diff mbox series

[meta-ti,master/kirkstone,6/9] ti-sci-fw: Drop k3-image-gen and only provide firmware

Message ID 20230525181132.417197-7-afd@ti.com
State Accepted
Delegated to: Ryan Eatmon
Headers show
Series Switch to U-Boot binman | expand

Commit Message

Andrew Davis May 25, 2023, 6:11 p.m. UTC
This converts ti-sci-fw into a standard firmware provider package. We do
not need to do anything additional here with that firmware as U-Boot now
does that for us with binman.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 .../recipes-bsp/ti-linux-fw/ti-linux-fw.inc   |  14 +-
 .../recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb    | 144 ++----------------
 2 files changed, 12 insertions(+), 146 deletions(-)
diff mbox series

Patch

diff --git a/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc b/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc
index c971321f..a0c2f79c 100644
--- a/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc
+++ b/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc
@@ -1,4 +1,4 @@ 
-SUMMARY = "TI SCI firmware (SYSFW)"
+SUMMARY = "Common include for TI Linux firmware"
 
 LICENSE = "TI-TFL"
 LIC_FILES_CHKSUM = "file://LICENSE.ti;md5=b5aebf0668bdf95621259288c4a46d76"
@@ -16,21 +16,13 @@  IMG_DEC_FW_VERSION = "1.0"
 CNM_WAVE521_FW_VERSION = "1.0.00"
 TIFS_LPM_STUB_FW_VERSION = "08.06.04"
 TI_DM_FW_VERSION = "08.06.04"
+TI_SYSFW_VERSION = "08.06.04"
 
 TI_LINUX_FW_SRCREV ?= "56819cfa9e72a4575b2aef6f8b986092d7d3efa9"
 SRCREV = "${TI_LINUX_FW_SRCREV}"
 
 BRANCH ?= "ti-linux-firmware"
 
-K3_IMAGE_GEN_SRCREV ?= "150f1956b4bdcba36e7dffc78a4342df602f8d6e"
-SRCREV_imggen = "${K3_IMAGE_GEN_SRCREV}"
-SRCREV_FORMAT = "imggen"
-
-K3_IMAGE_GEN_BRANCH ?= "master"
-
-SRC_URI = " \
-	git://git.ti.com/git/processor-firmware/ti-linux-firmware.git;protocol=https;branch=${BRANCH} \
-	git://git.ti.com/git/k3-image-gen/k3-image-gen.git;protocol=https;branch=${K3_IMAGE_GEN_BRANCH};destsuffix=imggen;name=imggen \
-"
+SRC_URI = "git://git.ti.com/git/processor-firmware/ti-linux-firmware.git;protocol=https;branch=${BRANCH}"
 
 S = "${WORKDIR}/git"
diff --git a/meta-ti-bsp/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb b/meta-ti-bsp/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
index ee995fa5..6a4c03f9 100644
--- a/meta-ti-bsp/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
+++ b/meta-ti-bsp/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
@@ -1,149 +1,23 @@ 
-require recipes-bsp/ti-linux-fw/ti-linux-fw.inc
-
-DEPENDS = "openssl-native u-boot-mkimage-native dtc-native virtual/bootloader"
-DEPENDS:remove:am65xx-evm-k3r5 = "virtual/bootloader"
-DEPENDS:remove:am65xx-evm-k3r5-sr2 = "virtual/bootloader"
-DEPENDS:remove:am65xx-hs-evm-k3r5 = "virtual/bootloader"
-DEPENDS:remove:am65xx-hs-evm-k3r5-sr2 = "virtual/bootloader"
-DEPENDS:remove:j721e-evm-k3r5 = "virtual/bootloader"
-DEPENDS:remove:j721e-hs-evm-k3r5 = "virtual/bootloader"
-DEPENDS:remove:j721e-hs-evm-k3r5-sr1-1 = "virtual/bootloader"
-DEPENDS:remove:beaglebone-ai64-k3r5 = "virtual/bootloader"
-
-CLEANBROKEN = "1"
-PR = "${INC_PR}.2"
+SUMMARY = "TI SYSFW/TIFS Firmware"
 
