diff options
Diffstat (limited to 'recipes-bsp/u-boot/u-boot-qoriq_2016.01.bb')
-rw-r--r-- | recipes-bsp/u-boot/u-boot-qoriq_2016.01.bb | 53 |
1 files changed, 12 insertions, 41 deletions
diff --git a/recipes-bsp/u-boot/u-boot-qoriq_2016.01.bb b/recipes-bsp/u-boot/u-boot-qoriq_2016.01.bb index 55e5700..d43a4a6 100644 --- a/recipes-bsp/u-boot/u-boot-qoriq_2016.01.bb +++ b/recipes-bsp/u-boot/u-boot-qoriq_2016.01.bb | |||
@@ -55,52 +55,23 @@ LOCALVERSION = "+fsl" | |||
55 | EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' | 55 | EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' |
56 | 56 | ||
57 | do_compile_append_qoriq-ppc () { | 57 | do_compile_append_qoriq-ppc () { |
58 | # some board's final nand/spi/sdcard binary was not named as u-boot.bin | ||
59 | unset i j | 58 | unset i j |
60 | if [ "x${UBOOT_CONFIG}" != "x" ]; then | 59 | if [ -n "${UBOOT_CONFIG}" ];then |
61 | for config in ${UBOOT_MACHINE}; do | 60 | for config in ${UBOOT_MACHINE}; do |
62 | i=`expr $i + 1`; | 61 | i=`expr $i + 1`; |
63 | UBOOT_SOURCE=${UBOOT_BINARY} | 62 | for type in ${UBOOT_CONFIG}; do |
64 | if echo ${config} |egrep -v "SECBOOT|SECURE" |egrep -qi "SDCARD|SPIFLASH|NAND"; then | 63 | j=`expr $j + 1`; |
65 | if echo ${config} |egrep -qi "NAND";then | 64 | if [ $j -eq $i ]; then |
66 | if echo ${config} |egrep -qi "^(BSC|C29|P10|P2020RDB)";then | 65 | # use boot-format to regenerate spi image if BOOTFORMAT_CONFIG is not empty |
67 | UBOOT_SOURCE=u-boot-with-spl.bin | 66 | if [ -n "${BOOTFORMAT_CONFIG}" ] && echo "${type}" |grep -q spi;then |
68 | elif echo ${config} |egrep -qi "^(B4|T1|T2|T4)";then | 67 | ${STAGING_BINDIR_NATIVE}/boot_format \ |
69 | UBOOT_SOURCE=u-boot-with-spl-pbl.bin | ||
70 | elif echo ${config} |egrep -qi "^(P2041|P3|P4|P5)";then | ||
71 | UBOOT_SOURCE=u-boot.pbl | ||
72 | fi | ||
73 | elif echo ${config} |egrep -qi "SPIFLASH";then | ||
74 | if echo ${config} |egrep -qi "^(P10|P2020RDB)";then | ||
75 | UBOOT_SOURCE=u-boot-with-spl.bin | ||
76 | elif echo ${config} |egrep -qi "^(T1|T2)";then | ||
77 | UBOOT_SOURCE=u-boot-with-spl-pbl.bin | ||
78 | elif echo ${config} |egrep -qi "^(B4|P2041|P3|P4|P5|T4)";then | ||
79 | UBOOT_SOURCE=u-boot.pbl | ||
80 | fi | ||
81 | elif echo ${config} |egrep -qi "SDCARD";then | ||
82 | if echo ${config} |egrep -qi "^(P10|P2020RDB)";then | ||
83 | UBOOT_SOURCE=u-boot-with-spl.bin | ||
84 | elif echo ${config} |egrep -qi "^(B4|T1|T2|T4)";then | ||
85 | UBOOT_SOURCE=u-boot-with-spl-pbl.bin | ||
86 | elif echo ${config} |egrep -qi "^(P2041|P3|P4|P5)";then | ||
87 | UBOOT_SOURCE=u-boot.pbl | ||
88 | fi | ||
89 | fi | ||
90 | for type in ${UBOOT_CONFIG}; do | ||
91 | j=`expr $j + 1`; | ||
92 | if [ $j -eq $i ]; then | ||
93 | cp ${S}/${config}/${UBOOT_SOURCE} ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} | ||
94 | # use boot-format to regenerate spi image if BOOTFORMAT_CONFIG is not empty | ||
95 | if echo ${config} |egrep -qi "SPIFLASH" && [ -n "${BOOTFORMAT_CONFIG}" ];then | ||
96 | ${STAGING_BINDIR_NATIVE}/boot_format \ | ||
97 | ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ | 68 | ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ |
98 | ${S}/${config}/${UBOOT_SOURCE} -spi ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} | 69 | ${config}/u-boot-${type}.${UBOOT_SUFFIX} -spi ${config}/u-boot.format.bin |
99 | fi | 70 | cp ${config}/u-boot.format.bin ${config}/u-boot-${type}.${UBOOT_SUFFIX} |
100 | fi | 71 | fi |
101 | done | 72 | fi |
102 | unset j | 73 | done |
103 | fi | 74 | unset j |
104 | done | 75 | done |
105 | unset i | 76 | unset i |
106 | fi | 77 | fi |