aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-bsp/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/firmware')
-rw-r--r--recipes-bsp/firmware/firmware-ath6kl_git.bb49
-rw-r--r--recipes-bsp/firmware/firmware-qcom-adreno.inc40
-rw-r--r--recipes-bsp/firmware/firmware-qcom-dragonboard-apq8074.bb21
-rw-r--r--recipes-bsp/firmware/firmware-qcom-dragonboard410c.inc21
-rw-r--r--recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb29
-rw-r--r--recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb25
-rw-r--r--recipes-bsp/firmware/firmware-qcom-ifc6410.bb22
-rw-r--r--recipes-bsp/firmware/firmware-qcom-ifc6560.bb30
-rw-r--r--recipes-bsp/firmware/firmware-qcom-nexus7-2013.bb40
-rw-r--r--recipes-bsp/firmware/firmware-qcom-nhlos.inc60
-rw-r--r--recipes-bsp/firmware/firmware-qcom-rb1_20230823-v2.bb25
-rw-r--r--recipes-bsp/firmware/firmware-qcom-rb2_20230823-v2.bb25
-rw-r--r--recipes-bsp/firmware/firmware-qcom-rb5_20210331-v4.bb26
-rw-r--r--recipes-bsp/firmware/firmware-qcom-sm8150-hdk.bb42
-rw-r--r--recipes-bsp/firmware/firmware-qcom-sm8350-hdk.bb31
-rw-r--r--recipes-bsp/firmware/firmware-qcom-sm8450-hdk.bb44
-rw-r--r--recipes-bsp/firmware/firmware-qcom.inc48
-rw-r--r--recipes-bsp/firmware/firmware-wcn6855_git.bb52
18 files changed, 513 insertions, 117 deletions
diff --git a/recipes-bsp/firmware/firmware-ath6kl_git.bb b/recipes-bsp/firmware/firmware-ath6kl_git.bb
new file mode 100644
index 0000000..81d237a
--- /dev/null
+++ b/recipes-bsp/firmware/firmware-ath6kl_git.bb
@@ -0,0 +1,49 @@
+# Extra firmware files, which are covered by the separate license.
+# They are not a part of linux-firmware and will never be:
+# https://lists.infradead.org/pipermail/ath6kl/2017-July/000296.html
+
+SUMMARY = "Additional firmware files for Qualcomm/Atheros Ath6k SoC"
+
+LICENSE = "Firmware-qualcommAthos_ath6kl"
+LIC_FILES_CHKSUM = "file://LICENSE.qca_firmware;md5=2a397c0e988f4c52d3d526133b617c8d"
+NO_GENERIC_LICENSE[Firmware-qualcommAthos_ath6kl] = "LICENSE.qca_firmware"
+
+SRC_URI = "git://github.com/qca/ath6kl-firmware;protocol=https;branch=master"
+SRCREV = "2e02576c1dab6fd35118eea1004f50aaaed3794f"
+
+PV = "3.5.0.349-1+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+inherit allarch
+
+CLEANBROKEN = "1"
+
+do_compile() {
+ :
+}
+
+FWDIR = "${nonarch_base_libdir}/firmware"
+
+do_install() {
+ install -d ${D}${FWDIR}/ath6k/AR6004/hw1.3
+ install -d ${D}${FWDIR}/ath6k/AR6004/hw3.0
+
+ install -m 0644 ath6k/AR6004/hw1.3/* ${D}${FWDIR}/ath6k/AR6004/hw1.3
+ install -m 0644 ath6k/AR6004/hw3.0/* ${D}${FWDIR}/ath6k/AR6004/hw3.0
+
+ install -m 0644 LICENSE.qca_firmware ${D}${FWDIR}
+}
+
+FILES:${PN} += "${FWDIR}"
+
+# There is a conflict between linux-firmware version and and the updated one
+
+inherit update-alternatives
+ALTERNATIVE:${PN} = "ar6004-hw13-bdata"
+ALTERNATIVE_LINK_NAME[ar6004-hw13-bdata] = "${nonarch_base_libdir}/firmware/ath6k/AR6004/hw1.3/bdata.bin"
+ALTERNATIVE_PRIORITY = "100"
+
+# Firmware files are generally not ran on the CPU, so they can be
+# allarch despite being architecture specific
+INSANE_SKIP = "arch"
diff --git a/recipes-bsp/firmware/firmware-qcom-adreno.inc b/recipes-bsp/firmware/firmware-qcom-adreno.inc
new file mode 100644
index 0000000..2fad318
--- /dev/null
+++ b/recipes-bsp/firmware/firmware-qcom-adreno.inc
@@ -0,0 +1,40 @@
+# Handle Adreno firmware unpacking in a generic way
+# Include the file to be able to dissect the archive.
+# If ADRENO_URI is defined, the image will be dissected automatically
+# Handle fwpath=... as a path to Adreno firmware inside the archive
+
+ADRENO_URI ??= ""
+
+# Conditionally populate SRC_URI. We have to do it here rather than in python
+# script to let base.bbclass to pick up dependencies
+SRC_URI += "${@['', '${ADRENO_URI};subdir=adreno;name=adreno'][d.getVar('ADRENO_URI') != ''] }"
+
+# the file is unpacked to this dir, clean it up
+do_unpack[cleandirs] = "${WORKDIR}/adreno"
+
+DEPENDS += "pil-squasher-native"
+
+python () {
+ uri = d.getVar("ADRENO_URI")
+ if uri == "":
+ bb.warn("%s: not packaging ADRENO firmware. Please provide ADRENO_URI" % d.getVar("PN"))
+ else:
+ urldata = bb.fetch2.FetchData(d.getVar("ADRENO_URI"), d)
+ if "fwpath" in urldata.parm:
+ d.setVar("ADRENO_PATH", urldata.parm["fwpath"])
+ else:
+ d.setVar("ADRENO_PATH", "")
+}
+
+do_compile:append() {
+ if [ -n "${ADRENO_URI}" ] ; then
+ for fw in ${WORKDIR}/adreno/${ADRENO_PATH}/*_zap.mdt ; do
+ pil-squasher ${B}/`basename $fw mdt`mbn $fw || exit 1
+ done
+ for fw in ${FW_QCOM_LIST} ; do
+ if [ -r ${WORKDIR}/adreno/${ADRENO_PATH}/$fw ] ; then
+ cp ${WORKDIR}/adreno/${ADRENO_PATH}/$fw ${B}/
+ fi
+ done
+ fi
+}
diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard-apq8074.bb b/recipes-bsp/firmware/firmware-qcom-dragonboard-apq8074.bb
new file mode 100644
index 0000000..595c41e
--- /dev/null
+++ b/recipes-bsp/firmware/firmware-qcom-dragonboard-apq8074.bb
@@ -0,0 +1,21 @@
+# Specify location of the corresponding NON-HLOS.bin file by adding
+# NHLOS_URI:pn-firmware-qcom-dragonboard-apq8074 = "..." to local.conf. Use
+# "file://" if the file is provided locally.
+
+DESCRIPTION = "QCOM Firmware for Dragonboard APQ8074 board"
+
+LICENSE = "CLOSED"
+
+# dragonboard8074 firmware is unsigned, so install into generic location
+FW_QCOM_NAME = "apq8074"
+
+FW_QCOM_LIST = "adsp.mbn mba.mbn modem.mbn wcnss.mbn"
+
+require recipes-bsp/firmware/firmware-qcom.inc
+require recipes-bsp/firmware/firmware-qcom-nhlos.inc
+
+SPLIT_FIRMWARE_PACKAGES = " \
+ linux-firmware-qcom-${FW_QCOM_NAME}-audio \
+ linux-firmware-qcom-${FW_QCOM_NAME}-modem \
+ linux-firmware-qcom-${FW_QCOM_NAME}-wifi \
+"
diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard410c.inc b/recipes-bsp/firmware/firmware-qcom-dragonboard410c.inc
index 1e4b454..1acb8d0 100644
--- a/recipes-bsp/firmware/firmware-qcom-dragonboard410c.inc
+++ b/recipes-bsp/firmware/firmware-qcom-dragonboard410c.inc
@@ -3,32 +3,15 @@ DESCRIPTION = "QCOM Firmware for DragonBoard 410c"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENSE;md5=4d087ee0965cb059f1b2f9429e166f64"
-DEPENDS += "mtools-native pil-squasher-native"
+FW_QCOM_NAME = "apq8016"
require recipes-bsp/firmware/firmware-qcom.inc
S = "${WORKDIR}/linux-board-support-package-r${PV}"
do_install() {
- install -d ${D}${nonarch_base_libdir}/firmware/
-
- install -d ${D}/boot
- cp ./efs-seed/fs_image_linux.tar.gz.mbn.img ${D}/boot/modem_fsg
-
- cp -r ./proprietary-linux/wlan ${D}${nonarch_base_libdir}/firmware/
-
- install -d ${D}${nonarch_base_libdir}/firmware/qcom/msm8916
- MTOOLS_SKIP_CHECK=1 mcopy -i ./bootloaders-linux/NON-HLOS.bin \
- ::image/modem.* ::image/mba.mbn ::image/wcnss.* ${D}${nonarch_base_libdir}/firmware/qcom/msm8916
-
- pil-squasher ${D}${nonarch_base_libdir}/firmware/qcom/msm8916/modem.mbn \
- ${D}${nonarch_base_libdir}/firmware/qcom/msm8916/modem.mdt
-
- pil-squasher ${D}${nonarch_base_libdir}/firmware/qcom/msm8916/wcnss.mbn \
- ${D}${nonarch_base_libdir}/firmware/qcom/msm8916/wcnss.mdt
+ install -d ${D}${FW_QCOM_PATH}
install -d ${D}${sysconfdir}/
install -m 0644 LICENSE ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE-${PN}
}
-
-FILES:${PN} += "/boot/modem_fsg"
diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb b/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb
index f3ca958..816a8ae 100644
--- a/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb
+++ b/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb
@@ -7,37 +7,22 @@ SRC_URI = "https://releases.linaro.org/96boards/dragonboard820c/qualcomm/firmwar
SRC_URI[md5sum] = "587138c5e677342db9a88d5c8747ec6c"
SRC_URI[sha256sum] = "6ee9c461b2b5dd2d3bd705bb5ea3f44b319ecb909b2772f305ce12439e089cd9"
-require recipes-bsp/firmware/firmware-qcom.inc
+FW_QCOM_NAME = "apq8096"
-DEPENDS += "pil-squasher-native qca-swiss-army-knife-native"
-inherit python3native
+require recipes-bsp/firmware/firmware-qcom.inc
S = "${WORKDIR}/linux-board-support-package-r${PV}"
-do_compile() {
- # Build board-2.bin needed by WiFi
- ath10k-generate-pci-board-2_json.sh ./proprietary-linux/ board-2.json
- python3 "${STAGING_BINDIR_NATIVE}/ath10k-bdencoder" -c board-2.json -o board-2.bin
-}
-
do_install() {
install -d ${D}${nonarch_base_libdir}/firmware/
- install -d ${D}${nonarch_base_libdir}/firmware/qcom/msm8996/
+ install -d ${D}${FW_QCOM_PATH}/
- install -m 0444 ./proprietary-linux/adsp*.* ${D}${nonarch_base_libdir}/firmware/qcom/msm8996/
- pil-squasher ${D}${nonarch_base_libdir}/firmware/qcom/msm8996/adsp.mbn ./proprietary-linux/adsp.mdt
-
- install -m 0444 ./bootloaders-linux/adspso.bin ${D}${nonarch_base_libdir}/firmware/qcom/msm8996/
-
- install -d ${D}${nonarch_base_libdir}/firmware/ath10k/QCA6174/hw3.0/
- install -m 0444 ${S}/board-2.bin ${D}${nonarch_base_libdir}/firmware/ath10k/QCA6174/hw3.0/board-2.bin
+ install -m 0444 ./bootloaders-linux/adspso.bin ${D}${FW_QCOM_PATH}/
install -d ${D}${sysconfdir}/
install -m 0644 LICENSE ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE-${PN}
}
-inherit update-alternatives
-
-ALTERNATIVE:${PN} = "qca6174-board2"
-ALTERNATIVE_LINK_NAME[qca6174-board2] = "/lib/firmware/ath10k/QCA6174/hw3.0/board-2.bin"
-ALTERNATIVE_PRIORITY = "100"
+SPLIT_FIRMWARE_PACKAGES = " \
+ ${PN}-dspso \
+"
diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb b/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb
index e23f465..b2760e8 100644
--- a/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb
+++ b/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb
@@ -7,31 +7,24 @@ SRC_URI = "https://releases.linaro.org/96boards/dragonboard845c/qualcomm/firmwar
SRC_URI[md5sum] = "ad69855a1275547b16d94a1b5405ac62"
SRC_URI[sha256sum] = "4289d2f2a7124b104d0274879e702aae9b1e50c42eec3747f8584c6744ef65e3"
-require recipes-bsp/firmware/firmware-qcom.inc
+FW_QCOM_NAME = "sdm845"
-DEPENDS += "qca-swiss-army-knife-native"
-inherit python3native
+require recipes-bsp/firmware/firmware-qcom.inc
-do_compile() {
- # Build board-2.bin needed by WiFi
- ath10k-generate-board-2_json.sh ./38-bdwlan_split board-2.json
- python3 "${STAGING_BINDIR_NATIVE}/ath10k-bdencoder" -c board-2.json -o board-2.bin
-}
+DEPENDS += "pil-squasher-native"
do_install() {
install -d ${D}${nonarch_base_libdir}/firmware/
- install -d ${D}${nonarch_base_libdir}/firmware/qcom/sdm845
+ install -d ${D}${FW_QCOM_PATH}
- install -m 0444 ./08-dspso/dspso.bin ${D}${nonarch_base_libdir}/firmware/qcom/sdm845
+ install -m 0444 ./08-dspso/dspso.bin ${D}${FW_QCOM_PATH}
install -m 0444 ./17-USB3-201-202-FW/K2026090.mem ${D}${nonarch_base_libdir}/firmware/renesas_usb_fw.mem
- install -m 0444 ./18-adreno-fw/a630_zap*.* ${D}${nonarch_base_libdir}/firmware/qcom/
- install -m 0444 ./20-adsp_split/firmware/adsp*.* ${D}${nonarch_base_libdir}/firmware/qcom/sdm845
- install -m 0444 ./21-cdsp_split/firmware/cdsp*.* ${D}${nonarch_base_libdir}/firmware/qcom/sdm845
-
- install -d ${D}${nonarch_base_libdir}/firmware/ath10k/WCN3990/hw1.0/
- install -m 0444 ./board-2.bin ${D}${nonarch_base_libdir}/firmware/ath10k/WCN3990/hw1.0/
install -d ${D}${sysconfdir}/
install -m 0644 LICENSE.qcom.txt ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE-${PN}
}
+
+SPLIT_FIRMWARE_PACKAGES = " \
+ ${PN}-dspso \
+"
diff --git a/recipes-bsp/firmware/firmware-qcom-ifc6410.bb b/recipes-bsp/firmware/firmware-qcom-ifc6410.bb
new file mode 100644
index 0000000..1fbeac2
--- /dev/null
+++ b/recipes-bsp/firmware/firmware-qcom-ifc6410.bb
@@ -0,0 +1,22 @@
+# Specify location of the corresponding NON-HLOS.bin file by adding
+# NHLOS_URI:pn-firmware-qcom-ifc6410 = "..." to local.conf. Use "file://"
+# if the file is provided locally.
+
+DESCRIPTION = "QCOM Firmware for Inforce IFC6410 board"
+
+LICENSE = "CLOSED"
+
+# ifc6410 firmware is unsigned, so install into generic location
+FW_QCOM_NAME = "apq8064"
+
+FW_QCOM_LIST = "dsps.mbn gss.mbn q6.mbn wcnss.mbn"
+
+require recipes-bsp/firmware/firmware-qcom.inc
+require recipes-bsp/firmware/firmware-qcom-nhlos.inc
+
+SPLIT_FIRMWARE_PACKAGES = " \
+ linux-firmware-qcom-${FW_QCOM_NAME}-dsps \
+ linux-firmware-qcom-${FW_QCOM_NAME}-gss \
+ linux-firmware-qcom-${FW_QCOM_NAME}-q6 \
+ linux-firmware-qcom-${FW_QCOM_NAME}-wifi \
+"
diff --git a/recipes-bsp/firmware/firmware-qcom-ifc6560.bb b/recipes-bsp/firmware/firmware-qcom-ifc6560.bb
new file mode 100644
index 0000000..03aca78
--- /dev/null
+++ b/recipes-bsp/firmware/firmware-qcom-ifc6560.bb
@@ -0,0 +1,30 @@
+# Specify location of the corresponding NON-HLOS.bin file by adding
+# NHLOS_URI:pn-firmware-qcom-ifc6560 = "..." to local.conf. Use "file://"
+# if the file is provided locally.
+
+DESCRIPTION = "QCOM Firmware for Inforce IFC6560 board"
+
+LICENSE = "CLOSED"
+
+# ifc6560 isn't locked, so install firmware into generic location
+FW_QCOM_NAME = "sda660"
+
+FW_QCOM_LIST = "\
+ a508_zap.mbn a512_zap.mbn \
+ adsp.mbn \
+ cdsp.mbn \
+ mba.mbn modem.mbn modemuw.jsn \
+ venus.mbn \
+"
+
+require recipes-bsp/firmware/firmware-qcom.inc
+require recipes-bsp/firmware/firmware-qcom-nhlos.inc
+require recipes-bsp/firmware/firmware-qcom-adreno.inc
+
+SPLIT_FIRMWARE_PACKAGES = "\
+ linux-firmware-qcom-${FW_QCOM_NAME}-adreno \
+ linux-firmware-qcom-${FW_QCOM_NAME}-audio \
+ linux-firmware-qcom-${FW_QCOM_NAME}-compute \
+ linux-firmware-qcom-${FW_QCOM_NAME}-modem \
+ linux-firmware-qcom-${FW_QCOM_NAME}-venus \
+"
diff --git a/recipes-bsp/firmware/firmware-qcom-nexus7-2013.bb b/recipes-bsp/firmware/firmware-qcom-nexus7-2013.bb
deleted file mode 100644
index a17c5ac..0000000
--- a/recipes-bsp/firmware/firmware-qcom-nexus7-2013.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-DESCRIPTION = "QCOM Firmware for Asus Google Nexus 7 (2013)"
-
-LICENSE = "Proprietary"
-LIC_FILES_CHKSUM = "file://license.txt;md5=0d238870f50c84250a14191d17aaf1d5"
-
-SRC_URI = "https://dl.google.com/dl/android/aosp/qcom-flo-mob30x-43963492.tgz;name=google \
- git://android.googlesource.com/device/asus/flo;protocol=https;branch=master;name=aosp"
-SRC_URI[google.md5sum] = "5c21950c751544cc92b5fe95c6f3be37"
-SRC_URI[google.sha256sum] = "1ccc740a461be8ea84369b1c13fc89cb3f26f8bc1400fedec8b3dd1f630a7994"
-SRCREV_aosp = "9d9fee956a9c4c7be4f69f7a472d3fc0e759c2dd"
-
-require recipes-bsp/firmware/firmware-qcom.inc
-
-DEPENDS += "pil-squasher-native"
-
-# extract the license file
-do_extract() {
- head -n 280 ${WORKDIR}/extract-qcom-flo.sh | tail -n +16 > ${S}/license.txt
- tail -n +315 ${WORKDIR}/extract-qcom-flo.sh | tar xzfv - -C ${S}
-}
-addtask extract after do_unpack before do_patch
-
-do_compile() {
- for fw in ${S}/vendor/qcom/flo/proprietary/*.mdt ; do
- pil-squasher ${B}/`basename $fw mdt`mbn $fw
- done
-}
-
-do_install() {
- install -d ${D}${nonarch_base_libdir}/firmware/qcom/flo
- install -m 0644 ${B}/*.mbn ${D}${nonarch_base_libdir}/firmware/qcom/flo
- install -m 0644 vendor/qcom/flo/proprietary/vidcfw.elf ${D}${nonarch_base_libdir}/firmware/qcom/flo
- install -m 0644 vendor/qcom/flo/proprietary/vidc_1080p.fw ${D}${nonarch_base_libdir}/firmware/qcom/flo
-
- install -m 0644 license.txt ${D}${nonarch_base_libdir}/firmware/qcom/flo
-
- install -m 0644 ${WORKDIR}/git/WCNSS_cfg.dat ${D}${nonarch_base_libdir}/firmware/qcom/flo
- install -m 0644 ${WORKDIR}/git/WCNSS_qcom_wlan_nv_deb.bin ${D}${nonarch_base_libdir}/firmware/qcom/flo
- install -m 0644 ${WORKDIR}/git/WCNSS_qcom_wlan_nv_flo.bin ${D}${nonarch_base_libdir}/firmware/qcom/flo/WCNSS_qcom_wlan_nv.bin
-}
diff --git a/recipes-bsp/firmware/firmware-qcom-nhlos.inc b/recipes-bsp/firmware/firmware-qcom-nhlos.inc
new file mode 100644
index 0000000..a4d5808
--- /dev/null
+++ b/recipes-bsp/firmware/firmware-qcom-nhlos.inc
@@ -0,0 +1,60 @@
+# Handle NON-HLOS.bin unpacking in a generic way
+# Include the file to be able to dissect the image using handle_nonhlos_image()
+# If NHLOS_URI is defined, the image will be dissected automatically
+
+NHLOS_URI ??= ""
+
+# List all firmware files to be installed
+FW_QCOM_LIST ??= ""
+
+DEPENDS += "pil-squasher-native mtools-native"
+
+# Conditionally populate SRC_URI. We have to do it here rather than in python
+# script to let base.bbclass to pick up dependencies
+SRC_URI += "${NHLOS_URI}"
+
+handle_nonhlos_image() {
+ mkdir -p ${B}/firmware
+ mcopy -n -s -i "$1" ::/* ${B}/firmware/
+ for fw in ${B}/firmware/image/*.mdt ; do
+ pil-squasher ${B}/`basename $fw mdt`mbn $fw || exit 1
+ done
+}
+
+# If the URL is the file:// URI, the whole local path will be duplicated in the WORKDIR.
+# Otherwise we just need the last (filename) part of the path.
+def get_nhlos_path(path):
+ from urllib.parse import urlparse
+ if path == "":
+ return ""
+ url = urlparse(path)
+ if url.scheme == "file":
+ return url.path
+ return url.path.rsplit('/', 1)[1]
+
+do_compile:prepend() {
+ if [ -n "${NHLOS_URI}" ] ; then
+ handle_nonhlos_image ${WORKDIR}/${@get_nhlos_path(d.getVar("NHLOS_URI"))}
+ fi
+}
+
+do_install:prepend() {
+ install -d ${D}${FW_QCOM_PATH}
+
+ for fw in ${FW_QCOM_LIST} ; do
+ if [ -r ${B}/$fw ] ; then
+ install -m 0644 ${B}/$fw ${D}${FW_QCOM_PATH}
+ fi
+
+ if [ -r ${B}/firmware/image/$fw ] ; then
+ install -m 0644 ${B}/firmware/image/$fw ${D}${FW_QCOM_PATH}
+ fi
+ done
+}
+
+# If firmware files are not provided, do not download/package anything
+python () {
+ uri = d.getVar("NHLOS_URI")
+ if uri == "":
+ bb.warn("%s: not packaging NHLOS firmware. Please provide HNLOS_URI" % d.getVar("PN"))
+}
diff --git a/recipes-bsp/firmware/firmware-qcom-rb1_20230823-v2.bb b/recipes-bsp/firmware/firmware-qcom-rb1_20230823-v2.bb
new file mode 100644
index 0000000..3d8a802
--- /dev/null
+++ b/recipes-bsp/firmware/firmware-qcom-rb1_20230823-v2.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "QCOM Firmware for Qualcomm Robotics RB1 platform"
+
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://LICENSE.qcom.txt;md5=cbbe399f2c983ad51768f4561587f000"
+
+SRC_URI = "http://releases.linaro.org/96boards/rb1/qualcomm/firmware/RB1_firmware_${PV}.zip;subdir=${BP}"
+SRC_URI[md5sum] = "db892ca115845938c6672d756448d512"
+SRC_URI[sha256sum] = "e7f95cc61d601f6267f87741c333ec5663a6fb538c79770dc094c2556fa757c0"
+
+FW_QCOM_NAME = "qcm2290"
+
+require recipes-bsp/firmware/firmware-qcom.inc
+
+do_install() {
+ install -d ${D}${sysconfdir}/
+ install -m 0644 LICENSE.qcom.txt ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE-${PN}
+
+ install -d ${D}${FW_QCOM_PATH}
+
+ install -m 0444 04-dspso/dspso.bin ${D}${FW_QCOM_PATH}
+}
+
+SPLIT_FIRMWARE_PACKAGES = " \
+ ${PN}-dspso \
+"
diff --git a/recipes-bsp/firmware/firmware-qcom-rb2_20230823-v2.bb b/recipes-bsp/firmware/firmware-qcom-rb2_20230823-v2.bb
new file mode 100644
index 0000000..480985a
--- /dev/null
+++ b/recipes-bsp/firmware/firmware-qcom-rb2_20230823-v2.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "QCOM Firmware for Qualcomm Robotics RB2 platform"
+
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://LICENSE.qcom.txt;md5=cbbe399f2c983ad51768f4561587f000"
+
+SRC_URI = "http://releases.linaro.org/96boards/rb2/qualcomm/firmware/RB2_firmware_${PV}.zip;subdir=${BP}"
+SRC_URI[md5sum] = "53b6cda776cb534883e6c2a048ad97ec"
+SRC_URI[sha256sum] = "5d96c6f224cd4667afd47770b6cd0ad2ad912fe67fec86f4478ad8dcffae8531"
+
+FW_QCOM_NAME = "qrb4210"
+
+require recipes-bsp/firmware/firmware-qcom.inc
+
+do_install() {
+ install -d ${D}${sysconfdir}/
+ install -m 0644 LICENSE.qcom.txt ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE-${PN}
+
+ install -d ${D}${FW_QCOM_PATH}
+
+ install -m 0444 04-dspso/dspso.bin ${D}${FW_QCOM_PATH}
+}
+
+SPLIT_FIRMWARE_PACKAGES = " \
+ ${PN}-dspso \
+"
diff --git a/recipes-bsp/firmware/firmware-qcom-rb5_20210331-v4.bb b/recipes-bsp/firmware/firmware-qcom-rb5_20210331-v4.bb
index 44dc7e7..201c646 100644
--- a/recipes-bsp/firmware/firmware-qcom-rb5_20210331-v4.bb
+++ b/recipes-bsp/firmware/firmware-qcom-rb5_20210331-v4.bb
@@ -14,33 +14,19 @@ SRC_URI[sha256sum] = "30e2c02be32de9f809b590f4fe76d9eb66d35f8c7d13b1f2850beb3d79
# 20210331-v4
PE = "1"
-DEPENDS += "qca-swiss-army-knife-native"
+FW_QCOM_NAME = "sm8250"
require recipes-bsp/firmware/firmware-qcom.inc
-do_compile() {
- # Build board-2.bin needed by WiFi
- ath11k-generate-board-2_json.sh ./38-bdwlan_split board-2.json
- python3 "${STAGING_BINDIR_NATIVE}/ath10k-bdencoder" -m ath11k -c board-2.json -o board-2.bin
-}
-
do_install() {
- install -d ${D}${nonarch_base_libdir}/firmware/qcom/sm8250
-
- install -m 0444 ./08-dspso/dspso.bin ${D}${nonarch_base_libdir}/firmware/qcom/sm8250
+ install -d ${D}${FW_QCOM_PATH}
- install -m 0444 ./30-slpi_split/slpi.mbn ${D}${nonarch_base_libdir}/firmware/qcom/sm8250/
- install -m 0444 ./39-jsn/slpi*.jsn ${D}${nonarch_base_libdir}/firmware/qcom/sm8250/
-
- install -d ${D}${nonarch_base_libdir}/firmware/ath11k/QCA6390/hw2.0/
- install -m 0444 ${S}/board-2.bin ${D}${nonarch_base_libdir}/firmware/ath11k/QCA6390/hw2.0/board-2.bin
+ install -m 0444 ./08-dspso/dspso.bin ${D}${FW_QCOM_PATH}
install -d ${D}${sysconfdir}/
install -m 0644 LICENSE.qcom.txt ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE-${PN}
}
-inherit update-alternatives
-
-ALTERNATIVE:${PN} = "qca6390-board2"
-ALTERNATIVE_LINK_NAME[qca6390-board2] = "/lib/firmware/ath11k/QCA6390/hw2.0/board-2.bin"
-ALTERNATIVE_PRIORITY = "100"
+SPLIT_FIRMWARE_PACKAGES = " \
+ ${PN}-dspso \
+"
diff --git a/recipes-bsp/firmware/firmware-qcom-sm8150-hdk.bb b/recipes-bsp/firmware/firmware-qcom-sm8150-hdk.bb
new file mode 100644
index 0000000..8579aa7
--- /dev/null
+++ b/recipes-bsp/firmware/firmware-qcom-sm8150-hdk.bb
@@ -0,0 +1,42 @@
+# Specify location of the corresponding NON-HLOS.bin file by adding
+# NHLOS_URI:pn-firmware-qcom-sm8350-hdk = "..." to local.conf. Use "file://"
+# if the file is provided locally.
+
+DESCRIPTION = "QCOM Firmware for SM8150 HDK (aka HDK855) board"
+
+LICENSE = "CLOSED"
+
+FW_QCOM_NAME = "sm8150"
+
+FW_QCOM_LIST = "\
+ a640_zap.mbn \
+ adsp.mbn adspr.jsn adspua.jsn \
+ cdsp.mbn cdspr.jsn \
+ ipa_fws.mbn \
+ modem.mbn modemuw.jsn \
+ slpi.mbn slpir.jsn \
+"
+
+require recipes-bsp/firmware/firmware-qcom.inc
+require recipes-bsp/firmware/firmware-qcom-nhlos.inc
+include recipes-bsp/firmware/firmware-qcom-adreno.inc
+
+SPLIT_FIRMWARE_PACKAGES = "\
+ linux-firmware-qcom-${FW_QCOM_NAME}-adreno \
+ linux-firmware-qcom-${FW_QCOM_NAME}-audio \
+ linux-firmware-qcom-${FW_QCOM_NAME}-compute \
+ linux-firmware-qcom-${FW_QCOM_NAME}-ipa \
+ linux-firmware-qcom-${FW_QCOM_NAME}-modem \
+ linux-firmware-qcom-${FW_QCOM_NAME}-sensors \
+ linux-firmware-qcom-adreno-a640 \
+"
+
+do_install:append() {
+ if [ -n "${ADRENO_URI}" ] ; then
+ install -m 0644 ${WORKDIR}/adreno/${ADRENO_PATH}/a640_gmu.bin ${D}${FW_QCOM_BASE_PATH}
+ fi
+}
+
+FILES:linux-firmware-qcom-adreno-a640 += "${FW_QCOM_BASE_PATH}/a640_gmu.bin"
+RDEPENDS:linux-firmware-qcom-adreno-a640 += "linux-firmware-qcom-adreno-a630"
+RDEPENDS:linux-firmware-qcom-adreno-a640:remove = "${PN}"
diff --git a/recipes-bsp/firmware/firmware-qcom-sm8350-hdk.bb b/recipes-bsp/firmware/firmware-qcom-sm8350-hdk.bb
new file mode 100644
index 0000000..f412673
--- /dev/null
+++ b/recipes-bsp/firmware/firmware-qcom-sm8350-hdk.bb
@@ -0,0 +1,31 @@
+# Specify location of the corresponding NON-HLOS.bin file by adding
+# NHLOS_URI:pn-firmware-qcom-sm8350-hdk = "..." to local.conf. Use "file://"
+# if the file is provided locally.
+
+DESCRIPTION = "QCOM Firmware for SM8350 HDK (aka HDK888) board"
+
+LICENSE = "CLOSED"
+
+FW_QCOM_NAME = "sm8350"
+
+FW_QCOM_LIST = "\
+ a660_zap.mbn a615_zap.mbn \
+ adsp.mbn adspr.jsn adspua.jsn battmgr.jsn \
+ cdsp.mbn cdspr.jsn \
+ ipa_fws.mbn \
+ modem.mbn modemr.jsn \
+ slpi.mbn slpir.jsn \
+"
+
+require recipes-bsp/firmware/firmware-qcom.inc
+require recipes-bsp/firmware/firmware-qcom-nhlos.inc
+require recipes-bsp/firmware/firmware-qcom-adreno.inc
+
+SPLIT_FIRMWARE_PACKAGES = "\
+ linux-firmware-qcom-${FW_QCOM_NAME}-adreno \
+ linux-firmware-qcom-${FW_QCOM_NAME}-audio \
+ linux-firmware-qcom-${FW_QCOM_NAME}-compute \
+ linux-firmware-qcom-${FW_QCOM_NAME}-ipa \
+ linux-firmware-qcom-${FW_QCOM_NAME}-modem \
+ linux-firmware-qcom-${FW_QCOM_NAME}-sensors \
+"
diff --git a/recipes-bsp/firmware/firmware-qcom-sm8450-hdk.bb b/recipes-bsp/firmware/firmware-qcom-sm8450-hdk.bb
new file mode 100644
index 0000000..b928bd6
--- /dev/null
+++ b/recipes-bsp/firmware/firmware-qcom-sm8450-hdk.bb
@@ -0,0 +1,44 @@
+# Specify location of the corresponding NON-HLOS.bin file by adding
+# NHLOS_URI:pn-firmware-qcom-sm8450-hdk = "..." to local.conf. Use "file://"
+# if the file is provided locally.
+
+DESCRIPTION = "QCOM Firmware for SM8450 HDK board"
+
+LICENSE = "CLOSED"
+
+FW_QCOM_NAME = "sm8450"
+
+FW_QCOM_LIST = "\
+ a730_zap.mbn \
+ adsp.mbn adspr.jsn adspua.jsn battmgr.jsn \
+ cdsp.mbn cdspr.jsn \
+ ipa_fws.mbn \
+ modem.mbn modemr.jsn \
+ slpi.mbn slpir.jsn slpius.jsn \
+"
+
+require recipes-bsp/firmware/firmware-qcom.inc
+require recipes-bsp/firmware/firmware-qcom-nhlos.inc
+require recipes-bsp/firmware/firmware-qcom-adreno.inc
+
+SPLIT_FIRMWARE_PACKAGES = "\
+ linux-firmware-qcom-${FW_QCOM_NAME}-adreno \
+ linux-firmware-qcom-${FW_QCOM_NAME}-audio \
+ linux-firmware-qcom-${FW_QCOM_NAME}-compute \
+ linux-firmware-qcom-${FW_QCOM_NAME}-ipa \
+ linux-firmware-qcom-${FW_QCOM_NAME}-modem \
+ linux-firmware-qcom-${FW_QCOM_NAME}-sensors \
+ linux-firmware-qcom-adreno-a730 \
+ linux-firmware-qcom-adreno-gmu-a700 \
+"
+
+do_install:append() {
+ if [ -n "${ADRENO_URI}" ] ; then
+ install -m 0644 ${WORKDIR}/adreno/${ADRENO_PATH}/a730_sqe.fw ${D}${FW_QCOM_BASE_PATH}
+ install -m 0644 ${WORKDIR}/adreno/${ADRENO_PATH}/gmu_gen70000.bin ${D}${FW_QCOM_BASE_PATH}
+ fi
+}
+
+FILES:linux-firmware-qcom-adreno-a730 += "${FW_QCOM_BASE_PATH}/a730_sqe.fw"
+FILES:linux-firmware-qcom-adreno-gmu-a700 += "${FW_QCOM_BASE_PATH}/gmu_gen70000.bin"
+RDEPENDS:linux-firmware-qcom-adreno-a730 += "linux-firmware-qcom-adreno-gmu-a700"
diff --git a/recipes-bsp/firmware/firmware-qcom.inc b/recipes-bsp/firmware/firmware-qcom.inc
index c458878..55b1d7e 100644
--- a/recipes-bsp/firmware/firmware-qcom.inc
+++ b/recipes-bsp/firmware/firmware-qcom.inc
@@ -4,6 +4,54 @@ FILES:${PN} += "${nonarch_base_libdir}/firmware/"
INSANE_SKIP:${PN} += "arch already-stripped"
+# Default settings
+# package name part in linux-firmware-qcom-...-audio
+FW_QCOM_NAME ?= "unset"
+# Subdir inside /lib/firmware/qcom. Typically it is equal to FW_QCOM_NAME but might differ in complex cases (like C630 Yoga).
+FW_QCOM_SUBDIR ?= "${FW_QCOM_NAME}"
+FW_QCOM_BASE_PATH = "${nonarch_base_libdir}/firmware/qcom"
+FW_QCOM_PATH = "${FW_QCOM_BASE_PATH}/${FW_QCOM_SUBDIR}"
+
+SPLIT_FIRMWARE_PACKAGES ?= ""
+
+PACKAGE_BEFORE_PN += "${SPLIT_FIRMWARE_PACKAGES}"
+# RRECOMMEND all non-split packages split from this recipe. Split firmware files re usually replaced with the squashed ones.
+RRECOMMENDS:${PN} += "${@ ' '.join(filter(lambda p: not p.endswith('-split'), d.getVar('SPLIT_FIRMWARE_PACKAGES').split())) }"
+
+# Default settings for several split packages
+FILES:${PN}-dspso += "${FW_QCOM_BASE_PATH}/*/*dspso.bin"
+FILES:linux-firmware-qcom-${FW_QCOM_NAME}-adreno = "${FW_QCOM_PATH}/*_zap.mbn ${FW_QCOM_PATH}/qcdxkmsuc*.mbn"
+FILES:linux-firmware-qcom-${FW_QCOM_NAME}-audio = "${FW_QCOM_PATH}/adsp.mbn ${FW_QCOM_PATH}/adsp*.jsn ${FW_QCOM_PATH}/battmgr*.jsn ${FW_QCOM_PATH}/qcadsp*.mbn"
+FILES:linux-firmware-qcom-${FW_QCOM_NAME}-audio-split = "${FW_QCOM_PATH}/adsp.mdt ${FW_QCOM_PATH}/adsp.b*"
+FILES:linux-firmware-qcom-${FW_QCOM_NAME}-compute = "${FW_QCOM_PATH}/cdsp.mbn ${FW_QCOM_PATH}/cdsp*.jsn ${FW_QCOM_PATH}/qccdsp*.mbn"
+FILES:linux-firmware-qcom-${FW_QCOM_NAME}-compute-split = "${FW_QCOM_PATH}/cdsp.mdt ${FW_QCOM_PATH}/cdsp.b*"
+FILES:linux-firmware-qcom-${FW_QCOM_NAME}-dsps = "${FW_QCOM_PATH}/dsps.mbn"
+FILES:linux-firmware-qcom-${FW_QCOM_NAME}-gss = "${FW_QCOM_PATH}/gss.mbn"
+FILES:linux-firmware-qcom-${FW_QCOM_NAME}-ipa = "${FW_QCOM_PATH}/ipa_fws.mbn ${FW_QCOM_PATH}/ipa_fws.elf"
+FILES:linux-firmware-qcom-${FW_QCOM_NAME}-modem = "${FW_QCOM_PATH}/mba.mbn ${FW_QCOM_PATH}/modem.mbn ${FW_QCOM_PATH}/modem*.jsn ${FW_QCOM_PATH}/qcmpss*.mbn"
+FILES:linux-firmware-qcom-${FW_QCOM_NAME}-modem-split = "${FW_QCOM_PATH}/modem.mdt ${FW_QCOM_PATH}/modem.b*"
+FILES:linux-firmware-qcom-${FW_QCOM_NAME}-q6 = "${FW_QCOM_PATH}/q6.mbn"
+FILES:linux-firmware-qcom-${FW_QCOM_NAME}-sensors = "${FW_QCOM_PATH}/slpi.mbn ${FW_QCOM_PATH}/slpi*.jsn ${FW_QCOM_PATH}/qcslpi*.mbn"
+FILES:linux-firmware-qcom-${FW_QCOM_NAME}-sensors-split = "${FW_QCOM_PATH}/slpi.mdt ${FW_QCOM_PATH}/slpi.b*"
+FILES:linux-firmware-qcom-${FW_QCOM_NAME}-venus = "${FW_QCOM_PATH}/venus.mbn ${FW_QCOM_PATH}/vidc* ${FW_QCOM_PATH}/qcvss*.mbn"
+FILES:linux-firmware-qcom-${FW_QCOM_NAME}-wifi = "${FW_QCOM_PATH}/wcnss.mbn ${FW_QCOM_PATH}/wlanmdsp.mbn"
+FILES:linux-firmware-qcom-${FW_QCOM_NAME}-wifi-split = "${FW_QCOM_PATH}/wcnss.mdt ${FW_QCOM_PATH}/wcnss.b*"
+
+python() {
+ pn = d.getVar("PN")
+ insanes = d.getVar("INSANE_SKIP:%s" % pn)
+ for pkg in d.getVar("SPLIT_FIRMWARE_PACKAGES").split():
+ # Depend on the main package to get the license file
+ d.appendVar("RDEPENDS:" + pkg, " " + pn)
+ # and append the INSANE_SKIP of the main package to pass QA
+ d.appendVar("INSANE_SKIP:" + pkg, " " + insanes)
+ # If it's a package with the split frmware, depend on non-split files (for jsn files, etc)
+ if pkg.endswith("-split"):
+ d.appendVar("RDEPENDS:" + pkg, " " + pkg[:-6])
+ if d.getVar("FW_QCOM_NAME") == "unset" and d.getVar("SPLIT_FIRMWARE_PACKAGES") != "":
+ bb.error("%s: split firmware-qcom packages engaged, but FW_QCOM_NAME is not defined" % pn)
+}
+
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_DEFAULT_DEPS = "1"
diff --git a/recipes-bsp/firmware/firmware-wcn6855_git.bb b/recipes-bsp/firmware/firmware-wcn6855_git.bb
new file mode 100644
index 0000000..2283519
--- /dev/null
+++ b/recipes-bsp/firmware/firmware-wcn6855_git.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Firmware files for Qualcomm/Atheros WCN6855 SoC"
+
+LICENSE = "Firmware-qualcommAthos_ath10k"
+LIC_FILES_CHKSUM = "file://LICENSE.QualcommAtheros_ath10k;md5=cb42b686ee5f5cb890275e4321db60a8"
+NO_GENERIC_LICENSE[Firmware-qualcommAthos_ath10k] = "LICENSE.QualcommAtheros_ath10k"
+
+SRC_URI = "git://chromium.googlesource.com/chromiumos/third_party/linux-firmware;protocol=https;branch=master"
+SRCREV = "d233ddd89abe06448070471963a58c0a7da81d79"
+
+PV = "1.1-01720.1+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+inherit allarch
+
+CLEANBROKEN = "1"
+
+do_compile() {
+ :
+}
+
+FWDIR = "${nonarch_base_libdir}/firmware/ath11k/WCN6855/hw2.0"
+FWDIR21 = "${nonarch_base_libdir}/firmware/ath11k/WCN6855/hw2.1"
+
+do_install() {
+ install -d ${D}${FWDIR}
+
+ install -m 0644 ath11k/WCN6855/hw2.0/* ${D}${FWDIR}
+
+ install -d ${D}${FWDIR21}
+ ln -sr ${D}${FWDIR}/board.bin ${D}${FWDIR21}/
+}
+
+inherit update-alternatives
+
+ALTERNATIVE:${PN} += "wcn6855-hw20-amss wcn6855-hw20-m3 wcn6855-hw20-regdb"
+ALTERNATIVE_LINK_NAME[wcn6855-hw20-amss] = "${nonarch_base_libdir}/firmware/ath11k/WCN6855/hw2.0/amss.bin"
+ALTERNATIVE_LINK_NAME[wcn6855-hw20-m3] = "${nonarch_base_libdir}/firmware/ath11k/WCN6855/hw2.0/m3.bin"
+ALTERNATIVE_LINK_NAME[wcn6855-hw20-regdb] = "${nonarch_base_libdir}/firmware/ath11k/WCN6855/hw2.0/regdb.bin"
+ALTERNATIVE_PRIORITY = "100"
+
+PACKAGE_BEFORE_PN = "${PN}-board"
+
+RDEPENDS:${PN}-board += "${PN}"
+RDEPENDS:${PN} += "linux-firmware-ath10k-license"
+
+FILES:${PN} = "${FWDIR}"
+FILES:${PN}-board = "${FWDIR}/board*.bin ${FWDIR21}/board*.bin"
+
+# Firmware files are generally not ran on the CPU, so they can be
+# allarch despite being architecture specific
+INSANE_SKIP = "arch"