From owner-svn-src-head@freebsd.org Mon Dec 11 02:44:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84767E835C5; Mon, 11 Dec 2017 02:44:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 2BF6A6D4E0; Mon, 11 Dec 2017 02:44:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBB2iAIf073884; Mon, 11 Dec 2017 02:44:10 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBB2iATE073883; Mon, 11 Dec 2017 02:44:10 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712110244.vBB2iATE073883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 11 Dec 2017 02:44:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326756 - head/tools/tools/nanobsd X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/tools/nanobsd X-SVN-Commit-Revision: 326756 X-SVN-Commit-Repository: base 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.25 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: Mon, 11 Dec 2017 02:44:12 -0000 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