summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--distrib/arm64/ramdisk/install.md13
-rw-r--r--distrib/miniroot/install.sub9
2 files changed, 17 insertions, 5 deletions
diff --git a/distrib/arm64/ramdisk/install.md b/distrib/arm64/ramdisk/install.md
index 51d20be4079..535011f767e 100644
--- a/distrib/arm64/ramdisk/install.md
+++ b/distrib/arm64/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.49 2024/04/17 04:36:39 kn Exp $
+# $OpenBSD: install.md,v 1.50 2024/05/12 19:47:14 kn Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -39,10 +39,11 @@ MOUNT_ARGS_msdos="-o-l"
KEEP_EFI_SYS=false
md_installboot() {
- local _disk=$1 _chunks _bootdisk _mdec _plat
+ local _disk=$1 _reason=$2 _rerun=false _chunks _bootdisk _mdec _plat
case ${COMPATIBLE} in
- apple,*) _plat=apple;;
+ apple,*) _plat=apple
+ [[ $_reason == apple-boot ]] && _rerun=true;;
raspberrypi,*) _plat=rpi;;
esac
@@ -52,6 +53,8 @@ md_installboot() {
exit
fi
+ $_rerun && return
+
# Apply some final tweaks on selected platforms
_mdec=/usr/mdec/$_plat
@@ -83,6 +86,10 @@ md_installboot() {
esac
}
+md_fw() {
+ md_installboot "$@"
+}
+
md_prep_fdisk() {
local _disk=$1 _d _type=MBR
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index e0679456207..28144871bca 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,5 +1,5 @@
#!/bin/ksh
-# $OpenBSD: install.sub,v 1.1263 2024/03/15 17:31:21 kn Exp $
+# $OpenBSD: install.sub,v 1.1264 2024/05/12 19:47:14 kn Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
@@ -3011,7 +3011,11 @@ if ((${#_KERNV[*]} == 1)); then
fi
__EOT
- [ -x /mnt/usr/sbin/fw_update ] && DESTDIR=/mnt /mnt/usr/sbin/fw_update
+ if [[ -x /mnt/usr/sbin/fw_update ]]; then
+ DESTDIR=/mnt /mnt/usr/sbin/fw_update
+ # Rerun installboot(8) to pick up just fetched boot firmware.
+ typeset -f md_fw >/dev/null && md_fw $ROOTDISK apple-boot
+ fi
if [[ -f $_kernel_dir.tgz ]]; then
echo -n "Relinking to create unique kernel..."
@@ -3584,6 +3588,7 @@ umount -af >/dev/null 2>&1
# md_consoleinfo() - set CDEV, CTTY, CSPEED, CPROM
#
# The following functions can be provided if required:
+# md_fw() - device specific firmware quirks
# md_prep_fdisk() - put a partition table on the disk
#
# The following variables can be provided if required: