summaryrefslogtreecommitdiff
path: root/distrib/miniroot
diff options
context:
space:
mode:
authorKlemens Nanni <kn@cvs.openbsd.org>2024-05-12 19:47:15 +0000
committerKlemens Nanni <kn@cvs.openbsd.org>2024-05-12 19:47:15 +0000
commit8c1b22fd42e9f747a37395c8e16404918b5d4d5c (patch)
treeaf6d76cee8e6003d9bfd86914052cb69e05d95db /distrib/miniroot
parent0b1c98d1d3ebb9b04fa41ffb6babd917ee7fbc6e (diff)
Rerun installboot(8) after fw_update(8) to pick up Apple boot firmware
Firmware is fetched after bootstraps are installed, i.e. on fresh installs apple-boot is not there yet when installboot ought to place it onto the EFI System Partition. Rerun --only on Apple silicon-- to replace Asahi u-boot and boot straight into ours, nicely visible my different logo. Input sthen deraadt
Diffstat (limited to 'distrib/miniroot')
-rw-r--r--distrib/miniroot/install.sub9
1 files changed, 7 insertions, 2 deletions
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: