Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Aug 2014 05:16:20 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r269423 - head/tools/tools/nanobsd
Message-ID:  <201408020516.s725GKNR040749@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Sat Aug  2 05:16:20 2014
New Revision: 269423
URL: http://svnweb.freebsd.org/changeset/base/269423

Log:
  Add a new -K to suppress installing the kernel. Useful for creating
  chroots that may never boot (such as build environments), or for
  platforms that don't really need the kernel installed into the
  filesystem.

Modified:
  head/tools/tools/nanobsd/nanobsd.sh

Modified: head/tools/tools/nanobsd/nanobsd.sh
==============================================================================
--- head/tools/tools/nanobsd/nanobsd.sh	Sat Aug  2 05:05:16 2014	(r269422)
+++ head/tools/tools/nanobsd/nanobsd.sh	Sat Aug  2 05:16:20 2014	(r269423)
@@ -895,10 +895,11 @@ pprint() (
 
 usage () {
 	(
-	echo "Usage: $0 [-bfiknqvw] [-c config_file]"
+	echo "Usage: $0 [-bfiKknqvw] [-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 installkernel"
 	echo "	-k	suppress buildkernel"
 	echo "	-n	add -DNO_CLEAN to buildworld, buildkernel, etc"
 	echo "	-q	make output more quiet"
@@ -914,12 +915,13 @@ usage () {
 
 do_clean=true
 do_kernel=true
+do_installkernel=true
 do_world=true
 do_image=true
 do_copyout_partition=true
 
 set +e
-args=`getopt bc:fhiknqvw $*`
+args=`getopt Kbc:fhiknqvw $*`
 if [ $? -ne 0 ] ; then
 	usage
 	exit 2
@@ -936,6 +938,10 @@ do
 		do_kernel=false
 		shift
 		;;
+	-K)
+		do_installkernel=false
+		shift
+		;;
 	-k)
 		do_kernel=false
 		shift
@@ -1083,7 +1089,11 @@ make_conf_install
 install_world
 install_etc
 setup_nanobsd_etc
-install_kernel
+if $do_installkernel ; then
+	install_kernel
+else
+	pprint 2 "Skipping installkernel (as instructed)"
+fi
 
 run_customize
 setup_nanobsd



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408020516.s725GKNR040749>