Skip to content

fix(monza): Add Monaco initramfs firmware overlay#305

Merged
Loïc Minier (lool) merged 1 commit into
qualcomm-linux:mainfrom
lool:monza-workaround-missing-firmware
Mar 5, 2026
Merged

fix(monza): Add Monaco initramfs firmware overlay#305
Loïc Minier (lool) merged 1 commit into
qualcomm-linux:mainfrom
lool:monza-workaround-missing-firmware

Conversation

@lool

Copy link
Copy Markdown
Contributor

Add workaround-initramfs-firmware-monaco overlay to ensure
Monaco-specific firmware files are included in the initramfs.

Use this workaround for linux-daily-monza images.

See #258

@gagath

Copy link
Copy Markdown
Contributor

Tip for shellcheck: use # shellcheck source=/dev/null above the source line like I did in #297

@lool Loïc Minier (lool) force-pushed the monza-workaround-missing-firmware branch from e51c8ec to 69c66d1 Compare March 3, 2026 15:52
@lool

Copy link
Copy Markdown
Contributor Author

Tip for shellcheck: use # shellcheck source=/dev/null above the source line like I did in #297

Done, thanks!

@lool

Copy link
Copy Markdown
Contributor Author

Koen Kooi (@koenkooi) I have a different set of files than yours; can you confirm?

@lool

Copy link
Copy Markdown
Contributor Author

I'm going to move this back to draft until Koen confirms the list of firmware that isn't loaded from initramfs-tools is critical for monza to work

@lool Loïc Minier (lool) marked this pull request as draft March 3, 2026 15:57
@github-actions

github-actions Bot commented Mar 3, 2026

Copy link
Copy Markdown

Test jobs for commit e51c8ec

@github-actions

github-actions Bot commented Mar 3, 2026

Copy link
Copy Markdown

Test Results

 2 files  ±0   6 suites  ±0   3m 2s ⏱️ ±0s
20 tests ±0  20 ✅ ±0  0 💤 ±0  0 ❌ ±0 
64 runs  ±0  64 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit c75cb67. ± Comparison against base commit ffe71f4.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Mar 3, 2026

Copy link
Copy Markdown

Test jobs for commit 69c66d1

@koenkooi

Copy link
Copy Markdown
Contributor

Koen Kooi (@koenkooi) I have a different set of files than yours; can you confirm?

I think I have the same list:

debian@thing:~$ cat /etc/dracut.conf.d/firmware.conf | sed 's:\ :\n:g' | grep lib
/lib/firmware/qcom/qcs8300/adsp.mbn
/lib/firmware/qcom/qcs8300/cdsp0.mbn
/lib/firmware/qcom/qcs8300/gpdsp0.mbn
/lib/firmware/qcom/qcs8300/qupv3fw.elf

@gagath Agathe Porte (gagath) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I really want the hook to fail if some of the firmware is not found instead of silently succeeding.

