From owner-svn-src-head@freebsd.org Mon Dec 11 02:43:57 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 B27CBE8357B; Mon, 11 Dec 2017 02:43:57 +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 7F8696D3A3; Mon, 11 Dec 2017 02:43:57 +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 vBB2huWf073807; Mon, 11 Dec 2017 02:43:56 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBB2huUg073806; Mon, 11 Dec 2017 02:43:56 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712110243.vBB2huUg073806@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:43:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326755 - head/tools/tools/nanobsd/embedded X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/tools/nanobsd/embedded X-SVN-Commit-Revision: 326755 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:43:57 -0000 Author: imp Date: Mon Dec 11 02:43:56 2017 New Revision: 326755 URL: https://svnweb.freebsd.org/changeset/base/326755 Log: Fix the std-x86 layout to produce a bootable system. Due to limitations in mkimg we're still not quite to where I'd like to be (I'd like to put s3 first on the disk, then s1, but mkimg won't allow that currently). However, the resulting image now boots with qemu using: qemu-system-x86_64 -hdd $file -serial telnet::4444,server -nographic We'll need tweaks to create a specialized /etc/rc.d/growfs that can create a properly grown image for either the simple or ping-pong cases, but that will be later. Switched to pure serial console (-h) instead of video or serial (-P) since that fits this usecase better. Sponsored by: Netflix Modified: head/tools/tools/nanobsd/embedded/common Modified: head/tools/tools/nanobsd/embedded/common ============================================================================== --- head/tools/tools/nanobsd/embedded/common Sun Dec 10 23:06:45 2017 (r326754) +++ head/tools/tools/nanobsd/embedded/common Mon Dec 11 02:43:56 2017 (r326755) @@ -76,7 +76,7 @@ fi NANO_SLICE_FAT_SIZE=32m NANO_SLICE_CFG_SIZE=32m -NANO_BOOT2CFG="-P -S115200" +NANO_BOOT2CFG="-h -S115200" NANO_RAM_ETCSIZE=8192 NANO_RAM_TMPVARSIZE=8192 @@ -289,11 +289,13 @@ create_diskimage_mbr ( ) ( -o ${out} ;; std-x86) - # s1 is cfg, s2 is /, not sure how to make that - # boot (marked as active) with mkimg yet - mkimg -a 2 ${fmtarg} ${bootmbr} -s mbr -p ${s1}:=${NANO_LOG}/_.s1 \ - -p ${s2}:=${NANO_LOG}/_.s2 \ + # s3 is cfg, s1 is /, s2 is other / (s2 is created in first boot script) + mkimg -a 1 ${fmtarg} ${bootmbr} -s mbr -p ${s1}:=${NANO_LOG}/_.s1 \ + -p- \ + -p ${s3}:=${NANO_LOG}/_.s3 \ -o ${out} + + ;; std-uefi) # s1 is boot, s2 is cfg, s3 is /, not sure how to make that @@ -615,9 +617,9 @@ std-embedded) NANO_ALTROOT=${NANO_SLICE_ALTROOT}a ;; std-x86) - NANO_SLICE_CFG=s1 - NANO_SLICE_ROOT=s2 - NANO_SLICE_ALTROOT=s3 + NANO_SLICE_CFG=s3 + NANO_SLICE_ROOT=s1 + NANO_SLICE_ALTROOT=s2 NANO_ROOT=${NANO_SLICE_ROOT}a NANO_ALTROOT=${NANO_SLICE_ALTROOT}a ;;