Skip to contentSkip to conversation

u-boot.inc : add compile multiple u-boot feature

PATCH In review Chunrong Guo 2 participants 5 messages Nov 20, 2014 – Nov 24, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 u-boot.inc : add compile multiple u-boot feature

---
 meta/recipes-bsp/u-boot/u-boot.inc | 42 ++++++++++++++------------------------
 1 file changed, 15 insertions(+), 27 deletions(-)
meta/recipes-bsp/u-boot/u-boot.inc +15 -27
index c695b73..f420061 100644
@@ -24,6 +24,7 @@ UBOOT_LOCALVERSION ?= ""
 # Some versions of u-boot use .bin and others use .img.  By default use .bin
 # but enable individual recipes to change this value.
 UBOOT_SUFFIX ??= "bin"
+UBOOT_DEF_IMAGE ?= ""
 UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
 UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}"
 UBOOT_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_SUFFIX}"
@@ -33,9 +34,6 @@ UBOOT_MAKE_TARGET ?= "all"
 # should be packaged along with the u-boot binary as well as placed in the
 # deploy directory.  For those versions they can set the following variables
 # to allow packaging the SPL.
-SPL_BINARY ?= ""
-SPL_IMAGE ?= "${SPL_BINARY}-${MACHINE}-${PV}-${PR}"
-SPL_SYMLINK ?= "${SPL_BINARY}-${MACHINE}"
 
 # Additional environment variables or a script can be installed alongside
 # u-boot to be used automatically on boot.  This file, typically 'uEnv.txt'
@@ -63,25 +61,25 @@ 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
 
     if [ "x${UBOOT_ENV}" != "x" ]
     then
@@ -93,21 +91,11 @@ 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
 
     if [ "x${UBOOT_ENV}" != "x" ]
     then
Signature · 1 line
1.9.2
#1 lore raw
Quoted 29 lines · Chunrong Guo
---
 meta/recipes-bsp/u-boot/u-boot.inc | 42 ++++++++++++++------------------------
 1 file changed, 15 insertions(+), 27 deletions(-)
meta/recipes-bsp/u-boot/u-boot.inc +1 -3
index c695b73..f420061 100644
@@ -24,6 +24,7 @@ UBOOT_LOCALVERSION ?= ""
 # Some versions of u-boot use .bin and others use .img.  By default use .bin
 # but enable individual recipes to change this value.
 UBOOT_SUFFIX ??= "bin"
+UBOOT_DEF_IMAGE ?= ""
 UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
 UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}"
 UBOOT_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_SUFFIX}"
@@ -33,9 +34,6 @@ UBOOT_MAKE_TARGET ?= "all"
 # should be packaged along with the u-boot binary as well as placed in the
 # deploy directory.  For those versions they can set the following variables
 # to allow packaging the SPL.
-SPL_BINARY ?= ""
-SPL_IMAGE ?= "${SPL_BINARY}-${MACHINE}-${PV}-${PR}"
-SPL_SYMLINK ?= "${SPL_BINARY}-${MACHINE}"
 
 # Additional environment variables or a script can be installed alongside
 # u-boot to be used automatically on boot.  This file, typically 'uEnv.txt'
