Created attachment 179650 [details]
Patch to fix the missing "-a" flag on mkimg commands
/usr/src/tools/tools/nanobsd/embedded/common contains a series of sections that use the "mkimg" command to make the disk image. This command includes a switch (-a) to make the active partition that is *not* present in other than -HEAD, and thus the command fails.
A workaround is available by using mdconfig to mount the image after it is built and set the active flag using gpart. Patch attached to (1) delete the missing "-a" flag from the mkimg command and (2) mount and image and use gpart to set the active flag instead.
A commit references this bug:
Date: Mon Feb 6 06:15:39 UTC 2017
New revision: 313326
o Add mkimg to the cross tools, and use the TMPPATH as PATH to pick up
mkimg for building on systems like FreeBSD 11.0 that don't have my
o Set NANO_ROOT and NANO_ALTROOT for std-* since their values don't
change when we set NANO_SLICE*.