[PATCH dunfell/master] am64xx-sk Add combined boot build support


Lokesh Vutla
 

Add combined boot flow support for the AM64XX SK device.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb | 16 ++++++++++++++++
recipes-bsp/u-boot/u-boot-ti.inc | 6 ++++++
2 files changed, 22 insertions(+)

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 d1d10a60..e7580a57 100644
--- a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
+++ b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
@@ -3,6 +3,7 @@ require recipes-bsp/ti-sci-fw/ti-sci-fw.inc
DEPENDS = "openssl-native u-boot-mkimage-native dtc-native"
DEPENDS_append_j7200-evm-k3r5 = " virtual/bootloader"
DEPENDS_append_am64xx-evm-k3r5 = " virtual/bootloader"
+DEPENDS_append_am64xx-sk-k3r5 = " virtual/bootloader"

CLEANBROKEN = "1"
PR = "r1"
@@ -53,6 +54,7 @@ EXTRA_OEMAKE_append = "${@['',' ${EXTRA_OEMAKE_HS}']['${SYSFW_SUFFIX}' == 'hs']}

EXTRA_OEMAKE_append_j7200-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
EXTRA_OEMAKE_append_am64xx-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
+EXTRA_OEMAKE_append_am64xx-sk-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""

do_compile() {
cd ${WORKDIR}/imggen/
@@ -113,4 +115,18 @@ do_deploy_am64xx-evm-k3r5() {
ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY}
}

+do_install_am64xx-sk-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_deploy_am64xx-sk-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}
+}
+
addtask deploy before do_build after do_compile
diff --git a/recipes-bsp/u-boot/u-boot-ti.inc b/recipes-bsp/u-boot/u-boot-ti.inc
index dc8d6b06..e5f92f4b 100644
--- a/recipes-bsp/u-boot/u-boot-ti.inc
+++ b/recipes-bsp/u-boot/u-boot-ti.inc
@@ -66,6 +66,7 @@ SPL_UART_BINARY_k3r5 = ""
SPL_UART_BINARY_lego-ev3 = ""
SPL_UART_BINARY_j7200-evm-k3r5 = "u-boot-spl.bin"
SPL_UART_BINARY_am64xx-evm-k3r5 = "u-boot-spl.bin"
+SPL_UART_BINARY_am64xx-sk-k3r5 = "u-boot-spl.bin"

SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}"
SPL_UART_SYMLINK ?= "${SPL_UART_BINARY}-${MACHINE}"
@@ -401,4 +402,9 @@ do_deploy_append_am64xx-evm-k3r5 () {
mv ${DEPLOYDIR}/u-boot-spl.bin ${DEPLOYDIR}/u-boot-spl-r5spl.bin || true
}

+do_deploy_append_am64xx-sk-k3r5 () {
+ mv ${DEPLOYDIR}/tiboot3.bin ${DEPLOYDIR}/tiboot3-r5spl.bin || true
+ mv ${DEPLOYDIR}/u-boot-spl.bin ${DEPLOYDIR}/u-boot-spl-r5spl.bin || true
+}
+
TOOLCHAIN = "gcc"
--
2.30.0