Skip to content

Commit 99be001

Browse files
committed
feat: add missing Lenovo T14s firmware in initramfs 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: #258 Signed-off-by: Agathe Porte <agathe.porte@oss.qualcomm.com>
1 parent 8d60a5d commit 99be001

2 files changed

Lines changed: 48 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/sh
2+
3+
PREREQ=""
4+
prereqs()
5+
{
6+
echo "$PREREQ"
7+
}
8+
9+
case $1 in
10+
prereqs)
11+
prereqs
12+
exit 0
13+
;;
14+
esac
15+
16+
# shellcheck source=/dev/null
17+
. /usr/share/initramfs-tools/hook-functions
18+
# Begin real processing below this line
19+
20+
# Add missing firmware required by the ADSP driver for eg. battery management
21+
for f in /usr/lib/firmware/qcom/x1e80100/LENOVO/21N1/*
22+
do
23+
copy_file firmware "$f"
24+
done
25+
26+
27+
# Uncomment the following for GPU accel support in initramfs
28+
# by having the Adreno firmware available.
29+
#
30+
# This is not a strict requirement, as the display will still work without the
31+
# GPU firmware for eg. full-disk encryption password prompt.
32+
#copy_file firmware /usr/lib/firmware/qcom/gen70500_sqe.fw
33+
#copy_file firmware /usr/lib/firmware/qcom/gen70500_gmu.bin

debos-recipes/qualcomm-linux-debian-rootfs.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,21 @@ actions:
299299
- kmod
300300
- linux-base
301301

302+
# Some firmware is needed early in the initramfs for ADSP, eg. on the Lenovo T14s.
303+
# These firmware files are not automatically included because they are
304+
# dynamically found from the device-tree instead of being statically loaded
305+
# in the driver.
306+
#
307+
# Install an initramfs-tools hook prior to the kernel package to make sure
308+
# the initramfs contains such firmware when it is generated.
309+
#
310+
# See also:
311+
# - https://github.com/qualcomm-linux/qcom-deb-images/issues/258
312+
# - https://github.com/dracut-ng/dracut-ng/pull/2266
313+
- action: overlay
314+
description: Install extra firmware hook for initramfs
315+
source: overlays/workaround-t14s-initramfs-firmware
316+
302317
- action: apt
303318
description: Install kernel and firmware packages
304319
recommends: true

0 commit comments

Comments
 (0)