All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 2/2] u-boot.inc : add compile multiple u-boot feature
@ 2014-11-24  5:24 Chunrong Guo
  2014-12-02  3:50 ` B40290
  2014-12-02 12:42 ` Otavio Salvador
  0 siblings, 2 replies; 4+ messages in thread
From: Chunrong Guo @ 2014-11-24  5:24 UTC (permalink / raw)
  To: openembedded-core

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

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index c695b73..bd76241 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -63,25 +63,32 @@ do_compile () {
 		echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion
 	fi
 
-	oe_runmake ${UBOOT_MACHINE}
-	oe_runmake ${UBOOT_MAKE_TARGET}
+    for type in ${UBOOT_MACHINE}; do
+        oe_runmake O=${type} ${type}
+        oe_runmake O=${type} ${UBOOT_MAKE_TARGET}
+        cp  ${S}/${type}/${UBOOT_BINARY}  ${S}/${type}/u-boot-${type}.bin
+    done
+
 }
 
 do_install () {
-    install -d ${D}/boot
-    install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
-    ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
+    for type in ${UBOOT_MACHINE}; do
+        install -d ${D}/boot
+        install ${S}/${type}/u-boot-${type}.bin ${D}/boot/u-boot-${type}.bin
+    done
 
     if [ -e ${WORKDIR}/fw_env.config ] ; then
         install -d ${D}${sysconfdir}
         install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
     fi
 
-    if [ "x${SPL_BINARY}" != "x" ]
-    then
-        install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
-        ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY}
-    fi
+    for type in ${UBOOT_MACHINE}; do
+        if [ "x${SPL_BINARY}" != "x" ] && [ -d "${S}/${type}/${SPL_BINARY}"]
+        then
+            install ${S}/${type}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
+            ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY}
+        fi
+    done
 
     if [ "x${UBOOT_ENV}" != "x" ]
     then
@@ -93,21 +100,20 @@ do_install () {
 FILES_${PN} = "/boot ${sysconfdir}"
 
 do_deploy () {
-    install -d ${DEPLOYDIR}
-    install ${S}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
-
-    cd ${DEPLOYDIR}
-    rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK}
-    ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
-    ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}
-
-    if [ "x${SPL_BINARY}" != "x" ]
-    then
-        install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
-        rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}
-        ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARY}
-        ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK}
-    fi
+    for type in ${UBOOT_MACHINE}; do
+        install -d ${DEPLOYDIR}
+        install ${S}/${type}/u-boot-${type}.bin ${DEPLOYDIR}/u-boot-${type}.bin
+    done
+    
+    for type in ${UBOOT_MACHINE}; do
+        if [ "x${SPL_BINARY}" != "x" ] && [ -d "${S}/${type}/${SPL_BINARY}"]
+        then
+            install ${S}/${type}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
+            rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}
+            ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARY}
+            ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK}
+        fi
+    done
 
     if [ "x${UBOOT_ENV}" != "x" ]
     then
-- 
1.9.2



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

* Re: [PATCH v2 2/2] u-boot.inc : add compile multiple u-boot feature
  2014-11-24  5:24 [PATCH v2 2/2] u-boot.inc : add compile multiple u-boot feature Chunrong Guo
@ 2014-12-02  3:50 ` B40290
  2014-12-02 12:42 ` Otavio Salvador
  1 sibling, 0 replies; 4+ messages in thread
From: B40290 @ 2014-12-02  3:50 UTC (permalink / raw)
  To: B40290, openembedded-core

Ping .

-----Original Message-----
From: Chunrong Guo [mailto:B40290@freescale.com] 
Sent: Monday, November 24, 2014 1:25 PM
To: openembedded-core@lists.openembedded.org
Cc: Liu Ting-B28495; Luo Zhenhua-B19537; Guo Chunrong-B40290; Guo Chunrong-B40290
Subject: [OE-core][PATCH v2 2/2] u-boot.inc : add compile multiple u-boot feature

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

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index c695b73..bd76241 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -63,25 +63,32 @@ do_compile () {
 		echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion
 	fi
 
-	oe_runmake ${UBOOT_MACHINE}
-	oe_runmake ${UBOOT_MAKE_TARGET}
+    for type in ${UBOOT_MACHINE}; do
+        oe_runmake O=${type} ${type}
+        oe_runmake O=${type} ${UBOOT_MAKE_TARGET}
+        cp  ${S}/${type}/${UBOOT_BINARY}  ${S}/${type}/u-boot-${type}.bin
+    done
+
 }
 
 do_install () {
-    install -d ${D}/boot
-    install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
-    ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
+    for type in ${UBOOT_MACHINE}; do
+        install -d ${D}/boot
+        install ${S}/${type}/u-boot-${type}.bin ${D}/boot/u-boot-${type}.bin
+    done
 
     if [ -e ${WORKDIR}/fw_env.config ] ; then
         install -d ${D}${sysconfdir}
         install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
     fi
 
-    if [ "x${SPL_BINARY}" != "x" ]
-    then
-        install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
-        ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY}
-    fi
+    for type in ${UBOOT_MACHINE}; do
+        if [ "x${SPL_BINARY}" != "x" ] && [ -d "${S}/${type}/${SPL_BINARY}"]
+        then
+            install ${S}/${type}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
+            ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY}
+        fi
+    done
 
     if [ "x${UBOOT_ENV}" != "x" ]
     then
