All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4] u-boot.inc: fix rename image error
@ 2015-03-11  9:40 Chunrong Guo
  2015-03-16  2:06 ` B40290
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Chunrong Guo @ 2015-03-11  9:40 UTC (permalink / raw)
  To: openembedded-core

  Resolve mismatch between U-Boot configs and uboot image name.
  The ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} may alway be false
  and repeat compile or install so we need to check if ${type} match ${config} .

Signed-off-by: Chunrong Guo <B40290@freescale.com>
---
 meta/recipes-bsp/u-boot/u-boot.inc | 85 ++++++++++++++++----------------------
 1 file changed, 35 insertions(+), 50 deletions(-)

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 6bdc86a..9b52971 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -66,20 +66,17 @@ do_compile () {
     if [ "x${UBOOT_CONFIG}" != "x" ]
     then
         for config in ${UBOOT_MACHINE}; do
-            for type in in ${UBOOT_CONFIG}; do
-                if [ "${type}"x = "in"x ]
+            i=`expr $i + 1`;
+            for type  in ${UBOOT_CONFIG}; do
+                j=`expr $j + 1`;
+                if [ $j -eq $i ]
                 then
-                    continue
-                fi
-                if [ -d "${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX}" ]
-                then
-                    break
-                else
                     oe_runmake O=${config} ${config}
                     oe_runmake O=${config} ${UBOOT_MAKE_TARGET}
                     cp  ${S}/${config}/${UBOOT_BINARY}  ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX}
                 fi
             done
+            unset  j
         done
     else
         oe_runmake ${UBOOT_MACHINE}
@@ -92,20 +89,17 @@ do_install () {
     if [ "x${UBOOT_CONFIG}" != "x" ]
     then
         for config in ${UBOOT_MACHINE}; do
-            for type in in ${UBOOT_CONFIG}; do
-                if [ "${type}"x = "in"x ]
-                then
-                    continue
-                fi
-                if [ -d "${D}/boot/u-boot-${type}.${UBOOT_SUFFIX}" ]
+            i=`expr $i + 1`;
+            for type in ${UBOOT_CONFIG}; do
+                j=`expr $j + 1`;
+                if [ $j -eq $i ]
                 then
-                    break
-                else
                     install -d ${D}/boot
                     install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}.${UBOOT_SUFFIX}
                     ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
                 fi
             done
+            unset  j
         done
     else
         install -d ${D}/boot
@@ -123,20 +117,17 @@ do_install () {
         if [ "x${UBOOT_CONFIG}" != "x" ]   
         then
             for config in ${UBOOT_MACHINE}; do
-                for type in in ${UBOOT_CONFIG}; do
-                     if [ "${type}"x = "in"x ]
-                     then
-                         continue
-                     fi
-                     if [ -d "${D}/boot/${SPL_IMAGE}-${type}" ]
-                     then
-                         break
-                     else
+                i=`expr $i + 1`;
+                for type in ${UBOOT_CONFIG}; do
+                    j=`expr $j + 1`;
+                    if [ $j -eq $i ]
+                    then
                          install ${S}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}
                          ln -sf ${SPL_IMAGE}-${type} ${D}/boot/${SPL_BINARY}-${type}
                          ln -sf ${SPL_IMAGE}-${type} ${D}/boot/${SPL_BINARY}
-                     fi
+                    fi
                 done
+                unset  j
             done
         else
             install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
@@ -157,15 +148,11 @@ do_deploy () {
     if [ "x${UBOOT_CONFIG}" != "x" ]
     then
         for config in ${UBOOT_MACHINE}; do
-            for type in in ${UBOOT_CONFIG}; do
-                if [ "${type}"x = "in"x ]  
+            i=`expr $i + 1`;
+            for type in ${UBOOT_CONFIG}; do
+                j=`expr $j + 1`;
+                if [ $j -eq $i ]
                 then
-                    continue
-                fi
-                if [ -d "${DEPLOYDIR}/u-boot-${type}.${UBOOT_SUFFIX}" ]
-                then 
-                    break
-                else
                     install -d ${DEPLOYDIR}
                     install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}.${UBOOT_SUFFIX}
                     cd ${DEPLOYDIR}
@@ -173,6 +160,7 @@ do_deploy () {
                     ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
                 fi 
             done 
+            unset  j
         done
     else
         install -d ${DEPLOYDIR}
@@ -190,23 +178,20 @@ do_deploy () {
          if [ "x${UBOOT_CONFIG}" != "x" ]   
          then
              for config in ${UBOOT_MACHINE}; do
-                 for type in in ${UBOOT_CONFIG}; do
-                      if [ "${type}"x = "in"x ]
-                      then
-                          continue
-                      fi
-                      if [ -d "${DEPLOYDIR}/${SPL_IMAGE}-${type}" ]
-                      then
-                          break
-                      else
-                          install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}
-                          rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
-                          ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}-${type}
-                          ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}
-                          ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
-                          ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}
-                      fi
+                 i=`expr $i + 1`;
+                 for type in ${UBOOT_CONFIG}; do
+                     j=`expr $j + 1`;
+                     if [ $j -eq $i ]
+                     then
+                         install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}
+                         rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
+                         ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}-${type}
+                         ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}
+                         ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
+                         ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}
+                     fi
                  done
+                 unset  j
              done
          else
              install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
-- 
1.9.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v4] u-boot.inc: fix rename image error
  2015-03-11  9:40 [PATCH v4] u-boot.inc: fix rename image error Chunrong Guo
@ 2015-03-16  2:06 ` B40290
  2015-03-16  2:27   ` Otavio Salvador
  2015-03-23  2:09 ` B40290
  2015-03-24  2:25 ` Otavio Salvador
  2 siblings, 1 reply; 8+ messages in thread
From: B40290 @ 2015-03-16  2:06 UTC (permalink / raw)
  To: B40290, openembedded-core

Pings.

-----Original Message-----
From: Chunrong Guo [mailto:B40290@freescale.com] 
Sent: Wednesday, March 11, 2015 5:40 PM
To: openembedded-core@lists.openembedded.org
Cc: Liu Ting-B28495; Luo Zhenhua-B19537; Guo Chunrong-B40290; Guo Chunrong-B40290
Subject: [OE-core][PATCH v4] u-boot.inc: fix rename image error

  Resolve mismatch between U-Boot configs and uboot image name.
  The ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} may alway be false
  and repeat compile or install so we need to check if ${type} match ${config} .

Signed-off-by: Chunrong Guo <B40290@freescale.com>
---
 meta/recipes-bsp/u-boot/u-boot.inc | 85 ++++++++++++++++----------------------
 1 file changed, 35 insertions(+), 50 deletions(-)

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 6bdc86a..9b52971 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -66,20 +66,17 @@ do_compile () {
     if [ "x${UBOOT_CONFIG}" != "x" ]
     then
         for config in ${UBOOT_MACHINE}; do
-            for type in in ${UBOOT_CONFIG}; do
-                if [ "${type}"x = "in"x ]
+            i=`expr $i + 1`;
+            for type  in ${UBOOT_CONFIG}; do
+                j=`expr $j + 1`;
+                if [ $j -eq $i ]
                 then
-                    continue
-                fi
-                if [ -d "${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX}" ]
-                then
-                    break
-                else
                     oe_runmake O=${config} ${config}
                     oe_runmake O=${config} ${UBOOT_MAKE_TARGET}
                     cp  ${S}/${config}/${UBOOT_BINARY}  ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX}
                 fi
             done
+            unset  j
         done
     else
         oe_runmake ${UBOOT_MACHINE}
@@ -92,20 +89,17 @@ do_install () {
     if [ "x${UBOOT_CONFIG}" != "x" ]
     then
         for config in ${UBOOT_MACHINE}; do
-            for type in in ${UBOOT_CONFIG}; do
-                if [ "${type}"x = "in"x ]
-                then
-                    continue
-                fi
-                if [ -d "${D}/boot/u-boot-${type}.${UBOOT_SUFFIX}" ]
+            i=`expr $i + 1`;
+            for type in ${UBOOT_CONFIG}; do
+                j=`expr $j + 1`;
+                if [ $j -eq $i ]
                 then
-                    break
-                else
                     install -d ${D}/boot
                     install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}.${UBOOT_SUFFIX}
                     ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
                 fi
             done
+            unset  j
         done
     else
         install -d ${D}/boot
@@ -123,20 +117,17 @@ do_install () {
         if [ "x${UBOOT_CONFIG}" != "x" ]   
         then
             for config in ${UBOOT_MACHINE}; do
-                for type in in ${UBOOT_CONFIG}; do
-                     if [ "${type}"x = "in"x ]
-                     then
-                         continue
-                     fi
-                     if [ -d "${D}/boot/${SPL_IMAGE}-${type}" ]
-                     then
-                         break
-                     else
+                i=`expr $i + 1`;
+                for type in ${UBOOT_CONFIG}; do
+                    j=`expr $j + 1`;
+                    if [ $j -eq $i ]
+                    then
                          install ${S}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}
                          ln -sf ${SPL_IMAGE}-${type} ${D}/boot/${SPL_BINARY}-${type}
                          ln -sf ${SPL_IMAGE}-${type} ${D}/boot/${SPL_BINARY}
-                     fi
+                    fi
                 done
+                unset  j
             done
         else
             install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} @@ -157,15 +148,11 @@ do_deploy () {
     if [ "x${UBOOT_CONFIG}" != "x" ]
     then
         for config in ${UBOOT_MACHINE}; do
-            for type in in ${UBOOT_CONFIG}; do
-                if [ "${type}"x = "in"x ]  
+            i=`expr $i + 1`;
+            for type in ${UBOOT_CONFIG}; do
+                j=`expr $j + 1`;
+                if [ $j -eq $i ]
                 then
-                    continue
-                fi
-                if [ -d "${DEPLOYDIR}/u-boot-${type}.${UBOOT_SUFFIX}" ]
-                then 
-                    break
-                else
                     install -d ${DEPLOYDIR}
                     install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}.${UBOOT_SUFFIX}
                     cd ${DEPLOYDIR}
@@ -173,6 +160,7 @@ do_deploy () {
                     ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
                 fi 
             done 
+            unset  j
         done
     else
         install -d ${DEPLOYDIR}
@@ -190,23 +178,20 @@ do_deploy () {
          if [ "x${UBOOT_CONFIG}" != "x" ]   
          then
              for config in ${UBOOT_MACHINE}; do
-                 for type in in ${UBOOT_CONFIG}; do
-                      if [ "${type}"x = "in"x ]
-                      then
-                          continue
-                      fi
-                      if [ -d "${DEPLOYDIR}/${SPL_IMAGE}-${type}" ]
-                      then
-                          break
-                      else
-                          install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}
-                          rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
-                          ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}-${type}
-                          ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}
-                          ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
-                          ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}
-                      fi
+                 i=`expr $i + 1`;
+                 for type in ${UBOOT_CONFIG}; do
+                     j=`expr $j + 1`;
+                     if [ $j -eq $i ]
+                     then
+                         install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}
+                         rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
+                         ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}-${type}
+                         ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}
+                         ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
+                         ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}
+                     fi
                  done
+                 unset  j
              done
          else
              install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
--
1.9.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v4] u-boot.inc: fix rename image error
  2015-03-16  2:06 ` B40290
@ 2015-03-16  2:27   ` Otavio Salvador
  0 siblings, 0 replies; 8+ messages in thread
From: Otavio Salvador @ 2015-03-16  2:27 UTC (permalink / raw)
  To: B40290; +Cc: openembedded-core

It is late here so I will it along with other tests in master tomorrow
before acking it.

On Sun, Mar 15, 2015 at 11:06 PM, B40290@freescale.com
<B40290@freescale.com> wrote:
> Pings.
>
> -----Original Message-----
> From: Chunrong Guo [mailto:B40290@freescale.com]
> Sent: Wednesday, March 11, 2015 5:40 PM
> To: openembedded-core@lists.openembedded.org
> Cc: Liu Ting-B28495; Luo Zhenhua-B19537; Guo Chunrong-B40290; Guo Chunrong-B40290
> Subject: [OE-core][PATCH v4] u-boot.inc: fix rename image error
>
>   Resolve mismatch between U-Boot configs and uboot image name.
>   The ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} may alway be false
>   and repeat compile or install so we need to check if ${type} match ${config} .
>
> Signed-off-by: Chunrong Guo <B40290@freescale.com>
> ---
>  meta/recipes-bsp/u-boot/u-boot.inc | 85 ++++++++++++++++----------------------
>  1 file changed, 35 insertions(+), 50 deletions(-)
>
> diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
> index 6bdc86a..9b52971 100644
> --- a/meta/recipes-bsp/u-boot/u-boot.inc
> +++ b/meta/recipes-bsp/u-boot/u-boot.inc
> @@ -66,20 +66,17 @@ do_compile () {
>      if [ "x${UBOOT_CONFIG}" != "x" ]
>      then
>          for config in ${UBOOT_MACHINE}; do
> -            for type in in ${UBOOT_CONFIG}; do
> -                if [ "${type}"x = "in"x ]
> +            i=`expr $i + 1`;
> +            for type  in ${UBOOT_CONFIG}; do
> +                j=`expr $j + 1`;
> +                if [ $j -eq $i ]
>                  then
> -                    continue
> -                fi
> -                if [ -d "${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX}" ]
> -                then
> -                    break
> -                else
>                      oe_runmake O=${config} ${config}
>                      oe_runmake O=${config} ${UBOOT_MAKE_TARGET}
>                      cp  ${S}/${config}/${UBOOT_BINARY}  ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX}
>                  fi
>              done
> +            unset  j
>          done
>      else
>          oe_runmake ${UBOOT_MACHINE}
> @@ -92,20 +89,17 @@ do_install () {
>      if [ "x${UBOOT_CONFIG}" != "x" ]
>      then
>          for config in ${UBOOT_MACHINE}; do
> -            for type in in ${UBOOT_CONFIG}; do
> -                if [ "${type}"x = "in"x ]
> -                then
> -                    continue
> -                fi
> -                if [ -d "${D}/boot/u-boot-${type}.${UBOOT_SUFFIX}" ]
> +            i=`expr $i + 1`;
> +            for type in ${UBOOT_CONFIG}; do
> +                j=`expr $j + 1`;
> +                if [ $j -eq $i ]
>                  then
> -                    break
> -                else
>                      install -d ${D}/boot
>                      install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}.${UBOOT_SUFFIX}
>                      ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
>                  fi
>              done
> +            unset  j
>          done
>      else
>          install -d ${D}/boot
> @@ -123,20 +117,17 @@ do_install () {
>          if [ "x${UBOOT_CONFIG}" != "x" ]
>          then
>              for config in ${UBOOT_MACHINE}; do
> -                for type in in ${UBOOT_CONFIG}; do
> -                     if [ "${type}"x = "in"x ]
> -                     then
> -                         continue
> -                     fi
> -                     if [ -d "${D}/boot/${SPL_IMAGE}-${type}" ]
> -                     then
> -                         break
> -                     else
> +                i=`expr $i + 1`;
> +                for type in ${UBOOT_CONFIG}; do
> +                    j=`expr $j + 1`;
> +                    if [ $j -eq $i ]
> +                    then
>                           install ${S}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}
>                           ln -sf ${SPL_IMAGE}-${type} ${D}/boot/${SPL_BINARY}-${type}
>                           ln -sf ${SPL_IMAGE}-${type} ${D}/boot/${SPL_BINARY}
> -                     fi
> +                    fi
>                  done
> +                unset  j
>              done
>          else
>              install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} @@ -157,15 +148,11 @@ do_deploy () {
>      if [ "x${UBOOT_CONFIG}" != "x" ]
>      then
>          for config in ${UBOOT_MACHINE}; do
> -            for type in in ${UBOOT_CONFIG}; do
> -                if [ "${type}"x = "in"x ]
> +            i=`expr $i + 1`;
> +            for type in ${UBOOT_CONFIG}; do
> +                j=`expr $j + 1`;
> +                if [ $j -eq $i ]
>                  then
> -                    continue
> -                fi
> -                if [ -d "${DEPLOYDIR}/u-boot-${type}.${UBOOT_SUFFIX}" ]
> -                then
> -                    break
> -                else
>                      install -d ${DEPLOYDIR}
>                      install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}.${UBOOT_SUFFIX}
>                      cd ${DEPLOYDIR}
> @@ -173,6 +160,7 @@ do_deploy () {
>                      ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
>                  fi
>              done
> +            unset  j
>          done
>      else
>          install -d ${DEPLOYDIR}
> @@ -190,23 +178,20 @@ do_deploy () {
>           if [ "x${UBOOT_CONFIG}" != "x" ]
>           then
>               for config in ${UBOOT_MACHINE}; do
> -                 for type in in ${UBOOT_CONFIG}; do
> -                      if [ "${type}"x = "in"x ]
> -                      then
> -                          continue
> -                      fi
> -                      if [ -d "${DEPLOYDIR}/${SPL_IMAGE}-${type}" ]
> -                      then
> -                          break
> -                      else
> -                          install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}
> -                          rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
> -                          ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}-${type}
> -                          ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}
> -                          ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
> -                          ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}
> -                      fi
> +                 i=`expr $i + 1`;
> +                 for type in ${UBOOT_CONFIG}; do
> +                     j=`expr $j + 1`;
> +                     if [ $j -eq $i ]
> +                     then
> +                         install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}
> +                         rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
> +                         ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}-${type}
> +                         ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}
> +                         ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
> +                         ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}
> +                     fi
>                   done
> +                 unset  j
>               done
>           else
>               install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
> --
> 1.9.2
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v4] u-boot.inc: fix rename image error
  2015-03-11  9:40 [PATCH v4] u-boot.inc: fix rename image error Chunrong Guo
  2015-03-16  2:06 ` B40290
