[OE-core] [PATCH] kernel-fitimage: add support for ext2.gz initramfs files

2018-07-03 Thread chunrong . guo
From: Chunrong Guo 

Signed-off-by: Chunrong Guo 
---
 meta/classes/kernel-fitimage.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index f84be44..8698022 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -404,7 +404,7 @@ fitimage_assemble() {
#
if [ "x${ramdiskcount}" = "x1" ] ; then
# Find and use the first initramfs image archive type we find
-   for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz cpio; do
+   for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz ext2.gz 
cpio; do

initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${img}"
echo "Using $initramfs_path"
if [ -e "${initramfs_path}" ]; then
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] tune-ppce500v1: Add a tune file for PowerPC e500v1 cores

2018-06-14 Thread chunrong . guo
From: Chunrong Guo 

Signed-off-by: Chunrong Guo 
---
 meta/conf/machine/include/tune-ppce500v1.inc | 20 
 1 file changed, 20 insertions(+)
 create mode 100644 meta/conf/machine/include/tune-ppce500v1.inc

diff --git a/meta/conf/machine/include/tune-ppce500v1.inc 
b/meta/conf/machine/include/tune-ppce500v1.inc
new file mode 100644
index 000..509c81b
--- /dev/null
+++ b/meta/conf/machine/include/tune-ppce500v1.inc
@@ -0,0 +1,20 @@
+DEFAULTTUNE ?= "ppce500v1"
+
+require conf/machine/include/powerpc/arch-powerpc.inc
+
+TUNEVALID[ppce500v1] = "Enable ppce500v1 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ppce500v1', ' 
-mcpu=8540', '', d)}"
+
+TUNEVALID[spe] = "Enable SPE ABI extensions"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', [ 'ppce500v1', 'spe' ], 
' -mabi=spe -mspe -mfloat-gprs=double', '', d)}"
+TARGET_FPU .= "${@bb.utils.contains('TUNE_FEATURES', [ 'ppce500v1' , 'spe' ], 
'ppc-efd', '', d)}"
+
+# spe is defined potentially in two places, so we want to be sure it will
+# only write spe once to the ABIEXTENSIONS field.
+SPEABIEXTENSION = "${@bb.utils.filter('TUNE_FEATURES', 'spe', d)}"
+ABIEXTENSION .= "${SPEABIEXTENSION}"
+
+AVAILTUNES += "ppce500v1"
+TUNE_FEATURES_tune-ppce500v1 = "m32 spe ppce500v1"
+TUNE_PKGARCH_tune-ppce500v1 = "ppce500v1"
+PACKAGE_EXTRA_ARCHS_tune-ppce500v1 = "ppce500v1"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] tcf-agent: update machine setting for aarch64 bigendian build

2018-01-24 Thread Chunrong Guo
From: Chunrong Guo <chunrong@nxp.com>

Signed-off-by: Chunrong Guo <chunrong@nxp.com>
---
 meta/recipes-devtools/tcf-agent/tcf-agent_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb 
b/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
index 6d6ba76..ba14c42 100644
--- a/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
+++ b/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
@@ -30,7 +30,7 @@ INITSCRIPT_NAME = "tcf-agent"
 INITSCRIPT_PARAMS = "start 99 3 5 . stop 20 0 1 2 6 ."
 
 # mangling needed for make
-MAKE_ARCH = "`echo ${TARGET_ARCH} | sed s,i.86,i686, | sed s,aarch64,a64,`"
+MAKE_ARCH = "`echo ${TARGET_ARCH} | sed s,i.86,i686, | sed s,aarch64.*,a64,`"
 MAKE_OS = "`echo ${TARGET_OS} | sed s,^linux.*,GNU/Linux,`"
 
 EXTRA_OEMAKE = "MACHINE=${MAKE_ARCH} OPSYS=${MAKE_OS} 'CC=${CC}' 'AR=${AR}'"
-- 
1.9.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] coreutils: fix u-a for link

2018-01-08 Thread Chunrong Guo
From: Chunrong Guo <chunrong@nxp.com>

* busybox installs link to base_bindir not bindir
  /bin/link -> busybox

* so u-a for coreutils fails: update-alternatives: Error: cannot register 
alternative link to /usr/bin/link since it is already registered to /bin/link

Signed-off-by: Chunrong Guo <chunrong@nxp.com>
---
 meta/recipes-core/coreutils/coreutils_8.28.bb | 14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-core/coreutils/coreutils_8.28.bb 
b/meta/recipes-core/coreutils/coreutils_8.28.bb
index 8a9e80c..a1cd8f7 100644
--- a/meta/recipes-core/coreutils/coreutils_8.28.bb
+++ b/meta/recipes-core/coreutils/coreutils_8.28.bb
@@ -48,10 +48,10 @@ PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
 PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
 PACKAGECONFIG[single-binary] = 
"--enable-single-binary,--disable-single-binary,,"
 
-# [ df mktemp base64 gets a special treatment and is not included in this
+# [ df link mktemp base64 gets a special treatment and is not included in this
 bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors 
dirname du \
 env expand expr factor fmt fold groups head hostid id install \
-join link logname md5sum mkfifo nice nl nohup nproc od paste 
pathchk \
+join logname md5sum mkfifo nice nl nohup nproc od paste 
pathchk \
 pinky pr printenv printf ptx readlink realpath runcon seq 
sha1sum sha224sum sha256sum \
 sha384sum sha512sum shred shuf sort split stdbuf sum tac tail 
tee test timeout\
 tr truncate tsort tty unexpand uniq unlink uptime users vdir 
wc who whoami yes"
@@ -83,7 +83,7 @@ do_install_class-native() {
 }
 
 do_install_append() {
-   for i in df mktemp base64; do mv ${D}${bindir}/$i 
${D}${bindir}/$i.${BPN}; done
+   for i in df link mktemp base64; do mv ${D}${bindir}/$i 
${D}${bindir}/$i.${BPN}; done
 
install -d ${D}${base_bindir}
[ "${base_bindir}" != "${bindir}" ] && for i in ${base_bindir_progs}; 
do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${BPN}; done
@@ -107,8 +107,8 @@ do_install_append() {
 inherit update-alternatives
 
 ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} 
${sbindir_progs} base64 mktemp df"
-ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 lbracket.1 groups.1 kill.1 
uptime.1 stat.1  hostname.1"
+ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} 
${sbindir_progs} base64 mktemp df link"
+ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 link.1 lbracket.1 groups.1 
kill.1 uptime.1 stat.1  hostname.1"
 
 ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
 
@@ -124,6 +124,10 @@ ALTERNATIVE_LINK_NAME[df] = "${base_bindir}/df"
 ALTERNATIVE_TARGET[df] = "${bindir}/df.${BPN}"
 ALTERNATIVE_LINK_NAME[df.1] = "${mandir}/man1/df.1"
 
+ALTERNATIVE_LINK_NAME[link] = "${base_bindir}/link"
+ALTERNATIVE_TARGET[link] = "${bindir}/link.${BPN}"
+ALTERNATIVE_LINK_NAME[link.1] = "${mandir}/man1/link.1"
+
 ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/["
 ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}"
 ALTERNATIVE_LINK_NAME[lbracket.1] = "${mandir}/man1/lbracket.1"
-- 
1.9.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] kernel-fitimage: add DTB_LOAD to set dtb address

2017-10-25 Thread Chunrong Guo
From: Chunrong Guo <chunrong@nxp.com>

kernel-fitimage for arm64 and arm need dynamically sets dtb address,
thus we need a flexible way to load dtb address value.

