* Use ti-cgt-pru to build the firmware images

Signed-off-by: Jacob Stiffler <[email protected]>
---
 recipes-bsp/prueth-fw/prueth-fw_git.bb | 46 ++++++++++++++++++++++++----------
 1 file changed, 33 insertions(+), 13 deletions(-)

diff --git a/recipes-bsp/prueth-fw/prueth-fw_git.bb 
b/recipes-bsp/prueth-fw/prueth-fw_git.bb
index 8359cf0..5a671e3 100644
--- a/recipes-bsp/prueth-fw/prueth-fw_git.bb
+++ b/recipes-bsp/prueth-fw/prueth-fw_git.bb
@@ -1,34 +1,54 @@
 DESCRIPTION = "PRU Ethernet firmware for AM57xx, AM437x, AM335x and K2G"
 
 LICENSE = "TI-TFL"
-LIC_FILES_CHKSUM = "file://LICENSE.ti;md5=b5aebf0668bdf95621259288c4a46d76"
+LIC_FILES_CHKSUM = 
"file://src/firmware_version.h;beginline=6;endline=53;md5=1f0a640a261059cdcbbcf01e6a739ff3"
 
+require recipes-ti/includes/ti-paths.inc
+
+ICSS_EMAC_LLD_GIT_URI = "git://git.ti.com/keystone-rtos/icss-emac.git"
+ICSS_EMAC_LLD_GIT_PROTOCOL = "git"
+ICSS_EMAC_LLD_GIT_BRANCH = "master"
+ICSS_EMAC_LLD_GIT_DESTSUFFIX = "git/ti/drv/icss_emac"
+
+# Below commit ID corresponds to "DEV.ICSS_EMAC_LLD.01.00.00.11B"
+ICSS_EMAC_LLD_SRCREV = "bd643d75a0322b6ca769d8ecbee310d859c0f761"
+
+BRANCH = "${ICSS_EMAC_LLD_GIT_BRANCH}"
+SRC_URI = 
"${ICSS_EMAC_LLD_GIT_URI};destsuffix=${ICSS_EMAC_LLD_GIT_DESTSUFFIX};protocol=${ICSS_EMAC_LLD_GIT_PROTOCOL};branch=${BRANCH}"
+
+SRCREV = "${ICSS_EMAC_LLD_SRCREV}"
 PV = "5.1.4"
 PR = "r0"
 
-CLEANBROKEN = "1"
+S = "${WORKDIR}/${ICSS_EMAC_LLD_GIT_DESTSUFFIX}/firmware/icss_dualemac"
 
 COMPATIBLE_MACHINE = "am57xx-evm|am437x-evm|am335x-evm|k2g"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-SRCREV = "b9d9e4bef2f32d4b55a63ecfec2e21f7b1eaaa34"
-BRANCH ?= "ti-linux-firmware-4.1.y"
+DEPENDS = "ti-cgt-pru-native"
+
+PRU_VERSION = ""
+PRU_VERSION_am335x-evm = "REV1"
+PRU_VERSION_am437x-evm = "REV1"
+PRU_VERSION_am57xx-evm = "REV2"
+PRU_VERSION_k2g = "REV2"
 
-SRC_URI = 
"git://git.ti.com/processor-firmware/ti-linux-firmware.git;protocol=git;branch=${BRANCH}"
+FW_PREFIX = ""
+FW_PREFIX_am335x-evm = "am335x"
+FW_PREFIX_am437x-evm = "am437x"
+FW_PREFIX_am57xx-evm = "am57xx"
+FW_PREFIX_k2g = "k2g"
 
-S = "${WORKDIR}/git"
 
-TARGET_am57xx-evm = "am57xx-pru0-prueth-fw.elf am57xx-pru1-prueth-fw.elf"
-TARGET_am437x-evm = "am437x-pru0-prueth-fw.elf am437x-pru1-prueth-fw.elf"
-TARGET_am335x-evm = "am335x-pru0-prueth-fw.elf am335x-pru1-prueth-fw.elf"
-TARGET_k2g = "k2g-pru0-prueth-fw.elf k2g-pru1-prueth-fw.elf"
+EXTRA_OEMAKE += "CL_PRU_INSTALL_PATH="${TI_CGT_PRU_INSTALL_DIR}" 
PRU_VERSION_LIST="${PRU_VERSION}""
 
 do_install() {
        install -d ${D}${base_libdir}/firmware/ti-pruss
-       for f in ${TARGET}; do
-               install -m 0644 ${S}/ti-pruss/$f 
${D}${base_libdir}/firmware/ti-pruss/$f
-       done
+       install -m 0644 ./elf/${PRU_VERSION}/icss_dualemac_PRU0.elf \
+               
${D}${base_libdir}/firmware/ti-pruss/${FW_PREFIX}-pru0-prueth-fw.elf
+       install -m 0644 ./elf/${PRU_VERSION}/icss_dualemac_PRU1.elf \
+               
${D}${base_libdir}/firmware/ti-pruss/${FW_PREFIX}-pru1-prueth-fw.elf
 }
 
 FILES_${PN} = "${base_libdir}/firmware"
-- 
2.7.4

-- 
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti

Reply via email to