Page MenuHomeFreeBSD

nanobsd: Add a provisional populate /cfg function
ClosedPublic

Authored by jlduran on Feb 1 2025, 4:25 AM.
Tags
None
Referenced Files
F157324326: D48791.id150334.diff
Wed, May 20, 8:31 AM
Unknown Object (File)
Sun, May 17, 2:31 PM
Unknown Object (File)
Tue, May 5, 6:00 AM
Unknown Object (File)
Sat, May 2, 5:37 PM
Unknown Object (File)
Fri, May 1, 6:34 AM
Unknown Object (File)
Mon, Apr 27, 5:54 PM
Unknown Object (File)
Mon, Apr 27, 11:21 AM
Unknown Object (File)
Mon, Apr 27, 10:54 AM
Subscribers
None

Details

Summary

Add a provisional _populate_cfg_part function. It populates the /cfg
partition, but using makefs(8), which is more in-line with what release
engineering uses to create images.

Test Plan
  1. The default, an empty /cfg slice:

    $ sh nanobsd.sh -U
  1. A custom /cfg slice (~/nanobsd/test/cfg/) without a metalog file (default user/group):

    $ mkdir -p ~/nanobsd/test $ echo "NANO_CFGDIR=$HOME/nanobsd/test/cfg" > ~/nanobsd/test/config.nano $ sh nanobsd.sh -U -c ~/nanobsd/test/config.nano
  1. A custom /cfg slice (~/nanobsd/test/cfg/) with a metalog file (~/nanobsd/test/metalog_cfg):

    $ mkdir -p ~/nanobsd/test $ echo "NANO_CFGDIR=$HOME/nanobsd/test/cfg" > ~/nanobsd/test/config.nano $ echo "NANO_METALOG_CFG=$HOME/nanobsd/test/metalog_cfg" >> ~/nanobsd/test/config.nano $ sh nanobsd.sh -U -c ~/nanobsd/test/config.nano
NOTE: Initially not wired, the -U flag is available later in the commit series.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable