diff mbox series

[master/kirkstone] k3r5: u-boot: prevent overlapping deployed SPL symlinks

Message ID 20230922063409.3061-1-denis@denix.org
State Accepted
Delegated to: Ryan Eatmon
Headers show
Series [master/kirkstone] k3r5: u-boot: prevent overlapping deployed SPL symlinks | expand

Commit Message

Denys Dmytriyenko Sept. 22, 2023, 6:34 a.m. UTC
From: Denys Dmytriyenko <denys@konsulko.com>

Make sure shortname R5 SPL symlink is not the same as the main K3 SPL
one, as they will overlap/overwrite each other when deployed into a
common location. Latest code in master now checks for this and errors
out.

Also remove unused UBOOT_SPI_* variables.

Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
---
 meta-ti-bsp/conf/machine/include/k3r5.inc    |  4 ++--
 meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc | 15 +--------------
 2 files changed, 3 insertions(+), 16 deletions(-)
diff mbox series

Patch

diff --git a/meta-ti-bsp/conf/machine/include/k3r5.inc b/meta-ti-bsp/conf/machine/include/k3r5.inc
index 3619d300..184d3a09 100644
--- a/meta-ti-bsp/conf/machine/include/k3r5.inc
+++ b/meta-ti-bsp/conf/machine/include/k3r5.inc
@@ -19,9 +19,9 @@  SPL_SUFFIX = "bin"
 SPL_BINARY = "tiboot3-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.${SPL_SUFFIX}"
 SPL_SYMLINK = "tiboot3.${SPL_SUFFIX}"
 UBOOT_SUFFIX = "bin"
-UBOOT_BINARY = "u-boot-spl.${UBOOT_SUFFIX}"
+UBOOT_BINARY = "u-boot-r5spl.${UBOOT_SUFFIX}"
 UBOOT_IMAGE = "u-boot-r5spl-${MAINMACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
-UBOOT_SYMLINK = "u-boot-r5spl.${UBOOT_SUFFIX}"
+UBOOT_SYMLINK = "u-boot-r5spl-${MAINMACHINE}.${UBOOT_SUFFIX}"
 
 PACKAGECONFIG:pn-u-boot-ti-staging = ""
 PACKAGECONFIG:pn-u-boot-ti-mainline = ""
diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
index 92eaf0cc..4f72c867 100644
--- a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
+++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
@@ -82,19 +82,6 @@  SPL_UART_BINARY:k3r5 = ""
 SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}"
 SPL_UART_SYMLINK ?= "${SPL_UART_BINARY}-${MACHINE}"
 
-# SPI NOR Flash binaries
-UBOOT_SPI_SPL_BINARY = "u-boot-spl.bin"
-UBOOT_SPI_BINARY = "u-boot.img"
-UBOOT_SPI_GPH_BINARY = "u-boot-spi.gph"
-
-# SPI NOR Flash deployed images
-UBOOT_SPI_SPL_IMAGE = "u-boot-spl-${MACHINE}-${PV}-${PR}.bin"
-UBOOT_SPI_SPL_SYMLINK = "u-boot-spl-${MACHINE}.bin"
-UBOOT_SPI_IMAGE = "u-boot-${MACHINE}-${PV}-${PR}.img"
-UBOOT_SPI_SYMLINK = "u-boot-${MACHINE}.img"
-UBOOT_SPI_GPH_IMAGE = "u-boot-spi-${MACHINE}-${PV}-${PR}.gph"
-UBOOT_SPI_GPH_SYMLINK = "u-boot-spi-${MACHINE}.gph"
-
 # HS XLD
 UBOOT_HS_XLD_BINARY = "u-boot-spl_HS_X-LOADER"
 UBOOT_HS_XLD_IMAGE = "u-boot-spl_HS_X-LOADER-${MACHINE}-${PV}-${PR}"
@@ -117,7 +104,7 @@  UBOOT_HS_2ND_SYMLINK = "u-boot-spl_HS_2ND-${MACHINE}"
 
 do_compile:append:k3r5 () {
 	if ! [ -f ${B}/${UBOOT_BINARY} ]; then
-		ln -s spl/${UBOOT_BINARY} ${B}/${UBOOT_BINARY}
+		ln -s spl/u-boot-spl.${UBOOT_SUFFIX} ${B}/${UBOOT_BINARY}
 	fi
 }