summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2011-05-13 18:36:24 +0000
committerimp <imp@FreeBSD.org>2011-05-13 18:36:24 +0000
commit733bbac7ce4efe0669bf91a4ea3925a7aa793b71 (patch)
tree604ed802293fe571d1f5814e06d06c5953903870 /tools
parent6fa2130df3462d64f97645eadb8e538f67b22956 (diff)
downloadFreeBSD-src-733bbac7ce4efe0669bf91a4ea3925a7aa793b71.zip
FreeBSD-src-733bbac7ce4efe0669bf91a4ea3925a7aa793b71.tar.gz
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@
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/nanobsd/nanobsd.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/tools/tools/nanobsd/nanobsd.sh b/tools/tools/nanobsd/nanobsd.sh
index 2944e53..98184a8 100644
--- a/tools/tools/nanobsd/nanobsd.sh
+++ b/tools/tools/nanobsd/nanobsd.sh
@@ -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
;;
OpenPOWER on IntegriCloud