@ 2015-03-23  2:09 ` B40290
  2015-03-23 20:28   ` Otavio Salvador
  2015-03-24  2:25 ` Otavio Salvador
  2 siblings, 1 reply; 8+ messages in thread
From: B40290 @ 2015-03-23  2:09 UTC (permalink / raw)
  To: B40290, openembedded-core

Ping.

-----Original Message-----
From: Chunrong Guo [mailto:B40290@freescale.com] 
Sent: Wednesday, March 11, 2015 5:40 PM
To: openembedded-core@lists.openembedded.org
Cc: Liu Ting-B28495; Luo Zhenhua-B19537; Guo Chunrong-B40290; Guo Chunrong-B40290
Subject: [OE-core][PATCH v4] u-boot.inc: fix rename image error

  Resolve mismatch between U-Boot configs and uboot image name.
  The ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} may alway be false
  and repeat compile or install so we need to check if ${type} match ${config} .

Signed-off-by: Chunrong Guo <B40290@freescale.com>
---
 meta/recipes-bsp/u-boot/u-boot.inc | 85 ++++++++++++++++----------------------
 1 file changed, 35 insertions(+), 50 deletions(-)

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 6bdc86a..9b52971 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -66,20 +66,17 @@ do_compile () {
     if [ "x${UBOOT_CONFIG}" != "x" ]
     then
         for config in ${UBOOT_MACHINE}; do
-            for type in in ${UBOOT_CONFIG}; do
-                if [ "${type}"x = "in"x ]
+            i=`expr $i + 1`;
+            for type  in ${UBOOT_CONFIG}; do
+                j=`expr $j + 1`;
+                if [ $j -eq $i ]
                 then
-                    continue
-                fi
-                if [ -d "${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX}" ]
-                then
-                    break
-                else
                     oe_runmake O=${config} ${config}
                     oe_runmake O=${config} ${UBOOT_MAKE_TARGET}
                     cp  ${S}/${config}/${UBOOT_BINARY}  ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX}
                 fi
             done
+            unset  j
         done
     else
         oe_runmake ${UBOOT_MACHINE}
@@ -92,20 +89,17 @@ do_install () {
     if [ "x${UBOOT_CONFIG}" != "x" ]
     then
         for config in ${UBOOT_MACHINE}; do
-            for type in in ${UBOOT_CONFIG}; do
-                if [ "${type}"x = "in"x ]
-                then
-                    continue
-                fi
-                if [ -d "${D}/boot/u-boot-${type}.${UBOOT_SUFFIX}" ]
+            i=`expr $i + 1`;
+            for type in ${UBOOT_CONFIG}; do
+                j=`expr $j + 1`;
+                if [ $j -eq $i ]
                 then
-                    break
-                else
                     install -d ${D}/boot
                     install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}.${UBOOT_SUFFIX}
                     ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
                 fi
             done
+            unset  j
         done
     else
         install -d ${D}/boot
@@ -123,20 +117,17 @@ do_install () {
         if [ "x${UBOOT_CONFIG}" != "x" ]   
         then
             for config in ${UBOOT_MACHINE}; do
-                for type in in ${UBOOT_CONFIG}; do
-                     if [ "${type}"x = "in"x ]
-                     then
-                         continue
-                     fi
-                     if [ -d "${D}/boot/${SPL_IMAGE}-${type}" ]
-                     then
-                         break
-                     else
+                i=`expr $i + 1`;
+                for type in ${UBOOT_CONFIG}; do
+                    j=`expr $j + 1`;
+                    if [ $j -eq $i ]
+                    then
                          install ${S}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}
                          ln -sf ${SPL_IMAGE}-${type} ${D}/boot/${SPL_BINARY}-${type}
                          ln -sf ${SPL_IMAGE}-${type} ${D}/boot/${SPL_BINARY}
-                     fi
+                    fi
                 done
+                unset  j
             done
         else
             install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} @@ -157,15 +148,11 @@ do_deploy () {
     if [ "x${UBOOT_CONFIG}" != "x" ]
     then
         for config in ${UBOOT_MACHINE}; do
-            for type in in ${UBOOT_CONFIG}; do
-                if [ "${type}"x = "in"x ]  
+            i=`expr $i + 1`;
+            for type in ${UBOOT_CONFIG}; do
+                j=`expr $j + 1`;
+                if [ $j -eq $i ]
                 then
-                    continue
-                fi
-                if [ -d "${DEPLOYDIR}/u-boot-${type}.${UBOOT_SUFFIX}" ]
-                then 
-                    break
-                else
                     install -d ${DEPLOYDIR}
                     install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}.${UBOOT_SUFFIX}
                     cd ${DEPLOYDIR}
@@ -173,6 +160,7 @@ do_deploy () {
                     ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
                 fi 
             done 
+            unset  j
         done
     else
         install -d ${DEPLOYDIR}
@@ -190,23 +178,20 @@ do_deploy () {
          if [ "x${UBOOT_CONFIG}" != "x" ]   
          then
              for config in ${UBOOT_MACHINE}; do
-                 for type in in ${UBOOT_CONFIG}; do
-                      if [ "${type}"x = "in"x ]
-                      then
-                          continue
-                      fi
-                      if [ -d "${DEPLOYDIR}/${SPL_IMAGE}-${type}" ]
-                      then
-                          break
-                      else
-                          install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}
-                          rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
-                          ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}-${type}
-                          ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}
-                          ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
-                          ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}
-                      fi
+                 i=`expr $i + 1`;
+                 for type in ${UBOOT_CONFIG}; do
+                     j=`expr $j + 1`;
+                     if [ $j -eq $i ]
+                     then
+                         install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}
+                         rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
+                         ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}-${type}
+                         ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}
+                         ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
+                         ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}
+                     fi
                  done
+                 unset  j
              done
          else
              install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
--
1.9.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v4] u-boot.inc: fix rename image error
  2015-03-23  2:09 ` B40290
