From e8c54dc6fb4f29fbe9a788e322797cdafbffa727 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Thu, 10 Aug 2023 14:45:57 +0200 Subject: u-boot-toradex: verdin-am62: integrate binman firmware and deploy artifacts This enables building upstream U-Boot for Verdin AM62 including building and deploying tiboot3 and tispl with binman. Related-to: ELB-5331 Signed-off-by: Max Krummenacher --- recipes-bsp/u-boot/binman-ti.inc | 43 ++++++++++++++++++++++++++++ recipes-bsp/u-boot/u-boot-toradex_2022.07.bb | 3 ++ 2 files changed, 46 insertions(+) create mode 100644 recipes-bsp/u-boot/binman-ti.inc diff --git a/recipes-bsp/u-boot/binman-ti.inc b/recipes-bsp/u-boot/binman-ti.inc new file mode 100644 index 0000000..1d9b110 --- /dev/null +++ b/recipes-bsp/u-boot/binman-ti.inc @@ -0,0 +1,43 @@ +# SYSFW/TIFS Firmware +DEPENDS:append:k3 = " python3-jsonschema-native python3-pyelftools-native python3-pyyaml-native optee-os ti-sci-fw ti-dm-fw trusted-firmware-a" +DEPENDS:append:k3r5 = " python3-jsonschema-native python3-pyelftools-native python3-pyyaml-native ti-sci-fw ti-dm-fw" +BL31 = "${STAGING_DIR_HOST}/firmware/bl31.bin" +TEE = "${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/bl32.bin" +BINMAN_INDIRS = "${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware" +EXTRA_OEMAKE:append:k3 = " BL31=${BL31} TEE=${TEE} BINMAN_INDIRS=${BINMAN_INDIRS}" +EXTRA_OEMAKE:append:k3r5 = " BINMAN_INDIRS=${BINMAN_INDIRS}" + +do_deploy:append:k3r5 () { + if [ -n "${UBOOT_CONFIG}" ] + then + for config in ${UBOOT_MACHINE}; do + if [ x${config} = "xverdin-am62_r5_usbdfu_defconfig" ] + then + TARGETSUFFIX="-dfu" + else + TARGETSUFFIX="" + fi + i=$(expr $i + 1); + for type in ${UBOOT_CONFIG}; do + j=$(expr $j + 1); + if [ $j -eq $i ] + then + for f in ${B}/${config}/tiboot3-*.bin; do + if [ -f "$f" ]; then + TARGET=$(basename $f)${TARGETSUFFIX} + install -m 644 $f ${DEPLOYDIR}/${TARGET} + fi + done + + for f in ${B}/${config}/sysfw*.itb; do + if [ -f "$f" ]; then + install -m 644 $f ${DEPLOYDIR}/ + fi + done + fi + done + unset j + done + unset i + fi +} diff --git a/recipes-bsp/u-boot/u-boot-toradex_2022.07.bb b/recipes-bsp/u-boot/u-boot-toradex_2022.07.bb index ee66a11..e9fdfaf 100644 --- a/recipes-bsp/u-boot/u-boot-toradex_2022.07.bb +++ b/recipes-bsp/u-boot/u-boot-toradex_2022.07.bb @@ -1,5 +1,8 @@ require recipes-bsp/u-boot/u-boot-common.inc require recipes-bsp/u-boot/u-boot.inc +BINMAN_HANDLING = "" +BINMAN_HANDLING:ti-soc = "recipes-bsp/u-boot/binman-ti.inc" +require ${BINMAN_HANDLING} LIC_FILES_CHKSUM = "file://Licenses/README;md5=2ca5f2c35c8cc335f0a19756634782f1" DEPENDS += "bc-native dtc-native" -- cgit v1.2.3