]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
nanobsd: Use gpart and create code image before full disk image
authorArrigo Marchiori <ardovm@yahoo.it>
Thu, 15 Jul 2021 22:06:51 +0000 (16:06 -0600)
committerWarner Losh <imp@FreeBSD.org>
Wed, 21 Jul 2021 16:13:11 +0000 (10:13 -0600)
commit50b2e5d608d2d8876af2a8d4e5c4e60867f9ad96
treee46ba5973ea0f5c704ed43e20a00981a7d64d3eb
parent5ad4296780ded135e8cd48a3877b52c4a7f4cb1d
nanobsd: Use gpart and create code image before full disk image

The attached patch brings two main changes to the nanobsd script:
 1- gpart is used instead of fdisk;
 2- the code image is created first, and then used to ``assemble'' the
    full disk image.

The patch was first proposed on the freebsd-embedded list:
http://lists.freebsd.org/pipermail/freebsd-embedded/2012-June/001580.html
and is currently under discussion:
http://lists.freebsd.org/pipermail/freebsd-embedded/2014-January/002216.html

Another effect is that the -f option ("suppress code slice extraction")
now imples the -i option ("suppress disk image build").

imp@ applied Patch by hand to new legacy.sh, plus tweaked for NANO_LOG vs
NANO_OBJ confusion in original.

PR: 186030
Reviewed by: imp@
Differential Revision: https://reviews.freebsd.org/D31102

(cherry picked from commit 587c054bea0f652fdbd86baf5807f21c904ac2ad)
tools/tools/nanobsd/defaults.sh
tools/tools/nanobsd/legacy.sh
tools/tools/nanobsd/nanobsd.sh