From owner-svn-src-head@freebsd.org Mon Feb 5 00:18:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 888B8EDF3D0; Mon, 5 Feb 2018 00:18:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3AEE579160; Mon, 5 Feb 2018 00:18:22 +0000 (UTC) (envelope-from marius@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3127821416; Mon, 5 Feb 2018 00:18:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w150IMwv047655; Mon, 5 Feb 2018 00:18:22 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w150ILoi047653; Mon, 5 Feb 2018 00:18:21 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201802050018.w150ILoi047653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Mon, 5 Feb 2018 00:18:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328865 - head/tools/boot X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/tools/boot X-SVN-Commit-Revision: 328865 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, 05 Feb 2018 00:18:22 -0000 Author: marius Date: Mon Feb 5 00:18:21 2018 New Revision: 328865 URL: https://svnweb.freebsd.org/changeset/base/328865 Log: Flesh out the creation of sparc64 UFS images. This has only been verified to yield working images in a native build as rootgen.sh generally doesn't support cross-testing so far. Modified: head/tools/boot/install-boot.sh head/tools/boot/rootgen.sh Modified: head/tools/boot/install-boot.sh ============================================================================== --- head/tools/boot/install-boot.sh Sun Feb 4 23:01:48 2018 (r328864) +++ head/tools/boot/install-boot.sh Mon Feb 5 00:18:21 2018 (r328865) @@ -78,12 +78,22 @@ boot_nogeli_mbr_ufs_legacy() { doit gpart bootcode -b ${mbr0} ${dev} s=$(findpart $dev "freebsd-ufs") if [ -z "$s" ] ; then - die "No freebsd-zfs slice found" + die "No freebsd-ufs slice found" fi doit gpart bootcode -p ${mbr2} ${dev}s${s} exit 0 } +boot_nogeli_vtoc8_ufs_ofw() { + dev=$1 + dst=$2 + + # For non-native builds, ensure that geom_part(4) supports VTOC8. + kldload geom_part_vtoc8.ko + doit gpart bootcode -p ${vtoc8} ${dev} + exit 0 +} + DESTDIR=/ # Note: we really don't support geli boot in this script yet. @@ -127,6 +137,9 @@ gptzfs2=${DESTDIR}/boot/gptzfsboot # For MBR, we have lots of choices, but select boot0 mbr0=${DESTDIR}/boot/boot0 mbr2=${DESTDIR}/boot/boot + +# VTOC8 +vtoc8=${DESTDIR}/boot/boot1 # sanity check here Modified: head/tools/boot/rootgen.sh ============================================================================== --- head/tools/boot/rootgen.sh Sun Feb 4 23:01:48 2018 (r328864) +++ head/tools/boot/rootgen.sh Mon Feb 5 00:18:21 2018 (r328865) @@ -193,6 +193,29 @@ mk_geli_mbr_zfs_both() { # u-boot # powerpc +mk_sparc64_nogeli_vtoc8_ufs_ofw() { + src=$1 + img=$2 + mntpt=$3 + geli=$4 + scheme=$5 + fs=$6 + bios=$7 + + cat > ${src}/etc/fstab < ${DESTDIR}/boot.config # XXX @@ -396,18 +420,21 @@ for arch in powerpc powerpc64; do done for arch in sparc64; do - for scheme in sun; do - fs=ufs - for bios in ofw; do - # Create sparse file and mount newly created filesystem(s) on it - img=${IMGDIR}/${arch}-${geli}-${scheme}-${fs}-${bios}.img - sh=${IMGDIR}/${arch}-${geli}-${scheme}-${fs}-${bios}.sh - echo "vvvvvvvvvvvvvvvvvvvvvv Creating $img vvvvvvvvvvvvvvvvvvvvvvv" - rm -f ${img}* - eval mk_${geli}_${scheme}_${fs}_${bios} ${DESTDIR} ${img} ${MNTPT} ${geli} ${scheme} ${fs} ${bios} - eval qemu_${arch}_${bios} ${img} ${sh} - [ -n "${SUDO_USER}" ] && chown ${SUDO_USER} ${img}* - echo "^^^^^^^^^^^^^^^^^^^^^^ Creating $img ^^^^^^^^^^^^^^^^^^^^^^^" + for geli in nogeli; do + for scheme in vtoc8; do + for fs in ufs; do + for bios in ofw; do + # Create sparse file and mount newly created filesystem(s) on it + img=${IMGDIR}/${arch}-${geli}-${scheme}-${fs}-${bios}.img + sh=${IMGDIR}/${arch}-${geli}-${scheme}-${fs}-${bios}.sh + echo "vvvvvvvvvvvvvvvvvvvvvv Creating $img vvvvvvvvvvvvvvvvvvvvvvv" + rm -f ${img}* + eval mk_${arch}_${geli}_${scheme}_${fs}_${bios} ${DESTDIR} ${img} ${MNTPT} ${geli} ${scheme} ${fs} ${bios} + eval qemu_${arch}_${bios} ${img} ${sh} + [ -n "${SUDO_USER}" ] && chown ${SUDO_USER} ${img}* + echo "^^^^^^^^^^^^^^^^^^^^^^ Creating $img ^^^^^^^^^^^^^^^^^^^^^^^" + done + done done done done