@@ -63,25 +61,25 @@ do_compile () {
                echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion

meta/recipes-bsp/u-boot/u-boot.inc do_compile () { · line 69

Quoted 10 lines
meta/recipes-bsp/u-boot/u-boot.inc +6 -2
        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

You are mixing indenting levels here; please fix.

Quoted 11 lines
meta/recipes-bsp/u-boot/u-boot.inc +4 -3
 }
 
 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

meta/recipes-bsp/u-boot/u-boot.inc do_compile () { · line 84

Quoted 10 lines
meta/recipes-bsp/u-boot/u-boot.inc +0 -5
     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

You seem to have broken the SPL support here.

Quoted 36 lines
meta/recipes-bsp/u-boot/u-boot.inc +4 -15
     if [ "x${UBOOT_ENV}" != "x" ]
     then
@@ -93,21 +91,11 @@ 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
 
     if [ "x${UBOOT_ENV}" != "x" ]
     then
--

1.9.2

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 3 lines
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
#2 lore raw

Hello , Salvador

Thank you for your comments.

Uboot config includes SPL type.
So I think spl type should be the same built with other uboot config type.

Thanks,
chunrong

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Otavio Salvador
Sent: Thursday, November 20, 2014 9:39 PM
To: Guo Chunrong-B40290
Cc: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCH 2/2] u-boot.inc : add compile multiple u-boot feature

Quoted 31 lines · Chunrong Guo
---
 meta/recipes-bsp/u-boot/u-boot.inc | 42 
++++++++++++++------------------------
 1 file changed, 15 insertions(+), 27 deletions(-)
meta/recipes-bsp/u-boot/u-boot.inc +0 -0
index c695b73..f420061 100644
@@ -24,6 +24,7 @@ UBOOT_LOCALVERSION ?= ""
 # Some versions of u-boot use .bin and others use .img.  By default 

use .bin # but enable individual recipes to change this value.
UBOOT_SUFFIX ??= "bin"

meta/recipes-bsp/u-boot/u-boot.inc +1 -0
+UBOOT_DEF_IMAGE ?= ""
 UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
 UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}"
 UBOOT_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_SUFFIX}"
@@ -33,9 +34,6 @@ UBOOT_MAKE_TARGET ?= "all"
 # should be packaged along with the u-boot binary as well as placed 

in the # deploy directory. For those versions they can set the following variables # to allow packaging the SPL.

meta/recipes-bsp/u-boot/u-boot.inc +0 -3
-SPL_BINARY ?= ""
-SPL_IMAGE ?= "${SPL_BINARY}-${MACHINE}-${PV}-${PR}"
-SPL_SYMLINK ?= "${SPL_BINARY}-${MACHINE}"
 
 # Additional environment variables or a script can be installed 

alongside # u-boot to be used automatically on boot. This file, typically 'uEnv.txt'

meta/recipes-bsp/u-boot/u-boot.inc +0 -0
@@ -63,25 +61,25 @@ do_compile () {
                echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion

meta/recipes-bsp/u-boot/u-boot.inc do_compile () { · line 69

Quoted 10 lines
meta/recipes-bsp/u-boot/u-boot.inc +6 -2
        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

You are mixing indenting levels here; please fix.

Quoted 11 lines
meta/recipes-bsp/u-boot/u-boot.inc +4 -3
 }
 
 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

meta/recipes-bsp/u-boot/u-boot.inc do_compile () { · line 84

Quoted 10 lines
meta/recipes-bsp/u-boot/u-boot.inc +0 -5
     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

You seem to have broken the SPL support here.

Quoted 36 lines
meta/recipes-bsp/u-boot/u-boot.inc +4 -15
     if [ "x${UBOOT_ENV}" != "x" ]
     then
@@ -93,21 +91,11 @@ 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
 
     if [ "x${UBOOT_ENV}" != "x" ]
     then
--

1.9.2

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 3 lines
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
#3 lore raw
Quoted 2 lines · On Fri, Nov 21, 2014 at 1:28 AM, [email protected] <[email protected]>…

Uboot config includes SPL type.
So I think spl type should be the same built with other uboot config type.

You removed the install block of SPL binary; I think it will break SPL based ones.

Signature · 3 lines
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
#4 lore raw

Thank you for your comments.

I have submitted new v2 patches .

Thanks
Chunrong

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Otavio Salvador
Sent: Saturday, November 22, 2014 1:08 AM
To: Guo Chunrong-B40290
Cc: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCH 2/2] u-boot.inc : add compile multiple u-boot feature

Quoted 2 lines · On Fri, Nov 21, 2014 at 1:28 AM, [email protected] <[email protected]>…

Uboot config includes SPL type.
So I think spl type should be the same built with other uboot config type.

You removed the install block of SPL binary; I think it will break SPL based ones.

Signature · 3 lines
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