Page MenuHomeFreeBSD

nanobsd: Add a provisional populate /cfg function
AcceptedPublic

Authored by jlduran on Feb 1 2025, 4:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 29, 5:11 PM
Unknown Object (File)
Thu, Nov 27, 11:23 PM
Unknown Object (File)
Thu, Nov 20, 6:06 PM
Unknown Object (File)
Mon, Nov 17, 12:14 PM
Unknown Object (File)
Tue, Nov 11, 1:26 PM
Unknown Object (File)
Oct 30 2025, 2:52 AM
Unknown Object (File)
Sep 17 2025, 12:17 PM
Unknown Object (File)
Sep 16 2025, 5:57 PM
Subscribers
None

Details

Reviewers
emaste
imp
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 62202
Build 59086: arc lint + arc unit