Signed-off-by: Chunrong Guo <chunrong@nxp.com>
---
 meta/classes/kernel-fitimage.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 179185b..479ffd4 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -36,6 +36,8 @@ python __anonymous () {
 # Options for the device tree compiler passed to mkimage '-D' feature:
 UBOOT_MKIMAGE_DTCOPTS ??= ""
 
+# Options for load dtb address
+DTB_LOAD ??= ""
 #
 # Emit the fitImage ITS header
 #
@@ -137,6 +139,7 @@ fitimage_emit_section_dtb() {
 type = "flat_dt";
 arch = "${UBOOT_ARCH}";
 compression = "none";
+load = <${DTB_LOAD}>;
 hash@1 {
 algo = "${dtb_csum}";
 };
-- 
1.9.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] kernel-fitimage: support ARM64 On arm64, the kernel image target is Image

2017-10-18 Thread Chunrong Guo
From: Chunrong Guo <chunrong@nxp.com>

Signed-off-by: Chunrong Guo <chunrong@nxp.com>
---
 meta/classes/kernel-fitimage.bbclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 179185b..53d9f4a 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -9,6 +9,8 @@ python __anonymous () {
 
 if d.getVar("UBOOT_ARCH") == "mips":
 replacementtype = "vmlinuz.bin"
+elif d.getVar("UBOOT_ARCH") == "arm64":
+replacementtype = "Image"
 elif d.getVar("UBOOT_ARCH") == "x86":
 replacementtype = "bzImage"
 else:
-- 
1.9.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] glibc: do the multilib_header magic also for bits/pthreadtypes-arch.h

2017-09-06 Thread Chunrong Guo
From: Chunrong Guo <chunrong@nxp.com>

Otherwise it will cause conflicts in mutlilib setting, as it
varies from one machine to another.

Signed-off-by: Chunrong Guo <chunrong@nxp.com>
---
 meta/recipes-core/glibc/glibc-package.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc 
b/meta/recipes-core/glibc/glibc-package.inc
index a291148..df3db2c 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -138,7 +138,7 @@ do_install_append_armeb () {
 do_install_armmultilib () {
 
oe_multilib_header bits/endian.h bits/fcntl.h bits/fenv.h 
bits/fp-fast.h bits/hwcap.h bits/ipc.h bits/link.h bits/wordsize.h
-   oe_multilib_header bits/local_lim.h bits/mman.h bits/msq.h 
bits/pthreadtypes.h  bits/sem.h  bits/semaphore.h bits/setjmp.h
+   oe_multilib_header bits/local_lim.h bits/mman.h bits/msq.h 
bits/pthreadtypes.h bits/pthreadtypes-arch.h  bits/sem.h  bits/semaphore.h 
bits/setjmp.h
oe_multilib_header bits/shm.h bits/sigstack.h bits/stat.h bits/statfs.h 
bits/typesizes.h
 
oe_multilib_header fpu_control.h gnu/lib-names.h gnu/stubs.h ieee754.h
-- 
1.9.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] glibc: Drop obsoleted bits/pthreadtypes-arch.h from multilibbing

2017-09-05 Thread Chunrong Guo
From: Chunrong Guo <chunrong@nxp.com>

Signed-off-by: Chunrong Guo <chunrong@nxp.com>
---
 meta/recipes-core/glibc/glibc-package.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc 
b/meta/recipes-core/glibc/glibc-package.inc
index a291148..df3db2c 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -138,7 +138,7 @@ do_install_append_armeb () {
 do_install_armmultilib () {
 
oe_multilib_header bits/endian.h bits/fcntl.h bits/fenv.h 
bits/fp-fast.h bits/hwcap.h bits/ipc.h bits/link.h bits/wordsize.h
-   oe_multilib_header bits/local_lim.h bits/mman.h bits/msq.h 
bits/pthreadtypes.h  bits/sem.h  bits/semaphore.h bits/setjmp.h
+   oe_multilib_header bits/local_lim.h bits/mman.h bits/msq.h 
bits/pthreadtypes.h bits/pthreadtypes-arch.h  bits/sem.h  bits/semaphore.h 
bits/setjmp.h
oe_multilib_header bits/shm.h bits/sigstack.h bits/stat.h bits/statfs.h 
bits/typesizes.h
 
oe_multilib_header fpu_control.h gnu/lib-names.h gnu/stubs.h ieee754.h
-- 
1.9.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 3/3] kernel-fitimage: fix KERNEL_DEVICETREE includes subdirectory issue

2017-06-19 Thread Chunrong Guo
 * For example:
   KERNEL_DEVICETREE ?= "freescale/fsl-ls1046a-rdb.dtb"

   ${DTB}= "freescale/fsl-ls1046a-rdb.dtb"

   but only fsl-ls1046a-rdb.dtb  should be used in fit-image.its

Signed-off-by: Chunrong Guo <b40...@freescale.com>
---
 meta/classes/kernel-fitimage.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 9fa836f..08644ea 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -347,6 +347,7 @@ fitimage_assemble() {
DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
fi
DTB_PATH="arch/${ARCH}/boot/dts/${DTB}"
+DTB=`basename ${DTB}`
if [ ! -e "${DTB_PATH}" ]; then
DTB_PATH="arch/${ARCH}/boot/${DTB}"
fi
-- 
1.9.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 2/3] kernel-fitimage: set replacementtype to vmlinux

2017-06-19 Thread Chunrong Guo
Signed-off-by: Chunrong Guo <b40...@freescale.com>
---
 meta/classes/kernel-fitimage.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index f40fbf3..9fa836f 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -10,7 +10,7 @@ python __anonymous () {
 if d.getVar("UBOOT_ARCH") == "x86":
 replacementtype = "bzImage"
 else:
-replacementtype = "zImage"
+replacementtype = "vmlinux"
 
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
-- 
1.9.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 1/3] kernel-fitimage: Support ext2.gz filesystems

2017-06-19 Thread Chunrong Guo
Signed-off-by: Chunrong Guo <b40...@freescale.com>
---
 meta/classes/kernel-fitimage.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 2630b47..f40fbf3 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -369,7 +369,7 @@ fitimage_assemble() {
#
if [ "x${ramdiskcount}" = "x1" ] ; then
# Find and use the first initramfs image archive type we find
-   for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz cpio; do
+   for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz ext2.gz 
cpio; do

initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${img}"
echo "Using $initramfs_path"
if [ -e "${initramfs_path}" ]; then
-- 
1.9.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH V2 2/3] kernel-fitimage: set replacementtype to vmlinux

2017-05-30 Thread Chunrong Guo
From: Chunrong Guo <chunrong@nxp.com>

Signed-off-by: Chunrong Guo <b40...@freescale.com>
---
 meta/classes/kernel-fitimage.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index f40fbf3..9fa836f 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -10,7 +10,7 @@ python __anonymous () {
 if d.getVar("UBOOT_ARCH") == "x86":
 replacementtype = "bzImage"
 else:
-replacementtype = "zImage"
+replacementtype = "vmlinux"
 
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
-- 
1.9.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH V2 3/3] kernel-fitimage: fix KERNEL_DEVICETREE includes subdirectory issue

2017-05-30 Thread Chunrong Guo
From: Chunrong Guo <chunrong@nxp.com>

 * For example:
   KERNEL_DEVICETREE ?= "freescale/fsl-ls1046a-rdb.dtb"

   ${DTB}= "freescale/fsl-ls1046a-rdb.dtb"

   but only fsl-ls1046a-rdb.dtb  should be used in fit-image.its

Signed-off-by: Chunrong Guo <b40...@freescale.com>
---
 meta/classes/kernel-fitimage.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 9fa836f..08644ea 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -347,6 +347,7 @@ fitimage_assemble() {
DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
fi
DTB_PATH="arch/${ARCH}/boot/dts/${DTB}"
+DTB=`basename ${DTB}`
if [ ! -e "${DTB_PATH}" ]; then
DTB_PATH="arch/${ARCH}/boot/${DTB}"
fi
-- 
1.9.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH V2 1/3] kernel-fitimage: Support ext2.gz filesystems

2017-05-30 Thread Chunrong Guo
From: Chunrong Guo <chunrong@nxp.com>

Signed-off-by: Chunrong Guo <b40...@freescale.com>
---
 meta/classes/kernel-fitimage.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 2630b47..f40fbf3 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -369,7 +369,7 @@ fitimage_assemble() {
#
if [ "x${ramdiskcount}" = "x1" ] ; then
# Find and use the first initramfs image archive type we find
-   for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz cpio; do
+   for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz ext2.gz 
cpio; do

initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${img}"
echo "Using $initramfs_path"
if [ -e "${initramfs_path}" ]; then
-- 
1.9.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [[PATCH v2 1/3] kernel-fitimage: Support ext2.gz filesystems

2017-05-16 Thread Chunrong Guo
From: Chunrong Guo <chunrong@nxp.com>

Signed-off-by: Chunrong Guo <b40...@freescale.com>
---
 meta/classes/kernel-fitimage.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 2630b47..f40fbf3 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -369,7 +369,7 @@ fitimage_assemble() {
#
if [ "x${ramdiskcount}" = "x1" ] ; then
# Find and use the first initramfs image archive type we find
-   for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz cpio; do
+   for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz ext2.gz 
cpio; do

initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${img}"
echo "Using $initramfs_path"
if [ -e "${initramfs_path}" ]; then
-- 
1.9.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [[PATCH v2 3/3] kernel-fitimage: fix KERNEL_DEVICETREE includes subdirectory issue

2017-05-16 Thread Chunrong Guo
From: Chunrong Guo <chunrong@nxp.com>

  * For example:
  KERNEL_DEVICETREE ?= "freescale/fsl-ls1046a-rdb.dtb"

  ${DTB}= "freescale/fsl-ls1046a-rdb.dtb"

  but only fsl-ls1046a-rdb.dtb  should be used in fit-image.its

Signed-off-by: Chunrong Guo <b40...@freescale.com>
---
 meta/classes/kernel-fitimage.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 9fa836f..08644ea 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -347,6 +347,7 @@ fitimage_assemble() {
DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
fi
DTB_PATH="arch/${ARCH}/boot/dts/${DTB}"
+DTB=`basename ${DTB}`
if [ ! -e "${DTB_PATH}" ]; then
DTB_PATH="arch/${ARCH}/boot/${DTB}"
fi
-- 
1.9.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [[PATCH v2 2/3] kernel-fitimage: set replacementtype to vmlinux

2017-05-16 Thread Chunrong Guo
From: Chunrong Guo <chunrong@nxp.com>

Signed-off-by: Chunrong Guo <b40...@freescale.com>
---
 meta/classes/kernel-fitimage.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index f40fbf3..9fa836f 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -10,7 +10,7 @@ python __anonymous () {
 if d.getVar("UBOOT_ARCH") == "x86":
 replacementtype = "bzImage"
 else:
-replacementtype = "zImage"
+replacementtype = "vmlinux"
 
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
-- 
1.9.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/3] kernel-fitimage: set replacementtype to vmlinux

2017-05-10 Thread Chunrong Guo
From: Chunrong Guo <chunrong@nxp.com>

Signed-off-by: Chunrong Guo <b40...@freescale.com>
---
 meta/classes/kernel-fitimage.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index f40fbf3..9fa836f 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -10,7 +10,7 @@ python __anonymous () {
 if d.getVar("UBOOT_ARCH") == "x86":
 replacementtype = "bzImage"
 else:
-replacementtype = "zImage"
+replacementtype = "vmlinux"
 
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
-- 
1.8.3.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/3] kernel-fitimage: Support ext2.gz filesystems

2017-05-10 Thread Chunrong Guo
From: Chunrong Guo <chunrong@nxp.com>

Signed-off-by: Chunrong Guo <b40...@freescale.com>
---
 meta/classes/kernel-fitimage.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 2630b47..f40fbf3 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -369,7 +369,7 @@ fitimage_assemble() {
#
if [ "x${ramdiskcount}" = "x1" ] ; then
# Find and use the first initramfs image archive type we find
-   for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz cpio; do
+   for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz ext2.gz 
cpio; do

initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${img}"
echo "Using $initramfs_path"
if [ -e "${initramfs_path}" ]; then
-- 
1.8.3.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 3/3] kernel-fitimage: fix KERNEL_DEVICETREE includes subdirectory issue

2017-05-10 Thread Chunrong Guo
From: Chunrong Guo <chunrong@nxp.com>

* For example:
  KERNEL_DEVICETREE ?= "freescale/fsl-ls1046a-rdb.dtb"

  ${DTB}= "freescale/fsl-ls1046a-rdb.dtb"

  but only fsl-ls1046a-rdb.dtb  should be used in fit-image.its

Signed-off-by: Chunrong Guo <b40...@freescale.com>
---
 meta/classes/kernel-fitimage.bbclass | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 9fa836f..3171d10 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -346,7 +346,10 @@ fitimage_assemble() {
bbwarn "${DTB} contains the full path to the 
the dts file, but only the dtb name should be used."
DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
fi
-   DTB_PATH="arch/${ARCH}/boot/dts/${DTB}"
+  
+   DTB=`basename ${DTB}`
+DTB_PATH=`find arch/${ARCH}/boot -name "${DTB}"`
+ 
if [ ! -e "${DTB_PATH}" ]; then
DTB_PATH="arch/${ARCH}/boot/${DTB}"
fi
-- 
1.8.3.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [[PATCH v2] kernel-fitimage: fix ${KERNEL_DEVICETREE} includes subdirectory issue.

2017-05-09 Thread Chunrong Guo
From: Chunrong Guo <chunrong@nxp.com>

* For example:
  KERNEL_DEVICETREE ?= "freescale/fsl-ls1046a-rdb.dtb"

  ${DTB}= "freescale/fsl-ls1046a-rdb.dtb"

  but only the dtb name should be used.

* Support "ext2.gz " filesystems

* Support mutiple KERNEL_IMAGETYPE
  For example:
   KERNEL_IMAGETYPE = "Image"  or  KERNEL_IMAGETYPE = "zImage"

Signed-off-by: Chunrong Guo <chunrong@nxp.com>
---
 meta/classes/kernel-fitimage.bbclass | 15 ---
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 2630b47..63f03a5 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -10,7 +10,7 @@ python __anonymous () {
 if d.getVar("UBOOT_ARCH") == "x86":
 replacementtype = "bzImage"
 else:
-replacementtype = "zImage"
+replacementtype = d.getVar("KERNEL_IMAGETYPE")
 
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
@@ -342,15 +342,8 @@ fitimage_assemble() {
if [ -n "${KERNEL_DEVICETREE}" ]; then
dtbcount=1
for DTB in ${KERNEL_DEVICETREE}; do
-   if echo ${DTB} | grep -q '/dts/'; then
-   bbwarn "${DTB} contains the full path to the 
the dts file, but only the dtb name should be used."
-   DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
-   fi
-   DTB_PATH="arch/${ARCH}/boot/dts/${DTB}"
-   if [ ! -e "${DTB_PATH}" ]; then
-   DTB_PATH="arch/${ARCH}/boot/${DTB}"
-   fi
-
+DTB=`basename ${DTB}`
+   DTB_PATH=`find arch/${ARCH}/boot -name "${DTB}"` 
DTBS="${DTBS} ${DTB}"
fitimage_emit_section_dtb ${1} ${DTB} ${DTB_PATH}
done
@@ -369,7 +362,7 @@ fitimage_assemble() {
#
if [ "x${ramdiskcount}" = "x1" ] ; then
# Find and use the first initramfs image archive type we find
-   for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz cpio; do
+   for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz cpio 
ext2.gz; do

initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${img}"
echo "Using $initramfs_path"
if [ -e "${initramfs_path}" ]; then
-- 
1.9.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [[PATCH v2] kernel-fitimage: fix ${KERNEL_DEVICETREE} includes subdirectory issue.

2017-05-08 Thread Chunrong Guo
From: Chunrong Guo <chunrong@nxp.com>

* For example:
  KERNEL_DEVICETREE ?= "freescale/fsl-ls1046a-rdb.dtb"

  ${DTB}= "freescale/fsl-ls1046a-rdb.dtb"

  but only the dtb name should be used.

* Support "ext2.gz " filesystems

* Support mutiple KERNEL_IMAGETYPE
  For example:
   KERNEL_IMAGETYPE = "Image"  or  KERNEL_IMAGETYPE = "zImage"

Signed-off-by: Chunrong Guo <chunrong@nxp.com>
---
 meta/classes/kernel-fitimage.bbclass | 15 ---
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 2630b47..63f03a5 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -10,7 +10,7 @@ python __anonymous () {
 if d.getVar("UBOOT_ARCH") == "x86":
 replacementtype = "bzImage"
 else:
-replacementtype = "zImage"
+replacementtype = d.getVar("KERNEL_IMAGETYPE")
 
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
@@ -342,15 +342,8 @@ fitimage_assemble() {
if [ -n "${KERNEL_DEVICETREE}" ]; then
dtbcount=1
for DTB in ${KERNEL_DEVICETREE}; do
-   if echo ${DTB} | grep -q '/dts/'; then
-   bbwarn "${DTB} contains the full path to the 
the dts file, but only the dtb name should be used."
-   DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
-   fi
-   DTB_PATH="arch/${ARCH}/boot/dts/${DTB}"
-   if [ ! -e "${DTB_PATH}" ]; then
-   DTB_PATH="arch/${ARCH}/boot/${DTB}"
-   fi
-
+DTB=`basename ${DTB}`
+   DTB_PATH=`find arch/${ARCH}/boot -name "${DTB}"` 
DTBS="${DTBS} ${DTB}"
fitimage_emit_section_dtb ${1} ${DTB} ${DTB_PATH}
done
@@ -369,7 +362,7 @@ fitimage_assemble() {
#
if [ "x${ramdiskcount}" = "x1" ] ; then
# Find and use the first initramfs image archive type we find
-   for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz cpio; do
+   for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz cpio 
ext2.gz; do

initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${img}"
echo "Using $initramfs_path"
if [ -e "${initramfs_path}" ]; then
-- 
1.9.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [[PATCH v2] kernel-fitimage: fix ${KERNEL_DEVICETREE} includes subdirectory issue.

2017-05-04 Thread Chunrong Guo
From: Chunrong Guo <chunrong@nxp.com>

* For example:
  KERNEL_DEVICETREE ?= "freescale/fsl-ls1046a-rdb.dtb"

  ${DTB}= "freescale/fsl-ls1046a-rdb.dtb"

  but only the dtb name should be used.

* Support "ext2.gz " filesystems

* Support mutiple KERNEL_IMAGETYPE
  For example:
   KERNEL_IMAGETYPE = "Image"  or  KERNEL_IMAGETYPE = "zImage"

Signed-off-by: Chunrong Guo <chunrong@nxp.com>
---
 meta/classes/kernel-fitimage.bbclass | 15 ---
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 2630b47..63f03a5 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -10,7 +10,7 @@ python __anonymous () {
 if d.getVar("UBOOT_ARCH") == "x86":
 replacementtype = "bzImage"
 else:
-replacementtype = "zImage"
+replacementtype = d.getVar("KERNEL_IMAGETYPE")
 
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
@@ -342,15 +342,8 @@ fitimage_assemble() {
if [ -n "${KERNEL_DEVICETREE}" ]; then
dtbcount=1
for DTB in ${KERNEL_DEVICETREE}; do
-   if echo ${DTB} | grep -q '/dts/'; then
-   bbwarn "${DTB} contains the full path to the 
the dts file, but only the dtb name should be used."
-   DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
-   fi
-   DTB_PATH="arch/${ARCH}/boot/dts/${DTB}"
-   if [ ! -e "${DTB_PATH}" ]; then
-   DTB_PATH="arch/${ARCH}/boot/${DTB}"
-   fi
-
+DTB=`basename ${DTB}`
+   DTB_PATH=`find arch/${ARCH}/boot -name "${DTB}"` 
DTBS="${DTBS} ${DTB}"
fitimage_emit_section_dtb ${1} ${DTB} ${DTB_PATH}
done
@@ -369,7 +362,7 @@ fitimage_assemble() {
#
if [ "x${ramdiskcount}" = "x1" ] ; then
# Find and use the first initramfs image archive type we find
-   for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz cpio; do
+   for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz cpio 
ext2.gz; do

initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${img}"
echo "Using $initramfs_path"
if [ -e "${initramfs_path}" ]; then
-- 
1.9.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] kernel-fitimage: fix ${KERNEL_DEVICETREE} includes subdirectory issue.

2017-05-04 Thread Chunrong Guo
From: Chunrong Guo <chunrong@nxp.com>

* For example:
  KERNEL_DEVICETREE ?= "freescale/fsl-ls1046a-rdb.dtb"

  ${DTB}= "freescale/fsl-ls1046a-rdb.dtb"

  but only the dtb name should be used.

* Support "ext2.gz " filesystems

* Support mutiple KERNEL_IMAGETYPE
  For example:
   KERNEL_IMAGETYPE = "Image"  or  KERNEL_IMAGETYPE = "zImage"

Signed-off-by: Chunrong Guo <chunrong@nxp.com>
---
 meta/classes/kernel-fitimage.bbclass | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 2630b47..33b477f 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -10,7 +10,7 @@ python __anonymous () {
 if d.getVar("UBOOT_ARCH") == "x86":
 replacementtype = "bzImage"
 else:
-replacementtype = "zImage"
+replacementtype = d.getVar("KERNEL_IMAGETYPE")
 
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
@@ -233,6 +233,7 @@ EOF
 # $4 ... ramdisk ID
 # $5 ... config ID
 # $6 ... default flag
+# $7 ... DTB image path 
 fitimage_emit_section_config() {
 
conf_csum="sha1"
@@ -346,13 +347,14 @@ fitimage_assemble() {
bbwarn "${DTB} contains the full path to the 
the dts file, but only the dtb name should be used."
DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
fi
+DTBNAME=`basename ${DTB}`
DTB_PATH="arch/${ARCH}/boot/dts/${DTB}"
if [ ! -e "${DTB_PATH}" ]; then
DTB_PATH="arch/${ARCH}/boot/${DTB}"
fi
 
DTBS="${DTBS} ${DTB}"
-   fitimage_emit_section_dtb ${1} ${DTB} ${DTB_PATH}
+   fitimage_emit_section_dtb ${1} ${DTBNAME} ${DTB_PATH}
done
fi
 
@@ -369,7 +371,7 @@ fitimage_assemble() {
#
if [ "x${ramdiskcount}" = "x1" ] ; then
# Find and use the first initramfs image archive type we find
-   for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz cpio; do
+   for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz cpio 
ext2.gz; do

initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${img}"
echo "Using $initramfs_path"
if [ -e "${initramfs_path}" ]; then
@@ -395,7 +397,8 @@ fitimage_assemble() {
if [ -n "${DTBS}" ]; then
i=1
for DTB in ${DTBS}; do
-   fitimage_emit_section_config ${1} "${kernelcount}" 
"${DTB}" "${ramdiskcount}" "${setupcount}" "`expr ${i} = ${dtbcount}`"
+DTBNAME=`basename ${DTB}`
+   fitimage_emit_section_config ${1} "${kernelcount}" 
"${DTBNAME}" "${ramdiskcount}" "${setupcount}" "`expr ${i} = ${dtbcount}` 
"${DTB}""
i=`expr ${i} + 1`
done
fi
-- 
1.9.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [fido][PATCH] groff: add runtime dependency on sed

2015-04-28 Thread Chunrong Guo
  This is to suppress the following QA warning:
  groff-1.22.2: groff requires /bin/sed, but no providers in its RDEPENDS 
[file-rdeps]

Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/recipes-extended/groff/groff_1.22.2.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-extended/groff/groff_1.22.2.bb 
b/meta/recipes-extended/groff/groff_1.22.2.bb
index 6e84587..dd345b7 100644
--- a/meta/recipes-extended/groff/groff_1.22.2.bb
+++ b/meta/recipes-extended/groff/groff_1.22.2.bb
@@ -17,6 +17,7 @@ SRC_URI[sha256sum] = 
380864dac4772e0c0d7b1282d25d0c5fd7f63baf45c87c4657afed22a1
 
 DEPENDS = groff-native
 DEPENDS_class-native = 
+RDEPENDS_${PN} += sed
 
 inherit autotools texinfo
 
-- 
1.9.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v5] u-boot.inc: fix rename image error

2015-03-25 Thread Chunrong Guo
   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 b40...@freescale.com
---
 meta/recipes-bsp/u-boot/u-boot.inc | 101 -
 1 file changed, 43 insertions(+), 58 deletions(-)

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc 
b/meta/recipes-bsp/u-boot/u-boot.inc
index 6bdc86a..7053a56 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 = inx ]
+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 = inx ]
-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}
+install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} 
${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
+ln -sf u-boot-${type}-${PV}-${PR}.${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 = inx ]
- then
- continue
- fi
- if [ -d ${D}/boot/${SPL_IMAGE}-${type} ]
- then
- break
- else
- 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
+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}-${PV}-${PR}
+ ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} 
${D}/boot/${SPL_BINARY}-${type}
+ ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} 
${D}/boot/${SPL_BINARY}
+fi
 done
+unset  j
 done
 else
 install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
@@ -157,22 +148,19 @@ do_deploy () {
 if [ x${UBOOT_CONFIG} != x ]
 then
 for config in ${UBOOT_MACHINE}; do
-for type in in ${UBOOT_CONFIG}; do
-if [ ${type}x = inx ]  
+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}
+install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} 
${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
 cd ${DEPLOYDIR

[OE-core] [PATCH v4] u-boot.inc: fix rename image error

2015-03-11 Thread Chunrong Guo
  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 b40...@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 = inx ]
+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 = inx ]
-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 = inx ]
- 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 = inx ]  
+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 = inx ]
-  then
-  continue
-  fi
-  if [ -d ${DEPLOYDIR}/${SPL_IMAGE}-${type

[OE-core] [PATCH v3] u-boot.inc: fix rename image error

2015-03-09 Thread Chunrong Guo
  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 b40...@freescale.com
---
 meta/recipes-bsp/u-boot/u-boot.inc | 52 --
 1 file changed, 11 insertions(+), 41 deletions(-)

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc 
b/meta/recipes-bsp/u-boot/u-boot.inc
index 6bdc86a..27fa809 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -62,19 +62,13 @@ do_compile () {
echo ${UBOOT_LOCALVERSION}  ${B}/.scmversion
echo ${UBOOT_LOCALVERSION}  ${S}/.scmversion
fi
-
+
 if [ x${UBOOT_CONFIG} != x ]
 then
 for config in ${UBOOT_MACHINE}; do
-for type in in ${UBOOT_CONFIG}; do
-if [ ${type}x = inx ]
-then
-continue
-fi
-if [ -d ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ]
+for type in ${UBOOT_CONFIG}; do
+if [ `echo ${config} | cut -d'_' -f2` = ${type} ]
 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}
@@ -92,15 +86,9 @@ do_install () {
 if [ x${UBOOT_CONFIG} != x ]
 then
 for config in ${UBOOT_MACHINE}; do
-for type in in ${UBOOT_CONFIG}; do
-if [ ${type}x = inx ]
-then
-continue
-fi
-if [ -d ${D}/boot/u-boot-${type}.${UBOOT_SUFFIX} ]
+for type in ${UBOOT_CONFIG}; do
+if [ `echo ${config} | cut -d'_' -f2` = ${type} ]
 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}
@@ -123,15 +111,9 @@ do_install () {
 if [ x${UBOOT_CONFIG} != x ]   
 then
 for config in ${UBOOT_MACHINE}; do
-for type in in ${UBOOT_CONFIG}; do
- if [ ${type}x = inx ]
+for type in ${UBOOT_CONFIG}; do
+ if [ `echo ${config} | cut -d'_' -f2` = ${type} ]
  then
- continue
- fi
- if [ -d ${D}/boot/${SPL_IMAGE}-${type} ]
- then
- break
- else
  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}
@@ -157,15 +139,9 @@ do_deploy () {
 if [ x${UBOOT_CONFIG} != x ]
 then
 for config in ${UBOOT_MACHINE}; do
-for type in in ${UBOOT_CONFIG}; do
-if [ ${type}x = inx ]  
+for type in ${UBOOT_CONFIG}; do
+if [ `echo ${config} | cut -d'_' -f2` = ${type} ]
 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}
@@ -190,15 +166,9 @@ do_deploy () {
  if [ x${UBOOT_CONFIG} != x ]   
  then
  for config in ${UBOOT_MACHINE}; do
- for type in in ${UBOOT_CONFIG}; do
-  if [ ${type}x = inx ]
-  then
-  continue
-  fi
-  if [ -d ${DEPLOYDIR}/${SPL_IMAGE}-${type} ]
+ for type in ${UBOOT_CONFIG}; do
+  if [ `echo ${config} | cut -d'_' -f2` = ${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}
-- 
1.9.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] u-boot.inc: fix rename image error

2015-03-05 Thread Chunrong Guo
  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 b40...@freescale.com
---
 meta/recipes-bsp/u-boot/u-boot.inc | 32 +++-
 1 file changed, 11 insertions(+), 21 deletions(-)

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc 
b/meta/recipes-bsp/u-boot/u-boot.inc
index 6bdc86a..aa7c20f 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -66,15 +66,13 @@ do_compile () {
 if [ x${UBOOT_CONFIG} != x ]
 then
 for config in ${UBOOT_MACHINE}; do
-for type in in ${UBOOT_CONFIG}; do
+for type in ${UBOOT_CONFIG}; do
 if [ ${type}x = inx ]
 then
 continue
 fi
-if [ -d ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ]
+if [ `echo ${config} | cut -d'_' -f2` = ${type} ]
 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}
@@ -92,15 +90,13 @@ do_install () {
 if [ x${UBOOT_CONFIG} != x ]
 then
 for config in ${UBOOT_MACHINE}; do
-for type in in ${UBOOT_CONFIG}; do
+for type in ${UBOOT_CONFIG}; do
 if [ ${type}x = inx ]
 then
 continue
 fi
-if [ -d ${D}/boot/u-boot-${type}.${UBOOT_SUFFIX} ]
+if [ `echo ${config} | cut -d'_' -f2` = ${type} ]
 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}
@@ -123,15 +119,13 @@ do_install () {
 if [ x${UBOOT_CONFIG} != x ]   
 then
 for config in ${UBOOT_MACHINE}; do
-for type in in ${UBOOT_CONFIG}; do
+for type in ${UBOOT_CONFIG}; do
  if [ ${type}x = inx ]
  then
  continue
  fi
- if [ -d ${D}/boot/${SPL_IMAGE}-${type} ]
+ if [ `echo ${config} | cut -d'_' -f2` = ${type} ]
  then
- break
- else
  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}
@@ -157,15 +151,13 @@ do_deploy () {
 if [ x${UBOOT_CONFIG} != x ]
 then
 for config in ${UBOOT_MACHINE}; do
-for type in in ${UBOOT_CONFIG}; do
+for type in ${UBOOT_CONFIG}; do
 if [ ${type}x = inx ]  
 then
 continue
 fi
-if [ -d ${DEPLOYDIR}/u-boot-${type}.${UBOOT_SUFFIX} ]
-then 
-break
-else
+if [ `echo ${config} | cut -d'_' -f2` = ${type} ]
+then
 install -d ${DEPLOYDIR}
 install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} 
${DEPLOYDIR}/u-boot-${type}.${UBOOT_SUFFIX}
 cd ${DEPLOYDIR}
@@ -190,15 +182,13 @@ do_deploy () {
  if [ x${UBOOT_CONFIG} != x ]   
  then
  for config in ${UBOOT_MACHINE}; do
- for type in in ${UBOOT_CONFIG}; do
+ for type in ${UBOOT_CONFIG}; do
   if [ ${type}x = inx ]
   then
   continue
   fi
-  if [ -d ${DEPLOYDIR}/${SPL_IMAGE}-${type} ]
+  if [ `echo ${config} | cut -d'_' -f2` = ${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}
-- 
1.9.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] u-boot.inc: fix rename image error

2015-03-05 Thread Chunrong Guo
  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 b40...@freescale.com
---
 meta/recipes-bsp/u-boot/u-boot.inc | 51 --
 1 file changed, 11 insertions(+), 40 deletions(-)

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc 
b/meta/recipes-bsp/u-boot/u-boot.inc
index 6bdc86a..b514893 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -63,18 +63,13 @@ do_compile () {
echo ${UBOOT_LOCALVERSION}  ${S}/.scmversion
fi
 
+
 if [ x${UBOOT_CONFIG} != x ]
 then
 for config in ${UBOOT_MACHINE}; do
-for type in in ${UBOOT_CONFIG}; do
-if [ ${type}x = inx ]
-then
-continue
-fi
-if [ -d ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ]
+for type in ${UBOOT_CONFIG}; do
+if [ `echo ${config} | cut -d'_' -f2` = ${type} ]
 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}
@@ -92,15 +87,9 @@ do_install () {
 if [ x${UBOOT_CONFIG} != x ]
 then
 for config in ${UBOOT_MACHINE}; do
-for type in in ${UBOOT_CONFIG}; do
-if [ ${type}x = inx ]
-then
-continue
-fi
-if [ -d ${D}/boot/u-boot-${type}.${UBOOT_SUFFIX} ]
+for type in ${UBOOT_CONFIG}; do
+if [ `echo ${config} | cut -d'_' -f2` = ${type} ]
 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}
@@ -123,15 +112,9 @@ do_install () {
 if [ x${UBOOT_CONFIG} != x ]   
 then
 for config in ${UBOOT_MACHINE}; do
-for type in in ${UBOOT_CONFIG}; do
- if [ ${type}x = inx ]
+for type in ${UBOOT_CONFIG}; do
+ if [ `echo ${config} | cut -d'_' -f2` = ${type} ]
  then
- continue
- fi
- if [ -d ${D}/boot/${SPL_IMAGE}-${type} ]
- then
- break
- else
  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}
@@ -157,15 +140,9 @@ do_deploy () {
 if [ x${UBOOT_CONFIG} != x ]
 then
 for config in ${UBOOT_MACHINE}; do
-for type in in ${UBOOT_CONFIG}; do
-if [ ${type}x = inx ]  
+for type in ${UBOOT_CONFIG}; do
+if [ `echo ${config} | cut -d'_' -f2` = ${type} ]
 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}
@@ -190,15 +167,9 @@ do_deploy () {
  if [ x${UBOOT_CONFIG} != x ]   
  then
  for config in ${UBOOT_MACHINE}; do
- for type in in ${UBOOT_CONFIG}; do
-  if [ ${type}x = inx ]
-  then
-  continue
-  fi
-  if [ -d ${DEPLOYDIR}/${SPL_IMAGE}-${type} ]
+ for type in ${UBOOT_CONFIG}; do
+  if [ `echo ${config} | cut -d'_' -f2` = ${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}
-- 
1.9.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v5 1/2] uboot-config.bbclass: Allow multiple U-Boot config for machine

2015-01-21 Thread Chunrong Guo
  This adds support to build multiple U-Boot configs for a machine; this
  is useful when we have support for different media boots which require
  different U-Boot configuration (e.g: eMMC and NAND).

  Below there's an usage example:
  ,[ i.MX6Q SABRE AUTO based example ]
  | UBOOT_CONFIG ??= sd eimnor nand spinor
  | UBOOT_CONFIG[sd] = mx6qsabreauto_config,sdcard
  | UBOOT_CONFIG[eimnor] = mx6qsabreauto_eimnor_config
  | UBOOT_CONFIG[nand] = mx6qsabreauto_nand_config,ubifs
  | UBOOT_CONFIG[spinor] = mx6qsabreauto_spinor_config
  `

Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/classes/uboot-config.bbclass | 37 ++---
 1 file changed, 14 insertions(+), 23 deletions(-)

diff --git a/meta/classes/uboot-config.bbclass 
b/meta/classes/uboot-config.bbclass
index b467659..cb061af 100644
--- a/meta/classes/uboot-config.bbclass
+++ b/meta/classes/uboot-config.bbclass
@@ -31,28 +31,19 @@ python () {
 return
 
 ubootconfig = (d.getVar('UBOOT_CONFIG', True) or ).split()
-if len(ubootconfig)  1:
-raise bb.parse.SkipPackage('You can only have a single default for 
UBOOT_CONFIG.')
+if len(ubootconfig)  0:
+for config in ubootconfig:
+for f, v in ubootconfigflags.items():
+if config == f: 
+items = v.split(',')
+if items[0] and len(items)  2:
+raise bb.parse.SkipPackage('Only config,images can be 
specified!')
+d.appendVar('UBOOT_MACHINE', ' ' + items[0])
+# IMAGE_FSTYPES appending
+if len(items)  1 and items[1]:
+bb.debug(1, Appending '%s' to IMAGE_FSTYPES. % 
items[1])
+d.appendVar('IMAGE_FSTYPES', ' ' + items[1])
+break
 elif len(ubootconfig) == 0:
-raise bb.parse.SkipPackage('You must set a default in UBOOT_CONFIG.')
-ubootconfig = ubootconfig[0]
-
-for f, v in ubootconfigflags.items():
-items = v.split(',')
-if items[0] and len(items)  2:
-raise bb.parse.SkipPackage('Only config,images can be specified!')
-
-if ubootconfig == f:
-bb.debug(1, Setting UBOOT_MACHINE to %s. % items[0])
-d.setVar('UBOOT_MACHINE', items[0])
-
-# IMAGE_FSTYPES appending
-if len(items)  1 and items[1]:
-bb.debug(1, Appending '%s' to IMAGE_FSTYPES. % items[1])
-d.appendVar('IMAGE_FSTYPES', ' ' + items[1])
-
-# Go out as we found a match!
-break
-else:
-raise bb.parse.SkipPackage(UBOOT_CONFIG %s is not supported % 
ubootconfig)
+   raise bb.parse.SkipPackage('You must set a default in UBOOT_CONFIG.')
 }
-- 
1.9.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v5 2/2] u-boot.inc : add compile multiple u-boot feature

2015-01-21 Thread Chunrong Guo
Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/recipes-bsp/u-boot/u-boot.inc | 150 +++--
 1 file changed, 129 insertions(+), 21 deletions(-)

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc 
b/meta/recipes-bsp/u-boot/u-boot.inc
index c695b73..58725fa 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -62,15 +62,56 @@ do_compile () {
echo ${UBOOT_LOCALVERSION}  ${B}/.scmversion
echo ${UBOOT_LOCALVERSION}  ${S}/.scmversion
fi
+
+if [ x${UBOOT_CONFIG} != x ]
+then
+for config in ${UBOOT_MACHINE}; do
+for type in in ${UBOOT_CONFIG}; do
+if [ ${type}x = inx ]
+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
+done
+else
+oe_runmake ${UBOOT_MACHINE}
+oe_runmake ${UBOOT_MAKE_TARGET}
+fi
 
-   oe_runmake ${UBOOT_MACHINE}
-   oe_runmake ${UBOOT_MAKE_TARGET}
 }
 
 do_install () {
-install -d ${D}/boot
-install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
-ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
+if [ x${UBOOT_CONFIG} != x ]
+then
+for config in ${UBOOT_MACHINE}; do
+for type in in ${UBOOT_CONFIG}; do
+if [ ${type}x = inx ]
+then
+continue
+fi
+if [ -d ${D}/boot/u-boot-${type}.${UBOOT_SUFFIX}]
+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
+done
+else
+install -d ${D}/boot
+install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
+ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
+fi
 
 if [ -e ${WORKDIR}/fw_env.config ] ; then
 install -d ${D}${sysconfdir}
@@ -79,8 +120,28 @@ do_install () {
 
 if [ x${SPL_BINARY} != x ]
 then
-install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
-ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY}
+if [ x${UBOOT_CONFIG} != x ]   
+then
+for config in ${UBOOT_MACHINE}; do
+for type in in ${UBOOT_CONFIG}; do
+ if [ ${type}x = inx ]
+ then
+ continue
+ fi
+ if [ -d ${D}/boot/${SPL_IMAGE}-${type}]
+ then
+ break
+ else
+ 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
+done
+done
+else
+install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
+ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY}
+fi
 fi
 
 if [ x${UBOOT_ENV} != x ]
@@ -93,21 +154,68 @@ 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 ]
+if [ x${UBOOT_CONFIG} != 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 config in ${UBOOT_MACHINE}; do
+for type in in ${UBOOT_CONFIG}; do
+if [ ${type}x = inx ]  
+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}
+ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}
+ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${UBOOT_BINARY

[OE-core] [PATCH v4 1/2] uboot-config.bbclass: Allow multiple U-Boot config for machine

2014-12-10 Thread Chunrong Guo
  This adds support to build multiple U-Boot configs for a machine; this
  is useful when we have support for different media boots which require
  different U-Boot configuration (e.g: eMMC and NAND).

Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/classes/uboot-config.bbclass | 37 ++---
 1 file changed, 14 insertions(+), 23 deletions(-)

diff --git a/meta/classes/uboot-config.bbclass 
b/meta/classes/uboot-config.bbclass
index b467659..cb061af 100644
--- a/meta/classes/uboot-config.bbclass
+++ b/meta/classes/uboot-config.bbclass
@@ -31,28 +31,19 @@ python () {
 return
 
 ubootconfig = (d.getVar('UBOOT_CONFIG', True) or ).split()
-if len(ubootconfig)  1:
-raise bb.parse.SkipPackage('You can only have a single default for 
UBOOT_CONFIG.')
+if len(ubootconfig)  0:
+for config in ubootconfig:
+for f, v in ubootconfigflags.items():
+if config == f: 
+items = v.split(',')
+if items[0] and len(items)  2:
+raise bb.parse.SkipPackage('Only config,images can be 
specified!')
+d.appendVar('UBOOT_MACHINE', ' ' + items[0])
+# IMAGE_FSTYPES appending
+if len(items)  1 and items[1]:
+bb.debug(1, Appending '%s' to IMAGE_FSTYPES. % 
items[1])
+d.appendVar('IMAGE_FSTYPES', ' ' + items[1])
+break
 elif len(ubootconfig) == 0:
-raise bb.parse.SkipPackage('You must set a default in UBOOT_CONFIG.')
-ubootconfig = ubootconfig[0]
-
-for f, v in ubootconfigflags.items():
-items = v.split(',')
-if items[0] and len(items)  2:
-raise bb.parse.SkipPackage('Only config,images can be specified!')
-
-if ubootconfig == f:
-bb.debug(1, Setting UBOOT_MACHINE to %s. % items[0])
-d.setVar('UBOOT_MACHINE', items[0])
-
-# IMAGE_FSTYPES appending
-if len(items)  1 and items[1]:
-bb.debug(1, Appending '%s' to IMAGE_FSTYPES. % items[1])
-d.appendVar('IMAGE_FSTYPES', ' ' + items[1])
-
-# Go out as we found a match!
-break
-else:
-raise bb.parse.SkipPackage(UBOOT_CONFIG %s is not supported % 
ubootconfig)
+   raise bb.parse.SkipPackage('You must set a default in UBOOT_CONFIG.')
 }
-- 
1.9.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v4 2/2] u-boot.inc : add compile multiple u-boot feature

2014-12-10 Thread Chunrong Guo
Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/recipes-bsp/u-boot/u-boot.inc | 150 +++--
 1 file changed, 129 insertions(+), 21 deletions(-)

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc 
b/meta/recipes-bsp/u-boot/u-boot.inc
index c695b73..58725fa 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -62,15 +62,56 @@ do_compile () {
echo ${UBOOT_LOCALVERSION}  ${B}/.scmversion
echo ${UBOOT_LOCALVERSION}  ${S}/.scmversion
fi
+
+if [ x${UBOOT_CONFIG} != x ]
+then
+for config in ${UBOOT_MACHINE}; do
+for type in in ${UBOOT_CONFIG}; do
+if [ ${type}x = inx ]
+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
+done
+else
+oe_runmake ${UBOOT_MACHINE}
+oe_runmake ${UBOOT_MAKE_TARGET}
+fi
 
-   oe_runmake ${UBOOT_MACHINE}
-   oe_runmake ${UBOOT_MAKE_TARGET}
 }
 
 do_install () {
-install -d ${D}/boot
-install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
-ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
+if [ x${UBOOT_CONFIG} != x ]
+then
+for config in ${UBOOT_MACHINE}; do
+for type in in ${UBOOT_CONFIG}; do
+if [ ${type}x = inx ]
+then
+continue
+fi
+if [ -d ${D}/boot/u-boot-${type}.${UBOOT_SUFFIX}]
+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
+done
+else
+install -d ${D}/boot
+install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
+ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
+fi
 
 if [ -e ${WORKDIR}/fw_env.config ] ; then
 install -d ${D}${sysconfdir}
@@ -79,8 +120,28 @@ do_install () {
 
 if [ x${SPL_BINARY} != x ]
 then
-install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
-ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY}
+if [ x${UBOOT_CONFIG} != x ]   
+then
+for config in ${UBOOT_MACHINE}; do
+for type in in ${UBOOT_CONFIG}; do
+ if [ ${type}x = inx ]
+ then
+ continue
+ fi
+ if [ -d ${D}/boot/${SPL_IMAGE}-${type}]
+ then
+ break
+ else
+ 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
+done
+done
+else
+install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
+ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY}
+fi
 fi
 
 if [ x${UBOOT_ENV} != x ]
@@ -93,21 +154,68 @@ 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 ]
+if [ x${UBOOT_CONFIG} != 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 config in ${UBOOT_MACHINE}; do
+for type in in ${UBOOT_CONFIG}; do
+if [ ${type}x = inx ]  
+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}
+ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}
+ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${UBOOT_BINARY

[OE-core] [PATCH v3 2/2] u-boot.inc : add compile multiple u-boot feature

2014-12-03 Thread Chunrong Guo
Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/recipes-bsp/u-boot/u-boot.inc | 72 +-
 1 file changed, 47 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..9b93946 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}.${UBOOT_SUFFIX}
+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}.${UBOOT_SUFFIX} 
${D}/boot/u-boot-${type}.${UBOOT_SUFFIX}
+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,36 @@ 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
+for imagetype in in ${UBOOT_CONFIG}; do
+if [ ${imagetype}x = inx ]  
+then
+continue
+fi
+if [ -d ${DEPLOYDIR}/u-boot-${imagetype}.${UBOOT_SUFFIX}]
+then 
+break
+else
+install -d ${DEPLOYDIR}
+install ${S}/${type}/u-boot-${type}.${UBOOT_SUFFIX} 
${DEPLOYDIR}/u-boot-${imagetype}.${UBOOT_SUFFIX}
+if [ ${imagetype}x = sdx ] || [ ${imagetype}x = 
mfgtoolx ]
+then
+cp  ${DEPLOYDIR}/u-boot-${imagetype}.${UBOOT_SUFFIX}  
${DEPLOYDIR}/u-boot-${MACHINE}.${UBOOT_SUFFIX}
+fi
+fi 
+done 
+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

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 1/2] uboot-config.bbclass: Allow multiple U-Boot config for machine

2014-12-03 Thread Chunrong Guo
  This adds support to build multiple U-Boot configs for a machine; this
  is useful when we have support for different media boots which require
  different U-Boot configuration (e.g: eMMC and NAND).

Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/classes/uboot-config.bbclass | 37 ++---
 1 file changed, 14 insertions(+), 23 deletions(-)

diff --git a/meta/classes/uboot-config.bbclass 
b/meta/classes/uboot-config.bbclass
index b467659..cb061af 100644
--- a/meta/classes/uboot-config.bbclass
+++ b/meta/classes/uboot-config.bbclass
@@ -31,28 +31,19 @@ python () {
 return
 
 ubootconfig = (d.getVar('UBOOT_CONFIG', True) or ).split()
-if len(ubootconfig)  1:
-raise bb.parse.SkipPackage('You can only have a single default for 
UBOOT_CONFIG.')
+if len(ubootconfig)  0:
+for config in ubootconfig:
+for f, v in ubootconfigflags.items():
+if config == f: 
+items = v.split(',')
+if items[0] and len(items)  2:
+raise bb.parse.SkipPackage('Only config,images can be 
specified!')
+d.appendVar('UBOOT_MACHINE', ' ' + items[0])
+# IMAGE_FSTYPES appending
+if len(items)  1 and items[1]:
+bb.debug(1, Appending '%s' to IMAGE_FSTYPES. % 
items[1])
+d.appendVar('IMAGE_FSTYPES', ' ' + items[1])
+break
 elif len(ubootconfig) == 0:
-raise bb.parse.SkipPackage('You must set a default in UBOOT_CONFIG.')
-ubootconfig = ubootconfig[0]
-
-for f, v in ubootconfigflags.items():
-items = v.split(',')
-if items[0] and len(items)  2:
-raise bb.parse.SkipPackage('Only config,images can be specified!')
-
-if ubootconfig == f:
-bb.debug(1, Setting UBOOT_MACHINE to %s. % items[0])
-d.setVar('UBOOT_MACHINE', items[0])
-
-# IMAGE_FSTYPES appending
-if len(items)  1 and items[1]:
-bb.debug(1, Appending '%s' to IMAGE_FSTYPES. % items[1])
-d.appendVar('IMAGE_FSTYPES', ' ' + items[1])
-
-# Go out as we found a match!
-break
-else:
-raise bb.parse.SkipPackage(UBOOT_CONFIG %s is not supported % 
ubootconfig)
+   raise bb.parse.SkipPackage('You must set a default in UBOOT_CONFIG.')
 }
-- 
1.9.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 2/2] u-boot.inc : add compile multiple u-boot feature

2014-11-23 Thread Chunrong Guo
Signed-off-by: Chunrong Guo b40...@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

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 1/2] uboot-config.bbclass: Allow multiple U-Boot config for machine

2014-11-23 Thread Chunrong Guo
   This adds support to build multiple U-Boot configs for a machine; this
   is useful when we have support for different media boots which require
   different U-Boot configuration (e.g: eMMC and NAND).

Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/classes/uboot-config.bbclass | 42 +++
 1 file changed, 16 insertions(+), 26 deletions(-)

diff --git a/meta/classes/uboot-config.bbclass 
b/meta/classes/uboot-config.bbclass
index 8ac1b71..f70ca88 100644
--- a/meta/classes/uboot-config.bbclass
+++ b/meta/classes/uboot-config.bbclass
@@ -31,31 +31,21 @@ python () {
 return
 
 ubootconfig = (d.getVar('UBOOT_CONFIG', True) or ).split()
-if len(ubootconfig)  1:
-raise bb.parse.SkipPackage('You can only have a single default for 
UBOOT_CONFIG.')
+if len(ubootconfig)  0:
+for config in ubootconfig:
+for f, v in ubootconfigflags.items():
+if f == 'defaultval':
+continue
+if config == f: 
+items = v.split(',')
+if items[0] and len(items)  2:
+raise bb.parse.SkipPackage('Only config,images can be 
specified!')
+d.appendVar('UBOOT_MACHINE', ' ' + items[0])
+# IMAGE_FSTYPES appending
+if len(items)  1 and items[1]:
+bb.debug(1, Appending '%s' to IMAGE_FSTYPES. % 
items[1])
+d.appendVar('IMAGE_FSTYPES', ' ' + items[1])
+break
 elif len(ubootconfig) == 0:
-raise bb.parse.SkipPackage('You must set a default in UBOOT_CONFIG.')
-ubootconfig = ubootconfig[0]
-
-for f, v in ubootconfigflags.items():
-if f == 'defaultval':
-continue
-
-items = v.split(',')
-if items[0] and len(items)  2:
-raise bb.parse.SkipPackage('Only config,images can be specified!')
-
-if ubootconfig == f:
-bb.debug(1, Setting UBOOT_MACHINE to %s. % items[0])
-d.setVar('UBOOT_MACHINE', items[0])
-
-# IMAGE_FSTYPES appending
-if len(items)  1 and items[1]:
-bb.debug(1, Appending '%s' to IMAGE_FSTYPES. % items[1])
-d.appendVar('IMAGE_FSTYPES', ' ' + items[1])
-
-# Go out as we found a match!
-break
-else:
-raise bb.parse.SkipPackage(UBOOT_CONFIG %s is not supported % 
ubootconfig)
+   raise bb.parse.SkipPackage('You must set a default in UBOOT_CONFIG.')
 }
-- 
1.9.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/2] u-boot.inc : add compile multiple u-boot feature

2014-11-20 Thread Chunrong Guo
Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/recipes-bsp/u-boot/u-boot.inc | 42 ++
 1 file changed, 15 insertions(+), 27 deletions(-)

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc 
b/meta/recipes-bsp/u-boot/u-boot.inc
index c695b73..f420061 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -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
-- 
1.9.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/2] uboot-config.bbclass: Allow multiple U-Boot config for machine

2014-11-20 Thread Chunrong Guo
 *This class provides a system similar to PACKAGECONFIG but for U-Boot.
  The format is: UBOOT_CONFIG ??= default UBOOT_CONFIG[foo] = 
config,images
  Below there's an usage example: ,[ i.MX6Q SABRE AUTO based example ]
 | UBOOT_CONFIG ??= sd eimnor nand
 | UBOOT_CONFIG[sd] = mx6qsabreauto_config,sdcard
 | UBOOT_CONFIG[eimnor] = mx6qsabreauto_eimnor_config
 | UBOOT_CONFIG[nand] = mx6qsabreauto_nand_config,ubifs
 | UBOOT_CONFIG[spinor] = mx6qsabreauto_spinor_config

Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/classes/uboot-config.bbclass | 40 ++-
 1 file changed, 14 insertions(+), 26 deletions(-)

diff --git a/meta/classes/uboot-config.bbclass 
b/meta/classes/uboot-config.bbclass
index 8ac1b71..f02ca58 100644
--- a/meta/classes/uboot-config.bbclass
+++ b/meta/classes/uboot-config.bbclass
@@ -31,31 +31,19 @@ python () {
 return
 
 ubootconfig = (d.getVar('UBOOT_CONFIG', True) or ).split()
-if len(ubootconfig)  1:
-raise bb.parse.SkipPackage('You can only have a single default for 
UBOOT_CONFIG.')
+if len(ubootconfig)  0:
+for config in ubootconfig:
+for f, v in ubootconfigflags.items():
+if f == 'defaultval':
+continue
+if config == f: 
+flag =  f.split(' ') 
+items = v.split(',')
+if items[0] and len(items)  2:
+raise bb.parse.SkipPackage('Only config,images can be 
specified!')
+d.appendVar('UBOOT_MACHINE', ' ' + items[0])
+d.appendVar('IMAGE_FSTYPES', ' ' + flag[0])
+break
 elif len(ubootconfig) == 0:
-raise bb.parse.SkipPackage('You must set a default in UBOOT_CONFIG.')
-ubootconfig = ubootconfig[0]
-
-for f, v in ubootconfigflags.items():
-if f == 'defaultval':
-continue
-
-items = v.split(',')
-if items[0] and len(items)  2:
-raise bb.parse.SkipPackage('Only config,images can be specified!')
-
-if ubootconfig == f:
-bb.debug(1, Setting UBOOT_MACHINE to %s. % items[0])
-d.setVar('UBOOT_MACHINE', items[0])
-
-# IMAGE_FSTYPES appending
-if len(items)  1 and items[1]:
-bb.debug(1, Appending '%s' to IMAGE_FSTYPES. % items[1])
-d.appendVar('IMAGE_FSTYPES', ' ' + items[1])
-
-# Go out as we found a match!
-break
-else:
-raise bb.parse.SkipPackage(UBOOT_CONFIG %s is not supported % 
ubootconfig)
+   raise bb.parse.SkipPackage('You must set a default in UBOOT_CONFIG.')
 }
-- 
1.9.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v1 1/2] uboot-config.bbclass: Allow multiple U-Boot config for machine

2014-11-20 Thread Chunrong Guo
   This adds support to build multiple U-Boot configs for a machine; this
   is useful when we have support for different media boots which require
   different U-Boot configuration (e.g: eMMC and NAND).

Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/classes/uboot-config.bbclass | 42 +++
 1 file changed, 16 insertions(+), 26 deletions(-)

diff --git a/meta/classes/uboot-config.bbclass 
b/meta/classes/uboot-config.bbclass
index 8ac1b71..f70ca88 100644
--- a/meta/classes/uboot-config.bbclass
+++ b/meta/classes/uboot-config.bbclass
@@ -31,31 +31,21 @@ python () {
 return
 
 ubootconfig = (d.getVar('UBOOT_CONFIG', True) or ).split()
-if len(ubootconfig)  1:
-raise bb.parse.SkipPackage('You can only have a single default for 
UBOOT_CONFIG.')
+if len(ubootconfig)  0:
+for config in ubootconfig:
+for f, v in ubootconfigflags.items():
+if f == 'defaultval':
+continue
+if config == f: 
+items = v.split(',')
+if items[0] and len(items)  2:
+raise bb.parse.SkipPackage('Only config,images can be 
specified!')
+d.appendVar('UBOOT_MACHINE', ' ' + items[0])
+# IMAGE_FSTYPES appending
+if len(items)  1 and items[1]:
+bb.debug(1, Appending '%s' to IMAGE_FSTYPES. % 
items[1])
+d.appendVar('IMAGE_FSTYPES', ' ' + items[1])
+break
 elif len(ubootconfig) == 0:
-raise bb.parse.SkipPackage('You must set a default in UBOOT_CONFIG.')
-ubootconfig = ubootconfig[0]
-
-for f, v in ubootconfigflags.items():
-if f == 'defaultval':
-continue
-
-items = v.split(',')
-if items[0] and len(items)  2:
-raise bb.parse.SkipPackage('Only config,images can be specified!')
-
-if ubootconfig == f:
-bb.debug(1, Setting UBOOT_MACHINE to %s. % items[0])
-d.setVar('UBOOT_MACHINE', items[0])
-
-# IMAGE_FSTYPES appending
-if len(items)  1 and items[1]:
-bb.debug(1, Appending '%s' to IMAGE_FSTYPES. % items[1])
-d.appendVar('IMAGE_FSTYPES', ' ' + items[1])
-
-# Go out as we found a match!
-break
-else:
-raise bb.parse.SkipPackage(UBOOT_CONFIG %s is not supported % 
ubootconfig)
+   raise bb.parse.SkipPackage('You must set a default in UBOOT_CONFIG.')
 }
-- 
1.9.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v1 2/2] u-boot.inc : add compile multiple u-boot feature

2014-11-20 Thread Chunrong Guo
Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/recipes-bsp/u-boot/u-boot.inc | 42 ++
 1 file changed, 15 insertions(+), 27 deletions(-)

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc 
b/meta/recipes-bsp/u-boot/u-boot.inc
index c695b73..d107a10 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -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
-- 
1.9.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] bumps to remove PRINC use in meta-fsl-ppc

2014-04-24 Thread Chunrong Guo
Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb| 2 +-
 meta/recipes-core/udev/udev-extraconf_1.0.bb  | 2 +-
 meta/recipes-core/udev/udev_182.bb| 2 +-
 meta/recipes-extended/procps/procps_3.2.8.bb  | 2 +-
 meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb 
b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
index 34e0a54..5c6bcd0 100644
--- a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
@@ -5,7 +5,7 @@ SECTION = base
 LICENSE = GPLv2+
 LIC_FILES_CHKSUM = file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
 
file://COPYRIGHT;endline=15;md5=349c872e0066155e1818b786938876a4
-PR = r13
+PR = r14
 
 RDEPENDS_${PN} = ${PN}-inittab
 
diff --git a/meta/recipes-core/udev/udev-extraconf_1.0.bb 
b/meta/recipes-core/udev/udev-extraconf_1.0.bb
index 3810b28..a0f9dde 100644
--- a/meta/recipes-core/udev/udev-extraconf_1.0.bb
+++ b/meta/recipes-core/udev/udev-extraconf_1.0.bb
@@ -4,7 +4,7 @@ LICENSE = MIT
 LIC_FILES_CHKSUM = 
file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
 
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420
 
-PR = r16
+PR = r18
 
 SRC_URI =  \
file://automount.rules \
diff --git a/meta/recipes-core/udev/udev_182.bb 
b/meta/recipes-core/udev/udev_182.bb
index a90c289..b216352 100644
--- a/meta/recipes-core/udev/udev_182.bb
+++ b/meta/recipes-core/udev/udev_182.bb
@@ -1,6 +1,6 @@
 include udev.inc
 
-PR = r8
+PR = r9
 
 # module-init-tools from kmod_git will provide libkmod runtime
 DEPENDS += module-init-tools
diff --git a/meta/recipes-extended/procps/procps_3.2.8.bb 
b/meta/recipes-extended/procps/procps_3.2.8.bb
index e4b82e0..94ac3db 100644
--- a/meta/recipes-extended/procps/procps_3.2.8.bb
+++ b/meta/recipes-extended/procps/procps_3.2.8.bb
@@ -1,6 +1,6 @@
 require procps.inc
 
-PR = r11
+PR = r12
 
 SRC_URI += file://procmodule.patch \
 file://psmodule.patch \
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb 
b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
index 3749a1d..54b0885 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
@@ -3,7 +3,7 @@ HOMEPAGE = http://www.x.org;
 SECTION = x11/base
 LICENSE = MIT-X
 LIC_FILES_CHKSUM = 
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420
-PR = r27
+PR = r28
 
 SRC_URI = file://xorg.conf
 
-- 
1.8.3.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] eglibc: __slow_ieee754_sqrt{, f} functions for ppc e6500-32b

2014-04-08 Thread Chunrong Guo
*fix the following error:
|/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c:138:1:
| error: redefinition of '__ieee754_sqrt'
| __ieee754_sqrt (double x)

Signed-off-by: Chunrong Guo b40...@freescale.com
---
 .../ppce6500-32b_slow_ieee754_sqrt.patch   | 47 ++
 meta/recipes-core/eglibc/eglibc_2.19.bb|  1 +
 2 files changed, 48 insertions(+)
 create mode 100644 
meta/recipes-core/eglibc/eglibc-2.19/ppce6500-32b_slow_ieee754_sqrt.patch

diff --git 
a/meta/recipes-core/eglibc/eglibc-2.19/ppce6500-32b_slow_ieee754_sqrt.patch 
b/meta/recipes-core/eglibc/eglibc-2.19/ppce6500-32b_slow_ieee754_sqrt.patch
new file mode 100644
index 000..4c6c107
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.19/ppce6500-32b_slow_ieee754_sqrt.patch
@@ -0,0 +1,47 @@
+ __ieee754_sqrt{,f} are now inline functions and call out __slow versions
+
+
+Signed-off-by: chunrong guo b40...@freescale.com
+Upstream-Status: Pending
+
+diff -rNu libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 
libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+--- libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2014-04-08 
04:39:58.487229887 -0500
 libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c  2014-04-08 
04:40:52.643069198 -0500
+@@ -41,10 +41,10 @@
+ 
+ #ifdef __STDC__
+ double
+-__ieee754_sqrt (double b)
++__slow_ieee754_sqrt (double b)
+ #else
+ double
+-__ieee754_sqrt (b)
++__slow_ieee754_sqrt (b)
+  double b;
+ #endif
+ {
+@@ -83,7 +83,7 @@
+ 
+   /* Handle small numbers by scaling.  */
+   if (__builtin_expect ((u.parts.msw  0x7ff0) = 0x0200, 0))
+-return __ieee754_sqrt (b * two108) * twom54;
++return __slow_ieee754_sqrt (b * two108) * twom54;
+ 
+ #define FMADD(a_, c_, b_)   \
+   ({ double __r;\
+diff -rNu libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 
libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+--- libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c2014-04-08 
04:39:58.487229887 -0500
 libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2014-04-08 
04:41:26.017067682 -0500
+@@ -39,10 +39,10 @@
+ 
+ #ifdef __STDC__
+ float
+-__ieee754_sqrtf (float b)
++__slow_ieee754_sqrtf (float b)
+ #else
+ float
+-__ieee754_sqrtf (b)
++__slow_ieee754_sqrtf (b)
+  float b;
+ #endif
+ {
diff --git a/meta/recipes-core/eglibc/eglibc_2.19.bb 
b/meta/recipes-core/eglibc/eglibc_2.19.bb
index 2bedf26..8f09676 100644
--- a/meta/recipes-core/eglibc/eglibc_2.19.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.19.bb
@@ -24,6 +24,7 @@ SRC_URI = 
http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr25
file://0001-R_ARM_TLS_DTPOFF32.patch \

file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
file://fix-tibetian-locales.patch \
+  file://ppce6500-32b_slow_ieee754_sqrt.patch \
   
 SRC_URI[md5sum] = 197836c2ba42fb146e971222647198dd
 SRC_URI[sha256sum] = 
baaa030531fc308f7820c46acdf8e1b2f8e3c1f40bcd28b6e440d1c95d170d4c
-- 
1.8.3.2


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] coreutils: fix search paths for libstdbuf.so

2014-03-28 Thread Chunrong Guo
   *fix the following error:
|stdbuf: failed to find 'libstdbuf.so'
*PKGLIBEXECDIR is the search paths for libstdbuf.so
|PKGLIBEXECDIR='$(pkglibexecdir)'
|pkglibexecdir='${libexecdir}/${PACKAGE}'

Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/recipes-core/coreutils/coreutils_8.22.bb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/meta/recipes-core/coreutils/coreutils_8.22.bb 
b/meta/recipes-core/coreutils/coreutils_8.22.bb
index a26aa02..ba3a0a0 100644
--- a/meta/recipes-core/coreutils/coreutils_8.22.bb
+++ b/meta/recipes-core/coreutils/coreutils_8.22.bb
@@ -22,7 +22,7 @@ SRC_URI[md5sum] = 8fb0ae2267aa6e728958adc38f8163a2
 SRC_URI[sha256sum] = 
5b3e94998152c017e6c75d56b9b994188eb71bf46d4038a642cb9141f6ff1212
 
 EXTRA_OECONF_class-native = --without-gmp
-EXTRA_OECONF_class-target = --enable-install-program=arch
+EXTRA_OECONF_class-target = --enable-install-program=arch 
--libexecdir=${libdir}
 
 # acl is not a default feature
 #
@@ -71,8 +71,6 @@ do_install_append() {
# in update-alternatives to fail, therefore use lbracket - the name used
# for the actual source file.
mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
-   install -d ${D}${libdir}/coreutils
-   mv ${D}${libexecdir}/coreutils/libstdbuf.so ${D}${libdir}/coreutils
 }
 
 inherit update-alternatives
-- 
1.8.3.2


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] coreutils: fix search paths for libstdbuf.so

2014-03-25 Thread Chunrong Guo
*fix the following error:
|stdbuf: failed to find 'libstdbuf.so'
*PKGLIBEXECDIR is the search paths for libstdbuf.so
|PKGLIBEXECDIR='$(pkglibexecdir)'
|pkglibexecdir='${libexecdir}/${PACKAGE}'

Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/recipes-core/coreutils/coreutils_8.22.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/recipes-core/coreutils/coreutils_8.22.bb 
b/meta/recipes-core/coreutils/coreutils_8.22.bb
index a26aa02..ed5fc84 100644
--- a/meta/recipes-core/coreutils/coreutils_8.22.bb
+++ b/meta/recipes-core/coreutils/coreutils_8.22.bb
@@ -71,8 +71,6 @@ do_install_append() {
# in update-alternatives to fail, therefore use lbracket - the name used
# for the actual source file.
mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
-   install -d ${D}${libdir}/coreutils
-   mv ${D}${libexecdir}/coreutils/libstdbuf.so ${D}${libdir}/coreutils
 }
 
 inherit update-alternatives
@@ -101,3 +99,4 @@ python __anonymous() {
 }
 
 BBCLASSEXTEND = native
+FILES_${PN}-dbg += ${libexecdir}/coreutils/.debug/*
-- 
1.8.3.2


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] lttng-modules: build as 64-bit kernel module on e6500

2013-12-12 Thread Chunrong Guo
   *e6500 is built with 32b rootfs/64b kernel, build lttng-modules as 64bit too.
   *Fix the below build issue on e6500 core:
| DEBUG: Executing shell function do_make_scripts
| make: Entering directory `.../tmp/sysroots/t4240qds/usr/src/kernel'
| CC scripts/mod/empty.o | scripts/mod/empty.c:1:0: error: -mcmodel not 
supported in this configuration
| make[2]: *** [scripts/mod/empty.o] Error 1
| make[1]: *** [scripts/mod] Error 2
| make: *** [scripts] Error 2

Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/recipes-kernel/lttng/lttng-modules_2.3.3.bb |   12 
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.3.3.bb 
b/meta/recipes-kernel/lttng/lttng-modules_2.3.3.bb
index dd06546..2a48c1a 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.3.3.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.3.3.bb
@@ -22,6 +22,18 @@ export KERNEL_SRC=${STAGING_KERNEL_DIR}
 
 S = ${WORKDIR}/git
 
+# Build as 64-bit kernel module on e6500
+python () {
+
+promote_kernel = d.getVar('BUILD_64BIT_KERNEL')
+
+if promote_kernel == 1:
+d.setVar('KERNEL_CC_append', ' -m64')
+d.setVar('KERNEL_LD_append', ' -melf64ppc')
+
+}
+
+
 do_install_append() {
# Delete empty directories to avoid QA failures if no modules were built
find ${D}/lib -depth -type d -empty -exec rmdir {} \;
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] mdadm: flag __SANE_USERSPACE_TYPES__ to include int-ll64.h for powerpc64

2013-11-11 Thread Chunrong Guo
  *PPC64 uses long long for u64 in the kernel, but powerpc's asm/types.h
   prevents 64-bit userland from seeing this definition, instead defaulting
   to u64 == long in userspace.

  *fix the below error
   |super-ddf.c:4542:5: error: format '%llu' expects argument of type 'long 
long unsigned int',
   |but argument 5 has type '__u64' [-Werror=format=]
   |dprintf(BVD %u has %08x at %llu\n, 0,

Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/recipes-extended/mdadm/mdadm_3.3.bb |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-extended/mdadm/mdadm_3.3.bb 
b/meta/recipes-extended/mdadm/mdadm_3.3.bb
index 586e04a..41816bc 100644
--- a/meta/recipes-extended/mdadm/mdadm_3.3.bb
+++ b/meta/recipes-extended/mdadm/mdadm_3.3.bb
@@ -26,6 +26,11 @@ do_configure_prepend () {
 }
 
 EXTRA_OEMAKE = CHECK_RUN_DIR=0
+# PPC64 uses long long for u64 in the kernel, but powerpc's asm/types.h
+# prevents 64-bit userland from seeing this definition, instead defaulting
+# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get
+# int-ll64.h included
+EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
 
 do_compile() {
oe_runmake
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] perf : fix perf of cross-compile for PowerPC 64bit targets

2013-09-26 Thread Chunrong Guo
*fix perf build issue on powerpc 64bit targets
|error information:
| tests/attr.c: In function 'store_event':
| tests/attr.c:71:4: error: format '%llu' expects argument of type 'long 
long unsigned int',
| but argument 6 has type '__u64' [-Werror=format=]
| attr-type, attr-config, fd);

Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/recipes-kernel/perf/perf.bb |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 269069f..fa6b8b9 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -77,6 +77,7 @@ EXTRA_OEMAKE = \
'
 
 EXTRA_OEMAKE += \
+   'CFLAGS=${CFLAGS} -fPIC' \
'prefix=${prefix}' \
'bindir=${bindir}' \
'sharedir=${datadir}' \
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] gcc-4.8: fix ICE of cross-compile for PowerPC e500v2 targets

2013-08-28 Thread Chunrong Guo
  * http://gcc.gnu.org/bugzilla//show_bug.cgi?id=57717#c7

  * fix the segfault issue of dd on e500v2 targets
Since double-float is disabled for e500v2 targets build due to ICE of 
gcc-4.8.1,
accordingly %Ld format of sprintf is disabled.
Address Bug 4910 - [p1022ds]urandom: segmentation fault

Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/recipes-devtools/gcc/gcc-4.8.inc  |1 +
 .../0045-gcc-4.8-PR57717-PowerPC-E500v2.patch  |   21 
 2 files changed, 22 insertions(+), 0 deletions(-)
 create mode 100644 
meta/recipes-devtools/gcc/gcc-4.8/0045-gcc-4.8-PR57717-PowerPC-E500v2.patch

diff --git a/meta/recipes-devtools/gcc/gcc-4.8.inc 
b/meta/recipes-devtools/gcc/gcc-4.8.inc
index 39f323d..0fbbc1d 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.8.inc
@@ -74,6 +74,7 @@ SRC_URI = ${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
   file://0042-pr57748.patch \
   file://0043-cpp.patch \
   file://0044-gengtypes.patch \
+  file://0045-gcc-4.8-PR57717-PowerPC-E500v2.patch \
  
 SRC_URI[md5sum] = 3b2386c114cd74185aa3754b58a79304
 SRC_URI[sha256sum] = 
545b44be3ad9f2c4e90e6880f5c9d4f0a8f0e5f67e1ffb0d45da9fa01bb05813
diff --git 
a/meta/recipes-devtools/gcc/gcc-4.8/0045-gcc-4.8-PR57717-PowerPC-E500v2.patch 
b/meta/recipes-devtools/gcc/gcc-4.8/0045-gcc-4.8-PR57717-PowerPC-E500v2.patch
new file mode 100644
index 000..96fa1da
--- /dev/null
+++ 
b/meta/recipes-devtools/gcc/gcc-4.8/0045-gcc-4.8-PR57717-PowerPC-E500v2.patch
@@ -0,0 +1,21 @@
+This backports fix from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717
+
+Upstream-Status: Backport
+Signed-off-by: Julian Brown julian_br...@mentor.com
+
+fix for PR57717 (PowerPC E500v2)
+http://gcc.gnu.org/ml/gcc-patches/2013-08/msg00668.html
+
+--- a/gcc/config/rs6000/rs6000.c   2013-05-09 20:54:06.0 -0500
 b/gcc/config/rs6000/rs6000.c   2013-08-28 01:25:24.865218744 -0500
+@@ -6337,9 +6337,7 @@
+GET_CODE (XEXP (x, 1)) == CONST_INT
+reg_offset_p
+!SPE_VECTOR_MODE (mode)
+-   !(TARGET_E500_DOUBLE  (mode == DFmode || mode == TFmode
+-|| mode == DDmode || mode == TDmode
+-|| mode == DImode))
++   !(TARGET_E500_DOUBLE  GET_MODE_SIZE (mode)  UNITS_PER_WORD)
+VECTOR_MEM_NONE_P (mode))
+ {
+   HOST_WIDE_INT val = INTVAL (XEXP (x, 1));
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] genext2fs: fix memory corruption on powerpc

2013-08-15 Thread Chunrong Guo
* fix memory corruption errors on powerpc64
e.g.
|$ genext2fs -b 3 -d . -i 8192 /tmp/tstrootfs
|  Segmentation fault

Signed-off-by: Chunrong Guo b40...@freescale.com
---
 .../fix-memory-corruption-on-powerpc.patch |   76 
 meta/recipes-devtools/genext2fs/genext2fs_1.4.1.bb |3 +-
 2 files changed, 78 insertions(+), 1 deletions(-)
 create mode 100644 
meta/recipes-devtools/genext2fs/genext2fs-1.4.1/fix-memory-corruption-on-powerpc.patch

diff --git 
a/meta/recipes-devtools/genext2fs/genext2fs-1.4.1/fix-memory-corruption-on-powerpc.patch
 
b/meta/recipes-devtools/genext2fs/genext2fs-1.4.1/fix-memory-corruption-on-powerpc.patch
new file mode 100644
index 000..0ef162c
--- /dev/null
+++ 
b/meta/recipes-devtools/genext2fs/genext2fs-1.4.1/fix-memory-corruption-on-powerpc.patch
@@ -0,0 +1,76 @@
+Upstream-Status: Submitted
+
+fix memory corruption on powerpc
+
+Signed-off-by: Wrobel Heinz heinz.wro...@freescale.com
+
+diff --unified a/genext2fs.c b/genext2fs.c
+--- a/genext2fs.c  2013-08-14 16:50:59.061623605 +0200
 b/genext2fs.c  2013-08-14 16:47:23.349623674 +0200
+@@ -675,21 +675,34 @@
+ }
+ 
+ static void
+-swap_nod(inode *nod)
++swap_nod(inode *nod, int fromdisk)
+ {
+   uint32 nblk;
++  uint32 i_blocks = nod-i_blocks;
++  uint32 i_size = nod-i_size;
++  uint16 i_mode = nod-i_mode;
++
+ 
+ #define this nod
+   inode_decl
+ #undef this
+ 
++  if (fromdisk) {
++  // Only now do we have the values in the correct
++  // endianess for the host. So we override the
++  // earlier assumption
++  i_blocks = nod-i_blocks;
++  i_size = nod-i_size;
++  i_mode = nod-i_mode;
++  }
++
+   // block and character inodes store the major and minor in the
+   // i_block, so we need to unswap to get those.  Also, if it's
+   // zero iblocks, put the data back like it belongs.
+-  nblk = nod-i_blocks / INOBLK;
+-  if ((nod-i_size  !nblk)
+-  || ((nod-i_mode  FM_IFBLK) == FM_IFBLK)
+-  || ((nod-i_mode  FM_IFCHR) == FM_IFCHR))
++  nblk = i_blocks / INOBLK;
++  if ((i_size  !nblk)
++  || ((i_mode  FM_IFBLK) == FM_IFBLK)
++  || ((i_mode  FM_IFCHR) == FM_IFCHR))
+   {
+   int i;
+   for(i = 0; i = EXT2_TIND_BLOCK; i++)
+@@ -1066,7 +1079,7 @@
+   nod_info *ni = container_of(elem, nod_info, link);
+ 
+   if (ni-fs-swapit)
+-  swap_nod(ni-itab);
++  swap_nod(ni-itab, 0);
+   put_blk(ni-bi);
+   free(ni);
+ }
+@@ -1102,7 +1115,7 @@
+   ni-b = get_blk(fs, fs-gd[grp].bg_inode_table + boffset, ni-bi);
+   ni-itab = ((inode *) ni-b) + offset;
+   if (fs-swapit)
+-  swap_nod(ni-itab);
++  swap_nod(ni-itab, 1);
+ 
+ out:
+   *rni = ni;
+@@ -1158,6 +1171,8 @@
+   if (dw-fs-swapit)
+   swap_dir(dw-d);
+   memcpy(dw-last_d, dw-d, sizeof(directory));
++  if (dw-fs-swapit)
++  swap_dir(dw-d);
+ 
+   if (((int8 *) next_d) = ((int8 *) dw-b + BLOCKSIZE))
+   return NULL;
diff --git a/meta/recipes-devtools/genext2fs/genext2fs_1.4.1.bb 
b/meta/recipes-devtools/genext2fs/genext2fs_1.4.1.bb
index 702245f..60fd0c2 100644
--- a/meta/recipes-devtools/genext2fs/genext2fs_1.4.1.bb
+++ b/meta/recipes-devtools/genext2fs/genext2fs_1.4.1.bb
@@ -22,7 +22,8 @@ SRC_URI += file://update_to_1.95.patch \
 file://0017-Fix-file-same-comparison.patch \
 file://0018-Handle-files-changing-while-we-are-working.patch \
 file://0019-Make-sure-superblock-is-clear-on-allocation.patch \
-file://fix-nbblocks-cast.patch
+file://fix-nbblocks-cast.patch \
+file://fix-memory-corruption-on-powerpc.patch 
 
 SRC_URI[md5sum] = b7b6361bcce2cedff1ae437fadafe53b
 SRC_URI[sha256sum] = 
404dbbfa7a86a6c3de8225c8da254d026b17fd288e05cec4df2cc7e1f4feecfc
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] base-files: remove symbolic link from /etc/mtab to /proc/mounts

2013-07-31 Thread Chunrong Guo
*If /etc/mtab is a symlink to /proc/self/mounts,
 mounting fails because addmntent returns an error.
 As a consequence, the Private directory is unusable
 because /proc/self/mounts is read-only feature.

Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/recipes-core/base-files/base-files_3.0.14.bb |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb 
b/meta/recipes-core/base-files/base-files_3.0.14.bb
index 054fefa..1843bdd 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -100,7 +100,6 @@ do_install () {
install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf
install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd
 
-   ln -sf /proc/mounts ${D}${sysconfdir}/mtab
 }
 
 do_install_basefilesissue () {
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] pseudo: pseudo-native breaks native builds for symver.patch

2013-07-11 Thread Chunrong Guo
  *symver.patch causes failure if the host glibc does not provide the 
glibc-2.0 version of the symbol.
  *fix the below error log:
  
|tmp/work/ppc64-linux/pseudo-native/1.5.1-r3/pseudo-1.5.1/pseudo_ipc.c:153: more
  |undefined references to `memcpy@GLIBC_2.0' follow
  |/pseudo_db.ccollect2: error: ld returned 1 exit status

Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/recipes-devtools/pseudo/files/symver.patch |   26 ---
 meta/recipes-devtools/pseudo/pseudo.inc |2 -
 2 files changed, 0 insertions(+), 28 deletions(-)
 delete mode 100644 meta/recipes-devtools/pseudo/files/symver.patch

diff --git a/meta/recipes-devtools/pseudo/files/symver.patch 
b/meta/recipes-devtools/pseudo/files/symver.patch
deleted file mode 100644
index 8d1b377..000
--- a/meta/recipes-devtools/pseudo/files/symver.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-When running as pseudo-nativesdk, we might need to run host binaries 
-linked against the host libc. Having a 2.14 libc dependency from memcpy is
-problematic so instruct the linker to use older symbols.
-
-Upstream-Status: Pending
-
-RP 2012/4/22
-
-Index: pseudo-1.3/pseudo.h
-===
 pseudo-1.3.orig/pseudo.h   2012-04-22 12:17:59.078909060 +
-+++ pseudo-1.3/pseudo.h2012-04-22 12:32:42.954888587 +
-@@ -29,6 +29,13 @@
- int pseudo_set_value(const char *key, const char *value);
- char *pseudo_get_value(const char *key);
- 
-+#ifdef __amd64__   
-+#define GLIBC_COMPAT_SYMBOL(SYM) __asm__(.symver  #SYM , #SYM 
@GLIBC_2.2.5)
-+#else   
-+#define GLIBC_COMPAT_SYMBOL(SYM) __asm__(.symver  #SYM , #SYM 
@GLIBC_2.0)
-+#endif
-+GLIBC_COMPAT_SYMBOL(memcpy);
-+
- #include pseudo_tables.h
- 
- extern void pseudo_debug_verbose(void);
diff --git a/meta/recipes-devtools/pseudo/pseudo.inc 
b/meta/recipes-devtools/pseudo/pseudo.inc
index 3baf3af..f5d0608 100644
--- a/meta/recipes-devtools/pseudo/pseudo.inc
+++ b/meta/recipes-devtools/pseudo/pseudo.inc
@@ -9,9 +9,7 @@ SECTION = base
 LICENSE = LGPL2.1
 DEPENDS = sqlite3
 
-SRC_URI_append_class-nativesdk =  file://symver.patch
 
-SRC_URI_append_class-native =  file://symver.patch
 
 FILES_${PN} = ${libdir}/pseudo/lib*/libpseudo.so ${bindir}/* 
${localstatedir}/pseudo ${prefix}/var/pseudo
 FILES_${PN}-dbg += ${libdir}/pseudo/lib*/.debug
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] common-licenses: Adding netperf

2013-07-09 Thread Chunrong Guo
   *netperf requires it's own specific license when
   add meta-openembedded layer

Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/files/common-licenses/netperf |   43 
 1 files changed, 43 insertions(+), 0 deletions(-)
 create mode 100644 meta/files/common-licenses/netperf

diff --git a/meta/files/common-licenses/netperf 
b/meta/files/common-licenses/netperf
new file mode 100644
index 000..3f3ceb2
--- /dev/null
+++ b/meta/files/common-licenses/netperf
@@ -0,0 +1,43 @@
+
+ 
+  Copyright (C) 1993 Hewlett-Packard Company
+ ALL RIGHTS RESERVED.
+ 
+  The enclosed software and documentation includes copyrighted works
+  of Hewlett-Packard Co. For as long as you comply with the following
+  limitations, you are hereby authorized to (i) use, reproduce, and
+  modify the software and documentation, and to (ii) distribute the
+  software and documentation, including modifications, for
+  non-commercial purposes only.
+  
+  1.  The enclosed software and documentation is made available at no
+  charge in order to advance the general development of
+  high-performance networking products.
+ 
+  2.  You may not delete any copyright notices contained in the
+  software or documentation. All hard copies, and copies in
+  source code or object code form, of the software or
+  documentation (including modifications) must contain at least
+  one of the copyright notices.
+ 
+  3.  The enclosed software and documentation has not been subjected
+  to testing and quality control and is not a Hewlett-Packard Co.
+  product. At a future time, Hewlett-Packard Co. may or may not
+  offer a version of the software and documentation as a product.
+  
+  4.  THE SOFTWARE AND DOCUMENTATION IS PROVIDED AS IS.
+  HEWLETT-PACKARD COMPANY DOES NOT WARRANT THAT THE USE,
+  REPRODUCTION, MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR
+  DOCUMENTATION WILL NOT INFRINGE A THIRD PARTY'S INTELLECTUAL
+  PROPERTY RIGHTS. HP DOES NOT WARRANT THAT THE SOFTWARE OR
+  DOCUMENTATION IS ERROR FREE. HP DISCLAIMS ALL WARRANTIES,
+  EXPRESS AND IMPLIED, WITH REGARD TO THE SOFTWARE AND THE
+  DOCUMENTATION. HP SPECIFICALLY DISCLAIMS ALL WARRANTIES OF
+  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+  
+  5.  HEWLETT-PACKARD COMPANY WILL NOT IN ANY EVENT BE LIABLE FOR ANY
+  DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
+  (INCLUDING LOST PROFITS) RELATED TO ANY USE, REPRODUCTION,
+  MODIFICATION, OR DISTRIBUTION OF THE SOFTWARE OR DOCUMENTATION.
+ 
+
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] connman: tist of connman do not support powerpc64

2013-04-26 Thread Chunrong Guo
connman build for powerpc 64bit boards were producing errors like this:
| make[1]: *** [plugins/plugins_tist_la-tist.lo] Error 1
| make[1]: *** Waiting for unfinished jobs
| make: *** [all] Error 2
| ERROR: oe_runmake failed

Signed-off-by: Chunrong Guo b40...@freescale.com
---
 meta/recipes-connectivity/connman/connman.inc |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-connectivity/connman/connman.inc 
b/meta/recipes-connectivity/connman/connman.inc
index 589ece8..5389f3a 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -20,10 +20,11 @@ DEPENDS  = dbus glib-2.0 ppp iptables gnutls \
 ${@base_contains('DISTRO_FEATURES', '3g','ofono', '', d)} \
 
 
-INC_PR = r19
+INC_PR = r20
 
 TIST = --enable-tist
 TIST_powerpc = 
+TIST_powerpc64 = 
 
 EXTRA_OECONF += \
 ac_cv_path_WPASUPPLICANT=${sbindir}/wpa_supplicant \
-- 
1.7.5.4



___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core