-# Loaded by R5F core
-COMPATIBLE_MACHINE = "k3r5"
-COMPATIBLE_MACHINE:aarch64 = "null"
+require recipes-bsp/ti-linux-fw/ti-linux-fw.inc
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-# Use TI SECDEV for signing
-inherit ti-secdev
-
-SYSFW_SOC ?= "unknown"
-SYSFW_SUFFIX ?= "unknown"
-SYSFW_CONFIG ?= "unknown"
-
-SYSFW_PREFIX = "sci"
-SYSFW_PREFIX:j721e-evm-k3r5 = "fs"
-SYSFW_PREFIX:j721e-hs-evm-k3r5 = "fs"
-SYSFW_PREFIX:j721e-hs-evm-k3r5-sr1-1 = "fs"
-SYSFW_PREFIX:beaglebone-ai64-k3r5 = "fs"
-SYSFW_PREFIX:j7200-evm-k3r5 = "fs"
-SYSFW_PREFIX:j7200-hs-evm-k3r5 = "fs"
-SYSFW_PREFIX:j721s2-evm-k3r5-gp = "fs"
-SYSFW_PREFIX:j721s2-evm-k3r5-sr1-hs-fs = "fs"
-SYSFW_PREFIX:j721s2-hs-evm-k3r5 = "fs"
-SYSFW_PREFIX:j784s4-evm-k3r5-gp = "fs"
-SYSFW_PREFIX:j784s4-evm-k3r5-sr1-hs-fs = "fs"
-SYSFW_PREFIX:j784s4-hs-evm-k3r5 = "fs"
-SYSFW_PREFIX:am62xx-evm-k3r5-gp = "fs"
-SYSFW_PREFIX:am62xx-evm-k3r5-hs-se = "fs"
-SYSFW_PREFIX:am62xx-evm-k3r5-hs-fs = "fs"
-SYSFW_PREFIX:beagleplay-k3r5 = "fs"
-SYSFW_PREFIX:am62xx-lp-evm-k3r5 = "fs"
-SYSFW_PREFIX:am62xx-lp-evm-k3r5-hs-se = "fs"
-SYSFW_PREFIX:am62xx-lp-evm-k3r5-hs-fs = "fs"
-SYSFW_PREFIX:am62axx-evm-k3r5-gp = "fs"
-SYSFW_PREFIX:am62axx-evm-k3r5-hs-fs = "fs"
-SYSFW_PREFIX:am62axx-evm-k3r5-hs-se = "fs"
-
-SYSFW_TISCI = "${S}/ti-sysfw/ti-${SYSFW_PREFIX}-firmware-${SYSFW_SOC}-*.bin"
-
-SYSFW_TIBOOT3 = "tiboot3-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.bin"
-SYSFW_TIBOOT3_SYMLINK ?= "tiboot3.bin"
-
-SYSFW_BINARY = "sysfw-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.itb"
-SYSFW_VBINARY = "sysfw-${PV}-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.itb"
-SYSFW_IMAGE = "sysfw-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.itb"
-SYSFW_SYMLINK ?= "sysfw.itb"
-
-SYSFW_VBINARY:am65xx-evm-k3r5 = "sysfw-${PV}-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.itb"
-SYSFW_VBINARY:am65xx-evm-k3r5-sr2 = "sysfw-${PV}-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.itb"
-SYSFW_VBINARY:am65xx-hs-evm-k3r5 = "sysfw-${PV}-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.itb"
-SYSFW_VBINARY:am65xx-hs-evm-k3r5-sr2 = "sysfw-${PV}-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.itb"
-SYSFW_VBINARY:j721e-evm-k3r5 = "sysfw-${PV}-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.itb"
-SYSFW_VBINARY:j721e-hs-evm-k3r5 = "sysfw-${PV}-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.itb"
-SYSFW_VBINARY:j721e-hs-evm-k3r5-sr1-1 = "sysfw-${PV}-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.itb"
-
-SYSFW_IMAGE:am65xx-evm-k3r5 = "sysfw-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.itb"
-SYSFW_IMAGE:am65xx-evm-k3r5-sr2 = "sysfw-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.itb"
-SYSFW_IMAGE:am65xx-hs-evm-k3r5 = "sysfw-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.itb"
-SYSFW_IMAGE:am65xx-hs-evm-k3r5-sr2 = "sysfw-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.itb"
-SYSFW_IMAGE:j721e-evm-k3r5 = "sysfw-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.itb"
-SYSFW_IMAGE:j721e-hs-evm-k3r5 = "sysfw-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.itb"
-SYSFW_IMAGE:j721e-hs-evm-k3r5-sr1-1 = "sysfw-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.itb"
-
 CFLAGS[unexport] = "1"
 LDFLAGS[unexport] = "1"
 AS[unexport] = "1"
 LD[unexport] = "1"
 
