Repository navigation
feat(dracut-install): only install requested firmwares with --hostonly - #2833
martinezjavier wants to merge 1 commit into
Conversation
Has https://lore.kernel.org/lkml/20261017142826.2668881-1-javierm@redhat.com/ already been merged, or are we sure that it'll be in its current form? Thanks |
|
@aafeijoo-suse sorry, I should had make clear in the PR comment. It needs to wait for the kernel patch to land and that is the reason why I opened as a draft. The Linux kernel maintainer said that he would like |
efb650b to
d5a8657
Compare
|
I've tested this MR on an AM625 BeaglePlay board with a patched kernel that exposes the requested firmware though sysfs entries: |
d5a8657 to
8c717f7
Compare
The --hostonly dracut option is used to generate smaller initramfs images, that are tailored to the running system. But one piece of information that has never been present is the set of firmware files requested by devices. The Linux kernel now exposes this information as sysfs entries, so it can be queried to only include the firmware files that are loaded in the host. Add a --sysfs-firmware option to dracut-install and a sysfs_firmware="yes" dracut.conf option, that can be used to opt-in using the sysfs entries as the source of information to gather the list of firmware files to include in the initramfs image. This option is only valid when used along --host-only, since --no-hostonly still includes all the firmware files that were defined in kernel modinfo. If a kernel does not expose requested firmware sysfs entries, the option is a no-op and the fallback is to just include all the firmware files that are defined in the kernel modules modinfo.
8c717f7 to
c9463e7
Compare
|
The failing checks don't seem to be related to the changes in this PR. |
The --hostonly dracut option is used to generate smaller initramfs images, that are tailored to the running system. But one piece of information that has never been present is the set of firmware files requested by devices.
The Linux kernel now exposes this information as sysfs entries, so it can be queried to only include the firmware files that are loaded in the host.
Add a --sysfs-firmware option to dracut-install and a sysfs_firmware="yes" dracut.conf option, that can be used to opt-in using the sysfs entries as the source of information to gather the list of firmware files to include in the initramfs image.
This option is only valid when used along --host-only, since --no-hostonly still includes all the firmware files that were defined in kernel modinfo. If a kernel does not expose requested firmware sysfs entries, the option is a no-op and the fallback is to just include all the firmware files that are defined in the kernel modules modinfo.