diff options
author | Mark Hatle <mark.hatle@xilinx.com> | 2021-08-30 10:30:30 -0700 |
---|---|---|
committer | Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com> | 2021-09-28 08:19:43 -0700 |
commit | 33fae482425fece5164f89819d810a21551c5a49 (patch) | |
tree | 4c1ed923e2e2c7894f80cfb15e0f0dfecf43338f /meta-xilinx-bsp/recipes-kernel | |
parent | 527d8690e4d1c296309c22d8d94154582b5bc939 (diff) | |
download | meta-xilinx-33fae482425fece5164f89819d810a21551c5a49.tar.gz |
linux-firmware: Move from bbappend to a custom firmware recipe
Ultra96 WiFi/BT chip requires custom firmware. The main wifi firmware is
provided by the linux-firmware recipe, but the Bluetooth firmware must be
sourced from another location.
We only package the specific firmware that we require for this, and do
it in a way that is similar to the linux-firmware recipe.
Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
Diffstat (limited to 'meta-xilinx-bsp/recipes-kernel')
-rw-r--r-- | meta-xilinx-bsp/recipes-kernel/linux-firmware/linux-firmware-ti-bt.bb | 65 | ||||
-rw-r--r-- | meta-xilinx-bsp/recipes-kernel/linux-firmware/linux-firmware_%.bbappend | 29 |
2 files changed, 65 insertions, 29 deletions
diff --git a/meta-xilinx-bsp/recipes-kernel/linux-firmware/linux-firmware-ti-bt.bb b/meta-xilinx-bsp/recipes-kernel/linux-firmware/linux-firmware-ti-bt.bb new file mode 100644 index 00000000..c3adcf58 --- /dev/null +++ b/meta-xilinx-bsp/recipes-kernel/linux-firmware/linux-firmware-ti-bt.bb | |||
@@ -0,0 +1,65 @@ | |||
1 | # TIInit_11.8.32.bts is required for bluetooth support but this particular | ||
2 | # version is not available in the linux-firmware repository. | ||
3 | # | ||
4 | SUMMARY = "TI Bluetooth firmware files for use with Linux kernel" | ||
5 | SECTION = "kernel" | ||
6 | |||
7 | LICENSE = "Firmware-ti-bt" | ||
8 | |||
9 | LIC_FILES_CHKSUM = "file://LICENSE.ti-bt;md5=f39eac9f4573be5b012e8313831e72a9" | ||
10 | |||
11 | # No common license for this, so be sure to include it | ||
12 | NO_GENERIC_LICENSE[Firmware-ti-bt] = "LICENSE.ti-bt" | ||
13 | |||
14 | SRC_URI = "git://git.ti.com/ti-bt/service-packs.git;protocol=https" | ||
15 | SRCREV = "c290f8af9e388f37e509ecb111a1b64572b7c225" | ||
16 | |||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | inherit allarch | ||
20 | |||
21 | CLEANBROKEN = "1" | ||
22 | |||
23 | do_unpack[postfuncs] += "rename_license" | ||
24 | |||
25 | rename_license() { | ||
26 | mv ${S}/LICENSE ${S}/LICENSE.ti-bt | ||
27 | } | ||
28 | |||
29 | do_compile() { | ||
30 | : | ||
31 | } | ||
32 | |||
33 | do_install() { | ||
34 | oe_runmake 'DEST_DIR=${D}' 'BASE_LIB_DIR=${nonarch_base_libdir}' | ||
35 | |||
36 | # Remove files we're not packaging... | ||
37 | rm -f ${D}${nonarch_base_libdir}/firmware/ti-connectivity/TIInit_7.6.15.bts \ | ||
38 | ${D}${nonarch_base_libdir}/firmware/ti-connectivity/TIInit_10.6.15.bts \ | ||
39 | ${D}${nonarch_base_libdir}/firmware/ti-connectivity/TIInit_6.7.16_bt_spec_4.1.bts \ | ||
40 | ${D}${nonarch_base_libdir}/firmware/ti-connectivity/TIInit_12.8.32.bts \ | ||
41 | ${D}${nonarch_base_libdir}/firmware/ti-connectivity/TIInit_12.10.28.bts \ | ||
42 | ${D}${nonarch_base_libdir}/firmware/ti-connectivity/TIInit_6.7.16_avpr_add-on.bts \ | ||
43 | ${D}${nonarch_base_libdir}/firmware/ti-connectivity/TIInit_6.7.16_bt_spec_4.0.bts \ | ||
44 | ${D}${nonarch_base_libdir}/firmware/ti-connectivity/TIInit_6.7.16_ble_add-on.bts | ||
45 | |||
46 | for each in ${D}${nonarch_base_libdir}/firmware/ti-connectivity/* ; do | ||
47 | ln -s ti-connectivity/`basename $each` ${D}${nonarch_base_libdir}/firmware/`basename $each` | ||
48 | done | ||
49 | |||
50 | cp LICENSE.ti-bt ${D}${nonarch_base_libdir}/firmware/License.ti-bt | ||
51 | } | ||
52 | |||
53 | # 11.8.32 = WL180x, WL183x, WL185x PG2.1 or PG2.2, 8.32 ROM Version | ||
54 | PACKAGES =+ "${PN}-wl180x ${PN}-license" | ||
55 | |||
56 | FILES_${PN}-license = "${nonarch_base_libdir}/firmware/License.ti-bt" | ||
57 | |||
58 | FILES_${PN}-wl180x = "${nonarch_base_libdir}/firmware/TIInit_11.8.32.bts \ | ||
59 | ${nonarch_base_libdir}/firmware/ti-connectivity/TIInit_11.8.32.bts" | ||
60 | |||
61 | RDEPENDS_${PN}-wl180x = "${PN}-license linux-firmware-wl18xx" | ||
62 | |||
63 | LICENSE_${PN}-wl180x = "Firmware-ti-bt" | ||
64 | |||
65 | INSANE_SKIP = "arch" | ||
diff --git a/meta-xilinx-bsp/recipes-kernel/linux-firmware/linux-firmware_%.bbappend b/meta-xilinx-bsp/recipes-kernel/linux-firmware/linux-firmware_%.bbappend deleted file mode 100644 index eb64045a..00000000 --- a/meta-xilinx-bsp/recipes-kernel/linux-firmware/linux-firmware_%.bbappend +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | # TIInit_11.8.32.bts is required for bluetooth support but this particular | ||
2 | # version is not available in the linux-firmware repository. | ||
3 | # | ||
4 | SRC_URI_append_ultra96 = "\ | ||
5 | https://git.ti.com/ti-bt/service-packs/blobs/raw/c290f8af9e388f37e509ecb111a1b64572b7c225/initscripts/TIInit_11.8.32.bts;name=TIInit_11.8.32 \ | ||
6 | " | ||
7 | |||
8 | SRC_URI[TIInit_11.8.32.md5sum] = "b1e142773e8ef0537b93895ebe2fcae3" | ||
9 | SRC_URI[TIInit_11.8.32.sha256sum] = "962322c05857ad6b1fb81467bdfc59c125e04a6a8eaabf7f24b742ddd68c3bfa" | ||
10 | |||
11 | do_install_append_ultra96() { | ||
12 | cp ${WORKDIR}/TIInit_11.8.32.bts ${D}${nonarch_base_libdir}/firmware/ti-connectivity/ | ||
13 | ( cd ${D}${nonarch_base_libdir}/firmware ; ln -sf ti-connectivity/* . ) | ||
14 | rm -f ${D}${nonarch_base_libdir}/firmware/ti-connectivity/TIInit_7* | ||
15 | rm -f ${D}${nonarch_base_libdir}/firmware/TIInit_7* | ||
16 | } | ||
17 | |||
18 | INSANE_SKIP_${PN} += "installed-vs-shipped" | ||
19 | |||
20 | PACKAGES_remove_ultra96 = "${PN}-wl12xx" | ||
21 | |||
22 | FILES_${PN}-wl18xx_ultra96 = " \ | ||
23 | ${nonarch_base_libdir}/firmware/wl18* \ | ||
24 | ${nonarch_base_libdir}/firmware/TI* \ | ||
25 | ${nonarch_base_libdir}/firmware/ti-connectivity/wl18* \ | ||
26 | ${nonarch_base_libdir}/firmware/ti-connectivity/TI* \ | ||
27 | " | ||
28 | |||
29 | PACKAGE_ARCH_ultra96 = "${BOARD_ARCH}" | ||