From owner-svn-src-head@FreeBSD.ORG Sat Aug 2 05:16:20 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2BD1D49; Sat, 2 Aug 2014 05:16:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0BAC2A79; Sat, 2 Aug 2014 05:16:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s725GKdP040750; Sat, 2 Aug 2014 05:16:20 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s725GKNR040749; Sat, 2 Aug 2014 05:16:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201408020516.s725GKNR040749@svn.freebsd.org> From: Warner Losh Date: Sat, 2 Aug 2014 05:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269423 - head/tools/tools/nanobsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Aug 2014 05:16:20 -0000 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