[meta-freescale] [PATCH 27/27] u-boot-qoriq: use machine specific variables defined in machine conf

Zhenhua Luo zhenhua.luo at freescale.com
Tue Sep 1 00:20:40 PDT 2015


Use the following machine specific variables which are defined in machine
conf file:
* UBOOT_SOURCE_NAND
* UBOOT_SOURCE_SPI
* UBOOT_SOURCE_SD

Signed-off-by: Zhenhua Luo <zhenhua.luo at freescale.com>
---
 recipes-bsp/u-boot/u-boot-qoriq_2015.01.bb | 30 ++++++------------------------
 1 file changed, 6 insertions(+), 24 deletions(-)

diff --git a/recipes-bsp/u-boot/u-boot-qoriq_2015.01.bb b/recipes-bsp/u-boot/u-boot-qoriq_2015.01.bb
index 2ab2e13..44480b9 100644
--- a/recipes-bsp/u-boot/u-boot-qoriq_2015.01.bb
+++ b/recipes-bsp/u-boot/u-boot-qoriq_2015.01.bb
@@ -80,30 +80,12 @@ do_compile_append_qoriq-ppc() {
             cp ${S}/${board}/${UBOOT_SOURCE}  ${S}/${board}/${UBOOT_TARGET}.bin
         elif [ "x${UBOOT_TARGET}" != "x" ]; then
             # some boards' final binary was not named as u-boot.bin
-            if [ "${UBOOT_TARGET}" = "u-boot-nand" ];then
-                if echo $board |egrep -q "^(BSC|C29|P10|P2020RDB)";then
-                    UBOOT_SOURCE=u-boot-with-spl.bin
-                elif echo $board |egrep -q "^(B4|T1|T2|T4)";then
-                    UBOOT_SOURCE=u-boot-with-spl-pbl.bin
-                elif echo $board |egrep -q "^(P2041|P3|P4|P5)";then
-                    UBOOT_SOURCE=u-boot.pbl
-                fi
-            elif [ "${UBOOT_TARGET}" = "u-boot-spi" ];then
-                if echo $board |egrep -q "^(P10|P2020RDB)";then
-                    UBOOT_SOURCE=u-boot-with-spl.bin
-                elif echo $board |egrep -q "^(T1|T2)";then
-                    UBOOT_SOURCE=u-boot-with-spl-pbl.bin
-                elif echo $board |egrep -q "^(B4|P2041|P3|P4|P5|T4)";then
-                    UBOOT_SOURCE=u-boot.pbl
-                fi
-            elif [ "${UBOOT_TARGET}" = "u-boot-sd" ];then
-                if echo $board |egrep -q "^(P10|P2020RDB)";then
-                    UBOOT_SOURCE=u-boot-with-spl.bin
-                elif echo $board |egrep -q "^(B4|T1|T2|T4)";then
-                    UBOOT_SOURCE=u-boot-with-spl-pbl.bin
-                elif echo $board |egrep -q "^(P2041|P3|P4|P5)";then
-                    UBOOT_SOURCE=u-boot.pbl
-                fi
+            if [ "${UBOOT_TARGET}" = "u-boot-nand" ] && [ "${UBOOT_SOURCE_NAND}" != "" ]; then
+                UBOOT_SOURCE="${UBOOT_SOURCE_NAND}"
+            elif [ "${UBOOT_TARGET}" = "u-boot-spi" ] && [ "${UBOOT_SOURCE_SPI}" != "" ]; then
+                UBOOT_SOURCE="${UBOOT_SOURCE_SPI}"
+            elif [ "${UBOOT_TARGET}" = "u-boot-sd" ] && [ "${UBOOT_SOURCE_SD}" != "" ]; then
+                UBOOT_SOURCE="${UBOOT_SOURCE_SD}"
             fi
             cp ${S}/${board}/${UBOOT_SOURCE}  ${S}/${board}/${UBOOT_TARGET}.bin
 
-- 
2.4.3



More information about the meta-freescale mailing list