AsahiLinux / asahi-scripts

Miscellaneous admin scripts for the Asahi Linux reference distro
MIT License
45 stars 32 forks source link

resolved issue with dracut module #16

Closed leifliddy closed 1 year ago

leifliddy commented 1 year ago

ref issue: https://github.com/AsahiLinux/asahi-scripts/issues/15

inst_dir needs to create /lib/firmware/vendor

 install() {
-    inst_dir "/lib/firmware"
+    inst_dir "/lib/firmware/vendor"
     ln_r "/lib/firmware/vendor" "/vendorfw"

Otherwise ln_r "/lib/firmware/vendor" "/vendorfw" will point to a non-existent directory
....and firmware.cpio can't be extracted to a non-existent directory.

Also, I fail to see how

 [ -e /vendorfw ]; then
    info ":: Asahi: Vendor firmware was loaded by the bootloader"
    return 0
fi

...is somehow validating that the firmware has been loaded.
That's just a symlink to /lib/firmware/vendor
But maybe I'm missing something??

How are we meant to verify that the firmware has been loaded?
Or should we just be extracting firmware.cpio on every boot?

marcan commented 1 year ago

You have this backwards. The symlink is supposed to be /lib/firmware/vendor -> /vendorfw, and /vendorfw is not supposed to exist.

In other words, the actual problem is that the ln_r is backwards.