@ 2015-03-23 20:28   ` Otavio Salvador
  0 siblings, 0 replies; 8+ messages in thread
From: Otavio Salvador @ 2015-03-23 20:28 UTC (permalink / raw)
  To: B40290; +Cc: openembedded-core

On Sun, Mar 22, 2015 at 11:09 PM, B40290@freescale.com
<B40290@freescale.com> wrote:
> Ping.
>
> -----Original Message-----
> From: Chunrong Guo [mailto:B40290@freescale.com]
> Sent: Wednesday, March 11, 2015 5:40 PM
> To: openembedded-core@lists.openembedded.org
> Cc: Liu Ting-B28495; Luo Zhenhua-B19537; Guo Chunrong-B40290; Guo Chunrong-B40290
> Subject: [OE-core][PATCH v4] u-boot.inc: fix rename image error
>
>   Resolve mismatch between U-Boot configs and uboot image name.
>   The ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} may alway be false
>   and repeat compile or install so we need to check if ${type} match ${config} .
>
> Signed-off-by: Chunrong Guo <B40290@freescale.com>

We are working in a deadline; I won't be able to test this until Wed. Sorry.

Did you try this with meta-fsl-arm?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v4] u-boot.inc: fix rename image error
  2015-03-11  9:40 [PATCH v4] u-boot.inc: fix rename image error Chunrong Guo
  2015-03-16  2:06 ` B40290
  2015-03-23  2:09 ` B40290
@ 2015-03-24  2:25 ` Otavio Salvador
  2015-03-24  7:34   ` B40290
  2 siblings, 1 reply; 8+ messages in thread
From: Otavio Salvador @ 2015-03-24  2:25 UTC (permalink / raw)
  To: Chunrong Guo; +Cc: Patches and discussions about the oe-core layer

Hello Chunrong,

On Wed, Mar 11, 2015 at 6:40 AM, Chunrong Guo <B40290@freescale.com> wrote:
>   Resolve mismatch between U-Boot configs and uboot image name.
>   The ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} may alway be false
>   and repeat compile or install so we need to check if ${type} match ${config} .
>
> Signed-off-by: Chunrong Guo <B40290@freescale.com>

First I'd like to apologize for the delay in testing it. Thanks for
your patience. I got some free time (waiting between builds) and
decided to check this ...

So build is working fine .. however we missed the version in the file.
This is unfortunate because if you end building two versions in a roll
in same deploy directory you cannot refer the old one, for example:

otavio@centrium ~/src/ossystems/yocto/build % ls
tmp/deploy/images/imx6qsabresd/u-boot* -l
lrwxrwxrwx 1 otavio otavio     18 Mar 23 23:17
tmp/deploy/images/imx6qsabresd/u-boot.imx -> u-boot-mfgtool.imx*
lrwxrwxrwx 1 otavio otavio     18 Mar 23 23:17
tmp/deploy/images/imx6qsabresd/u-boot-imx6qsabresd.imx ->
u-boot-mfgtool.imx*
-rwxr-xr-x 2 otavio otavio 379904 Mar 23 23:17
tmp/deploy/images/imx6qsabresd/u-boot-mfgtool.imx*
-rwxr-xr-x 2 otavio otavio 379904 Mar 23 23:17
tmp/deploy/images/imx6qsabresd/u-boot-sd.imx*

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v4] u-boot.inc: fix rename image error
  2015-03-24  2:25 ` Otavio Salvador
