[meta-ti] [rocko/master][PATCH 5/5] u-boot-ti-staging: add handling of K3 and AM65x on A53 side

Denys Dmytriyenko denys at ti.com
Sun Jun 17 12:37:23 PDT 2018


Handle dependencies on ATF and OPTEE via PACKAGECONFIGs.

Signed-off-by: Denys Dmytriyenko <denys at ti.com>
---
 recipes-bsp/u-boot/u-boot-ti-staging_2018.01.bb |  6 +++---
 recipes-bsp/u-boot/u-boot-ti.inc                | 27 +++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/recipes-bsp/u-boot/u-boot-ti-staging_2018.01.bb b/recipes-bsp/u-boot/u-boot-ti-staging_2018.01.bb
index 14b5e4d..8f79fe5 100644
--- a/recipes-bsp/u-boot/u-boot-ti-staging_2018.01.bb
+++ b/recipes-bsp/u-boot/u-boot-ti-staging_2018.01.bb
@@ -1,7 +1,7 @@
 require u-boot-ti.inc
 
-PR = "r10"
+PR = "r11"
 
-BRANCH = "ti-u-boot-2018.01"
+BRANCH = "ti-u-boot-2018.01-next"
 
-SRCREV = "3c49934f57ead2da6b6a0a2345d576ba2735687c"
+SRCREV = "6e9cffd6e111df6f9122b4a77c71112981feb9d3"
diff --git a/recipes-bsp/u-boot/u-boot-ti.inc b/recipes-bsp/u-boot/u-boot-ti.inc
index 666d7ae..4fd3529 100644
--- a/recipes-bsp/u-boot/u-boot-ti.inc
+++ b/recipes-bsp/u-boot/u-boot-ti.inc
@@ -29,6 +29,12 @@ PV_append = "+git${SRCPV}"
 # u-boot needs devtree compiler to parse dts files
 DEPENDS += "dtc-native bc-native lzop-native"
 
+PACKAGECONFIG[atf] = "ATF=${STAGING_DIR_HOST}/boot/bl31.bin,,arm-trusted-firmware"
+PACKAGECONFIG[optee] = "TEE=${STAGING_DIR_HOST}/boot/bl32.bin,,optee-os"
+
+# optee-os is not a direct dependency, do not enable optee by default
+PACKAGECONFIG_append_k3 = " atf"
+
 PROVIDES += "u-boot"
 PKG_${PN} = "u-boot"
 PKG_${PN}-dev = "u-boot-dev"
@@ -47,10 +53,12 @@ SPL_BINARY_k2hk-hs-evm = ""
 SPL_BINARY_k2g-hs-evm = ""
 SPL_BINARY_k2l-hs-evm = ""
 SPL_BINARY_omapl138 = ""
+SPL_BINARY_k3 = "tispl.bin"
 
 # SPL (Second Program Loader) to be loaded over UART
 SPL_UART_BINARY = "u-boot-spl.bin"
 SPL_UART_BINARY_keystone = ""
+SPL_UART_BINARY_k3 = ""
 
 SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}"
 SPL_UART_SYMLINK ?= "${SPL_UART_BINARY}-${MACHINE}"
@@ -99,6 +107,25 @@ UBOOT_HS_2ND_BINARY = "u-boot-spl_HS_2ND"
 UBOOT_HS_2ND_IMAGE = "u-boot-spl_HS_2ND-${MACHINE}-${PV}-${PR}"
 UBOOT_HS_2ND_SYMLINK = "u-boot-spl_HS_2ND-${MACHINE}"
 
+do_compile_k3 () {
+	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
+		sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk
+	fi
+
+	unset LDFLAGS
+	unset CFLAGS
+	unset CPPFLAGS
+
+	if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]
+	then
+		echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion
+		echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion
+	fi
+
+	oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
+	oe_runmake -C ${S} O=${B} ${PACKAGECONFIG_CONFARGS} ${UBOOT_MAKE_TARGET}
+}
+
 do_install_append () {
 	if [ -n "${UBOOT_CONFIG}" ]
 	then
-- 
2.7.4



More information about the meta-ti mailing list