From f8d25de4f652366bd86932e6831102de8dfe503a Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Thu, 22 Apr 2021 19:24:59 +0300 Subject: [PATCH 1/4] firmware-qcom-*: switch to allarch Change all firmware packages to use allarch.bbclass (as linux-firmware does) rather than tying them to the ${MACHINE}, since there is nothing machine-specific in firmware packgages themselves (and qcom-armv8a machine will include some of them anyway). Signed-off-by: Dmitry Baryshkov --- recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb | 2 +- recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb | 2 +- .../firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb | 2 +- recipes-bsp/firmware/firmware-qcom-rb5_20210331-v4.bb | 2 +- recipes-bsp/firmware/firmware-qcom-sd-600eval_1.0.bb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb b/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb index 7ea3a7d..29d6dab 100644 --- a/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb +++ b/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb @@ -9,7 +9,7 @@ SRC_URI[sha256sum] = "46953b974c5c58c7ca66db414437c0268b033ac9d28127e98d9c4e1a49 DEPENDS += "mtools-native" -PACKAGE_ARCH = "${MACHINE_ARCH}" +inherit allarch S = "${WORKDIR}/linux-board-support-package-r${PV}" diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb b/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb index 494db0d..0903441 100644 --- a/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb +++ b/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb @@ -7,7 +7,7 @@ SRC_URI = "https://releases.linaro.org/96boards/dragonboard820c/qualcomm/firmwar SRC_URI[md5sum] = "587138c5e677342db9a88d5c8747ec6c" SRC_URI[sha256sum] = "6ee9c461b2b5dd2d3bd705bb5ea3f44b319ecb909b2772f305ce12439e089cd9" -PACKAGE_ARCH = "${MACHINE_ARCH}" +inherit allarch S = "${WORKDIR}/linux-board-support-package-r${PV}" diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb b/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb index dd03753..62cdbd2 100644 --- a/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb +++ b/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb @@ -7,7 +7,7 @@ SRC_URI = "https://releases.linaro.org/96boards/dragonboard845c/qualcomm/firmwar SRC_URI[md5sum] = "ad69855a1275547b16d94a1b5405ac62" SRC_URI[sha256sum] = "4289d2f2a7124b104d0274879e702aae9b1e50c42eec3747f8584c6744ef65e3" -PACKAGE_ARCH = "${MACHINE_ARCH}" +inherit allarch DEPENDS += "qca-swiss-army-knife-native" inherit python3native diff --git a/recipes-bsp/firmware/firmware-qcom-rb5_20210331-v4.bb b/recipes-bsp/firmware/firmware-qcom-rb5_20210331-v4.bb index 618a55f..de2679f 100644 --- a/recipes-bsp/firmware/firmware-qcom-rb5_20210331-v4.bb +++ b/recipes-bsp/firmware/firmware-qcom-rb5_20210331-v4.bb @@ -22,7 +22,7 @@ PE = "1" DEPENDS += "qca-swiss-army-knife-native" -PACKAGE_ARCH = "${MACHINE_ARCH}" +inherit allarch VENUS_FW = "vpu-1.0" diff --git a/recipes-bsp/firmware/firmware-qcom-sd-600eval_1.0.bb b/recipes-bsp/firmware/firmware-qcom-sd-600eval_1.0.bb index 89e9411..43091ce 100644 --- a/recipes-bsp/firmware/firmware-qcom-sd-600eval_1.0.bb +++ b/recipes-bsp/firmware/firmware-qcom-sd-600eval_1.0.bb @@ -7,7 +7,7 @@ SRC_URI = "https://eragon.einfochips.com/pub/media/datasheet/SD_600eval-linux_pr SRC_URI[md5sum] = "0903e9f656d3cea005ecc8e26f1243b2" SRC_URI[sha256sum] = "fdffcb2cedc0d0215ee3dec95ce3683a780d9280960d27200379fbe1b21af979" -PACKAGE_ARCH = "${MACHINE_ARCH}" +inherit allarch S = "${WORKDIR}/SD_600eval-linux_proprietary_firmware-v${PV}" From 19c2e063a2006b811def400e5e7d40041ffef3d5 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Thu, 22 Apr 2021 19:36:20 +0300 Subject: [PATCH 2/4] firmware-qcom-dragonboard820c: install dsp paritition image Install an image with DSP shell and libraries. Signed-off-by: Dmitry Baryshkov --- recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb b/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb index 0903441..bb0d9b6 100644 --- a/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb +++ b/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb @@ -21,6 +21,8 @@ do_install() { install -m 0444 ./proprietary-linux/adsp*.* ${D}${nonarch_base_libdir}/firmware/qcom/msm8996/ + install -m 0444 ./bootloaders-linux/adspso.bin ${D}${nonarch_base_libdir}/firmware/qcom/msm8996/ + install -d ${D}${sysconfdir}/ install -m 0644 LICENSE ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE-${PN} } From 915c7ed4bee8905139ebe62343f23cbf9efb12b3 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Thu, 22 Apr 2021 19:36:20 +0300 Subject: [PATCH 3/4] firmware-qcom-dragonboard845c: install dsp paritition image Install an image with DSP shell and libraries. Signed-off-by: Dmitry Baryshkov --- .../firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb b/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb index 62cdbd2..848b76a 100644 --- a/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb +++ b/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb @@ -21,6 +21,8 @@ do_install() { install -d ${D}${nonarch_base_libdir}/firmware/ install -d ${D}${nonarch_base_libdir}/firmware/qcom/sdm845 + install -m 0444 ./08-dspso/dspso.bin ${D}${nonarch_base_libdir}/firmware/qcom/sdm845 + 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 From e2278e196ef790cde752ab26cca6067c09b18d6c Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Thu, 22 Apr 2021 19:00:40 +0300 Subject: [PATCH 4/4] firmware-qcom-dragonboard410c: add support for fw 1036.1 Firmware 1036.1 was never release for further redistribution, however it can be manually downloaded from Qualcomm site. Add a recipe to build it. Signed-off-by: Dmitry Baryshkov --- .../firmware-qcom-dragonboard410c.inc | 36 ++++++++++++++++++ .../firmware-qcom-dragonboard410c_1034.2.1.bb | 37 +------------------ .../firmware-qcom-dragonboard410c_1036.1.bb | 15 ++++++++ 3 files changed, 52 insertions(+), 36 deletions(-) create mode 100644 recipes-bsp/firmware/firmware-qcom-dragonboard410c.inc create mode 100644 recipes-bsp/firmware/firmware-qcom-dragonboard410c_1036.1.bb diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard410c.inc b/recipes-bsp/firmware/firmware-qcom-dragonboard410c.inc new file mode 100644 index 0000000..d8361f3 --- /dev/null +++ b/recipes-bsp/firmware/firmware-qcom-dragonboard410c.inc @@ -0,0 +1,36 @@ +DESCRIPTION = "QCOM Firmware for DragonBoard 410c" + +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4d087ee0965cb059f1b2f9429e166f64" + +DEPENDS += "mtools-native" + +inherit allarch + +S = "${WORKDIR}/linux-board-support-package-r${PV}" + +do_compile() { + : +} + +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 + + install -d ${D}${sysconfdir}/ + install -m 0644 LICENSE ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE-${PN} +} + +FILES_${PN} += "/boot/modem_fsg" +FILES_${PN} += "${nonarch_base_libdir}/firmware/wlan/*" +FILES_${PN} += "${nonarch_base_libdir}/firmware/qcom/msm8916/*" + +INSANE_SKIP_${PN} += "arch" diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb b/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb index 29d6dab..6f188bc 100644 --- a/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb +++ b/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb @@ -1,40 +1,5 @@ -DESCRIPTION = "QCOM Firmware for DragonBoard 410c" - -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://LICENSE;md5=4d087ee0965cb059f1b2f9429e166f64" +require recipes-bsp/firmware/firmware-qcom-dragonboard410c.inc SRC_URI = "http://releases.linaro.org/96boards/dragonboard410c/qualcomm/firmware/linux-board-support-package-r${PV}.zip" SRC_URI[md5sum] = "25c241bfd5fb2e55e8185752d5fe92ce" SRC_URI[sha256sum] = "46953b974c5c58c7ca66db414437c0268b033ac9d28127e98d9c4e1a49359da5" - -DEPENDS += "mtools-native" - -inherit allarch - -S = "${WORKDIR}/linux-board-support-package-r${PV}" - -do_compile() { - : -} - -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 - - install -d ${D}${sysconfdir}/ - install -m 0644 LICENSE ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE-${PN} -} - -FILES_${PN} += "/boot/modem_fsg" -FILES_${PN} += "${nonarch_base_libdir}/firmware/wlan/*" -FILES_${PN} += "${nonarch_base_libdir}/firmware/qcom/msm8916/*" - -INSANE_SKIP_${PN} += "arch" diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1036.1.bb b/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1036.1.bb new file mode 100644 index 0000000..194c3e5 --- /dev/null +++ b/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1036.1.bb @@ -0,0 +1,15 @@ +# This firmware is not released for redistribution, however it can be +# downloaded from https://developer.qualcomm.com/hardware/dragonboard-410c +# +# Add the following line to local.conf to use it: +# PREFERRED_VERSION_firmware-qcom-dragonboard410c = "1036.1" +# You have to manually put the downloaded file into ${DL_DIR} + +require recipes-bsp/firmware/firmware-qcom-dragonboard410c.inc + +SRC_URI = '${@oe.utils.conditional("PREFERRED_VERSION_firmware-qcom-dragonboard410c", "1036.1", "file://dragonboard_410c.zip.1.0-r1036.1.zip", "", d)}' +SRC_URI[md5sum] = "3092fccf7a97fa319d7732a98425f9d4" +SRC_URI[sha256sum] = "93070f58fa3aa6467baa881935c37c4da2df2a8af3248746931ce3d11a3a1200" + +# This should not be selected by default as the firmware archive is behind the accept&click wall. +DEFAULT_PREFERENCE = "-1"