@ 2015-03-24  7:34   ` B40290
  2015-03-24 13:15     ` Otavio Salvador
  0 siblings, 1 reply; 8+ messages in thread
From: B40290 @ 2015-03-24  7:34 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

Hello Otavio,
Thank you for your comments.

But I do not understand what "old one" is.

Thanks
Chunrong



-----Original Message-----
From: otavio.salvador@gmail.com [mailto:otavio.salvador@gmail.com] On Behalf Of Otavio Salvador
Sent: Tuesday, March 24, 2015 10:25 AM
To: Guo Chunrong-B40290
Cc: Patches and discussions about the oe-core layer; Burton, Ross
Subject: Re: [OE-core] [PATCH v4] u-boot.inc: fix rename image error

Hello Chunrong,

On Wed, Mar 11, 2015 at 6:40 AM, Chunrong Guo <B40290@freescale.com> wrote:
>   Resolve mismatch between U-Boot configs and uboot image name.
>   The ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} may alway be false
>   and repeat compile or install so we need to check if ${type} match ${config} .
>
> Signed-off-by: Chunrong Guo <B40290@freescale.com>

First I'd like to apologize for the delay in testing it. Thanks for your patience. I got some free time (waiting between builds) and decided to check this ...

So build is working fine .. however we missed the version in the file.
This is unfortunate because if you end building two versions in a roll in same deploy directory you cannot refer the old one, for example:

