Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 May 2019 02:12:01 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r348145 - stable/12/tools/boot
Message-ID:  <201905230212.x4N2C1W6052191@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Thu May 23 02:12:00 2019
New Revision: 348145
URL: https://svnweb.freebsd.org/changeset/base/348145

Log:
  MFC r346652-r346654
  
  r346652:
  Complain and exit the script if the 'make install' phase fails.  Also,
  there is no need to install any debug files.
  
  r346653:
  The zfs module has grown a dependency on zcl_nfs4.ko, so copy it into all
  the test images.
  
  r346654:
  For the geli-gpt-zfs test images, both bios and uefi flavors, add a dummy
  ufs partition as p2, and put the zfs partition at p3, to test the ability
  of the zfs probe code to find a zfs pool on something other than the first
  partition.

Modified:
  stable/12/tools/boot/rootgen.sh
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/tools/boot/rootgen.sh
==============================================================================
--- stable/12/tools/boot/rootgen.sh	Thu May 23 02:10:41 2019	(r348144)
+++ stable/12/tools/boot/rootgen.sh	Thu May 23 02:12:00 2019	(r348145)
@@ -130,6 +130,7 @@ mk_nogeli_gpt_zfs_legacy() {
 zfs_load=YES
 opensolaris_load=YES
 EOF
+    cp /boot/kernel/acl_nfs4.ko ${mntpt}/boot/kernel/acl_nfs4.ko
     cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko
     cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko
     # end tweaks
@@ -168,6 +169,7 @@ mk_nogeli_gpt_zfs_uefi() {
 zfs_load=YES
 opensolaris_load=YES
 EOF
+    cp /boot/kernel/acl_nfs4.ko ${mntpt}/boot/kernel/acl_nfs4.ko
     cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko
     cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko
     # end tweaks
@@ -207,6 +209,7 @@ mk_nogeli_gpt_zfs_both() {
 zfs_load=YES
 opensolaris_load=YES
 EOF
+    cp /boot/kernel/acl_nfs4.ko ${mntpt}/boot/kernel/acl_nfs4.ko
     cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko
     cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko
     # end tweaks
@@ -288,6 +291,7 @@ mk_nogeli_mbr_zfs_legacy() {
 zfs_load=YES
 opensolaris_load=YES
 EOF
+    cp /boot/kernel/acl_nfs4.ko ${mntpt}/boot/kernel/acl_nfs4.ko
     cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko
     cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko
     # end tweaks
@@ -329,6 +333,7 @@ mk_nogeli_mbr_zfs_uefi() {
 zfs_load=YES
 opensolaris_load=YES
 EOF
+    cp /boot/kernel/acl_nfs4.ko ${mntpt}/boot/kernel/acl_nfs4.ko
     cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko
     cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko
     # end tweaks
@@ -370,6 +375,7 @@ mk_nogeli_mbr_zfs_both() {
 zfs_load=YES
 opensolaris_load=YES
 EOF
+    cp /boot/kernel/acl_nfs4.ko ${mntpt}/boot/kernel/acl_nfs4.ko
     cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko
     cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko
     # end tweaks
@@ -501,15 +507,20 @@ mk_geli_gpt_zfs_legacy() {
     bios=$7
     pool=geli-gpt-zfs-legacy
 
-    dd if=/dev/zero of=${img} count=1 seek=$(( 200 * 1024 * 1024 / 512 ))
+    # Note that in this flavor we create an empty p2 ufs partition, and put
+    # the bootable zfs stuff on p3, just to test the ability of the zfs probe
+    # probe routines to find a pool on a partition other than the first one.
+
+    dd if=/dev/zero of=${img} count=1 seek=$(( 300 * 1024 * 1024 / 512 ))
     md=$(mdconfig -f ${img})
     gpart create -s gpt ${md}
     gpart add -t freebsd-boot -s 400k -a 4k	${md}	# <= ~540k
+    gpart add -t freebsd-ufs -s 100m ${md}
     gpart add -t freebsd-zfs -l root $md
     # install-boot will make this bootable
-    echo ${passphrase} | geli init -bg -e AES-XTS -i ${iterations} -J - -l 256 -s 4096 ${md}p2
-    echo ${passphrase} | geli attach -j - ${md}p2
-    zpool create -O mountpoint=none -R ${mntpt} ${pool} ${md}p2.eli
+    echo ${passphrase} | geli init -bg -e AES-XTS -i ${iterations} -J - -l 256 -s 4096 ${md}p3
+    echo ${passphrase} | geli attach -j - ${md}p3
+    zpool create -O mountpoint=none -R ${mntpt} ${pool} ${md}p3.eli
     zpool set bootfs=${pool} ${pool}
     zfs create -po mountpoint=/ ${pool}/ROOT/default
     # NB: The online guides go nuts customizing /var and other mountpoints here, no need
@@ -520,6 +531,7 @@ zfs_load=YES
 opensolaris_load=YES
 geom_eli_load=YES
 EOF
+    cp /boot/kernel/acl_nfs4.ko ${mntpt}/boot/kernel/acl_nfs4.ko
     cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko
     cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko
     cp /boot/kernel/geom_eli.ko ${mntpt}/boot/kernel/geom_eli.ko
@@ -529,7 +541,7 @@ EOF
     zpool set bootfs=${pool}/ROOT/default ${pool}
     zpool set autoexpand=on ${pool}
     zpool export ${pool}
-    geli detach ${md}p2
+    geli detach ${md}p3
     ${SRCTOP}/tools/boot/install-boot.sh -g ${geli} -s ${scheme} -f ${fs} -b ${bios} -d ${src} ${md}
     mdconfig -d -u ${md}
 }
@@ -544,15 +556,20 @@ mk_geli_gpt_zfs_uefi() {
     bios=$7
     pool=geli-gpt-zfs-uefi
 
-    dd if=/dev/zero of=${img} count=1 seek=$(( 200 * 1024 * 1024 / 512 ))
+    # Note that in this flavor we create an empty p2 ufs partition, and put
+    # the bootable zfs stuff on p3, just to test the ability of the zfs probe
+    # probe routines to find a pool on a partition other than the first one.
+
+    dd if=/dev/zero of=${img} count=1 seek=$(( 300 * 1024 * 1024 / 512 ))
     md=$(mdconfig -f ${img})
     gpart create -s gpt ${md}
     gpart add -t efi -s 800k -a 4k ${md}
+    gpart add -t freebsd-ufs -s 100m ${md}
     gpart add -t freebsd-zfs -l root $md
     # install-boot will make this bootable
-    echo ${passphrase} | geli init -bg -e AES-XTS -i ${iterations} -J - -l 256 -s 4096 ${md}p2
-    echo ${passphrase} | geli attach -j - ${md}p2
-    zpool create -O mountpoint=none -R ${mntpt} ${pool} ${md}p2.eli
+    echo ${passphrase} | geli init -bg -e AES-XTS -i ${iterations} -J - -l 256 -s 4096 ${md}p3
+    echo ${passphrase} | geli attach -j - ${md}p3
+    zpool create -O mountpoint=none -R ${mntpt} ${pool} ${md}p3.eli
     zpool set bootfs=${pool} ${pool}
     zfs create -po mountpoint=/ ${pool}/ROOT/default
     # NB: The online guides go nuts customizing /var and other mountpoints here, no need
@@ -563,6 +580,7 @@ zfs_load=YES
 opensolaris_load=YES
 geom_eli_load=YES
 EOF
+    cp /boot/kernel/acl_nfs4.ko ${mntpt}/boot/kernel/acl_nfs4.ko
     cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko
     cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko
     cp /boot/kernel/geom_eli.ko ${mntpt}/boot/kernel/geom_eli.ko
@@ -572,7 +590,7 @@ EOF
     zpool set bootfs=${pool}/ROOT/default ${pool}
     zpool set autoexpand=on ${pool}
     zpool export ${pool}
-    geli detach ${md}p2
+    geli detach ${md}p3
     ${SRCTOP}/tools/boot/install-boot.sh -g ${geli} -s ${scheme} -f ${fs} -b ${bios} -d ${src} ${md}
     mdconfig -d -u ${md}
 }
@@ -607,6 +625,7 @@ zfs_load=YES
 opensolaris_load=YES
 geom_eli_load=YES
 EOF
+    cp /boot/kernel/acl_nfs4.ko ${mntpt}/boot/kernel/acl_nfs4.ko
     cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko
     cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko
     cp /boot/kernel/geom_eli.ko ${mntpt}/boot/kernel/geom_eli.ko
@@ -803,7 +822,11 @@ EOF
 # XXX
 cp /boot/device.hints ${DESTDIR}/boot/device.hints
 # Assume we're already built
-make install DESTDIR=${DESTDIR} MK_MAN=no MK_INSTALL_AS_USER=yes
+make install DESTDIR=${DESTDIR} MK_MAN=no MK_INSTALL_AS_USER=yes WITHOUT_DEBUG_FILES=yes
+if [ $? -ne 0 ]; then
+        echo "make install failed"
+        exit 1
+fi
 # Copy init, /bin/sh, minimal libraries and testing /etc/rc
 mkdir -p ${DESTDIR}/sbin ${DESTDIR}/bin \
       ${DESTDIR}/lib ${DESTDIR}/libexec \



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