aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Dechesne <ndechesne@users.noreply.github.com>2020-09-04 09:14:21 +0200
committerGitHub <noreply@github.com>2020-09-04 09:14:21 +0200
commite26f03f268c17ae913ae801f7dc6aad861729847 (patch)
treeb9748071b7c42a46e3aca9ffc2d8894b6ee1f44e
parent96a4c8020ede9c66d767bd8e654034be58d0799d (diff)
parent0a7307b688a3873dd1c0350524721958584f68a7 (diff)
downloadmeta-qcom-e26f03f268c17ae913ae801f7dc6aad861729847.tar.gz
meta-qcom-e26f03f268c17ae913ae801f7dc6aad861729847.tar.bz2
meta-qcom-e26f03f268c17ae913ae801f7dc6aad861729847.zip
Merge pull request #178 from lumag/fw-qcom-rb5
firmware-qcom-rb5: package QRB5165 RB5 firmware files
-rw-r--r--conf/machine/qrb5165-rb5.conf1
-rw-r--r--recipes-bsp/firmware/.gitignore2
-rw-r--r--recipes-bsp/firmware/firmware-qcom-rb5_1.0.bb69
3 files changed, 72 insertions, 0 deletions
diff --git a/conf/machine/qrb5165-rb5.conf b/conf/machine/qrb5165-rb5.conf
index 447c889..c2727ac 100644
--- a/conf/machine/qrb5165-rb5.conf
+++ b/conf/machine/qrb5165-rb5.conf
@@ -13,6 +13,7 @@ SERIAL_CONSOLE ?= "115200 ttyMSM0"
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
kernel-modules \
+ firmware-qcom-rb5 \
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'linux-firmware-qca', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-msm', '', d)} \
"
diff --git a/recipes-bsp/firmware/.gitignore b/recipes-bsp/firmware/.gitignore
new file mode 100644
index 0000000..c552b48
--- /dev/null
+++ b/recipes-bsp/firmware/.gitignore
@@ -0,0 +1,2 @@
+files/NHLOS_Binaries.zip
+files/adreno_1.0_qrb5165_rb5.tar.gz
diff --git a/recipes-bsp/firmware/firmware-qcom-rb5_1.0.bb b/recipes-bsp/firmware/firmware-qcom-rb5_1.0.bb
new file mode 100644
index 0000000..ed7870f
--- /dev/null
+++ b/recipes-bsp/firmware/firmware-qcom-rb5_1.0.bb
@@ -0,0 +1,69 @@
+# Provide base URI of NHLOS_Binaries.zip and adreno_1.0_qrb5165_rb5.tar.gz
+# files. Use "file://" if those files are copied into
+# recipes-bsp/firmware/files/ directory.
+# NHLOS_URI ?= "file://"
+# ADRENO_URI ?= "file://"
+
+DESCRIPTION = "QCOM Firmware for Qualcomm Robotics RB5 platform"
+
+LICENSE = "Proprietary"
+
+# There is no license file in the archive
+#LIC_FILES_CHKSUM = "file://license.txt;md5="
+ERROR_QA_remove = "license-checksum"
+
+NHLOS_ARCHIVE = "NHLOS_Binaries.zip"
+ADRENO_ARCHIVE = "adreno_1.0_qrb5165_rb5.tar.gz"
+
+SRC_URI_NHLOS = "${NHLOS_URI}${NHLOS_ARCHIVE}"
+SRC_URI_ADRENO = "${ADRENO_URI}${ADRENO_ARCHIVE};unpack=0"
+
+COMPATIBLE_MACHINE = "(sm8250)"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+# do_unpack is written in Python, so let's use do_compile here
+do_compile() {
+ if [ -r ${WORKDIR}/${ADRENO_ARCHIVE} ] ; then
+ tar xzf ${WORKDIR}/${ADRENO_ARCHIVE} .//lib/firmware
+ fi
+}
+
+do_install() {
+ if [ -n "${ADRENO_URI}" ] ; then
+ install -d ${D}${nonarch_base_libdir}/firmware/qcom
+ install -m 0444 ./lib/firmware/a650_*.* ${D}${nonarch_base_libdir}/firmware/qcom
+ fi
+
+ if [ -n "${NHLOS_URI}" ] ; then
+ cd ${WORKDIR}/NHLOS_Binaries
+ install -d ${D}${nonarch_base_libdir}/firmware/qcom/sm8250
+ install -m 0444 adsp.b* adsp.mdt adspr.jsn adspua.jsn ${D}${nonarch_base_libdir}/firmware/qcom/sm8250
+ install -m 0444 cdsp.b* cdsp.mdt cdspr.jsn ${D}${nonarch_base_libdir}/firmware/qcom/sm8250
+ install -m 0444 slpi.b* slpi.mdt ${D}${nonarch_base_libdir}/firmware/qcom/sm8250
+ install -m 0444 venus.b* venus.mdt ${D}${nonarch_base_libdir}/firmware/qcom/sm8250
+
+ install -m 0444 verinfo/Ver_Info.txt ${D}${nonarch_base_libdir}/firmware/qcom/sm8250
+ fi
+}
+
+FILES_${PN} += "${nonarch_base_libdir}/firmware/*"
+INSANE_SKIP_${PN} += "arch"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_DEFAULT_DEPS = "1"
+
+# We list firmware-qcom-rb5 in RRECOMMENDS, so we can not skip the recipe here
+# If firmware files are not provided, do not download/package anything
+python () {
+ if d.getVar("NHLOS_URI") == "" and d.getVar("ADRENO_URI") == "":
+ bb.warn("Not packaging RB5 firmware. Please update HNLOS_URI and ADRENO_URI")
+
+ uri = d.getVar("NHLOS_URI")
+ if uri != None and uri != "":
+ d.appendVar("SRC_URI", " ${SRC_URI_NHLOS}")
+ d.appendVarFlag('do_unpack', 'depends', ' unzip-native:do_populate_sysroot')
+
+ uri = d.getVar("ADRENO_URI")
+ if uri != None and uri != "":
+ d.appendVar("SRC_URI", " ${SRC_URI_ADRENO}")
+}