u-boot-ti.inc: k2e-hs-evm doesn't provide the same binaries as other KS2 devices
PATCH 1/1 u-boot-ti.inc: k2e-hs-evm doesn't provide the same binaries as other KS2 devices
--- recipes-bsp/u-boot/u-boot-ti.inc | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-)
recipes-bsp/u-boot/u-boot-ti.inc +22 -13
@@ -49,7 +49,6 @@ SPL_BINARY_omapl138 = "" # SPL (Second Program Loader) to be loaded over UART SPL_UART_BINARY = "u-boot-spl.bin" -SPL_UART_BINARY_k2e-hs-evm = "" SPL_UART_BINARY_keystone = "" SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}"
@@ -60,8 +59,10 @@ UBOOT_SUFFIX_keystone = "bin" # SPI NOR Flash binaries UBOOT_SPI_SPL_BINARY = "u-boot-spl.bin" +UBOOT_SPI_SPL_BINARY_k2e-hs-evm = "" UBOOT_SPI_BINARY = "u-boot.img" UBOOT_SPI_GPH_BINARY = "u-boot-spi.gph" +UBOOT_SPI_GPH_BINARY_k2e-hs-evm = "" # SPI NOR Flash deployed images UBOOT_SPI_SPL_IMAGE = "u-boot-spl-${MACHINE}-${PV}-${PR}.bin"
@@ -126,29 +127,37 @@ do_deploy_append () { } do_install_append_keystone () { - install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${D}/boot/${UBOOT_SPI_SPL_IMAGE} - ln -sf ${UBOOT_SPI_SPL_IMAGE} ${D}/boot/${UBOOT_SPI_SPL_BINARY} + if [ "x${UBOOT_SPI_SPL_BINARY}" != "x" ]; then + install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${D}/boot/${UBOOT_SPI_SPL_IMAGE} + ln -sf ${UBOOT_SPI_SPL_IMAGE} ${D}/boot/${UBOOT_SPI_SPL_BINARY} + fi install ${B}/${UBOOT_SPI_BINARY} ${D}/boot/${UBOOT_SPI_IMAGE} ln -sf ${UBOOT_SPI_IMAGE} ${D}/boot/${UBOOT_SPI_BINARY} - install ${B}/${UBOOT_SPI_GPH_BINARY} ${D}/boot/${UBOOT_SPI_GPH_IMAGE} - ln -sf ${UBOOT_SPI_GPH_IMAGE} ${D}/boot/${UBOOT_SPI_GPH_BINARY} + if [ "x${UBOOT_SPI_GPH_BINARY}" != "x" ]; then + install ${B}/${UBOOT_SPI_GPH_BINARY} ${D}/boot/${UBOOT_SPI_GPH_IMAGE} + ln -sf ${UBOOT_SPI_GPH_IMAGE} ${D}/boot/${UBOOT_SPI_GPH_BINARY} + fi } do_deploy_append_keystone () { - install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_SPL_IMAGE} - rm -f ${UBOOT_SPI_SPL_BINARY} ${UBOOT_SPI_SPL_SYMLINK} - ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_SYMLINK} - ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_BINARY} + if [ "x${UBOOT_SPI_SPL_BINARY}" != "x" ]; then + install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_SPL_IMAGE} + rm -f ${UBOOT_SPI_SPL_BINARY} ${UBOOT_SPI_SPL_SYMLINK} + ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_SYMLINK} + ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_BINARY} + fi install ${B}/${UBOOT_SPI_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_IMAGE} rm -f ${UBOOT_SPI_BINARY} ${UBOOT_SPI_SYMLINK} ln -sf ${UBOOT_SPI_IMAGE} ${UBOOT_SPI_SYMLINK} ln -sf ${UBOOT_SPI_IMAGE} ${UBOOT_SPI_BINARY} - install ${B}/${UBOOT_SPI_GPH_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_GPH_IMAGE} - rm -f ${UBOOT_SPI_GPH_BINARY} ${UBOOT_SPI_GPH_SYMLINK} - ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_SYMLINK} - ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_BINARY} + if [ "x${UBOOT_SPI_GPH_BINARY}" != "x" ]; then + install ${B}/${UBOOT_SPI_GPH_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_GPH_IMAGE} + rm -f ${UBOOT_SPI_GPH_BINARY} ${UBOOT_SPI_GPH_SYMLINK} + ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_SYMLINK} + ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_BINARY} + fi }
Signature · 1 line
2.7.4
Denys
Quoted 29 lines · Denys Dmytriyenko
Signed-off-by Denys Dmytriyenko <[email protected]>--- recipes-bsp/u-boot/u-boot-ti.inc | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-)recipes-bsp/u-boot/u-boot-ti.inc +2
-1@@ -49,7 +49,6 @@ SPL_BINARY_omapl138 = "" # SPL (Second Program Loader) to be loaded over UART SPL_UART_BINARY = "u-boot-spl.bin" -SPL_UART_BINARY_k2e-hs-evm = "" SPL_UART_BINARY_keystone = "" SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}"@@ -60,8 +59,10 @@ UBOOT_SUFFIX_keystone = "bin" # SPI NOR Flash binaries UBOOT_SPI_SPL_BINARY = "u-boot-spl.bin" +UBOOT_SPI_SPL_BINARY_k2e-hs-evm = "" UBOOT_SPI_BINARY = "u-boot.img" UBOOT_SPI_GPH_BINARY = "u-boot-spi.gph" +UBOOT_SPI_GPH_BINARY_k2e-hs-evm = "" # SPI NOR Flash deployed images UBOOT_SPI_SPL_IMAGE = "u-boot-spl-${MACHINE}-${PV}-${PR}.bin"
recipes-bsp/u-boot/u-boot-ti.inc do_deploy_append () { · line 130
Quoted 6 lines
recipes-bsp/u-boot/u-boot-ti.inc +1
-2@@ -126,29 +127,37 @@ do_deploy_append () { } do_install_append_keystone () { - install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${D}/boot/${UBOOT_SPI_SPL_IMAGE} - ln -sf ${UBOOT_SPI_SPL_IMAGE} ${D}/boot/${UBOOT_SPI_SPL_BINARY} + if [ "x${UBOOT_SPI_SPL_BINARY}" != "x" ]; then
This won't work. You are checking for the SPI SPL binary in the build directory then try to install the binary from the spl directory.
Also why don't we use the -d and -f directory and file tests? They are shell compliant
I used
"if [ -d ${B}/spl ]; then
if [ -f ${B}/spl/${UBOOT_SPI_SPL_BINARY} ]; then"Then we can just define all the uboot images and then if they are there copy otherwise log a message and move on.
Quoted 11 lines
recipes-bsp/u-boot/u-boot-ti.inc +5
-2+ install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${D}/boot/${UBOOT_SPI_SPL_IMAGE} + ln -sf ${UBOOT_SPI_SPL_IMAGE} ${D}/boot/${UBOOT_SPI_SPL_BINARY} + fi install ${B}/${UBOOT_SPI_BINARY} ${D}/boot/${UBOOT_SPI_IMAGE} ln -sf ${UBOOT_SPI_IMAGE} ${D}/boot/${UBOOT_SPI_BINARY} - install ${B}/${UBOOT_SPI_GPH_BINARY} ${D}/boot/${UBOOT_SPI_GPH_IMAGE} - ln -sf ${UBOOT_SPI_GPH_IMAGE} ${D}/boot/${UBOOT_SPI_GPH_BINARY} + if [ "x${UBOOT_SPI_GPH_BINARY}" != "x" ]; then + install ${B}/${UBOOT_SPI_GPH_BINARY} ${D}/boot/${UBOOT_SPI_GPH_IMAGE}
recipes-bsp/u-boot/u-boot-ti.inc do_deploy_append () { · line 145
Quoted 10 lines
recipes-bsp/u-boot/u-boot-ti.inc +3
-4+ ln -sf ${UBOOT_SPI_GPH_IMAGE} ${D}/boot/${UBOOT_SPI_GPH_BINARY} + fi } do_deploy_append_keystone () { - install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_SPL_IMAGE} - rm -f ${UBOOT_SPI_SPL_BINARY} ${UBOOT_SPI_SPL_SYMLINK} - ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_SYMLINK} - ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_BINARY} + if [ "x${UBOOT_SPI_SPL_BINARY}" != "x" ]; then
Same as above
recipes-bsp/u-boot/u-boot-ti.inc do_deploy_append () { · line 152
Quoted 7 lines
recipes-bsp/u-boot/u-boot-ti.inc +5
-0+ install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_SPL_IMAGE} + rm -f ${UBOOT_SPI_SPL_BINARY} ${UBOOT_SPI_SPL_SYMLINK} + ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_SYMLINK} + ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_BINARY} + fi install ${B}/${UBOOT_SPI_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_IMAGE}
Can we add the existence check here as well?
Quoted 15 lines
recipes-bsp/u-boot/u-boot-ti.inc +6
-4rm -f ${UBOOT_SPI_BINARY} ${UBOOT_SPI_SYMLINK} ln -sf ${UBOOT_SPI_IMAGE} ${UBOOT_SPI_SYMLINK} ln -sf ${UBOOT_SPI_IMAGE} ${UBOOT_SPI_BINARY} - install ${B}/${UBOOT_SPI_GPH_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_GPH_IMAGE} - rm -f ${UBOOT_SPI_GPH_BINARY} ${UBOOT_SPI_GPH_SYMLINK} - ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_SYMLINK} - ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_BINARY} + if [ "x${UBOOT_SPI_GPH_BINARY}" != "x" ]; then + install ${B}/${UBOOT_SPI_GPH_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_GPH_IMAGE} + rm -f ${UBOOT_SPI_GPH_BINARY} ${UBOOT_SPI_GPH_SYMLINK} + ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_SYMLINK} + ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_BINARY} + fi }
Signature · 2 lines
------------------ Dan Murphy
Quoted 34 lines · Dan Murphy
Denys
Quoted 31 lines · Denys Dmytriyenko
Signed-off-by Denys Dmytriyenko <[email protected]>--- recipes-bsp/u-boot/u-boot-ti.inc | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-)recipes-bsp/u-boot/u-boot-ti.inc +2
-1@@ -49,7 +49,6 @@ SPL_BINARY_omapl138 = "" # SPL (Second Program Loader) to be loaded over UART SPL_UART_BINARY = "u-boot-spl.bin" -SPL_UART_BINARY_k2e-hs-evm = "" SPL_UART_BINARY_keystone = "" SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}"@@ -60,8 +59,10 @@ UBOOT_SUFFIX_keystone = "bin" # SPI NOR Flash binaries UBOOT_SPI_SPL_BINARY = "u-boot-spl.bin" +UBOOT_SPI_SPL_BINARY_k2e-hs-evm = "" UBOOT_SPI_BINARY = "u-boot.img" UBOOT_SPI_GPH_BINARY = "u-boot-spi.gph" +UBOOT_SPI_GPH_BINARY_k2e-hs-evm = "" # SPI NOR Flash deployed images UBOOT_SPI_SPL_IMAGE = "u-boot-spl-${MACHINE}-${PV}-${PR}.bin"@@ -126,29 +127,37 @@ do_deploy_append () { }
Quoted 7 lines
recipes-bsp/u-boot/u-boot-ti.inc do_deploy_append () { · line 130
Quoted 4 lines
recipes-bsp/u-boot/u-boot-ti.inc +1
-2do_install_append_keystone () { - install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${D}/boot/${UBOOT_SPI_SPL_IMAGE} - ln -sf ${UBOOT_SPI_SPL_IMAGE} ${D}/boot/${UBOOT_SPI_SPL_BINARY} + if [ "x${UBOOT_SPI_SPL_BINARY}" != "x" ]; thenThis won't work. You are checking for the SPI SPL binary in the build directory then try to install the binary from the spl directory.
Not checking for the file at all here. The check is only to see if it's enabled, not whether it exists.
Quoted 8 lines
Also why don't we use the -d and -f directory and file tests? They are shell compliant
I used
"if [ -d ${B}/spl ]; thenif [ -f ${B}/spl/${UBOOT_SPI_SPL_BINARY} ]; then"Then we can just define all the uboot images and then if they are there copy otherwise log a message and move on.
Again, it's a different logic here. Originally, the idea was if an image is defined here, it must exist, not the other way around.
Quoted 55 lines
Quoted 11 lines
recipes-bsp/u-boot/u-boot-ti.inc +5
-2+ install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${D}/boot/${UBOOT_SPI_SPL_IMAGE} + ln -sf ${UBOOT_SPI_SPL_IMAGE} ${D}/boot/${UBOOT_SPI_SPL_BINARY} + fi install ${B}/${UBOOT_SPI_BINARY} ${D}/boot/${UBOOT_SPI_IMAGE} ln -sf ${UBOOT_SPI_IMAGE} ${D}/boot/${UBOOT_SPI_BINARY} - install ${B}/${UBOOT_SPI_GPH_BINARY} ${D}/boot/${UBOOT_SPI_GPH_IMAGE} - ln -sf ${UBOOT_SPI_GPH_IMAGE} ${D}/boot/${UBOOT_SPI_GPH_BINARY} + if [ "x${UBOOT_SPI_GPH_BINARY}" != "x" ]; then + install ${B}/${UBOOT_SPI_GPH_BINARY} ${D}/boot/${UBOOT_SPI_GPH_IMAGE}recipes-bsp/u-boot/u-boot-ti.inc do_deploy_append () { · line 145
Quoted 10 lines
recipes-bsp/u-boot/u-boot-ti.inc +3
-4+ ln -sf ${UBOOT_SPI_GPH_IMAGE} ${D}/boot/${UBOOT_SPI_GPH_BINARY} + fi } do_deploy_append_keystone () { - install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_SPL_IMAGE} - rm -f ${UBOOT_SPI_SPL_BINARY} ${UBOOT_SPI_SPL_SYMLINK} - ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_SYMLINK} - ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_BINARY} + if [ "x${UBOOT_SPI_SPL_BINARY}" != "x" ]; thenSame as above
recipes-bsp/u-boot/u-boot-ti.inc do_deploy_append () { · line 152
Quoted 7 lines
recipes-bsp/u-boot/u-boot-ti.inc +5
-0+ install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_SPL_IMAGE} + rm -f ${UBOOT_SPI_SPL_BINARY} ${UBOOT_SPI_SPL_SYMLINK} + ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_SYMLINK} + ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_BINARY} + fi install ${B}/${UBOOT_SPI_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_IMAGE}Can we add the existence check here as well?
Quoted 15 lines
recipes-bsp/u-boot/u-boot-ti.inc +6
-4rm -f ${UBOOT_SPI_BINARY} ${UBOOT_SPI_SYMLINK} ln -sf ${UBOOT_SPI_IMAGE} ${UBOOT_SPI_SYMLINK} ln -sf ${UBOOT_SPI_IMAGE} ${UBOOT_SPI_BINARY} - install ${B}/${UBOOT_SPI_GPH_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_GPH_IMAGE} - rm -f ${UBOOT_SPI_GPH_BINARY} ${UBOOT_SPI_GPH_SYMLINK} - ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_SYMLINK} - ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_BINARY} + if [ "x${UBOOT_SPI_GPH_BINARY}" != "x" ]; then + install ${B}/${UBOOT_SPI_GPH_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_GPH_IMAGE} + rm -f ${UBOOT_SPI_GPH_BINARY} ${UBOOT_SPI_GPH_SYMLINK} + ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_SYMLINK} + ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_BINARY} + fi }Signature · 2 lines
------------------ Dan Murphy
Denys
Quoted 35 lines · Denys Dmytriyenko
Quoted 34 lines · Dan Murphy
Denys
Quoted 31 lines · Denys Dmytriyenko
Signed-off-by Denys Dmytriyenko <[email protected]>--- recipes-bsp/u-boot/u-boot-ti.inc | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-)recipes-bsp/u-boot/u-boot-ti.inc +2
-1@@ -49,7 +49,6 @@ SPL_BINARY_omapl138 = "" # SPL (Second Program Loader) to be loaded over UART SPL_UART_BINARY = "u-boot-spl.bin" -SPL_UART_BINARY_k2e-hs-evm = "" SPL_UART_BINARY_keystone = "" SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}"@@ -60,8 +59,10 @@ UBOOT_SUFFIX_keystone = "bin" # SPI NOR Flash binaries UBOOT_SPI_SPL_BINARY = "u-boot-spl.bin" +UBOOT_SPI_SPL_BINARY_k2e-hs-evm = "" UBOOT_SPI_BINARY = "u-boot.img" UBOOT_SPI_GPH_BINARY = "u-boot-spi.gph" +UBOOT_SPI_GPH_BINARY_k2e-hs-evm = "" # SPI NOR Flash deployed images UBOOT_SPI_SPL_IMAGE = "u-boot-spl-${MACHINE}-${PV}-${PR}.bin"@@ -126,29 +127,37 @@ do_deploy_append () { }
Quoted 9 lines
Quoted 6 lines
recipes-bsp/u-boot/u-boot-ti.inc do_deploy_append () { · line 130
Quoted 4 lines
recipes-bsp/u-boot/u-boot-ti.inc +1
-2do_install_append_keystone () { - install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${D}/boot/${UBOOT_SPI_SPL_IMAGE} - ln -sf ${UBOOT_SPI_SPL_IMAGE} ${D}/boot/${UBOOT_SPI_SPL_BINARY} + if [ "x${UBOOT_SPI_SPL_BINARY}" != "x" ]; thenThis won't work. You are checking for the SPI SPL binary in the build directory then try to install the binary from the spl directory.
Not checking for the file at all here. The check is only to see if it's enabled, not whether it exists.
OK right I misread that. but again if the SPI_SPL binary is defined then we attempt to install from a directory we don't know exists or not.
Maybe an AND case here to check the directory and whether the file is defined.
Quoted 64 lines
Quoted 8 lines
Also why don't we use the -d and -f directory and file tests? They are shell compliant
I used
"if [ -d ${B}/spl ]; thenif [ -f ${B}/spl/${UBOOT_SPI_SPL_BINARY} ]; then"Then we can just define all the uboot images and then if they are there copy otherwise log a message and move on.
Again, it's a different logic here. Originally, the idea was if an image is defined here, it must exist, not the other way around.
Quoted 52 lines
Quoted 11 lines
recipes-bsp/u-boot/u-boot-ti.inc +5
-2+ install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${D}/boot/${UBOOT_SPI_SPL_IMAGE} + ln -sf ${UBOOT_SPI_SPL_IMAGE} ${D}/boot/${UBOOT_SPI_SPL_BINARY} + fi install ${B}/${UBOOT_SPI_BINARY} ${D}/boot/${UBOOT_SPI_IMAGE} ln -sf ${UBOOT_SPI_IMAGE} ${D}/boot/${UBOOT_SPI_BINARY} - install ${B}/${UBOOT_SPI_GPH_BINARY} ${D}/boot/${UBOOT_SPI_GPH_IMAGE} - ln -sf ${UBOOT_SPI_GPH_IMAGE} ${D}/boot/${UBOOT_SPI_GPH_BINARY} + if [ "x${UBOOT_SPI_GPH_BINARY}" != "x" ]; then + install ${B}/${UBOOT_SPI_GPH_BINARY} ${D}/boot/${UBOOT_SPI_GPH_IMAGE}recipes-bsp/u-boot/u-boot-ti.inc do_deploy_append () { · line 145
Quoted 10 lines
recipes-bsp/u-boot/u-boot-ti.inc +3
-4+ ln -sf ${UBOOT_SPI_GPH_IMAGE} ${D}/boot/${UBOOT_SPI_GPH_BINARY} + fi } do_deploy_append_keystone () { - install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_SPL_IMAGE} - rm -f ${UBOOT_SPI_SPL_BINARY} ${UBOOT_SPI_SPL_SYMLINK} - ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_SYMLINK} - ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_BINARY} + if [ "x${UBOOT_SPI_SPL_BINARY}" != "x" ]; thenSame as above
recipes-bsp/u-boot/u-boot-ti.inc do_deploy_append () { · line 152
Quoted 7 lines
recipes-bsp/u-boot/u-boot-ti.inc +5
-0+ install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_SPL_IMAGE} + rm -f ${UBOOT_SPI_SPL_BINARY} ${UBOOT_SPI_SPL_SYMLINK} + ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_SYMLINK} + ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_BINARY} + fi install ${B}/${UBOOT_SPI_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_IMAGE}Can we add the existence check here as well?
Quoted 15 lines
recipes-bsp/u-boot/u-boot-ti.inc +6
-4rm -f ${UBOOT_SPI_BINARY} ${UBOOT_SPI_SYMLINK} ln -sf ${UBOOT_SPI_IMAGE} ${UBOOT_SPI_SYMLINK} ln -sf ${UBOOT_SPI_IMAGE} ${UBOOT_SPI_BINARY} - install ${B}/${UBOOT_SPI_GPH_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_GPH_IMAGE} - rm -f ${UBOOT_SPI_GPH_BINARY} ${UBOOT_SPI_GPH_SYMLINK} - ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_SYMLINK} - ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_BINARY} + if [ "x${UBOOT_SPI_GPH_BINARY}" != "x" ]; then + install ${B}/${UBOOT_SPI_GPH_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_GPH_IMAGE} + rm -f ${UBOOT_SPI_GPH_BINARY} ${UBOOT_SPI_GPH_SYMLINK} + ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_SYMLINK} + ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_BINARY} + fi }Signature · 2 lines
------------------ Dan Murphy
Signature · 2 lines
------------------ Dan Murphy
Quoted 45 lines · Dan Murphy
Denys
Quoted 41 lines · Denys Dmytriyenko
Quoted 40 lines · Dan Murphy
Denys
Quoted 29 lines · Denys Dmytriyenko
Signed-off-by Denys Dmytriyenko <[email protected]>--- recipes-bsp/u-boot/u-boot-ti.inc | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-)recipes-bsp/u-boot/u-boot-ti.inc +2
-1@@ -49,7 +49,6 @@ SPL_BINARY_omapl138 = "" # SPL (Second Program Loader) to be loaded over UART SPL_UART_BINARY = "u-boot-spl.bin" -SPL_UART_BINARY_k2e-hs-evm = "" SPL_UART_BINARY_keystone = "" SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}"@@ -60,8 +59,10 @@ UBOOT_SUFFIX_keystone = "bin" # SPI NOR Flash binaries UBOOT_SPI_SPL_BINARY = "u-boot-spl.bin" +UBOOT_SPI_SPL_BINARY_k2e-hs-evm = "" UBOOT_SPI_BINARY = "u-boot.img" UBOOT_SPI_GPH_BINARY = "u-boot-spi.gph" +UBOOT_SPI_GPH_BINARY_k2e-hs-evm = "" # SPI NOR Flash deployed images UBOOT_SPI_SPL_IMAGE = "u-boot-spl-${MACHINE}-${PV}-${PR}.bin"recipes-bsp/u-boot/u-boot-ti.inc do_deploy_append () { · line 130
Quoted 6 lines
recipes-bsp/u-boot/u-boot-ti.inc +1
-2@@ -126,29 +127,37 @@ do_deploy_append () { } do_install_append_keystone () { - install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${D}/boot/${UBOOT_SPI_SPL_IMAGE} - ln -sf ${UBOOT_SPI_SPL_IMAGE} ${D}/boot/${UBOOT_SPI_SPL_BINARY} + if [ "x${UBOOT_SPI_SPL_BINARY}" != "x" ]; thenThis won't work. You are checking for the SPI SPL binary in the build directory then try to install the binary from the spl directory.
Quoted 8 lines
Quoted 3 lines
Not checking for the file at all here. The check is only to see if it's enabled, not whether it exists.
OK right I misread that. but again if the
SPI_SPLbinary is defined then we attempt to install from a directory we don't know exists or not.Maybe an AND case here to check the directory and whether the file is defined.
I completely understand where you are coming from with this suggestion - it would definitely reduce the number of failures if/when u-boot decides to change what artifacts and where it deploys.
On the other hand, here in u-boot-ti.inc I'm extending the standard OpenEmbedded code from u-boot.inc for additional TI artifacts and following the same coding standard. In many cases it is required for pre-defined artifacts to exist and fail if they don't, instead of ignoring it and continuing.
Signature · 1 line
Denys
Quoted 70 lines
Quoted 64 lines
Quoted 8 lines
Also why don't we use the -d and -f directory and file tests? They are shell compliant
I used
"if [ -d ${B}/spl ]; thenif [ -f ${B}/spl/${UBOOT_SPI_SPL_BINARY} ]; then"Then we can just define all the uboot images and then if they are there copy otherwise log a message and move on.
Again, it's a different logic here. Originally, the idea was if an image is defined here, it must exist, not the other way around.
Quoted 52 lines
Quoted 11 lines
recipes-bsp/u-boot/u-boot-ti.inc +5
-2+ install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${D}/boot/${UBOOT_SPI_SPL_IMAGE} + ln -sf ${UBOOT_SPI_SPL_IMAGE} ${D}/boot/${UBOOT_SPI_SPL_BINARY} + fi install ${B}/${UBOOT_SPI_BINARY} ${D}/boot/${UBOOT_SPI_IMAGE} ln -sf ${UBOOT_SPI_IMAGE} ${D}/boot/${UBOOT_SPI_BINARY} - install ${B}/${UBOOT_SPI_GPH_BINARY} ${D}/boot/${UBOOT_SPI_GPH_IMAGE} - ln -sf ${UBOOT_SPI_GPH_IMAGE} ${D}/boot/${UBOOT_SPI_GPH_BINARY} + if [ "x${UBOOT_SPI_GPH_BINARY}" != "x" ]; then + install ${B}/${UBOOT_SPI_GPH_BINARY} ${D}/boot/${UBOOT_SPI_GPH_IMAGE}recipes-bsp/u-boot/u-boot-ti.inc do_deploy_append () { · line 145
Quoted 10 lines
recipes-bsp/u-boot/u-boot-ti.inc +3
-4+ ln -sf ${UBOOT_SPI_GPH_IMAGE} ${D}/boot/${UBOOT_SPI_GPH_BINARY} + fi } do_deploy_append_keystone () { - install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_SPL_IMAGE} - rm -f ${UBOOT_SPI_SPL_BINARY} ${UBOOT_SPI_SPL_SYMLINK} - ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_SYMLINK} - ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_BINARY} + if [ "x${UBOOT_SPI_SPL_BINARY}" != "x" ]; thenSame as above
recipes-bsp/u-boot/u-boot-ti.inc do_deploy_append () { · line 152
Quoted 7 lines
recipes-bsp/u-boot/u-boot-ti.inc +5
-0+ install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_SPL_IMAGE} + rm -f ${UBOOT_SPI_SPL_BINARY} ${UBOOT_SPI_SPL_SYMLINK} + ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_SYMLINK} + ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_BINARY} + fi install ${B}/${UBOOT_SPI_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_IMAGE}Can we add the existence check here as well?
Quoted 15 lines
recipes-bsp/u-boot/u-boot-ti.inc +6
-4rm -f ${UBOOT_SPI_BINARY} ${UBOOT_SPI_SYMLINK} ln -sf ${UBOOT_SPI_IMAGE} ${UBOOT_SPI_SYMLINK} ln -sf ${UBOOT_SPI_IMAGE} ${UBOOT_SPI_BINARY} - install ${B}/${UBOOT_SPI_GPH_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_GPH_IMAGE} - rm -f ${UBOOT_SPI_GPH_BINARY} ${UBOOT_SPI_GPH_SYMLINK} - ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_SYMLINK} - ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_BINARY} + if [ "x${UBOOT_SPI_GPH_BINARY}" != "x" ]; then + install ${B}/${UBOOT_SPI_GPH_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_GPH_IMAGE} + rm -f ${UBOOT_SPI_GPH_BINARY} ${UBOOT_SPI_GPH_SYMLINK} + ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_SYMLINK} + ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_BINARY} + fi }Signature · 2 lines
------------------ Dan MurphySignature · 2 lines
------------------ Dan Murphy
Dan Murphy
Reviewed-byDenys
Quoted 57 lines · Denys Dmytriyenko
Quoted 45 lines · Dan Murphy
Denys
Quoted 41 lines · Denys Dmytriyenko
Quoted 40 lines · Dan Murphy
Denys
Quoted 29 lines · Denys Dmytriyenko
Signed-off-by Denys Dmytriyenko <[email protected]>--- recipes-bsp/u-boot/u-boot-ti.inc | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-)recipes-bsp/u-boot/u-boot-ti.inc +2
-1@@ -49,7 +49,6 @@ SPL_BINARY_omapl138 = "" # SPL (Second Program Loader) to be loaded over UART SPL_UART_BINARY = "u-boot-spl.bin" -SPL_UART_BINARY_k2e-hs-evm = "" SPL_UART_BINARY_keystone = "" SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-Mon: 16.30 - 17.00${MACHINE}-${PV}-${PR}"@@ -60,8 +59,10 @@ UBOOT_SUFFIX_keystone = "bin" # SPI NOR Flash binaries UBOOT_SPI_SPL_BINARY = "u-boot-spl.bin" +UBOOT_SPI_SPL_BINARY_k2e-hs-evm = "" UBOOT_SPI_BINARY = "u-boot.img" UBOOT_SPI_GPH_BINARY = "u-boot-spi.gph" +UBOOT_SPI_GPH_BINARY_k2e-hs-evm = "" # SPI NOR Flash deployed images UBOOT_SPI_SPL_IMAGE = "u-boot-spl-${MACHINE}-${PV}-${PR}.bin"recipes-bsp/u-boot/u-boot-ti.inc do_deploy_append () { · line 130
Quoted 6 lines
recipes-bsp/u-boot/u-boot-ti.inc +1
-2@@ -126,29 +127,37 @@ do_deploy_append () { } do_install_append_keystone () { - install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${D}/boot/${UBOOT_SPI_SPL_IMAGE} - ln -sf ${UBOOT_SPI_SPL_IMAGE} ${D}/boot/${UBOOT_SPI_SPL_BINARY} + if [ "x${UBOOT_SPI_SPL_BINARY}" != "x" ]; thenThis won't work. You are checking for the SPI SPL binary in the build directory then try to install the binary from the spl directory.
Quoted 7 lines
Quoted 3 lines
Not checking for the file at all here. The check is only to see if it's enabled, not whether it exists.
OK right I misread that. but again if the
SPI_SPLbinary is defined then we attempt to install from a directory we don't know exists or not.Maybe an AND case here to check the directory and whether the file is defined.
I completely understand where you are coming from with this suggestion - it would definitely reduce the number of failures if/when u-boot decides to change what artifacts and where it deploys.
Quoted 6 lines
On the other hand, here in u-boot-ti.inc I'm extending the standard OpenEmbedded code from u-boot.inc for additional TI artifacts and following the same coding standard. In many cases it is required for pre-defined artifacts to exist and fail if they don't, instead of ignoring it and continuing.
Thanks for the explanation
Dan
Signature · 2 lines
------------------ Dan Murphy