Skip to content

Commit c6dce3d

Browse files
committed
Drop update-vendor-firmware
This is no longer needed, since we can just unconditionally unpack the firmware.cpio in the initramfs hook the same way the kernel would have. We still need the functions.sh for the ESP mount functionality. Signed-off-by: Hector Martin <[email protected]>
1 parent 6eb1349 commit c6dce3d

4 files changed

Lines changed: 21 additions & 90 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PREFIX=/usr/local
22
CONFIG_DIR=/etc/default
33
BIN_DIR=$(PREFIX)/bin
4-
SCRIPTS=update-vendor-firmware update-m1n1
4+
SCRIPTS=update-m1n1
55
ARCH_SCRIPTS=update-grub first-boot
66
UNITS=first-boot.service
77
MULTI_USER_WANTS=first-boot.service

initcpio/hooks/asahi

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,26 @@ run_earlyhook() {
2727
fi
2828

2929
# If the above exists, hopefully the /dev device exists and this will work
30+
3031
msg ":: Asahi: Unpacking vendor firmware into initramfs..."
31-
mkdir -p /vendorfw
32-
TARGET=/vendorfw ash /usr/bin/update-vendor-firmware
32+
33+
VENDORFW="/run/.system-efi/vendorfw/"
34+
35+
(
36+
. /usr/share/asahi-scripts/functions.sh
37+
mount_sys_esp /run/.system-efi
38+
)
39+
40+
if [ ! -e "$VENDORFW/firmware.cpio" ]; then
41+
msg ":: Asahi: Vendor firmware not available in ESP!"
42+
umount /run/.system-efi
43+
return 1
44+
fi
45+
46+
( cd /; cpio -i < "$VENDORFW/firmware.cpio" )
47+
umount /run/.system-efi
48+
49+
msg ":: Asahi: Vendor firmware unpacked successfully"
3350
}
3451

3552
run_latehook() {

initcpio/install/asahi

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ build() {
3030
# For MTP HID
3131
map add_module apple-dockchannel? dockchannel-hid? apple-rtkit-helper?
3232

33-
# asahi-scripts dependencies
33+
# Hook dependencies
3434
add_full_dir /usr/share/asahi-scripts
35-
add_binary /usr/bin/update-vendor-firmware
36-
add_binary /usr/bin/comm
3735

3836
# Firmware update script
3937
add_runscript

update-vendor-firmware

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)