All of lore.kernel.org
 help / color / mirror / Atom feed
* [dunfell/master PATCH-V2 3/3] AM64x Unification: Update ti-sci-fw recipe
@ 2021-04-19  8:20 Sinthu Raja M
  0 siblings, 0 replies; only message in thread
From: Sinthu Raja M @ 2021-04-19  8:20 UTC (permalink / raw)
  To: meta-ti; +Cc: Praneeth Bajjuri, Sinthu Raja

     Update ti-sci-fw recipe to build for both SK and EVM compilation and
     installation through one machine name

Signed-off-by: Sinthu Raja <x0257345@ti.com>
---
 recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb | 83 ++++++++++++++++++++++----
 1 file changed, 73 insertions(+), 10 deletions(-)

diff --git a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
index 87fdec68d..de8be2070 100644
--- a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
+++ b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
@@ -11,6 +11,8 @@ PR = "r1"
 COMPATIBLE_MACHINE = "k3r5"
 COMPATIBLE_MACHINE_aarch64 = "null"
 
+inherit uboot-config uboot-extlinux-config uboot-sign deploy cml1 python3native
+
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 TI_SECURE_DEV_PKG ?= ""
@@ -85,6 +87,27 @@ do_deploy () {
 	install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
 }
 
+do_compile_am64xx-evm-k3r5 () {
+	cd ${WORKDIR}/imggen/
+	if [ -n "${UBOOT_CONFIG}" ]
+	then
+		for config in ${UBOOT_MACHINE}; do
+			i=$(expr $i + 1);
+			for type in ${UBOOT_CONFIG}; do
+				j=$(expr $j + 1);
+				if [ $j -eq $i ]
+				then
+					oe_runmake
+				fi
+			done
+			unset j
+		done
+		unset i
+	else
+		oe_runmake
+	fi
+}
+
 do_install_j7200-evm-k3r5() {
 	install -d ${D}/boot
 	install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
@@ -100,19 +123,59 @@ do_deploy_j7200-evm-k3r5() {
 	install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
 }
 
-do_install_am64xx-evm-k3r5() {
-	install -d ${D}/boot
-	install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
-	ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK}
-	ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
+do_install_am64xx-evm-k3r5 () {
+	if [ -n "${UBOOT_CONFIG}" ]
+	then
+		for config in ${UBOOT_MACHINE}; do
+			i=$(expr $i + 1);
+			for type in ${UBOOT_CONFIG}; do
+				j=$(expr $j + 1);
+				if [ $j -eq $i ]
+				then
+					install -d ${D}/boot/${type}
+					install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${type}/${UBOOT_IMAGE}-${type}
+					cd ${D}/boot/${type}
+					ln -sf ${UBOOT_IMAGE}-${type} ${UBOOT_SYMLINK}-${type}
+					ln -sf ${UBOOT_IMAGE}-${type} ${UBOOT_BINARY}
+				fi
+			done
+			unset j
+		done
+		unset i
+	else
+		install -d ${D}/boot
+		install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
+	        ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK}
+		ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
+	fi
 }
 
 do_deploy_am64xx-evm-k3r5() {
-	install -d ${DEPLOYDIR}
-	install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
-	ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK}
-	ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY}
-	install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
+	if [ -n "${UBOOT_CONFIG}" ]
+	then
+		for config in ${UBOOT_MACHINE}; do
+			i=$(expr $i + 1);
+			for type in ${UBOOT_CONFIG}; do
+				j=$(expr $j + 1);
+				if [ $j -eq $i ]
+				then
+					install -d ${DEPLOYDIR}/${type}
+					install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${type}/${UBOOT_IMAGE}-${type}
+					cd ${DEPLOYDIR}/${type}
+					ln -sf ${UBOOT_IMAGE}-${type} ${UBOOT_SYMLINK}-${type}
+					ln -sf ${UBOOT_IMAGE}-${type} ${UBOOT_BINARY}
+				fi
+			done
+			unset j
+		done
+		unset i
+	else
+		install -d ${DEPLOYDIR}
+		install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
+		ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK}
+		ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY}
+		install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
+	fi
 }
 
 addtask deploy before do_build after do_compile
-- 
2.17.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-19  8:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-19  8:20 [dunfell/master PATCH-V2 3/3] AM64x Unification: Update ti-sci-fw recipe Sinthu Raja M

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.