Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions dracut/modules.d/99asahi-firmware/install-asahi-firmware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@
type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh

info ":: Asahi: Installing vendor firmware to root filesystem..."

if [ ! -d /sysroot/lib/firmware/vendor ]; then
warn ":: Asahi: Vendor firmware directory missing on the root filesystem!"
return 1
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.

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.

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.

fi

mount -t tmpfs -o mode=0755 vendorfw /sysroot/lib/firmware/vendor
cp -a /vendorfw/* /vendorfw/.vendorfw.manifest /sysroot/lib/firmware/vendor