[I do not understand what "old one" is ] 


otavio@centrium ~/src/ossystems/yocto/build % ls
tmp/deploy/images/imx6qsabresd/u-boot* -l
lrwxrwxrwx 1 otavio otavio     18 Mar 23 23:17
tmp/deploy/images/imx6qsabresd/u-boot.imx -> u-boot-mfgtool.imx*
lrwxrwxrwx 1 otavio otavio     18 Mar 23 23:17
tmp/deploy/images/imx6qsabresd/u-boot-imx6qsabresd.imx ->
u-boot-mfgtool.imx*
-rwxr-xr-x 2 otavio otavio 379904 Mar 23 23:17
tmp/deploy/images/imx6qsabresd/u-boot-mfgtool.imx*
-rwxr-xr-x 2 otavio otavio 379904 Mar 23 23:17
tmp/deploy/images/imx6qsabresd/u-boot-sd.imx*

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v4] u-boot.inc: fix rename image error
  2015-03-24  7:34   ` B40290
@ 2015-03-24 13:15     ` Otavio Salvador
  0 siblings, 0 replies; 8+ messages in thread
From: Otavio Salvador @ 2015-03-24 13:15 UTC (permalink / raw)
  To: B40290; +Cc: Patches and discussions about the oe-core layer

On Tue, Mar 24, 2015 at 4:34 AM, B40290@freescale.com
<B40290@freescale.com> wrote:
> Thank you for your comments.
>
> But I do not understand what "old one" is.

If you build a 2014.10 and next a 2015.01 version in a roll, you
cannot infer the version in deploy or pick previous release (as
possible in kernel).

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-03-24 13:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-11  9:40 [PATCH v4] u-boot.inc: fix rename image error Chunrong Guo
2015-03-16  2:06 ` B40290
2015-03-16  2:27   ` Otavio Salvador
2015-03-23  2:09 ` B40290
2015-03-23 20:28   ` Otavio Salvador
2015-03-24  2:25 ` Otavio Salvador
2015-03-24  7:34   ` B40290
2015-03-24 13:15     ` Otavio Salvador

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.