dracut: asahi-firmware: Configure the /lib/firmware/vendor path - #72
dracut: asahi-firmware: Configure the /lib/firmware/vendor path#72Conan-Kudo wants to merge 1 commit into
Conversation
This enables the running kernel to know it can load firmware from the path we install firmware data to after copying the staged data from the ESP location (which itself was installed there by the installer). Signed-off-by: Neal Gompa <neal@asahilinux.org>
jannau
left a comment
There was a problem hiding this comment.
Are dracut modules capable of adding kernel cmd line options? I think that's the more portable way considering we have firmware.cpio which some bootloaders will just append to the real initramfs. With that this is likely too late for built-in drivers which require firmware.
In any case this code needs to be in load-asahi-firmware.sh otherwise drivers loaded while the initramfs system is active will end up without firmware.
| fi | ||
|
|
||
| if [ -e /sys/module/firmware_class/parameters/path ]; then | ||
| echo -n /lib/firmware/vendor > /sys/module/firmware_class/parameters/path |
There was a problem hiding this comment.
I think a warning for the unlikely case that the path isn't empty/unset is warranted here.
| echo -n /lib/firmware/vendor > /sys/module/firmware_class/parameters/path | ||
| else | ||
| warn ":: Asahi: Vendor firmware directory unable to be configured!" | ||
| return 1 |
There was a problem hiding this comment.
Does the return 1 help debugging in any way? I would have copied the firmware anyway.
| if [ -e /sys/module/firmware_class/parameters/path ]; then | ||
| echo -n /lib/firmware/vendor > /sys/module/firmware_class/parameters/path | ||
| else | ||
| warn ":: Asahi: Vendor firmware directory unable to be configured!" |
There was a problem hiding this comment.
does dracut have error log messages? This should be one especially with with the return 1 below.
This enables the running kernel to know it can load firmware from the path we install firmware data to after copying the staged data from the ESP location (which itself was installed there by the installer).