/lib/firmware/qcom/qcs8300/gpdsp0.mbn \
/lib/firmware/qcom/qcs8300/qupv3fw.elf
do
if [ -f "$fw" ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

don’t we want to fail if the firmware files are not present in the first place? this hook will silently fail if the files are not found

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I do not see this if removed from your last push?

@lool

Copy link
Copy Markdown
Contributor Author

Koen Kooi (@koenkooi) I have a different set of files than yours; can you confirm?

I think I have the same list:

debian@thing:~$ cat /etc/dracut.conf.d/firmware.conf | sed 's:\ :\n:g' | grep lib
/lib/firmware/qcom/qcs8300/adsp.mbn
/lib/firmware/qcom/qcs8300/cdsp0.mbn
/lib/firmware/qcom/qcs8300/gpdsp0.mbn
/lib/firmware/qcom/qcs8300/qupv3fw.elf

But you're testing with dracut, I'm interested in the initramfs-tools gaps

@lool

Copy link
Copy Markdown
Contributor Author

Ok, went through installing a kernel locally, and then the initrd contains more modules and they lack their firmware; boot results in:

Mar 04 13:01:38 debian kernel: geni_i2c a90000.i2c: Direct firmware load for qcom/qcs8300/qupv3fw.elf failed with error -2
Mar 04 13:01:38 debian kernel: geni_spi a88000.spi: Direct firmware load for qcom/qcs8300/qupv3fw.elf failed with error -2
Mar 04 13:01:38 debian kernel: remoteproc remoteproc0: Direct firmware load for qcom/qcs8300/adsp.mbn failed with error -2
Mar 04 13:01:38 debian kernel: remoteproc remoteproc1: Direct firmware load for qcom/qcs8300/gpdsp0.mbn failed with error -2
Mar 04 13:01:38 debian kernel: remoteproc remoteproc2: Direct firmware load for qcom/qcs8300/cdsp0.mbn failed with error -2
Mar 04 13:01:41 debian kernel: bluetooth hci0: Direct firmware load for qca/QCA2066/nvm_usb_00130201_gf_030b.bin failed with error -2

@lool Loïc Minier (lool) marked this pull request as ready for review March 4, 2026 13:50
@lool Loïc Minier (lool) force-pushed the monza-workaround-missing-firmware branch from 69c66d1 to c75cb67 Compare March 4, 2026 19:22
@lool

Copy link
Copy Markdown
Contributor Author

I really want the hook to fail if some of the firmware is not found instead of silently succeeding.

Changed to fail if missing; errors look like this:

root@debian:~# update-initramfs -u
update-initramfs: Generating /boot/initrd.img-6.19.5-gb6d81b5a6968
W: Possible missing firmware /lib/firmware/microchip/mscc_vsc8574_revb_int8051_29e8.bin for built-in driver mscc
W: Possible missing firmware /lib/firmware/microchip/mscc_vsc8584_revb_int8051_fb48.bin for built-in driver mscc
W: Possible missing firmware /lib/firmware/r8a779x_usb3_v3.dlmem for built-in driver xhci_rcar_hcd
W: Possible missing firmware /lib/firmware/r8a779x_usb3_v1.dlmem for built-in driver xhci_rcar_hcd
W: Possible missing firmware /lib/firmware/nvidia/tegra194/xusb.bin for built-in driver xhci_tegra
W: Possible missing firmware /lib/firmware/nvidia/tegra186/xusb.bin for built-in driver xhci_tegra
W: Possible missing firmware /lib/firmware/nvidia/tegra210/xusb.bin for built-in driver xhci_tegra
W: Possible missing firmware /lib/firmware/nvidia/tegra124/xusb.bin for built-in driver xhci_tegra
ERROR: Required firmware file not found: /lib/firmware/qcom/qcs8300/qupv3fw.elf2
E: /etc/initramfs-tools/hooks/qcom-monaco-firmware failed with return 1.
update-initramfs: failed for /boot/initrd.img-6.19.5-gb6d81b5a6968 with 1.

Tested the latest version, here's the different between initramfs from pre-built image, and after running update-initramfs -u:

root@debian:~# diff pre post
64a65,66
> usr/lib/aarch64-linux-gnu/libcom_err.so.2
> usr/lib/aarch64-linux-gnu/libcom_err.so.2.1
68a71,74
> usr/lib/aarch64-linux-gnu/libe2p.so.2
> usr/lib/aarch64-linux-gnu/libe2p.so.2.3
> usr/lib/aarch64-linux-gnu/libext2fs.so.2
> usr/lib/aarch64-linux-gnu/libext2fs.so.2.4
87a94,95
> usr/lib/aarch64-linux-gnu/libuuid.so.1
> usr/lib/aarch64-linux-gnu/libuuid.so.1.3.0
93a102,108
> usr/lib/firmware
> usr/lib/firmware/qcom
> usr/lib/firmware/qcom/qcs8300
> usr/lib/firmware/qcom/qcs8300/adsp.mbn
> usr/lib/firmware/qcom/qcs8300/cdsp0.mbn
> usr/lib/firmware/qcom/qcs8300/gpdsp0.mbn
> usr/lib/firmware/qcom/qcs8300/qupv3fw.elf
599a615,619
> usr/lib/modules/6.19.5-gb6d81b5a6968/kernel/drivers/remoteproc/qcom_common.ko
> usr/lib/modules/6.19.5-gb6d81b5a6968/kernel/drivers/remoteproc/qcom_pil_info.ko
> usr/lib/modules/6.19.5-gb6d81b5a6968/kernel/drivers/remoteproc/qcom_q6v5.ko
> usr/lib/modules/6.19.5-gb6d81b5a6968/kernel/drivers/remoteproc/qcom_q6v5_pas.ko
> usr/lib/modules/6.19.5-gb6d81b5a6968/kernel/drivers/remoteproc/qcom_sysmon.ko
835a856,859
> usr/sbin/e2fsck
> usr/sbin/fsck
> usr/sbin/fsck.ext4
> usr/sbin/logsave

@github-actions

github-actions Bot commented Mar 4, 2026

Copy link
Copy Markdown

Test jobs for commit c75cb67

@gagath

Copy link
Copy Markdown
Contributor

Github says there are no changes between commits after your last push, can you check that you added your changes? I am expecting for the if to be gone in order to approve the PR.

Add workaround-initramfs-firmware-monaco overlay to ensure
Monaco-specific firmware files are included in the initramfs.

Use this workaround for linux-daily-monza images.

See qualcomm-linux#258

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
@lool

Copy link
Copy Markdown
Contributor Author

Github says there are no changes between commits after your last push, can you check that you added your changes? I am expecting for the if to be gone in order to approve the PR.

Urgh, pushed again, sorry

@lool Loïc Minier (lool) force-pushed the monza-workaround-missing-firmware branch from c75cb67 to b3920c8 Compare March 5, 2026 17:51
@lool Loïc Minier (lool) merged commit 95081ca into qualcomm-linux:main Mar 5, 2026
12 checks passed
@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown

Test jobs for commit b3920c8

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.

3 participants