svn commit: r322254 - stable/11/usr.sbin/bsdinstall/scripts

Ed Maste emaste at FreeBSD.org
Tue Aug 8 13:44:34 UTC 2017


Author: emaste
Date: Tue Aug  8 13:44:32 2017
New Revision: 322254
URL: https://svnweb.freebsd.org/changeset/base/322254

Log:
  MFC r321734: bsdinstall: default to UEFI-only boot on arm64
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/11/usr.sbin/bsdinstall/scripts/zfsboot
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/bsdinstall/scripts/zfsboot
==============================================================================
--- stable/11/usr.sbin/bsdinstall/scripts/zfsboot	Tue Aug  8 13:27:32 2017	(r322253)
+++ stable/11/usr.sbin/bsdinstall/scripts/zfsboot	Tue Aug  8 13:44:32 2017	(r322254)
@@ -1554,17 +1554,27 @@ f_dprintf "BSDINSTALL_TMPETC=[%s]" "$BSDINSTALL_TMPETC
 f_dprintf "FSTAB_FMT=[%s]" "$FSTAB_FMT"
 
 #
-# If the system was booted with UEFI, set the default boot type to UEFI
+# Determine default boot type
 #
-bootmethod=$( sysctl -n machdep.bootmethod )
-f_dprintf "machdep.bootmethod=[%s]" "$bootmethod"
-if [ "$bootmethod" = "UEFI" ]; then
-	: ${ZFSBOOT_BOOT_TYPE:=BIOS+UEFI}
+case $(uname -m) in
+arm64)
+	# We support only UEFI boot for arm64
+	: ${ZFSBOOT_BOOT_TYPE:=UEFI}
 	: ${ZFSBOOT_PARTITION_SCHEME:=GPT}
-else
-	: ${ZFSBOOT_BOOT_TYPE:=BIOS}
-	: ${ZFSBOOT_PARTITION_SCHEME:=GPT}
-fi
+	;;
+*)
+	# If the system was booted with UEFI, set the default boot type to UEFI
+	bootmethod=$( sysctl -n machdep.bootmethod )
+	f_dprintf "machdep.bootmethod=[%s]" "$bootmethod"
+	if [ "$bootmethod" = "UEFI" ]; then
+		: ${ZFSBOOT_BOOT_TYPE:=BIOS+UEFI}
+		: ${ZFSBOOT_PARTITION_SCHEME:=GPT}
+	else
+		: ${ZFSBOOT_BOOT_TYPE:=BIOS}
+		: ${ZFSBOOT_PARTITION_SCHEME:=GPT}
+	fi
+	;;
+esac
 
 #
 # Loop over the main menu until we've accomplished what we came here to do


More information about the svn-src-all mailing list