[meta-freescale] [meta-fsl-ppc][PATCH 03/13] u-boot-qoriq: switch to new UBOOT_CONFIG format
ting.liu at nxp.com
ting.liu at nxp.com
Fri Jun 17 00:36:16 PDT 2016
From: Ting Liu <ting.liu at nxp.com>
By using the new UBOOT_CONFIG format, the final u-boot binary will be
configured in machine config file, and will be processed in upstream
u-boot.inc.
Remove the codes to copy final u-boot binary, and append the special
steps which need boot-format tool.
Signed-off-by: Ting Liu <ting.liu at nxp.com>
---
recipes-bsp/u-boot/u-boot-qoriq_2016.01.bb | 53 +++++++-----------------------
1 file 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"
EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"'
do_compile_append_qoriq-ppc () {
- # some board's final nand/spi/sdcard binary was not named as u-boot.bin
unset i j
- if [ "x${UBOOT_CONFIG}" != "x" ]; then
+ if [ -n "${UBOOT_CONFIG}" ];then
for config in ${UBOOT_MACHINE}; do
i=`expr $i + 1`;
- UBOOT_SOURCE=${UBOOT_BINARY}
- if echo ${config} |egrep -v "SECBOOT|SECURE" |egrep -qi "SDCARD|SPIFLASH|NAND"; then
- if echo ${config} |egrep -qi "NAND";then
- if echo ${config} |egrep -qi "^(BSC|C29|P10|P2020RDB)";then
- UBOOT_SOURCE=u-boot-with-spl.bin
- elif echo ${config} |egrep -qi "^(B4|T1|T2|T4)";then
- UBOOT_SOURCE=u-boot-with-spl-pbl.bin
- elif echo ${config} |egrep -qi "^(P2041|P3|P4|P5)";then
- UBOOT_SOURCE=u-boot.pbl
- fi
- elif echo ${config} |egrep -qi "SPIFLASH";then
- if echo ${config} |egrep -qi "^(P10|P2020RDB)";then
- UBOOT_SOURCE=u-boot-with-spl.bin
- elif echo ${config} |egrep -qi "^(T1|T2)";then
- UBOOT_SOURCE=u-boot-with-spl-pbl.bin
- elif echo ${config} |egrep -qi "^(B4|P2041|P3|P4|P5|T4)";then
- UBOOT_SOURCE=u-boot.pbl
- fi
- elif echo ${config} |egrep -qi "SDCARD";then
- if echo ${config} |egrep -qi "^(P10|P2020RDB)";then
- UBOOT_SOURCE=u-boot-with-spl.bin
- elif echo ${config} |egrep -qi "^(B4|T1|T2|T4)";then
- UBOOT_SOURCE=u-boot-with-spl-pbl.bin
- elif echo ${config} |egrep -qi "^(P2041|P3|P4|P5)";then
- UBOOT_SOURCE=u-boot.pbl
- fi
- fi
- for type in ${UBOOT_CONFIG}; do
- j=`expr $j + 1`;
- if [ $j -eq $i ]; then
- cp ${S}/${config}/${UBOOT_SOURCE} ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX}
- # use boot-format to regenerate spi image if BOOTFORMAT_CONFIG is not empty
- if echo ${config} |egrep -qi "SPIFLASH" && [ -n "${BOOTFORMAT_CONFIG}" ];then
- ${STAGING_BINDIR_NATIVE}/boot_format \
+ for type in ${UBOOT_CONFIG}; do
+ j=`expr $j + 1`;
+ if [ $j -eq $i ]; then
+ # use boot-format to regenerate spi image if BOOTFORMAT_CONFIG is not empty
+ if [ -n "${BOOTFORMAT_CONFIG}" ] && echo "${type}" |grep -q spi;then
+ ${STAGING_BINDIR_NATIVE}/boot_format \
${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \
- ${S}/${config}/${UBOOT_SOURCE} -spi ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX}
- fi
+ ${config}/u-boot-${type}.${UBOOT_SUFFIX} -spi ${config}/u-boot.format.bin
+ cp ${config}/u-boot.format.bin ${config}/u-boot-${type}.${UBOOT_SUFFIX}
fi
- done
- unset j
- fi
+ fi
+ done
+ unset j
done
unset i
fi
--
1.9.2
More information about the meta-freescale
mailing list