-do_configure[noexec] = "1"
-
-EXTRA_OEMAKE = "\
-    CROSS_COMPILE=${TARGET_PREFIX} SOC=${SYSFW_SOC} SOC_TYPE=${SYSFW_SUFFIX} \
-    CONFIG=${SYSFW_CONFIG} SYSFW_DIR="${S}/ti-sysfw" \
-    SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin" \
-"
-EXTRA_OEMAKE:remove:am65xx-evm-k3r5 = "SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
-EXTRA_OEMAKE:remove:am65xx-evm-k3r5-sr2 = "SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
-EXTRA_OEMAKE:remove:am65xx-hs-evm-k3r5 = "SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
-EXTRA_OEMAKE:remove:am65xx-hs-evm-k3r5-sr2 = "SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
-EXTRA_OEMAKE:remove:j721e-evm-k3r5 = "SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
-EXTRA_OEMAKE:remove:j721e-hs-evm-k3r5 = "SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
-EXTRA_OEMAKE:remove:j721e-hs-evm-k3r5-sr1-1 = "SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
-EXTRA_OEMAKE:remove:beaglebone-ai64-k3r5 = "SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
+PV = "${TI_SYSFW_VERSION}"
+PR = "${INC_PR}.0"
 
-do_compile() {
-	cd ${WORKDIR}/imggen/
-	oe_runmake
-}
+CLEANBROKEN = "1"
 
 do_install() {
-	install -d ${D}/boot
-
-	if [ -f "${WORKDIR}/imggen/${SYSFW_BINARY}" ]; then
-		install -m 644 ${WORKDIR}/imggen/${SYSFW_BINARY} ${D}/boot/${SYSFW_VBINARY}
-		ln -sf ${SYSFW_VBINARY} ${D}/boot/${SYSFW_IMAGE}
-		if [ ! -z "${SYSFW_SYMLINK}" ]; then
-			ln -sf ${SYSFW_VBINARY} ${D}/boot/${SYSFW_SYMLINK}
-		fi
-	fi
-
-	if [ -f "${WORKDIR}/imggen/${SYSFW_TIBOOT3}" ]; then
-		install -m 644 ${WORKDIR}/imggen/${SYSFW_TIBOOT3} ${D}/boot/${SYSFW_TIBOOT3}
-		if [ ! -z "${SYSFW_TIBOOT3_SYMLINK}" ]; then
-			ln -sf ${SYSFW_TIBOOT3} ${D}/boot/${SYSFW_TIBOOT3_SYMLINK}
-		fi
-	fi
-}
-
-FILES:${PN} = "/boot"
-
-inherit deploy
-
-do_deploy () {
-	install -d ${DEPLOYDIR}
-
-	if [ -f "${WORKDIR}/imggen/${SYSFW_BINARY}" ]; then
-		install -m 644 ${WORKDIR}/imggen/${SYSFW_BINARY} ${DEPLOYDIR}/${SYSFW_VBINARY}
-		ln -sf ${SYSFW_VBINARY} ${DEPLOYDIR}/${SYSFW_IMAGE}
-		if [ ! -z "${SYSFW_SYMLINK}" ]; then
-			ln -sf ${SYSFW_VBINARY} ${DEPLOYDIR}/${SYSFW_SYMLINK}
-			install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
-		fi
-	fi
-
-	if [ -f "${WORKDIR}/imggen/${SYSFW_TIBOOT3}" ]; then
-		install -m 644 ${WORKDIR}/imggen/${SYSFW_TIBOOT3} ${DEPLOYDIR}/${SYSFW_TIBOOT3}
-		if [ ! -z "${SYSFW_TIBOOT3_SYMLINK}" ]; then
-			ln -sf ${SYSFW_TIBOOT3} ${DEPLOYDIR}/${SYSFW_TIBOOT3_SYMLINK}
-			install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
-		fi
-	fi
+	install -d ${D}${nonarch_base_libdir}/firmware/ti-sysfw
+	install -m 644 ${S}/ti-sysfw/ti-sci-firmware-* ${D}${nonarch_base_libdir}/firmware/ti-sysfw
+	install -m 644 ${S}/ti-sysfw/ti-fs-firmware-* ${D}${nonarch_base_libdir}/firmware/ti-sysfw
 }
 
-addtask deploy before do_build after do_compile
+FILES:${PN} = "${nonarch_base_libdir}/firmware"