All of lore.kernel.org
 help / color / mirror / Atom feed
From: <ting.liu@nxp.com>
To: <meta-freescale@yoctoproject.org>
Subject: [meta-fsl-ppc][PATCH 03/13] u-boot-qoriq: switch to new UBOOT_CONFIG format
Date: Fri, 17 Jun 2016 15:36:16 +0800	[thread overview]
Message-ID: <1466148986-926-4-git-send-email-ting.liu@nxp.com> (raw)
In-Reply-To: <1466148986-926-1-git-send-email-ting.liu@nxp.com>

From: Ting Liu <ting.liu@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@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



  parent reply	other threads:[~2016-06-17  7:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-17  7:36 [meta-fsl-ppc][PATCH 00/13] QorIQ SDK V2.0 patches - Part I ting.liu
2016-06-17  7:36 ` [meta-fsl-ppc][PATCH 01/13] remove not supported e500v2 machines ting.liu
2016-06-17  7:36 ` [meta-fsl-ppc][PATCH 02/13] u-boot-qoriq: upgrade to 2016.01 ting.liu
2016-06-17  7:36 ` ting.liu [this message]
2016-06-17  7:36 ` [meta-fsl-ppc][PATCH 04/13] u-boot-qoriq: sync with u-boot.inc from poky ting.liu
2016-06-17  7:36 ` [meta-fsl-ppc][PATCH 05/13] p2041rdb: switch to new UBOOT_CONFIG format ting.liu
2016-06-17  7:36 ` [meta-fsl-ppc][PATCH 06/13] p3041ds: " ting.liu
2016-06-17  7:36 ` [meta-fsl-ppc][PATCH 07/13] p4080ds: " ting.liu
2016-06-17  7:36 ` [meta-fsl-ppc][PATCH 08/13] p5020: " ting.liu
2016-06-17  7:36 ` [meta-fsl-ppc][PATCH 09/13] p5040: " ting.liu
2016-06-17  7:36 ` [meta-fsl-ppc][PATCH 10/13] t1023: " ting.liu
2016-06-17  7:36 ` [meta-fsl-ppc][PATCH 11/13] t1024: " ting.liu
2016-06-17  7:36 ` [meta-fsl-ppc][PATCH 12/13] t104x: " ting.liu
2016-06-17  7:36 ` [meta-fsl-ppc][PATCH 13/13] t2080: " ting.liu
2016-06-21 13:47 ` [meta-fsl-ppc][PATCH 00/13] QorIQ SDK V2.0 patches - Part I Robert E. Cochran
2016-06-22  2:00   ` Ting Liu
2016-06-22  5:58     ` Zhenhua Luo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1466148986-926-4-git-send-email-ting.liu@nxp.com \
    --to=ting.liu@nxp.com \
    --cc=meta-freescale@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.