summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-ti-bsp/recipes-bsp/zephyr-fw/zephyr-openamp-rsc-table-fw.bb83
1 files changed, 83 insertions, 0 deletions
diff --git a/meta-ti-bsp/recipes-bsp/zephyr-fw/zephyr-openamp-rsc-table-fw.bb b/meta-ti-bsp/recipes-bsp/zephyr-fw/zephyr-openamp-rsc-table-fw.bb
new file mode 100644
index 00000000..4efc99ac
--- /dev/null
+++ b/meta-ti-bsp/recipes-bsp/zephyr-fw/zephyr-openamp-rsc-table-fw.bb
@@ -0,0 +1,83 @@
1SUMMARY = "Precompiled Zephyr OpenAMP example firmware for TI K3 devices"
2
3# Name of this demo's firmware
4FW_NAME = "zephyr_openamp_rsc_table.elf"
5
6# List of cores for which this demo has a build
7FW_CORES = ""
8FW_CORES:am62xx = "mcu-m4f0_0"
9
10# Note: Everything below is common to all our Zephyr firmwares and can be
11# factored out to a common include file once we have more than one demo
12
13LICENSE = "Apache-2.0"
14LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
15
16COMPATIBLE_MACHINE = "k3"
17
18PACKAGE_ARCH = "${MACHINE_ARCH}"
19
20SRC_URI = "git://github.com/glneo/zephyr-firmware.git;protocol=https;branch=main"
21SRCREV = "146d4f9b3930722d73685d600958f0b10ea97de2"
22PV = "3.6.0"
23#PR = "r1"
24
25S = "${WORKDIR}/git"
26
27FW_PLAT = ""
28FW_PLAT:am62xx = "am62"
29
30FW_INSTALL_DIR = "${nonarch_base_libdir}/firmware/zephyr/${FW_PLAT}"
31
32do_install() {
33 for FW_CORE in ${FW_CORES}
34 do
35 install -d ${D}${FW_INSTALL_DIR}/${FW_CORE}
36 install -m 0644 ${S}/${FW_PLAT}/${FW_CORE}/${FW_NAME} ${D}${FW_INSTALL_DIR}/${FW_CORE}
37 done
38}
39
40# Make sure that lib/firmware, and all its contents are part of the package
41FILES:${PN} = "${nonarch_base_libdir}/firmware"
42
43# This is used to prevent the build system from stripping the firmwares
44INHIBIT_PACKAGE_STRIP = "1"
45INHIBIT_SYSROOT_STRIP = "1"
46
47# This is used to prevent the build system from splitting out the firmware debug info into a separate file
48INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
49
50# This is a prebuilt with no external dependencies
51INHIBIT_DEFAULT_DEPS = "1"
52
53# Disable arch checking as firmware is likely to be a different arch from the Yocto build
54INSANE_SKIP:${PN} += "arch"
55
56# Zephyr-Firmware has no configure, compile, nor clean steps
57do_configure[noexec] = "1"
58do_compile[noexec] = "1"
59CLEANBROKEN = "1"
60
61inherit update-alternatives
62
63python fw_generate_alternatives() {
64 for fw_core_name in d.getVar('FW_CORES').split():
65 fw_plat = d.getVar('FW_PLAT')
66 fw_pkg_name = d.getVar('PN')
67 fw_core_name_full = (fw_plat + "-" + fw_core_name + "-fw")
68
69 # Create the firmware alternatives
70 d.appendVar('ALTERNATIVE:%s' % fw_pkg_name, (fw_core_name_full + " "))
71
72 # Set up firmware alternatives link names
73 fw_alt_link = ("${nonarch_base_libdir}/firmware/" + fw_core_name_full)
74 d.setVarFlag('ALTERNATIVE_LINK_NAME', fw_core_name_full, fw_alt_link)
75
76 # Set up firmware alternatives link targets
77 fw_alt_target_rename = "${FW_INSTALL_DIR}/" + fw_core_name + "/${FW_NAME}"
78 d.setVarFlag('ALTERNATIVE_TARGET_%s' % fw_pkg_name, fw_core_name_full, fw_alt_target_rename)
79}
80
81do_package[prefuncs] += "fw_generate_alternatives"
82
83ALTERNATIVE_PRIORITY = "20"