Use installboot(8) on arm64 ramdisks like we do for amd64.
authorkettenis <kettenis@openbsd.org>
Sun, 6 Jun 2021 18:58:14 +0000 (18:58 +0000)
committerkettenis <kettenis@openbsd.org>
Sun, 6 Jun 2021 18:58:14 +0000 (18:58 +0000)
ok krw@

distrib/arm64/ramdisk/install.md
distrib/arm64/ramdisk/list

index 957ca68..f444ea7 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: install.md,v 1.17 2021/06/03 17:08:56 kettenis Exp $
+#      $OpenBSD: install.md,v 1.18 2021/06/06 18:58:14 kettenis Exp $
 #
 #
 # Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -44,10 +44,14 @@ md_installboot() {
        raspberrypi,*)          _plat=rpi;
        esac
 
-       # Mount MSDOS partition, extract U-Boot and copy UEFI boot program
+       if ! installboot -r /mnt ${1}; then
+               echo "\nFailed to install bootblocks."
+               echo "You will not be able to boot OpenBSD from ${1}."
+               exit
+       fi
+
+       # Mount MSDOS partition to do some final tweaks
        mount ${MOUNT_ARGS_msdos} ${_disk}i /mnt/mnt
-       mkdir -p /mnt/mnt/efi/boot
-       cp /mnt/usr/mdec/BOOTAA64.EFI /mnt/mnt/efi/boot/bootaa64.efi
        echo bootaa64.efi > /mnt/mnt/efi/boot/startup.nsh
 
        _mdec=/usr/mdec/$_plat
index f6b1356..500669d 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: list,v 1.14 2021/04/17 21:19:40 sthen Exp $
+#      $OpenBSD: list,v 1.15 2021/06/06 18:58:14 kettenis Exp $
 
 SRCDIRS distrib/special
 
@@ -61,6 +61,7 @@ LINK  instbin                                 usr/bin/sed
 LINK   instbin                                 usr/bin/signify
 LINK   instbin                                 usr/bin/tee
 LINK   instbin                                 usr/sbin/chroot
+LINK   instbin                                 usr/sbin/installboot
 LINK   instbin                                 usr/sbin/pwd_mkdb
 ARGVLINK ksh                                   -sh
 SPECIAL        rm bin/md5