aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linaro.org>2020-03-31 02:07:05 +0200
committerAníbal Limón <anibal.limon@linaro.org>2020-05-20 09:35:48 -0500
commit9fce842e9c2007322e367fecc1fb4b9a4de02505 (patch)
tree779e751aa850496837d279c31bb3c1f8ff7d601b
parent07fceedf0c24f3953a29838c2a4b6255b0fdf6a7 (diff)
downloadmeta-qcom-9fce842e9c2007322e367fecc1fb4b9a4de02505.tar.gz
meta-qcom-9fce842e9c2007322e367fecc1fb4b9a4de02505.tar.bz2
meta-qcom-9fce842e9c2007322e367fecc1fb4b9a4de02505.zip
firmware-qcom-dragonboard845c: Generate WiFi board-2.bin file for ath10k
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
-rw-r--r--recipes-bsp/firmware/firmware-qcom-dragonboard845c/generate_board-2_json.sh23
-rw-r--r--recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb16
2 files changed, 37 insertions, 2 deletions
diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard845c/generate_board-2_json.sh b/recipes-bsp/firmware/firmware-qcom-dragonboard845c/generate_board-2_json.sh
new file mode 100644
index 0000000..3a1d532
--- /dev/null
+++ b/recipes-bsp/firmware/firmware-qcom-dragonboard845c/generate_board-2_json.sh
@@ -0,0 +1,23 @@
+JSON="$2"
+
+iter=0
+echo "[" > "${JSON}"
+for file in $1/bdwlan.*; do
+ [[ $file == *.txt ]] && continue
+
+ iter=$((iter+1))
+ [ $iter -ne 1 ] && echo " }," >> "${JSON}"
+
+ echo " {" >> "${JSON}"
+ echo " \"data\": \"$file\"," >> "${JSON}"
+ if [[ $file == */bdwlan.bin ]]; then
+ file_ext="ff"
+ else
+ file_ext="$(printf '%x\n' "$(basename "${file}" | sed -E 's:^.*\.b?([0-9a-f]*)$:0x\1:')")"
+ fi
+ echo " \"names\": [\"bus=snoc,qmi-board-id=${file_ext}\"]" >> "${JSON}"
+done
+
+echo " }" >> "${JSON}"
+echo "]" >> "${JSON}"
+
diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb b/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb
index 6d36a49..88a1a6c 100644
--- a/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb
+++ b/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb
@@ -3,17 +3,26 @@ DESCRIPTION = "QCOM Firmware for DragonBoard 845c"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENSE.qcom.txt;md5=cbbe399f2c983ad51768f4561587f000"
-SRC_URI = "https://releases.linaro.org/96boards/dragonboard845c/qualcomm/firmware/RB3_firmware_${PV}.zip"
+SRC_URI = "https://releases.linaro.org/96boards/dragonboard845c/qualcomm/firmware/RB3_firmware_${PV}.zip \
+ git://github.com/alimon/qca-swiss-army-knife \
+ file://generate_board-2_json.sh"
SRC_URI[md5sum] = "ad69855a1275547b16d94a1b5405ac62"
SRC_URI[sha256sum] = "4289d2f2a7124b104d0274879e702aae9b1e50c42eec3747f8584c6744ef65e3"
+SRCREV = "0c01a2abc3e9855b71f0fbea2c335011104d9ec0"
COMPATIBLE_MACHINE = "(dragonboard-845c)"
PACKAGE_ARCH = "${MACHINE_ARCH}"
+DEPENDS += "bash-native"
+inherit python3native
S = "${WORKDIR}"
do_compile() {
- :
+ # Build board-2.bin needed by WiFi
+ mkdir -p bdf
+ cp ./38-bdwlan_split/bdwlan*.* bdf
+ bash generate_board-2_json.sh bdf board-2.json
+ python3 git/tools/scripts/ath10k/ath10k-bdencoder -c board-2.json -o board-2.bin
}
do_install() {
@@ -27,6 +36,9 @@ do_install() {
install -m 0444 ./21-cdsp_split/firmware/cdsp*.* ${D}${nonarch_base_libdir}/firmware/qcom/sdm845
install -m 0444 ./33-venus_split/venus.* ${D}${nonarch_base_libdir}/firmware/qcom/venus-5.2/
+ 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
}