diff options
author | emaste <emaste@FreeBSD.org> | 2017-08-08 13:44:32 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2017-08-08 13:44:32 +0000 |
commit | 1a55566fb3b7a51aa48ed2a272c96167d2265404 (patch) | |
tree | 9a0467a4f2e2b254e26415d693629f812bbb1ffd /usr.sbin | |
parent | a6b39bb9e47f5d975d99196ea1862c50db1ea74f (diff) | |
download | FreeBSD-src-1a55566fb3b7a51aa48ed2a272c96167d2265404.zip FreeBSD-src-1a55566fb3b7a51aa48ed2a272c96167d2265404.tar.gz |
MFC r321734: bsdinstall: default to UEFI-only boot on arm64
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'usr.sbin')
-rwxr-xr-x | usr.sbin/bsdinstall/scripts/zfsboot | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index 36b136c..49a1af3 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -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 |