svn commit: r326756 - head/tools/tools/nanobsd
Warner Losh
imp at FreeBSD.org
Mon Dec 11 02:44:12 UTC 2017
Author: imp
Date: Mon Dec 11 02:44:10 2017
New Revision: 326756
URL: https://svnweb.freebsd.org/changeset/base/326756
Log:
Add -I to just run the imaging part of nanobsd so you can test out
changes to the packaging part of nanobsd more easily, or experiment
with the image contents w/o regenerating a whole new image tree. This
can save minutes when you don't need to do the installworld /
installkernel, etc.
Sponsored by: Netflix
Modified:
head/tools/tools/nanobsd/nanobsd.sh
Modified: head/tools/tools/nanobsd/nanobsd.sh
==============================================================================
--- head/tools/tools/nanobsd/nanobsd.sh Mon Dec 11 02:43:56 2017 (r326755)
+++ head/tools/tools/nanobsd/nanobsd.sh Mon Dec 11 02:44:10 2017 (r326756)
@@ -44,12 +44,13 @@ do_installworld=true
do_image=true
do_copyout_partition=true
do_native_xtools=false
+do_prep_image=true
# Pull in legacy stuff for now automatically
. "${topdir}/legacy.sh"
set +e
-args=`getopt BKXWbc:fhiknqvw $*`
+args=`getopt BKXWbc:fhiIknqvw $*`
if [ $? -ne 0 ] ; then
usage
exit 2
@@ -123,6 +124,15 @@ do
do_world=false
shift
;;
+ -I)
+ do_world=false
+ do_kernel=false
+ do_installworld=false
+ do_installkernel=false
+ do_prep_image=false
+ do_image=true
+ shift
+ ;;
--)
shift
break
@@ -184,21 +194,27 @@ else
pprint 2 "Skipping installworld (as instructed)"
fi
-if $do_native_xtools ; then
+if ${do_native_xtools} ; then
native_xtools
fi
-setup_nanobsd_etc
+if ${do_prep_image} ; then
+ setup_nanobsd_etc
+fi
if $do_installkernel ; then
install_kernel
else
pprint 2 "Skipping installkernel (as instructed)"
fi
-run_customize
-setup_nanobsd
-prune_usr
-run_late_customize
-fixup_before_diskimage
+if $do_prep_image ; then
+ run_customize
+ setup_nanobsd
+ prune_usr
+ run_late_customize
+ fixup_before_diskimage
+else
+ pprint 2 "Skipping image prep (as instructed)"
+fi
if $do_image ; then
create_diskimage
else
More information about the svn-src-all
mailing list