[meta-freescale] [meta-fsl-arm][PATCH] u-boot-ls1: The finale u-boot binary is not named as u-boot.bin for sdcard/spi

b40290 at freescale.com b40290 at freescale.com
Tue Nov 17 00:47:49 PST 2015


From: Chunrong Guo <B40290 at freescale.com>

Signed-off-by: Chunrong Guo <B40290 at freescale.com>
---
 recipes-bsp/u-boot/u-boot-ls1_2015.01.bb | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/recipes-bsp/u-boot/u-boot-ls1_2015.01.bb b/recipes-bsp/u-boot/u-boot-ls1_2015.01.bb
index 5b1e566..ae31763 100644
--- a/recipes-bsp/u-boot/u-boot-ls1_2015.01.bb
+++ b/recipes-bsp/u-boot/u-boot-ls1_2015.01.bb
@@ -25,17 +25,26 @@ DEPENDS += "change-file-endianess-native dtc-native"
 PROVIDES += "u-boot"
 
 do_compile_append () {
-    if [ "x${UBOOT_CONFIG}" != "x" ]
-    then
+ unset i j
+    if [ "x${UBOOT_CONFIG}" != "x" ]; then
         for config in ${UBOOT_MACHINE}; do
-            case "${config}" in
-                *spi*) tclsh ${STAGING_BINDIR_NATIVE}/byte_swap.tcl ${S}/${config}/u-boot-dtb.bin ${S}/${config}/u-boot.swap.bin 8
-                mv ${S}/${config}/u-boot.swap.bin ${S}/u-boot-${type}.${UBOOT_SUFFIX};;
-                *nand* | *sdcard*)  mv ${S}/${config}/u-boot-with-spl-pbl.bin  ${S}/${config}/u-boot.bin;;
-            esac
+            i=`expr $i + 1`;
+            for type in ${UBOOT_CONFIG}; do
+                j=`expr $j + 1`;
+                if [ $j -eq $i ]; then
+                    case "${config}" in
+                        *nand* | *sdcard*)
+                            cp ${config}/u-boot-with-spl-pbl.bin ${config}/u-boot-${type}.${UBOOT_SUFFIX};;
+                        *spi*) 
+                            tclsh ${STAGING_BINDIR_NATIVE}/byte_swap.tcl ${config}/u-boot-dtb.bin ${config}/u-boot.swap.bin 8
+                            cp ${config}/u-boot.swap.bin ${config}/u-boot-${type}.${UBOOT_SUFFIX};;
+                    esac
+                fi
+            done
+            unset j
         done
+        unset i
     fi
-
 }
 
 PACKAGES += "${PN}-images"
-- 
1.9.2



More information about the meta-freescale mailing list