svn commit: r221851 - head/tools/tools/nanobsd
Warner Losh
imp at FreeBSD.org
Fri May 13 18:36:25 UTC 2011
Author: imp
Date: Fri May 13 18:36:24 2011
New Revision: 221851
URL: http://svn.freebsd.org/changeset/base/221851
Log:
Implement -f to inhibit copying s1 partition out for speed.
(-z not taken from PR, it is no longer needed since we basically always
do that now)
PR: misc/151698
Submitted by: lev@
Modified:
head/tools/tools/nanobsd/nanobsd.sh
Modified: head/tools/tools/nanobsd/nanobsd.sh
==============================================================================
--- head/tools/tools/nanobsd/nanobsd.sh Fri May 13 18:28:25 2011 (r221850)
+++ head/tools/tools/nanobsd/nanobsd.sh Fri May 13 18:36:24 2011 (r221851)
@@ -567,8 +567,10 @@ create_i386_diskimage ( ) (
dd if=/dev/${MD} of=${IMG} bs=64k
fi
- echo "Writing out _.disk.image..."
- dd if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image bs=64k
+ if do_copyout_partition ; then
+ echo "Writing out _.disk.image..."
+ dd if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image bs=64k
+ fi
mdconfig -d -u $MD
trap - 1 2 15 EXIT
@@ -758,8 +760,9 @@ pprint() {
usage () {
(
- echo "Usage: $0 [-biknqvw] [-c config_file]"
+ echo "Usage: $0 [-bfiknqvw] [-c config_file]"
echo " -b suppress builds (both kernel and world)"
+ echo " -f suppress code slice extraction"
echo " -i suppress disk image build"
echo " -k suppress buildkernel"
echo " -n add -DNO_CLEAN to buildworld, buildkernel, etc"
@@ -778,9 +781,10 @@ do_clean=true
do_kernel=true
do_world=true
do_image=true
+do_copyout_partition=true
set +e
-args=`getopt bc:hiknqvw $*`
+args=`getopt bc:fhiknqvw $*`
if [ $? -ne 0 ] ; then
usage
exit 2
@@ -806,6 +810,10 @@ do
shift
shift
;;
+ -f)
+ do_copyout_partition=false
+ shift
+ ;;
-h)
usage
;;
More information about the svn-src-head
mailing list