Skip to content

Commit c0112ba

Browse files
authored
Merge pull request #674 from lumag/hexagon-dsp-binaries
Use Hexagon DSP binaries recipe
2 parents 5e56a4a + 96eb8e5 commit c0112ba

20 files changed

+140
-201
lines changed

recipes-bsp/firmware-nexus/firmware-qcom-pixel.inc

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ DEPENDS += "pil-squasher-native"
1616

1717
VENDOR_IMG_SPARSE ?= "1"
1818

19+
PACKAGES =+ "${PN}-dsp-binaries"
20+
INSANE_SKIP:${PN}-dsp-binaries += "arch libdir file-rdeps textrel"
21+
FILES:${PN}-dsp-binaries = "${DSP_QCOM_BASE_PATH}"
22+
RDEPENDS:${PN}-dsp-binaries += "${PN} (= ${PV})"
23+
RRECOMMENDS:${PN} += "${PN}-dsp-binaries"
24+
1925
# extract the license file
2026
do_extract() {
2127
head -n 280 ${UNPACKDIR}/extract-${VENDOR}-${FW_QCOM_NAME}.sh | tail -n +16 > ${S}/license.txt
@@ -27,14 +33,13 @@ do_extract() {
2733
ln -sr ${S}/vendor/${VENDOR}/${FW_QCOM_NAME}/proprietary/vendor.img ${B}/vendor.img
2834
fi
2935

30-
# FIXME: also extract fastrpc shell
31-
mkdir -p ${B}/firmware
32-
debugfs ${B}/vendor.img -R 'ls -p /firmware' | \
33-
grep '^/[0-9]*/100' | cut -d/ -f6 > ${B}/firmware/fw.lst
34-
debugfs ${B}/vendor.img -R 'ls -p /firmware' | \
35-
grep '^/[0-9]*/100' | cut -d/ -f6 | \
36-
while read name ; do echo "dump /firmware/$name ${B}/firmware/$name" ; done | \
37-
debugfs ${B}/vendor.img
36+
for path in firmware dsp/adsp dsp/cdsp dsp/sdsp lib/rfsa/adsp ; do
37+
mkdir -p ${B}/$path
38+
debugfs ${B}/vendor.img -R "ls -p /$path" | \
39+
grep '^/[0-9]*/100' | cut -d/ -f6 | \
40+
while read name ; do echo "dump /$path/$name ${B}/$path/$name" ; done | \
41+
debugfs ${B}/vendor.img
42+
done
3843

3944
radio="${S}/vendor/${VENDOR}/${FW_QCOM_NAME}/proprietary/radio.img"
4045
if [ -r "${radio}" ] ; then
@@ -75,11 +80,17 @@ do_install() {
7580
ls ${B}/firmware/a[0-9]*_gmu.bin && install -m 0644 ${B}/firmware/a[0-9]*_gmu.bin ${D}${FW_QCOM_PATH}
7681
ls ${B}/a[0-9]*.mbn && install -m 0644 ${B}/a[0-9]*.mbn ${D}${FW_QCOM_PATH}
7782

83+
ls ${B}/dsp/adsp/* && mkdir -p ${D}${DSP_QCOM_PATH}/dsp/adsp && install -m 0644 ${B}/dsp/adsp/* ${D}${DSP_QCOM_PATH}/dsp/adsp
84+
ls ${B}/dsp/cdsp/* && mkdir -p ${D}${DSP_QCOM_PATH}/dsp/cdsp && install -m 0644 ${B}/dsp/cdsp/* ${D}${DSP_QCOM_PATH}/dsp/cdsp
85+
ls ${B}/dsp/sdsp/* && mkdir -p ${D}${DSP_QCOM_PATH}/dsp/sdsp && install -m 0644 ${B}/dsp/sdsp/* ${D}${DSP_QCOM_PATH}/dsp/sdsp
86+
ls ${B}/lib/rfsa/adsp/* && mkdir -p ${D}${DSP_QCOM_PATH}/dsp/lib && install -m 0644 ${B}/lib/rfsa/adsp/* ${D}${DSP_QCOM_PATH}/dsp/lib
87+
7888
install -m 0644 license.txt ${D}${FW_QCOM_PATH}
7989

8090
# Remove duplicates
8191
rm -f ${D}${FW_QCOM_PATH}/a630_gmu.bin
8292
rm -f ${D}${FW_QCOM_PATH}/a650_gmu.bin
8393

8494
[ -z "${EXTRA_DEVICE_SUBDIR}" ] || ln -sr ${D}${FW_QCOM_PATH} ${D}${FW_QCOM_BASE_PATH}/${EXTRA_DEVICE_SUBDIR}
95+
[ -n "${EXTRA_DEVICE_SUBDIR}" -a -d ${D}${DSP_QCOM_PATH} ] && ln -sr ${D}${DSP_QCOM_PATH} ${D}${DSP_QCOM_BASE_PATH}/${EXTRA_DEVICE_SUBDIR} || true
8596
}

recipes-bsp/firmware/firmware-qcom-dragonboard410c.inc

Lines changed: 0 additions & 17 deletions
This file was deleted.

recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb

Lines changed: 0 additions & 5 deletions
This file was deleted.

recipes-bsp/firmware/firmware-qcom-dragonboard410c_1036.1.bb

Lines changed: 0 additions & 15 deletions
This file was deleted.

recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb

Lines changed: 0 additions & 28 deletions
This file was deleted.

recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,13 @@ SRC_URI = "https://releases.linaro.org/96boards/dragonboard845c/qualcomm/firmwar
77
SRC_URI[md5sum] = "ad69855a1275547b16d94a1b5405ac62"
88
SRC_URI[sha256sum] = "4289d2f2a7124b104d0274879e702aae9b1e50c42eec3747f8584c6744ef65e3"
99

10-
FW_QCOM_NAME = "sdm845"
11-
12-
require recipes-bsp/firmware/firmware-qcom.inc
13-
14-
DEPENDS += "pil-squasher-native"
10+
FILES:${PN} += "${nonarch_base_libdir}/firmware/"
1511

1612
do_install() {
1713
install -d ${D}${nonarch_base_libdir}/firmware/
18-
install -d ${D}${FW_QCOM_PATH}
19-
20-
install -m 0444 ./08-dspso/dspso.bin ${D}${FW_QCOM_PATH}
2114

2215
install -m 0444 ./17-USB3-201-202-FW/K2026090.mem ${D}${nonarch_base_libdir}/firmware/renesas_usb_fw.mem
2316

2417
install -d ${D}${sysconfdir}/
2518
install -m 0644 LICENSE.qcom.txt ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE-${PN}
2619
}
27-
28-
SPLIT_FIRMWARE_PACKAGES = " \
29-
${PN}-dspso \
30-
"

recipes-bsp/firmware/firmware-qcom-rb1_20230823-v2.bb

Lines changed: 0 additions & 25 deletions
This file was deleted.

recipes-bsp/firmware/firmware-qcom-rb2_20230823-v2.bb

Lines changed: 0 additions & 25 deletions
This file was deleted.

recipes-bsp/firmware/firmware-qcom-rb5_20210331-v4.bb

Lines changed: 0 additions & 32 deletions
This file was deleted.

recipes-bsp/firmware/firmware-qcom.inc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@ FW_QCOM_SUBDIR ?= "${FW_QCOM_NAME}"
1212
FW_QCOM_BASE_PATH = "${nonarch_base_libdir}/firmware/qcom"
1313
FW_QCOM_PATH = "${FW_QCOM_BASE_PATH}/${FW_QCOM_SUBDIR}"
1414

15+
DSP_QCOM_BASE_PATH = "${datadir}/qcom"
16+
DSP_QCOM_PATH = "${DSP_QCOM_BASE_PATH}/${FW_QCOM_SUBDIR}"
17+
1518
SPLIT_FIRMWARE_PACKAGES ?= ""
1619

1720
PACKAGE_BEFORE_PN += "${SPLIT_FIRMWARE_PACKAGES}"
1821
# RRECOMMEND all non-split packages split from this recipe. Split firmware files re usually replaced with the squashed ones.
1922
RRECOMMENDS:${PN} += "${@ ' '.join(filter(lambda p: not p.endswith('-split'), d.getVar('SPLIT_FIRMWARE_PACKAGES').split())) }"
2023

2124
# Default settings for several split packages
22-
FILES:${PN}-dspso += "${FW_QCOM_BASE_PATH}/*/*dspso.bin"
2325
FILES:linux-firmware-qcom-${FW_QCOM_NAME}-adreno = "${FW_QCOM_PATH}/*_zap.mbn"
2426
FILES:linux-firmware-qcom-${FW_QCOM_NAME}-audio = "${FW_QCOM_PATH}/adsp.mbn ${FW_QCOM_PATH}/adsp_dtb.mbn ${FW_QCOM_PATH}/adsp*.jsn ${FW_QCOM_PATH}/battmgr.jsn"
2527
FILES:linux-firmware-qcom-${FW_QCOM_NAME}-audio-split = "${FW_QCOM_PATH}/adsp.mdt ${FW_QCOM_PATH}/adsp.b*"

0 commit comments

Comments
 (0)