From: kettenis Date: Sat, 3 Sep 2022 08:37:36 +0000 (+0000) Subject: Copy Apple touchpad firmware on machines that need it. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ce015b32c4022cf2a6d8afd44dc154f1c9a09c21;p=openbsd Copy Apple touchpad firmware on machines that need it. ok kn@, deraadt@ --- diff --git a/distrib/arm64/ramdisk/install.md b/distrib/arm64/ramdisk/install.md index cd160857e92..f7a308ae21d 100644 --- a/distrib/arm64/ramdisk/install.md +++ b/distrib/arm64/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.32 2022/08/07 03:22:29 deraadt Exp $ +# $OpenBSD: install.md,v 1.33 2022/09/03 08:37:36 kettenis Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -55,6 +55,10 @@ md_installboot() { case $_plat in apple) + if [[ -d /etc/firmware/apple ]]; then + (cd /etc/firmware + pax -rw apple /mnt/etc/firmware) + fi if [[ -d /etc/firmware/apple-bwfm ]]; then (cd /etc/firmware pax -rw apple-bwfm /mnt/etc/firmware) @@ -211,12 +215,16 @@ md_consoleinfo() { _fw=$(dmesgtail | sed -n '\!^bwfm0: failed!{s!^.*/\(.*\),.*$!\1!p;q;}') case $(sysctl -n machdep.compatible) in apple,*) + _fw2=$(sysctl -n machdep.compatible | sed 's/.*apple,//') make_dev sd0 if mount -o ro /dev/sd0l /mnt2 2>/dev/null; then - rm -rf /usr/mdec/rpi /etc/firmware/brcm /etc/firmware/apple-bwfm + rm -rf /usr/mdec/rpi /etc/firmware/apple + rm -rf /etc/firmware/brcm /etc/firmware/apple-bwfm if [[ -s /mnt2/vendorfw/firmware.tar ]]; then tar -x -C /etc/firmware \ -f /mnt2/vendorfw/firmware.tar "*$_fw*" + tar -x -C /etc/firmware \ + -f /mnt2/vendorfw/firmware.tar "*$_fw2*" mv /etc/firmware/brcm /etc/firmware/apple-bwfm fi umount /mnt2