diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2023-02-21 16:53:42 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2023-02-22 14:43:40 +0100 |
commit | fb1479811929d0f787cab72b4741497efbaa5fa8 (patch) | |
tree | 59f90e5e622b53f2ea28aaac24385a8e58b3baea /recipes-bsp | |
parent | 3129dfc0d5756047838f9ace400a3fcefb81e089 (diff) |
u-boot-toradex-ti-staging: ti-sci-fw: allow for multiple configs
I.e. for specifing UBOOT_CONFIG and not UBOOT_MACHINE. This allows to
build the K3R5 SPL for normal boot and for DFU boot.
This requires to additonally build multiple tiboot.bin for each
version in the ti-sci-fw recipe.
Related-to: ELB-5045
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes-bsp')
-rw-r--r-- | recipes-bsp/ti-sci-fw/ti-sci-fw_git.bbappend | 23 | ||||
-rw-r--r-- | recipes-bsp/u-boot/u-boot-toradex-ti-staging_2021.01.bb | 29 |
2 files changed, 52 insertions, 0 deletions
diff --git a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bbappend b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bbappend new file mode 100644 index 0000000..2196e5a --- /dev/null +++ b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bbappend @@ -0,0 +1,23 @@ +# build the k3r5 tiboot also for DFU +EXTRA_OEMAKE_DFU = "\ + CROSS_COMPILE=${TARGET_PREFIX} SOC=${SYSFW_SOC} SOC_TYPE=${SYSFW_SUFFIX} \ + CONFIG=${SYSFW_CONFIG} SYSFW_DIR="${S}/ti-sysfw" \ + SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin-dfu" \ +" + +do_compile:prepend:k3r5 () { + if [ -e "${STAGING_DIR_HOST}/boot/u-boot-spl.bin-dfu" ]; then + cd ${WORKDIR}/imggen/ + make ${EXTRA_OEMAKE_DFU} $@ + if [ -f "${WORKDIR}/imggen/${SYSFW_TIBOOT3}" ]; then + mv "${WORKDIR}/imggen/${SYSFW_TIBOOT3}" "${WORKDIR}/imggen/${SYSFW_TIBOOT3}"-dfu + fi + make clean + fi +} + +do_deploy:append:k3r5 () { + if [ -f "${WORKDIR}/imggen/${SYSFW_TIBOOT3}-dfu" ]; then + install -m 644 ${WORKDIR}/imggen/${SYSFW_TIBOOT3}-dfu ${DEPLOYDIR}/ + fi +} diff --git a/recipes-bsp/u-boot/u-boot-toradex-ti-staging_2021.01.bb b/recipes-bsp/u-boot/u-boot-toradex-ti-staging_2021.01.bb index 39ee068..7e2df76 100644 --- a/recipes-bsp/u-boot/u-boot-toradex-ti-staging_2021.01.bb +++ b/recipes-bsp/u-boot/u-boot-toradex-ti-staging_2021.01.bb @@ -36,3 +36,32 @@ DEPLOY_INITIAL_ENV:k3r5 = ":" do_deploy:append () { ${DEPLOY_INITIAL_ENV} } + +# build the k3r5 spl also for DFU +do_compile:append:k3r5 () { + if [ -L ${B}/${UBOOT_BINARY} ]; then + rm ${B}/${UBOOT_BINARY} + fi + + 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 + if ! [ -f ${B}/${config}/${UBOOT_BINARY} ]; then + ln -s spl/${UBOOT_BINARY} ${B}/${config}/${UBOOT_BINARY} + fi + fi + done + unset j + done + unset i + else + if ! [ -f ${B}/${UBOOT_BINARY} ]; then + ln -s spl/${UBOOT_BINARY} ${B}/${UBOOT_BINARY} + fi + fi +} |