From owner-svn-src-stable-11@freebsd.org Tue Aug 8 13:44:34 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03380DB4492; Tue, 8 Aug 2017 13:44:34 +0000 (UTC) (envelope-from emaste@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 mx1.freebsd.org (Postfix) with ESMTPS id C57393AA6; Tue, 8 Aug 2017 13:44:33 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v78DiWs1005117; Tue, 8 Aug 2017 13:44:32 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v78DiW2O005116; Tue, 8 Aug 2017 13:44:32 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201708081344.v78DiW2O005116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 8 Aug 2017 13:44:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r322254 - stable/11/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 322254 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Aug 2017 13:44:34 -0000 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