Skip to content

feat: add missing Lenovo T14s firmware in initramfs#297

Open
gagath wants to merge 1 commit into
qualcomm-linux:mainfrom
gagath:add-missing-initramfs-firmware
Open

feat: add missing Lenovo T14s firmware in initramfs#297
gagath wants to merge 1 commit into
qualcomm-linux:mainfrom
gagath:add-missing-initramfs-firmware

Conversation

@gagath
Copy link
Copy Markdown
Contributor

@gagath gagath commented Mar 2, 2026

Add missing firmware into initramfs to make the sound and battery work on Lenovo T14s.

Closes: #258

Copy link
Copy Markdown
Contributor

@lool lool left a comment

Choose a reason for hiding this comment

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

I know this is still draft, generally ok with the changes, but I'd suggest renaming the overlay for the function it's achieving, e.g. "t14s-initramfs-firmware" and adding a more verbose version in the recipe (perhaps with a link to the issue we need to fix for this to go away).

@gagath gagath force-pushed the add-missing-initramfs-firmware branch from 1833a5b to 63dc827 Compare March 3, 2026 08:46
@gagath
Copy link
Copy Markdown
Contributor Author

gagath commented Mar 3, 2026

I know this is still draft, generally ok with the changes, but I'd suggest renaming the overlay for the function it's achieving, e.g. "t14s-initramfs-firmware" and adding a more verbose version in the recipe (perhaps with a link to the issue we need to fix for this to go away).

Thanks for the suggestion, I renamed the overlay and added more comments in the recipe for context. I will mark this as ready for review once I test-boot it and confirm that the battery reporting works from the generated image.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 3, 2026

Test Results

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

Results for commit 99be001. ± Comparison against base commit 8d60a5d.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 3, 2026

Test jobs for commit 63dc827

@lool
Copy link
Copy Markdown
Contributor

lool commented Mar 3, 2026

I know this is still draft, generally ok with the changes, but I'd suggest renaming the overlay for the function it's achieving, e.g. "t14s-initramfs-firmware" and adding a more verbose version in the recipe (perhaps with a link to the issue we need to fix for this to go away).

Thanks for the suggestion, I renamed the overlay and added more comments in the recipe for context. I will mark this as ready for review once I test-boot it and confirm that the battery reporting works from the generated image.

Thanks, I don't know if it's a good or bad pattern, but we can use a var as a list of overlays to apply from the debos invocation as you saw here:
#301
not sure if it's simpler or messier than people editing the debos recipes, I was trying to make it nice for downstream (e.g. arduino-deb-images)

@gagath
Copy link
Copy Markdown
Contributor Author

gagath commented Mar 3, 2026

Boot-tested OK on Lenovo T14s, the firmware is loaded early thanks to the initramfs hook:

[    0.531873] remoteproc remoteproc0: adsp is available
[    0.533967] remoteproc remoteproc0: powering up adsp
[    0.534672] remoteproc remoteproc0: Booting fw image qcom/x1e80100/LENOVO/21N1/qcadsp8380.mbn, size 22043064
[    0.890105] remoteproc remoteproc0: remote processor adsp is now up

Marking as ready for review.

I don't know if it's a good or bad pattern, but we can use a var as a list of overlays to apply from the debos invocation as you saw here

The grow of the initramfs with this PR seems minimal so I would like the recipe to be run in every case for now. We might have the possibility to have this overlay removed by default in the future if needed.

@lool
Copy link
Copy Markdown
Contributor

lool commented Mar 3, 2026

Boot-tested OK on Lenovo T14s, the firmware is loaded early thanks to the initramfs hook:

[    0.531873] remoteproc remoteproc0: adsp is available
[    0.533967] remoteproc remoteproc0: powering up adsp
[    0.534672] remoteproc remoteproc0: Booting fw image qcom/x1e80100/LENOVO/21N1/qcadsp8380.mbn, size 22043064
[    0.890105] remoteproc remoteproc0: remote processor adsp is now up

Marking as ready for review.

I don't know if it's a good or bad pattern, but we can use a var as a list of overlays to apply from the debos invocation as you saw here

The grow of the initramfs with this PR seems minimal so I would like the recipe to be run in every case for now. We might have the possibility to have this overlay removed by default in the future if needed.

Yeah, that's orthogonal though; I'm suggesting patching this line:
https://github.com/qualcomm-linux/qcom-deb-images/blob/main/debos-recipes/qualcomm-linux-debian-rootfs.yaml#L5

Copy link
Copy Markdown
Contributor

@lool lool left a comment

Choose a reason for hiding this comment

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

So generally ok that we carry this by default in our images while landing this upstream, but I'd like to make it clear that it's a workaround for a deficiency somewhere in our stack; something should be pulling these firmware files automatically, and that's what we need to patch upstream

Could you rename this as a workaround-something dir, and could you make sure there's an issue somewhere to fix this properly?

@basak-qcom
Copy link
Copy Markdown
Contributor

For reference, there's a proper fix for dracut-ng in progress here: dracut-ng/dracut#2266

Not sure about initramfs-tools.

@gagath gagath force-pushed the add-missing-initramfs-firmware branch from 63dc827 to 9e9ded3 Compare March 4, 2026 10:09
@gagath
Copy link
Copy Markdown
Contributor Author

gagath commented Mar 4, 2026

Renamed the overlay to workaround-t14s-initramfs-firmware/ and changed Closes: #258 to See also: #258 to avoid closing the bug when this workaround is merged.

@gagath
Copy link
Copy Markdown
Contributor Author

gagath commented Mar 4, 2026

After this is merged I think we can rename #258 to something like "workaround-t14s-initramfs-firmware tracking bug" or something similar. Ideally having one tracking bug per live workaround.

Add missing firmware into initramfs to make ADSP work on Lenovo T14s:

[    0.531873] remoteproc remoteproc0: adsp is available
[    0.533967] remoteproc remoteproc0: powering up adsp
[    0.534672] remoteproc remoteproc0: Booting fw image qcom/x1e80100/LENOVO/21N1/qcadsp8380.mbn, size 22043064
[    0.890105] remoteproc remoteproc0: remote processor adsp is now up

The Adreno firmware can also be installed if needed by
the users but is commented out by default as not strictly necessary.

See also: qualcomm-linux#258

Signed-off-by: Agathe Porte <agathe.porte@oss.qualcomm.com>
@gagath gagath force-pushed the add-missing-initramfs-firmware branch from 9e9ded3 to 99be001 Compare March 4, 2026 10:38
@gagath gagath requested a review from lool March 4, 2026 11:11
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 4, 2026

Test jobs for commit 99be001

@lool
Copy link
Copy Markdown
Contributor

lool commented Mar 4, 2026

I think we've identified the path forward for initramfs-tools; once we have something started upstream, I'd be happy to merge the workaround pointing at the upstream long-term fix :)

@gagath
Copy link
Copy Markdown
Contributor Author

gagath commented Apr 15, 2026

The dracut fix was merged two days ago, I will look at adapting it for initramfs-tools.

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.

Lenovo T14s: firmware installed, but not available early in initramfs

3 participants