@@ -93,21 +100,20 @@ do_install () {
 FILES_${PN} = "/boot ${sysconfdir}"
 
 do_deploy () {
-    install -d ${DEPLOYDIR}
-    install ${S}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
-
-    cd ${DEPLOYDIR}
-    rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK}
-    ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
-    ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}
-
-    if [ "x${SPL_BINARY}" != "x" ]
-    then
-        install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
-        rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}
-        ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARY}
-        ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK}
-    fi
+    for type in ${UBOOT_MACHINE}; do
+        install -d ${DEPLOYDIR}
+        install ${S}/${type}/u-boot-${type}.bin ${DEPLOYDIR}/u-boot-${type}.bin
+    done
+    
+    for type in ${UBOOT_MACHINE}; do
+        if [ "x${SPL_BINARY}" != "x" ] && [ -d "${S}/${type}/${SPL_BINARY}"]
+        then
+            install ${S}/${type}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
+            rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}
+            ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARY}
+            ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK}
+        fi
+    done
 
     if [ "x${UBOOT_ENV}" != "x" ]
     then
-- 
1.9.2



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

* Re: [PATCH v2 2/2] u-boot.inc : add compile multiple u-boot feature
  2014-11-24  5:24 [PATCH v2 2/2] u-boot.inc : add compile multiple u-boot feature Chunrong Guo
  2014-12-02  3:50 ` B40290
@ 2014-12-02 12:42 ` Otavio Salvador
  2014-12-04  5:54   ` B40290
  1 sibling, 1 reply; 4+ messages in thread
From: Otavio Salvador @ 2014-12-02 12:42 UTC (permalink / raw)
  To: Chunrong Guo; +Cc: Patches and discussions about the oe-core layer

Hello Chunrong,

On Mon, Nov 24, 2014 at 3:24 AM, Chunrong Guo <B40290@freescale.com> wrote:
> Signed-off-by: Chunrong Guo <B40290@freescale.com>
> ---
>  meta/recipes-bsp/u-boot/u-boot.inc | 56 +++++++++++++++++++++-----------------
>  1 file changed, 31 insertions(+), 25 deletions(-)
>
> diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
> index c695b73..bd76241 100644
> --- a/meta/recipes-bsp/u-boot/u-boot.inc
> +++ b/meta/recipes-bsp/u-boot/u-boot.inc
> @@ -63,25 +63,32 @@ do_compile () {
>                 echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion
>         fi
>
> -       oe_runmake ${UBOOT_MACHINE}
> -       oe_runmake ${UBOOT_MAKE_TARGET}
> +    for type in ${UBOOT_MACHINE}; do
> +        oe_runmake O=${type} ${type}
> +        oe_runmake O=${type} ${UBOOT_MAKE_TARGET}
> +        cp  ${S}/${type}/${UBOOT_BINARY}  ${S}/${type}/u-boot-${type}.bin
> +    done
> +
>  }

The out of tree build has caused some headache in one of our internal
customer layers; it was indeed caused by a "bug" in the respective
recipe but I think it is worth mention that it now builds using out of
tree in the commit log so people are aware.

There are two things which has catch my attention here:

 * filename uglyness: the filename in deploy dir is using the
UBOOT_MACHINE however the UBOOT_CONFIG 'name' would be better as it is
more meaningful.

 * difficulty to figure the binary when generating the rootfs: in
meta-fsl-arm, for example, we generate the .sdcard rootfs and using
the patch we now have...

ERROR: Error: The image creation script
'.../tmp/work/imx6qsabresd-oel-linux-gnueabi/core-image-minimal/1.0-r0/temp/create_image.sdcard'
returned 1:
0+0 records in
0+0 records out
0 bytes (0 B) copied, 1.3395e-05 s, 0.0 kB/s
Model:  (file)
Disk .../tmp/deploy/images/imx6qsabresd/core-image-minimal-imx6qsabresd-20141202123437.rootfs.sdcard:
67.1MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 1      4194kB  12.6MB  8389kB  primary               lba
 2      12.6MB  62.9MB  50.3MB  primary

dd: opening `.../tmp/deploy/images/imx6qsabresd/u-boot-imx6qsabresd.imx':
No such file or directory
WARNING: .../tmp/work/imx6qsabresd-oel-linux-gnueabi/core-image-minimal/1.0-r0/temp/create_image.sdcard:1
exit 1 from
  dd if=.../tmp/deploy/images/imx6qsabresd/u-boot-imx6qsabresd.imx
of=.../tmp/deploy/images/imx6qsabresd/core-image-minimal-imx6qsabresd-20141202123437.rootfs.sdcard
conv=notrunc seek=2 skip=0 bs=512

