Skip to contentSkip to conversation

u-boot-k3-r5: instead of handling R5 in bbappend, use separate recipe

PATCH New Denys Dmytriyenko 1 participant 1 message Jul 26, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 u-boot-k3-r5: instead of handling R5 in bbappend, use separate recipe

This simplifies a lot of things and allows using most of standard u-boot recipe infrastructure.
Set additional PACKAGECONFIG and EXTRA_IMAGEDEPENDS in distro config.

---
 meta-arago-distro/conf/distro/arago.conf           |  5 +++++
 .../recipes-bsp/u-boot/u-boot-k3-r5_2018.01.bb     | 19 ++++++++++++++++
 .../u-boot/u-boot-ti-staging_2018.01.bbappend      | 26 ----------------------
 3 files changed, 24 insertions(+), 26 deletions(-)
 create mode 100644 meta-arago-distro/recipes-bsp/u-boot/u-boot-k3-r5_2018.01.bb
 delete mode 100644 meta-arago-distro/recipes-bsp/u-boot/u-boot-ti-staging_2018.01.bbappend
meta-arago-distro/conf/distro/arago.conf +5 -0
index 7f7baef..b2711c5 100644
@@ -120,6 +120,11 @@ PACKAGECONFIG_remove_pn-gstreamer1.0-plugins-bad_omapl1 = "wayland egl gles2"
 
 PACKAGECONFIG_pn-glmark2 = "drm-gles2 wayland-gles2"
 
+# Enable U-boot OPTEE config for K3
+PACKAGECONFIG_append_pn-u-boot-ti-staging_k3 = " optee"
+
+EXTRA_IMAGEDEPENDS_append_k3 += " u-boot-k3-r5"
+
 # Enable UI and scripting for perf
 PERF_FEATURES_ENABLE ?= "perf-scripting perf-tui"
 
meta-arago-distro/recipes-bsp/u-boot/u-boot-k3-r5_2018.01.bb new file +19 -0
new file mode 100644
index 0000000..e841128
@@ -0,0 +1,19 @@
+require recipes-bsp/u-boot/u-boot-ti-staging_${PV}.bb
+
+PROVIDES = ""
+
+COMPATIBLE_MACHINE = "k3"
+
+CROSS_COMPILE_V7 = "${ELT_TARGET_SYS_ARMV7}-"
+PATH_prepend = "${TOOLCHAIN_PATH_ARMV7}/bin:"
+
+UBOOT_MACHINE_am65xx-evm = "am65x_evm_r5_defconfig"
+
+EXTRA_OEMAKE = 'ARCH=arm CROSS_COMPILE=${CROSS_COMPILE_V7} CC="${CROSS_COMPILE_V7}gcc ${TOOLCHAIN_OPTIONS}" V=1'
+EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
+EXTRA_OEMAKE += 'SYSFW=${SYSFW_FILE}'
+
+UBOOT_BINARY = "tiboot3.bin"
+UBOOT_IMAGE = "tiboot3-${MACHINE}-${PV}-${PR}.bin"
+UBOOT_SYMLINK = "tiboot3-${MACHINE}.bin"
+SPL_BINARY_k3 = ""
meta-arago-distro/recipes-bsp/u-boot/u-boot-ti-staging_2018.01.bbappend deleted +0 -26
deleted file mode 100644
index 5f6c1a5..0000000
@@ -1,26 +0,0 @@
-PACKAGECONFIG_append_k3 = " optee"
-
-CROSS_COMPILE_V7 = "${ELT_TARGET_SYS_ARMV7}-"
-PATH_prepend = "${TOOLCHAIN_PATH_ARMV7}/bin:"
-
-UBOOT_R5_BINARY = "tiboot3.bin"
-UBOOT_R5_IMAGE = "tiboot3-${MACHINE}-${PV}-${PR}.bin"
-UBOOT_R5_SYMLINK = "tiboot3-${MACHINE}.bin"
-
-do_compile_append_am65xx-evm() {
-	# Build R5 side now
-	make ${PARALLEL_MAKE} ARCH=arm CROSS_COMPILE=${CROSS_COMPILE_V7} CC="${CROSS_COMPILE_V7}gcc ${TOOLCHAIN_OPTIONS}" V=1 HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" -C ${S} O=${B}/r5 am65x_evm_r5_defconfig
-	make ${PARALLEL_MAKE} ARCH=arm CROSS_COMPILE=${CROSS_COMPILE_V7} CC="${CROSS_COMPILE_V7}gcc ${TOOLCHAIN_OPTIONS}" V=1 HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" -C ${S} O=${B}/r5 SYSFW=${SYSFW_FILE} ${UBOOT_MAKE_TARGET}
-}
-
-do_install_append_am65xx-evm() {
-	install -m 644 ${B}/r5/${UBOOT_R5_BINARY} ${D}/boot/${UBOOT_R5_IMAGE}
-	ln -sf ${UBOOT_R5_IMAGE} ${D}/boot/${UBOOT_R5_BINARY}
-}
-
-do_deploy_append_am65xx-evm() {
-	install ${B}/r5/${UBOOT_R5_BINARY} ${DEPLOYDIR}/${UBOOT_R5_IMAGE}
-	rm -f ${DEPLOYDIR}/${UBOOT_R5_BINARY} ${DEPLOYDIR}/${UBOOT_R5_SYMLINK}
-	ln -sf ${UBOOT_R5_IMAGE} ${DEPLOYDIR}/${UBOOT_R5_BINARY}
-	ln -sf ${UBOOT_R5_IMAGE} ${DEPLOYDIR}/${UBOOT_R5_SYMLINK}
-}
Signature · 1 line
2.7.4