add module to add fw files from DT firmware-name properties

Devicetree based platforms may need board / model specific firmwares in the initrd.

E.g. on Qualcomm Snapdragon X1e Windows (WoA) laptops the qcom_q6v5_pas ADSP driver gets added to the initrd because dracut includes all pinctrl drivers in the initrd and the 6e80000.pinctrl lpass-lpi-pinctrl device has a supplier:platform:6800000.remoteproc symlink, dragging the ADSP driver into the initrd.

The ADSP driver tries to load model-specific firmware files with the filenames to use specified in a devicetree firmware-name properties.

This module adds support for retrieving the firmware-names from these devicetree properties and adding the firmware files to the initrd.

The ADSP driver, being a remoteproc driver does bind even without the firmware files, operating in a degraded mode. This means e.g. no battery readings and no working audio, since both depend on the ADSP. These firmware files need to be in the initrd to avoid this degraded mode.

The ADSP driver getting brought into the initrd is actually a good thing, since the ADSP also controls the Type-C PD-controller(s) and when the firmware is present and loaded this results in a reset of all Type-C USB ports, so this needs to happen early on, to e.g. avoid USB-storage devices getting disconnected and filesystems on top getting in a broken state.

This is a port from dracut to initramfs-tools: https://github.com/dracut-ng/dracut-ng/commit/725fe30be562e9c5567137f1351ae8c5af0ed422

Resolves: https://github.com/dracut-ng/dracut-ng/issues/722
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2275920
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2455055

Merge request reports

Loading