ERROR: Function failed: do_rootfs
ERROR: Logfile of failure stored in:
.../tmp/work/imx6qsabresd-oel-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.31415
ERROR: Task 7 (.../poky/meta/recipes-core/images/core-image-minimal.bb,
do_rootfs) failed with exit code '1'

Do you have any idea how we could address those issues?

-- 
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] 4+ messages in thread

* Re: [PATCH v2 2/2] u-boot.inc : add compile multiple u-boot feature
  2014-12-02 12:42 ` Otavio Salvador
@ 2014-12-04  5:54   ` B40290
  0 siblings, 0 replies; 4+ messages in thread
From: B40290 @ 2014-12-04  5:54 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

Hello Otavio Salvador,                          

Thank you for your comments.
I had submitted  patch v3 .
Please  review  them .

Thanks
Chunrong



-----Original Message-----
From: otavio.salvador@gmail.com [mailto:otavio.salvador@gmail.com] On Behalf Of Otavio Salvador
Sent: Tuesday, December 02, 2014 8:43 PM
To: Guo Chunrong-B40290
Cc: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCH v2 2/2] u-boot.inc : add compile multiple u-boot feature

Hello Chunrong,

On Mon, Nov 24, 2014 at 3:24 AM, Chunrong Guo <B40290@freescale.com> wrote:
> Signed-off-by: Chunrong Guo <B40290@freescale.com>
> ---
>  meta/recipes-bsp/u-boot/u-boot.inc | 56 
> +++++++++++++++++++++-----------------
>  1 file changed, 31 insertions(+), 25 deletions(-)
>
> diff --git a/meta/recipes-bsp/u-boot/u-boot.inc 
> b/meta/recipes-bsp/u-boot/u-boot.inc
> index c695b73..bd76241 100644
> --- a/meta/recipes-bsp/u-boot/u-boot.inc
> +++ b/meta/recipes-bsp/u-boot/u-boot.inc
> @@ -63,25 +63,32 @@ do_compile () {
>                 echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion
>         fi
>
> -       oe_runmake ${UBOOT_MACHINE}
> -       oe_runmake ${UBOOT_MAKE_TARGET}
> +    for type in ${UBOOT_MACHINE}; do
> +        oe_runmake O=${type} ${type}
> +        oe_runmake O=${type} ${UBOOT_MAKE_TARGET}
> +        cp  ${S}/${type}/${UBOOT_BINARY}  ${S}/${type}/u-boot-${type}.bin
> +    done
> +
>  }

The out of tree build has caused some headache in one of our internal customer layers; it was indeed caused by a "bug" in the respective recipe but I think it is worth mention that it now builds using out of tree in the commit log so people are aware.

There are two things which has catch my attention here:

 * filename uglyness: the filename in deploy dir is using the UBOOT_MACHINE however the UBOOT_CONFIG 'name' would be better as it is more meaningful.

 * difficulty to figure the binary when generating the rootfs: in meta-fsl-arm, for example, we generate the .sdcard rootfs and using the patch we now have...

ERROR: Error: The image creation script
'.../tmp/work/imx6qsabresd-oel-linux-gnueabi/core-image-minimal/1.0-r0/temp/create_image.sdcard'
returned 1:
0+0 records in
0+0 records out
0 bytes (0 B) copied, 1.3395e-05 s, 0.0 kB/s
Model:  (file)
Disk .../tmp/deploy/images/imx6qsabresd/core-image-minimal-imx6qsabresd-20141202123437.rootfs.sdcard:
67.1MB
Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 1      4194kB  12.6MB  8389kB  primary               lba
 2      12.6MB  62.9MB  50.3MB  primary

dd: opening `.../tmp/deploy/images/imx6qsabresd/u-boot-imx6qsabresd.imx':
No such file or directory
WARNING: .../tmp/work/imx6qsabresd-oel-linux-gnueabi/core-image-minimal/1.0-r0/temp/create_image.sdcard:1
exit 1 from
  dd if=.../tmp/deploy/images/imx6qsabresd/u-boot-imx6qsabresd.imx
of=.../tmp/deploy/images/imx6qsabresd/core-image-minimal-imx6qsabresd-20141202123437.rootfs.sdcard
conv=notrunc seek=2 skip=0 bs=512

ERROR: Function failed: do_rootfs
ERROR: Logfile of failure stored in:
.../tmp/work/imx6qsabresd-oel-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.31415
ERROR: Task 7 (.../poky/meta/recipes-core/images/core-image-minimal.bb,
do_rootfs) failed with exit code '1'

Do you have any idea how we could address those issues?

-- 
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] 4+ messages in thread

end of thread, other threads:[~2014-12-04  5:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-24  5:24 [PATCH v2 2/2] u-boot.inc : add compile multiple u-boot feature Chunrong Guo
2014-12-02  3:50 ` B40290
2014-12-02 12:42 ` Otavio Salvador
2014-12-04  5:54   ` B40290

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.