Skip to content

dracut: asahi-firmware: Configure the /lib/firmware/vendor path - #72

Open
Conan-Kudo wants to merge 1 commit into
AsahiLinux:mainfrom
Conan-Kudo:dracut-use-fwpathpara
Open

dracut: asahi-firmware: Configure the /lib/firmware/vendor path#72
Conan-Kudo wants to merge 1 commit into
AsahiLinux:mainfrom
Conan-Kudo:dracut-use-fwpathpara

Conversation

@Conan-Kudo

Copy link
Copy Markdown
Member

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).

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 jannau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does dracut have error log messages? This should be one especially with with the return 1 below.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants