The branch main has been updated by alfredo:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=b6644f529ca4c13975727c5625415fcc30c60af6

commit b6644f529ca4c13975727c5625415fcc30c60af6
Author:     Alfredo Dal'Ava Junior <alfr...@freebsd.org>
AuthorDate: 2021-11-26 00:02:53 +0000
Commit:     Alfredo Dal'Ava Junior <alfr...@freebsd.org>
CommitDate: 2021-11-26 00:02:53 +0000

    powerpc64: make autoboot possible on powernv machines
    
    It's required to specify a default boot option in order to make
    petitboot's autoboot feature work.
    
    Tested on Raptor Blackbird
    
    Reviewed by:    imp, luporl
    MFC after:      2 days
    Sponsored by:   Instituto de Pesquisas Eldorado (eldorado.org.br)
    Differential Revision:  https://reviews.freebsd.org/D32838
---
 usr.sbin/bsdinstall/scripts/bootconfig | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/usr.sbin/bsdinstall/scripts/bootconfig 
b/usr.sbin/bsdinstall/scripts/bootconfig
index c0a0ff4f77ee..c5218b10a271 100755
--- a/usr.sbin/bsdinstall/scripts/bootconfig
+++ b/usr.sbin/bsdinstall/scripts/bootconfig
@@ -27,6 +27,9 @@
 #
 # $FreeBSD$
 
+
+FREEBSD_BOOTLABEL="FreeBSD"
+
 BSDCFG_SHARE="/usr/share/bsdconfig"
 . $BSDCFG_SHARE/common.subr || exit 1
 
@@ -41,8 +44,10 @@ if [ `uname -m` == powerpc ]; then
        platform=`sysctl -n hw.platform`
        if [ "$platform" == ps3 -o "$platform" == powernv ]; then
                rootpart=$(awk '{ if($2 == "/") printf("%s:%s\n", $3, $1); }' 
$PATH_FSTAB)
+               kboot_conf=$BSDINSTALL_CHROOT/boot/etc/kboot.conf
                mkdir -p $BSDINSTALL_CHROOT/boot/etc/
-               echo FreeBSD=\'/kernel/kernel kernelname=/boot/kernel/kernel 
vfs.root.mountfrom=${rootpart}\' > $BSDINSTALL_CHROOT/boot/etc/kboot.conf
+               echo default=$FREEBSD_BOOTLABEL > $kboot_conf
+               echo $FREEBSD_BOOTLABEL=\'/kernel/kernel 
kernelname=/boot/kernel/kernel vfs.root.mountfrom=${rootpart}\' >> $kboot_conf
        fi
 fi
 
@@ -81,11 +86,9 @@ if [ -n "$(awk '{if ($2=="/boot/efi") printf("%s\n",$1);}' 
$PATH_FSTAB)" ]; then
                cp "$BSDINSTALL_CHROOT/boot/loader.efi" "${mntpt}/${BOOTNAME}"
        fi
 
-       bootlabel="FreeBSD"
-
        if [ "$BSDINSTALL_CONFIGCURRENT" ]; then
                f_dprintf "Creating UEFI boot entry"
-               efibootmgr --create --activate --label "$bootlabel" --loader 
"${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null
+               efibootmgr --create --activate --label "$FREEBSD_BOOTLABEL" 
--loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null
        fi
 
        f_dprintf "Finished configuring ESP"

Reply via email to