Re: [OE-core] uninative binary?

2016-11-07 Thread Gary Thomas

On 2016-11-04 11:03, Richard Purdie wrote:

On Fri, 2016-11-04 at 08:16 +0100, Gary Thomas wrote:

Some of my customers need to be able to build without any
network connectivity, so I normally use BB_NO_NETWORK="1"

Is there a way to add the uninative "binary shim" to my
download mirror?  Given that the path includes a hash as
a directory, it's not clear to me how to put it into my
mirror.

Thanks for any ideas


Set UNINATIVE_URL to point at your mirror?

If the file already exists in DL_DIR, it will be used without touching
the network.


Thanks, that worked.  I keep a link to my mirror in my meta tree,
so I added these lines to my ${DISTRO}.conf:
  UNINATIVE_URL ?= "file://${COREBASE}/sources/uninative/1.4/"
  require conf/distro/include/yocto-uninative.inc
  INHERIT += "uninative"
When I ran a build, this got sucked into my ${DL_DIR} as
  $ ls -lR downloads/uninative/
  downloads/uninative/:
  total 4
  drwxrwxr-x 2 gthomas gthomas 4096 Nov  7 13:02 
101ff8f2580c193488db9e76f9646fb6ed38b65fb76f403acb0e2178ce7127ca

  
downloads/uninative/101ff8f2580c193488db9e76f9646fb6ed38b65fb76f403acb0e2178ce7127ca:
  total 4
  lrwxrwxrwx 1 gthomas gthomas 76 Nov  7 13:02 x86_64-nativesdk-libc.tar.bz2 -> 
/local/poky-cutting-edge/sources/uninative/1.4/x86_64-nativesdk-libc.tar.bz2


--

Gary Thomas |  Consulting for the
MLB Associates  |Embedded world

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


Re: [OE-core] [PATCH version2] db: disable the ARM assembler mutex code

2016-11-07 Thread Zhou, Li

ping


On 11/07/2016 11:02 AM, Li Zhou wrote:

The swpb in macro MUTEX_SET will cause "undefined instruction" error
on the new arm arches which don't support this assembly instruction
any more. If use ldrex/strex to replace swpb, the old arm arches don't
support them. So to avoid this issue, just disable the ARM assembler
mutex code, and use the default pthreads mutex.

Signed-off-by: Li Zhou 
---
  meta/recipes-support/db/db_6.0.35.bb | 9 -
  1 file changed, 9 deletions(-)

diff --git a/meta/recipes-support/db/db_6.0.35.bb 
b/meta/recipes-support/db/db_6.0.35.bb
index f60edf9..b1bec0e 100644
--- a/meta/recipes-support/db/db_6.0.35.bb
+++ b/meta/recipes-support/db/db_6.0.35.bb
@@ -77,15 +77,6 @@ do_configure() {
oe_runconf
  }
  
-# Override the MUTEX setting here, the POSIX library is

-# the default - "POSIX/pthreads/library".
-# Don't ignore the nice SWP instruction on the ARM:
-# These enable the ARM assembler mutex code
-ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
-MUTEX = ""
-MUTEX_arm = "${ARM_MUTEX}"
-MUTEX_armeb = "${ARM_MUTEX}"
-EXTRA_OECONF += "${MUTEX}"
  EXTRA_OEMAKE_append_class-target = " 
LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
  EXTRA_OEMAKE += "STRIP=true docdir=${docdir}/db/"
  


--
Best Regards!
Zhou Li
Phone number: 86-10-84778511

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


[OE-core] [PATCH V2] musl: Update to latest on master

2016-11-07 Thread Khem Raj
Signed-off-by: Khem Raj 
---
 meta/recipes-core/musl/files/CVE-2016-8859.patch | 79 
 meta/recipes-core/musl/musl_git.bb   |  3 +-
 2 files changed, 1 insertion(+), 81 deletions(-)
 delete mode 100644 meta/recipes-core/musl/files/CVE-2016-8859.patch

diff --git a/meta/recipes-core/musl/files/CVE-2016-8859.patch 
b/meta/recipes-core/musl/files/CVE-2016-8859.patch
deleted file mode 100644
index 82da86f..000
--- a/meta/recipes-core/musl/files/CVE-2016-8859.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From c3edc06d1e1360f3570db9155d6b318ae0d0f0f7 Mon Sep 17 00:00:00 2001
-From: Rich Felker 
-Date: Thu, 6 Oct 2016 18:34:58 -0400
-Subject: [PATCH] fix missing integer overflow checks in regexec buffer size
- computations
-
-most of the possible overflows were already ruled out in practice by
-regcomp having already succeeded performing larger allocations.
-however at least the num_states*num_tags multiplication can clearly
-overflow in practice. for safety, check them all, and use the proper
-type, size_t, rather than int.
-
-also improve comments, use calloc in place of malloc+memset, and
-remove bogus casts.
-
-Upstream-Status: Backport
-CVE: CVE-2016-8859
-
-Signed-off-by: Armin Kuster 
-

- src/regex/regexec.c | 23 ++-
- 1 file changed, 18 insertions(+), 5 deletions(-)
-
-diff --git a/src/regex/regexec.c b/src/regex/regexec.c
-index 16c5d0a..dd52319 100644
 a/src/regex/regexec.c
-+++ b/src/regex/regexec.c
-@@ -34,6 +34,7 @@
- #include 
- #include 
- #include 
-+#include 
- 
- #include 
- 
-@@ -206,11 +207,24 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void 
*string,
- 
-   /* Allocate memory for temporary data required for matching.This 
needs to
-  be done for every matching operation to be thread safe.  This allocates
-- everything in a single large block from the stack frame using alloca()
-- or with malloc() if alloca is unavailable. */
-+ everything in a single large block with calloc(). */
-   {
--int tbytes, rbytes, pbytes, xbytes, total_bytes;
-+size_t tbytes, rbytes, pbytes, xbytes, total_bytes;
- char *tmp_buf;
-+
-+/* Ensure that tbytes and xbytes*num_states cannot overflow, and that
-+ * they don't contribute more than 1/8 of SIZE_MAX to total_bytes. */
-+if (num_tags > SIZE_MAX/(8 * sizeof(int) * tnfa->num_states))
-+  goto error_exit;
-+
-+/* Likewise check rbytes. */
-+if (tnfa->num_states+1 > SIZE_MAX/(8 * sizeof(*reach_next)))
-+  goto error_exit;
-+
-+/* Likewise check pbytes. */
-+if (tnfa->num_states > SIZE_MAX/(8 * sizeof(*reach_pos)))
-+  goto error_exit;
-+
- /* Compute the length of the block we need. */
- tbytes = sizeof(*tmp_tags) * num_tags;
- rbytes = sizeof(*reach_next) * (tnfa->num_states + 1);
-@@ -221,10 +235,9 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void 
*string,
-   + (rbytes + xbytes * tnfa->num_states) * 2 + tbytes + pbytes;
- 
- /* Allocate the memory. */
--buf = xmalloc((unsigned)total_bytes);
-+buf = calloc(total_bytes, 1);
- if (buf == NULL)
-   return REG_ESPACE;
--memset(buf, 0, (size_t)total_bytes);
- 
- /* Get the various pointers within tmp_buf (properly aligned). */
- tmp_tags = (void *)buf;
--- 
-2.7.4
-
diff --git a/meta/recipes-core/musl/musl_git.bb 
b/meta/recipes-core/musl/musl_git.bb
index 1ee56b6..be5c5af 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -3,7 +3,7 @@
 
 require musl.inc
 
-SRCREV = "39494a273eaa6b714e0fa0c59ce7a1f5fbc80a1e"
+SRCREV = "33ce920857405d4f4b342c85b74588a15e2702e5"
 
 PV = "1.1.15+git${SRCPV}"
 
@@ -11,7 +11,6 @@ PV = "1.1.15+git${SRCPV}"
 
 SRC_URI = "git://git.musl-libc.org/musl \
file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
-   file://CVE-2016-8859.patch \
   "
 
 S = "${WORKDIR}/git"
-- 
2.10.2

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


[OE-core] [PATCH] x264: Update to latest on stable branch

2016-11-07 Thread Khem Raj
- Switch URI to use github mirror for reliabality
- Disable openCL code, its not used
- TEXTRELs are fixed, therefore dont skip QA check

Signed-off-by: Khem Raj 
---
 .../x264/x264/don-t-default-to-cortex-a9-with-neon.patch| 13 ++---
 meta/recipes-multimedia/x264/x264_git.bb|  9 +++--
 2 files changed, 5 insertions(+), 17 deletions(-)

diff --git 
a/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch 
b/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch
index bf72fca..73f2aac 100644
--- 
a/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch
+++ 
b/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch
@@ -5,10 +5,10 @@ Upstream-Status: Pending
 Signed-off-by: Andrei Gherzan 
 
 diff --git a/configure b/configure
-index 2916036..f4ece40 100755
+index 9d1586c..3109ec4 100755
 --- a/configure
 +++ b/configure
-@@ -773,9 +773,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] 
; then
+@@ -874,9 +874,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] 
; then
  fi
  
  if [ $asm = auto -a $ARCH = ARM ] ; then
@@ -18,12 +18,3 @@ index 2916036..f4ece40 100755
  if  cc_check '' '' '__asm__("rev ip, ip");' ; then  define HAVE_ARMV6
  cc_check '' '' '__asm__("movt r0, #0");' && define 
HAVE_ARMV6T2
  cc_check '' '' '__asm__("vadd.i16 q0, q0, q0");' && define HAVE_NEON
-@@ -788,8 +785,6 @@ if [ $asm = auto -a $ARCH = ARM ] ; then
- fi
- 
- if [ $asm = auto -a $ARCH = AARCH64 ] ; then
--# set flags so neon is built by default
--echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu|-arch)' || CFLAGS="$CFLAGS 
-arch arm64 -mfpu=neon"
- 
- if  cc_check '' '' '__asm__("cmeq v0.8h, v0.8h, #0");' ; then define 
HAVE_NEON
- ASFLAGS="$ASFLAGS -c"
diff --git a/meta/recipes-multimedia/x264/x264_git.bb 
b/meta/recipes-multimedia/x264/x264_git.bb
index 393310f..8a239e1 100644
--- a/meta/recipes-multimedia/x264/x264_git.bb
+++ b/meta/recipes-multimedia/x264/x264_git.bb
@@ -8,11 +8,11 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
 DEPENDS = "yasm-native"
 
-SRC_URI = "git://git.videolan.org/x264.git \
+SRC_URI = "git://github.com/mirror/x264;branch=stable \
file://don-t-default-to-cortex-a9-with-neon.patch \
"
 
-SRCREV = "c8a773ebfca148ef04f5a60d42cbd7336af0baf6"
+SRCREV = "86b71982e131eaa70125f8d0e725fcade9c4c677"
 
 PV = "r2491+git${SRCPV}"
 
@@ -34,6 +34,7 @@ EXTRA_OECONF = '--prefix=${prefix} \
 --enable-static \
 --disable-lavf \
 --disable-swscale \
+--disable-opencl \
 --enable-pic \
 ${X264_DISABLE_ASM} \
'
@@ -47,7 +48,3 @@ AS = "${TARGET_PREFIX}gcc"
 do_install() {
 oe_runmake install DESTDIR=${D}
 }
-
-# PIC can't be enabled for few BSP's
-INSANE_SKIP_${PN}_append = " textrel"
-
-- 
2.10.2

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


Re: [OE-core] [OE-Core][Patch 01/13] arch-mips: Add MACHINEOVERRIDES variables to reduce duplication

2016-11-07 Thread Andre McCurdy
On Mon, Nov 7, 2016 at 9:30 AM, Khem Raj  wrote:
>
> On 11/7/16 7:01 AM, Zubair Lutfullah Kakakhel wrote:
>> In some cases, each MIPS variant in a recipe requires a duplicate
>> line. Even if the passed flag is the same.
>>
>> Add global MACHINEOVERRIDES variables for the following
>>  * mipsarch   : All MIPS
>>  * mipsarchr6 : All MIPS R6
>>  * mipsarcho32{el}: All MIPS o32
>>  * mipsarchn32{el}: All MIPS n32
>>  * mipsarchn64{el}: All MIPS n64
>>
>> This is intended to reduce duplications in recipes
>>
>> [YOCTO #10404]
>>
>> Signed-off-by: Zubair Lutfullah Kakakhel 
>> ---
>>  meta/conf/machine/include/mips/arch-mips.inc | 7 +++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/meta/conf/machine/include/mips/arch-mips.inc 
>> b/meta/conf/machine/include/mips/arch-mips.inc
>> index 6069ca1..5b42841 100644
>> --- a/meta/conf/machine/include/mips/arch-mips.inc
>> +++ b/meta/conf/machine/include/mips/arch-mips.inc
>> @@ -50,6 +50,13 @@ MIPSPKGSFX_32R6 = "${@bb.utils.contains('TUNE_FEATURES', 
>> 'mipsisa32r6', 'isa32',
>>  TUNE_ARCH = 
>> "mips${MIPSPKGSFX_32R6}${MIPSPKGSFX_64R6}${MIPSPKGSFX_BYTE}${MIPSPKGSFX_R6}${MIPSPKGSFX_ENDIAN}"
>>  TUNE_PKGARCH = 
>> "${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}"
>>
>> +# Various Global Machine Overrides
>> +MACHINEOVERRIDES =. "mipsarch:"
>> +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'r6', 
>> 'mipsarchr6:', '' ,d)}"
>> +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'n32', 
>> 'mipsarchn32${MIPSPKGSFX_ENDIAN}:', '' ,d)}"
>> +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'o32', 
>> 'mipsarcho32${MIPSPKGSFX_ENDIAN}:', '' ,d)}"
>> +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'n64', 
>> 'mipsarch64${MIPSPKGSFX_ENDIAN}:', '' ,d)}"
>
> how about mips16 ?

We explicitly removed _thumb as an over-ride for ARM, so adding the
equivalent for MIPS would be odd, unless you see a clear need for it?

  
http://git.openembedded.org/openembedded-core/commit/?id=351443d71eb246a946b41f12b54d57b36fe1574e

>> +
>>  # Base tunes
>>  AVAILTUNES += "mips mips64-n32 mips64 mipsel mips64el-n32 mips64el mips-nf 
>> mips64-nf-n32 mips64-nf mipsel-nf mips64el-nf-n32 mips64el-nf"
>>  TUNE_FEATURES_tune-mips = "o32 bigendian fpu-hard"
>>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] mkefidisk.sh: add deprecation warning to the output

2016-11-07 Thread Khem Raj


On 11/7/16 3:00 PM, Ed Bartosh wrote:
> On Thu, Nov 03, 2016 at 02:42:39PM -0700, Khem Raj wrote:
>>
>>> On Oct 31, 2016, at 3:46 AM, Ed Bartosh  wrote:
>>>
>>> mkefidisk.sh will soon be deprecated in favor of .wic images.
>>>
>>> Added deprecation warning to the script to inform users that
>>> this script will soon be removed from the codebase.
>>>
>>> Signed-off-by: Ed Bartosh 
>>> ---
>>> scripts/contrib/mkefidisk.sh | 5 +
>>> 1 file changed, 5 insertions(+)
>>>
>>> diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
>>> index d8db3c0..a175895 100755
>>> --- a/scripts/contrib/mkefidisk.sh
>>> +++ b/scripts/contrib/mkefidisk.sh
>>> @@ -20,6 +20,11 @@
>>>
>>> LANG=C
>>>
>>> +echo
>>> +echo "WARNING: This script is deprecated and will be removed soon."
>>> +echo "Please consider using wic EFI images instead."
>>> +echo
>>> +
>>
>> is .wic image dd’able directly ?
> Yes, they are.
> 
>> We should also document, the wic steps in wiki pages e.g. 
>> http://wiki.minnowboard.org/Yocto_Project
> It's already documented in README.hardware: 
> https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/README.hardware
> 
> And in Yocto manual:
> http://www.yoctoproject.org/docs/2.2/mega-manual/mega-manual.html#building-an-image-for-hardware

Thanks, now can you also nudge the minnowboard.org to do the same ?

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


Re: [OE-core] [PATCH] mkefidisk.sh: add deprecation warning to the output

2016-11-07 Thread Ed Bartosh
On Thu, Nov 03, 2016 at 07:23:24PM -0700, Christopher Larson wrote:
> On Thu, Nov 3, 2016 at 2:42 PM, Khem Raj  wrote:
> 
> > > On Oct 31, 2016, at 3:46 AM, Ed Bartosh 
> > wrote:
> > >
> > > mkefidisk.sh will soon be deprecated in favor of .wic images.
> > >
> > > Added deprecation warning to the script to inform users that
> > > this script will soon be removed from the codebase.
> > >
> > > Signed-off-by: Ed Bartosh 
> > > ---
> > > scripts/contrib/mkefidisk.sh | 5 +
> > > 1 file changed, 5 insertions(+)
> > >
> > > diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
> > > index d8db3c0..a175895 100755
> > > --- a/scripts/contrib/mkefidisk.sh
> > > +++ b/scripts/contrib/mkefidisk.sh
> > > @@ -20,6 +20,11 @@
> > >
> > > LANG=C
> > >
> > > +echo
> > > +echo "WARNING: This script is deprecated and will be removed soon."
> > > +echo "Please consider using wic EFI images instead."
> > > +echo
> > > +
> >
> > is .wic image dd’able directly ?
> >
> 
> Yes, that’s the point :) Though I prefer bmaptool w/ IMAGE_FSTYPES +=
> “wic.bmap” personally, don’t have to rely on the file keeping its
> sparseness when scp’ing it around and whatnot.

Recommending bmaptool as a preferred way of flashing is in the plans :)

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


Re: [OE-core] [PATCH] mkefidisk.sh: add deprecation warning to the output

2016-11-07 Thread Ed Bartosh
On Thu, Nov 03, 2016 at 02:42:39PM -0700, Khem Raj wrote:
> 
> > On Oct 31, 2016, at 3:46 AM, Ed Bartosh  wrote:
> > 
> > mkefidisk.sh will soon be deprecated in favor of .wic images.
> > 
> > Added deprecation warning to the script to inform users that
> > this script will soon be removed from the codebase.
> > 
> > Signed-off-by: Ed Bartosh 
> > ---
> > scripts/contrib/mkefidisk.sh | 5 +
> > 1 file changed, 5 insertions(+)
> > 
> > diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
> > index d8db3c0..a175895 100755
> > --- a/scripts/contrib/mkefidisk.sh
> > +++ b/scripts/contrib/mkefidisk.sh
> > @@ -20,6 +20,11 @@
> > 
> > LANG=C
> > 
> > +echo
> > +echo "WARNING: This script is deprecated and will be removed soon."
> > +echo "Please consider using wic EFI images instead."
> > +echo
> > +
> 
> is .wic image dd’able directly ?
Yes, they are.

> We should also document, the wic steps in wiki pages e.g. 
> http://wiki.minnowboard.org/Yocto_Project
It's already documented in README.hardware: 
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/README.hardware

And in Yocto manual:
http://www.yoctoproject.org/docs/2.2/mega-manual/mega-manual.html#building-an-image-for-hardware

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


[OE-core] [PATCH 1/4] lib/oe/path: remove duplicate import

2016-11-07 Thread Joshua Lock
There's no need to import glob inside copyhardlinktree() as it's
already imported for the entire path module.

Signed-off-by: Joshua Lock 
---
 meta/lib/oe/path.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py
index 06a5af2..f73fd4a 100644
--- a/meta/lib/oe/path.py
+++ b/meta/lib/oe/path.py
@@ -81,7 +81,6 @@ def copyhardlinktree(src, dst):
 subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
 source = ''
 if os.path.isdir(src):
-import glob
 if len(glob.glob('%s/.??*' % src)) > 0:
 source = '%s/.??* ' % src
 source = source + '%s/*' % src
-- 
2.7.4

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


[OE-core] [PATCH 3/4] lib/oe/lsb: prefer /etc/os-release for distribution data

2016-11-07 Thread Joshua Lock
os-release(5) is an increasingly standard source of operating system
identification and more likely to be present on modern OS deployments, i.e.
many container variants of common distros include os-release and not the
lsb_release tool.

Therefore we should favour parsing /etc/os-release in distro_identifier(),
try lsb_release when that fails and finally fall back on various distro
specific sources of OS identification.

Signed-off-by: Joshua Lock 
---
 meta/lib/oe/lsb.py | 34 +-
 1 file changed, 25 insertions(+), 9 deletions(-)

diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index 0bb7686..bdc893f 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -1,3 +1,22 @@
+def release_dict_osr():
+""" Populate a dict with pertinent values from /etc/os-release """
+if not os.path.exists('/etc/os-release'):
+return None
+
+data = {}
+with open('/etc/os-release') as f:
+for line in f:
+key, val = line.rstrip().split('=', 1)
+if key == 'NAME':
+data['DISTRIB_ID'] = val
+if key == 'VERSION_ID':
+data['DISTRIB_RELEASE'] = val
+
+if len(data.keys()) != 2:
+return None
+
+return data
+
 def release_dict_lsb():
 """ Return the output of lsb_release -ir as a dictionary """
 from subprocess import PIPE
@@ -46,14 +65,6 @@ def release_dict_file():
 if match:
 data['DISTRIB_ID'] = match.group(1)
 data['DISTRIB_RELEASE'] = match.group(2)
-elif os.path.exists('/etc/os-release'):
-data = {}
-with open('/etc/os-release') as f:
-for line in f:
-if line.startswith('NAME='):
-data['DISTRIB_ID'] = line[5:].rstrip().strip('"')
-if line.startswith('VERSION_ID='):
-data['DISTRIB_RELEASE'] = line[11:].rstrip().strip('"')
 elif os.path.exists('/etc/SuSE-release'):
 data = {}
 data['DISTRIB_ID'] = 'SUSE LINUX'
@@ -73,7 +84,12 @@ def distro_identifier(adjust_hook=None):
 
 import re
 
-distro_data = release_dict_lsb()
+# Try /etc/os-release first, then the output of `lsb_release -ir` and
+# finally fall back on parsing various release files in order to determine
+# host distro name and version.
+distro_data = release_dict_osr()
+if not distro_data:
+distro_data = release_dict_lsb()
 if not distro_data:
 distro_data = release_dict_file()
 
-- 
2.7.4

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


[OE-core] [PATCH 2/4] lib/oe/lsb: make the release dict keys consistent regardless of source

2016-11-07 Thread Joshua Lock
Rather than have the distro_identifier method look for different keys in
the dict depending on the source ensure that each function for retrieving
release data uses the same key names in the returned dict.

Signed-off-by: Joshua Lock 
---
 meta/lib/oe/lsb.py | 36 +---
 1 file changed, 21 insertions(+), 15 deletions(-)

diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index e0bdfba..0bb7686 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -1,5 +1,5 @@
-def release_dict():
-"""Return the output of lsb_release -ir as a dictionary"""
+def release_dict_lsb():
+""" Return the output of lsb_release -ir as a dictionary """
 from subprocess import PIPE
 
 try:
@@ -7,19 +7,28 @@ def release_dict():
 except bb.process.CmdError as exc:
 return None
 
+lsb_map = { 'Distributor ID': 'DISTRIB_ID',
+'Release': 'DISTRIB_RELEASE'}
+lsb_keys = lsb_map.keys()
+
 data = {}
 for line in output.splitlines():
-if line.startswith("-e"): line = line[3:]
+if line.startswith("-e"):
+line = line[3:]
 try:
 key, value = line.split(":\t", 1)
 except ValueError:
 continue
-else:
-data[key] = value
+if key in lsb_keys:
+data[lsb_map[key]] = value
+
+if len(data.keys()) != 2:
+return None
+
 return data
 
 def release_dict_file():
-""" Try to gather LSB release information manually when lsb_release tool 
is unavailable """
+""" Try to gather release information manually when other methods fail """
 data = None
 try:
 if os.path.exists('/etc/lsb-release'):
@@ -64,15 +73,12 @@ def distro_identifier(adjust_hook=None):
 
 import re
 
-lsb_data = release_dict()
-if lsb_data:
-distro_id, release = lsb_data['Distributor ID'], lsb_data['Release']
-else:
-lsb_data_file = release_dict_file()
-if lsb_data_file:
-distro_id, release = lsb_data_file['DISTRIB_ID'], 
lsb_data_file.get('DISTRIB_RELEASE', None)
-else:
-distro_id, release = None, None
+distro_data = release_dict_lsb()
+if not distro_data:
+distro_data = release_dict_file()
+
+distro_id = distro_data['DISTRIB_ID']
+release = distro_data['DISTRIB_RELEASE']
 
 if adjust_hook:
 distro_id, release = adjust_hook(distro_id, release)
-- 
2.7.4

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


[OE-core] [PATCH 0/4] Make oe.lsb.distro_identifier() more consistent

2016-11-07 Thread Joshua Lock
The oe.lsb.distro_identifier() method call will return different identification
information depending on the source which is found to provide that information.

This series attempts to address this in two ways:
1) preferring os-release(5) as the source of distribution identification. this
  increasingly common standard mechanism is available on each of the build host
  distributions we commonly test on.
2) converting the distribution identifier to lower case before including it in
  the distro_identifier return value. This ensures that, for most of the tested
  distros, the identifier returned via the LSB code paths matches that returned
  by the os-release code paths.

The following changes since commit 98c6ebf1e05158c689e01b785d32757847cdb10c:

  oeqa/selftest/kernel.py: Add new file destined for kernel related tests 
(2016-11-01 10:05:40 +)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib joshuagl/liboe
  
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=joshuagl/liboe

Joshua Lock (4):
  lib/oe/path: remove duplicate import
  lib/oe/lsb: make the release dict keys consistent regardless of source
  lib/oe/lsb: prefer /etc/os-release for distribution data
  lib/oe/lsb: attempt to ensure consistent distro id regardless of
source

 meta/lib/oe/lsb.py  | 70 +++--
 meta/lib/oe/path.py |  1 -
 2 files changed, 46 insertions(+), 25 deletions(-)

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


[OE-core] [PATCH 4/4] lib/oe/lsb: attempt to ensure consistent distro id regardless of source

2016-11-07 Thread Joshua Lock
The LSB Distributor ID and os-release NAME differ for most of the
distributions tested by the Yocto Project (CentOS, Debian, Fedora,
openSUSE and Ubuntu) however for all but openSUSE the os-release ID
matches the LSB Distributor ID when both are lowered before
comparison.

Therefore, in order to improve the consistency of identification of
a distribution, switch to using the os-release ID and converting
the ID value to lowercase.

Table showing comparison of LSB Distributor ID to os-release fields NAME
and ID for current Yocto Project supported host distributions:

Distribution | Version | Distributor ID   | NAME | ID   |
-
CentOS   | 7   | CentOS   | CentOS Linux | centos   |
Debian   | 8   | Debian   | Debian GNU/Linux | debian   |
Fedora   | 23  | Fedora   | Fedora   | fedora   |
Fedora   | 24  | Fedora   | Fedora   | fedora   |
openSUSE | 13.2| openSUSE project | openSUSE | opensuse |
openSUSE | 42.1| SUSE LINUX   | openSUSE Leap| opensuse |
Ubuntu   | 14.04   | Ubuntu   | Ubuntu   | ubuntu   |
Ubuntu   | 16.04   | Ubuntu   | Ubuntu   | ubuntu   |

[YOCTO #10591]

Signed-off-by: Joshua Lock 
---
 meta/lib/oe/lsb.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index bdc893f..cd43731 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -7,7 +7,7 @@ def release_dict_osr():
 with open('/etc/os-release') as f:
 for line in f:
 key, val = line.rstrip().split('=', 1)
-if key == 'NAME':
+if key == 'ID':
 data['DISTRIB_ID'] = val
 if key == 'VERSION_ID':
 data['DISTRIB_RELEASE'] = val
@@ -104,7 +104,7 @@ def distro_identifier(adjust_hook=None):
 distro_id = re.sub(r'\W', '', distro_id)
 
 if release:
-id_str = '{0}-{1}'.format(distro_id, release)
+id_str = '{0}-{1}'.format(distro_id.lower(), release)
 else:
 id_str = distro_id
 return id_str.replace(' ','-').replace('/','-')
-- 
2.7.4

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


Re: [OE-core] [PATCH] u-boot: mkimage: Fix build of u-boot-mkimage

2016-11-07 Thread Jussi Kukkonen
On 7 November 2016 at 20:20, Marek Vasut  wrote:

> The build failed on qemux86-64 because it couldn't execute
> tools/bin2header on a host due to it being compiled with target
> toolchain. Drop the incorrect EXTRA_OEMAKE, U-Boot Kbuild/Kconfig
> respects the flags from OE. Moreover, since U-Boot buildsystem
> already strips the tools, add INSANE_SKIP = "already-stripped" .
>

The INSANE_SKIP mentioned here is no longer included in the patch.


Signed-off-by: Marek Vasut 
> Cc: Ross Burton 
> ---
>  meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb | 11 ++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb
> b/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb
> index 5025961..8adc1e6 100644
> --- a/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb
> +++ b/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb
> @@ -3,10 +3,19 @@ require u-boot-common_${PV}.inc
>  SUMMARY = "U-Boot bootloader image creation tool"
>  DEPENDS = "openssl"
>
> -EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS}
> ${LDFLAGS}" STRIP=true V=1'
> +EXTRA_OEMAKE = 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
> +EXTRA_OEMAKE_append_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}"
> CC="${CC} ${CFLAGS} ${LDFLAGS}" STRIP=true V=1'
> +EXTRA_OEMAKE_append_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS}
> ${BUILD_LDFLAGS}" STRIP=true V=1'
> +EXTRA_OEMAKE_append_class-nativesdk = 'CC="${BUILD_CC} ${BUILD_CFLAGS}
> ${BUILD_LDFLAGS}" STRIP=true V=1'
>
>  do_compile () {
> oe_runmake sandbox_defconfig
> +
> +   # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and
> +   # generating it requires bin2header tool, which for target build
> +   # is built with target tools and thus cannot be executed on host.
> +   sed -i "s/CONFIG_CMD_LICENSE.*/# CONFIG_CMD_LICENSE is not set/"
> .config
> +
> oe_runmake cross_tools NO_SDL=1
>  }
>
> --
> 2.9.3
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] u-boot: mkimage: Fix build of u-boot-mkimage

2016-11-07 Thread Burton, Ross
On 7 November 2016 at 20:15, Burton, Ross  wrote:

> Looking at the makefile this isn't the case - it's part of hostprogs so if
> anyone of the host-built tools work, they all should.
>

Just verified that the HOSTCC changes in this patch make it work for me
even after removing the sed.  Can you send a revision?

Also the u-boot series went through a number of revisions, can you verify
that the patches in poky-contrib:ross/mut match what you expect to see?

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


Re: [OE-core] [PATCH] u-boot: mkimage: Fix build of u-boot-mkimage

2016-11-07 Thread Burton, Ross
On 7 November 2016 at 18:20, Marek Vasut  wrote:

> +   # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and
> +   # generating it requires bin2header tool, which for target build
> +   # is built with target tools and thus cannot be executed on host.
> +   sed -i "s/CONFIG_CMD_LICENSE.*/# CONFIG_CMD_LICENSE is not set/"
> .config
>

Looking at the makefile this isn't the case - it's part of hostprogs so if
anyone of the host-built tools work, they all should.

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


[OE-core] [PATCH] u-boot: mkimage: Fix build of u-boot-mkimage

2016-11-07 Thread Marek Vasut
The build failed on qemux86-64 because it couldn't execute
tools/bin2header on a host due to it being compiled with target
toolchain. Drop the incorrect EXTRA_OEMAKE, U-Boot Kbuild/Kconfig
respects the flags from OE. Moreover, since U-Boot buildsystem
already strips the tools, add INSANE_SKIP = "already-stripped" .

Signed-off-by: Marek Vasut 
Cc: Ross Burton 
---
 meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb 
b/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb
index 5025961..8adc1e6 100644
--- a/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb
+++ b/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb
@@ -3,10 +3,19 @@ require u-boot-common_${PV}.inc
 SUMMARY = "U-Boot bootloader image creation tool"
 DEPENDS = "openssl"
 
-EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} 
${LDFLAGS}" STRIP=true V=1'
+EXTRA_OEMAKE = 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
+EXTRA_OEMAKE_append_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} 
${CFLAGS} ${LDFLAGS}" STRIP=true V=1'
+EXTRA_OEMAKE_append_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} 
${BUILD_LDFLAGS}" STRIP=true V=1'
+EXTRA_OEMAKE_append_class-nativesdk = 'CC="${BUILD_CC} ${BUILD_CFLAGS} 
${BUILD_LDFLAGS}" STRIP=true V=1'
 
 do_compile () {
oe_runmake sandbox_defconfig
+
+   # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and
+   # generating it requires bin2header tool, which for target build
+   # is built with target tools and thus cannot be executed on host.
+   sed -i "s/CONFIG_CMD_LICENSE.*/# CONFIG_CMD_LICENSE is not set/" .config
+
oe_runmake cross_tools NO_SDL=1
 }
 
-- 
2.9.3

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


Re: [OE-core] [PATCH] packagegroup-core-sdk: Disable sanitizers for mips64el

2016-11-07 Thread Burton, Ross
On 7 November 2016 at 08:15,  wrote:

> These are not available on mips64el yet, so disable them.
>

This was just superseded by the MIPS arch override, so this won't be
applied.

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


Re: [OE-core] [OE-Core][Patch 00/13] MIPS: Use MACHINEOVERRIDES and reduce duplication

2016-11-07 Thread Khem Raj


On 11/7/16 8:05 AM, Mark Hatle wrote:
> 
> I've looked over the set, it all looks reasonable to me.

Its an improvement definitely, however we should address
the endianness issue while we are here.

> 
> Acked-by: Mark Hatle 
> 
> --Mark
> 
> On 11/7/16 9:01 AM, Zubair Lutfullah Kakakhel wrote:
>> Hi,
>>
>> This patch series adds a few MACHINEOVERRIDES options in arch-mips
>> to reduce duplicate configurations in various recipes.
>>
>> Further info in 
>> https://bugzilla.yoctoproject.org/show_bug.cgi?id=10404
>>
>> Regards,
>> ZubairLK
>>
>> Zubair Lutfullah Kakakhel (13):
>>   arch-mips: Add MACHINEOVERRIDES variables to reduce duplication
>>   bitbake.conf: Reduce duplication in MIPS variants
>>   fts: Reduce duplication in MIPS variants.
>>   glibc: Reduce duplication in MIPS variants
>>   packagegroup: Reduce duplication in MIPS variants.
>>   gcc-runtime: Reduce duplication in MIPS variants.
>>   gdb: Reduce duplication in MIPS variants.
>>   mmc-utils: Reduce duplication in MIPS variants.
>>   valgrind: Reduce duplication in MIPS variants.
>>   ghostscript: Reduce duplication in MIPS variants.
>>   ltp: Reduce duplication in MIPS variants.
>>   mdadm: Reduce duplication in MIPS variants.
>>   webkit: Reduce duplication in MIPS variants.
>>
>>  meta/conf/bitbake.conf  | 11 +--
>>  meta/conf/machine/include/mips/arch-mips.inc|  7 +++
>>  meta/recipes-core/fts/fts.bb|  5 +
>>  meta/recipes-core/glibc/glibc-ld.inc| 17 
>> ++---
>>  .../recipes-core/packagegroups/packagegroup-core-sdk.bb |  5 +
>>  .../packagegroups/packagegroup-core-tools-profile.bb| 10 ++
>>  meta/recipes-devtools/gcc/gcc-runtime.inc   |  9 +
>>  meta/recipes-devtools/gdb/gdb-common.inc|  7 +--
>>  meta/recipes-devtools/mmc/mmc-utils_git.bb  |  6 --
>>  meta/recipes-devtools/valgrind/valgrind_3.12.0.bb   |  3 +--
>>  meta/recipes-extended/ghostscript/ghostscript_9.19.bb   |  4 ++--
>>  meta/recipes-extended/ltp/ltp_20160126.bb   |  3 ++-
>>  meta/recipes-extended/mdadm/mdadm_3.4.bb|  6 --
>>  meta/recipes-sato/webkit/webkitgtk_2.14.1.bb|  3 +--
>>  14 files changed, 30 insertions(+), 66 deletions(-)
>>
> 
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-Core][Patch 01/13] arch-mips: Add MACHINEOVERRIDES variables to reduce duplication

2016-11-07 Thread Khem Raj


On 11/7/16 7:01 AM, Zubair Lutfullah Kakakhel wrote:
> In some cases, each MIPS variant in a recipe requires a duplicate
> line. Even if the passed flag is the same.
> 
> Add global MACHINEOVERRIDES variables for the following
>  * mipsarch   : All MIPS
>  * mipsarchr6 : All MIPS R6
>  * mipsarcho32{el}: All MIPS o32
>  * mipsarchn32{el}: All MIPS n32
>  * mipsarchn64{el}: All MIPS n64
> 
> This is intended to reduce duplications in recipes
> 
> [YOCTO #10404]
> 
> Signed-off-by: Zubair Lutfullah Kakakhel 
> ---
>  meta/conf/machine/include/mips/arch-mips.inc | 7 +++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/meta/conf/machine/include/mips/arch-mips.inc 
> b/meta/conf/machine/include/mips/arch-mips.inc
> index 6069ca1..5b42841 100644
> --- a/meta/conf/machine/include/mips/arch-mips.inc
> +++ b/meta/conf/machine/include/mips/arch-mips.inc
> @@ -50,6 +50,13 @@ MIPSPKGSFX_32R6 = "${@bb.utils.contains('TUNE_FEATURES', 
> 'mipsisa32r6', 'isa32',
>  TUNE_ARCH = 
> "mips${MIPSPKGSFX_32R6}${MIPSPKGSFX_64R6}${MIPSPKGSFX_BYTE}${MIPSPKGSFX_R6}${MIPSPKGSFX_ENDIAN}"
>  TUNE_PKGARCH = 
> "${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}"
>  
> +# Various Global Machine Overrides
> +MACHINEOVERRIDES =. "mipsarch:"
> +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'r6', 
> 'mipsarchr6:', '' ,d)}"
> +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'n32', 
> 'mipsarchn32${MIPSPKGSFX_ENDIAN}:', '' ,d)}"
> +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'o32', 
> 'mipsarcho32${MIPSPKGSFX_ENDIAN}:', '' ,d)}"
> +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'n64', 
> 'mipsarch64${MIPSPKGSFX_ENDIAN}:', '' ,d)}"

how about mips16 ?

> +
>  # Base tunes
>  AVAILTUNES += "mips mips64-n32 mips64 mipsel mips64el-n32 mips64el mips-nf 
> mips64-nf-n32 mips64-nf mipsel-nf mips64el-nf-n32 mips64el-nf"
>  TUNE_FEATURES_tune-mips = "o32 bigendian fpu-hard"
> 
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-Core][Patch 10/13] ghostscript: Reduce duplication in MIPS variants.

2016-11-07 Thread Khem Raj


On 11/7/16 7:01 AM, Zubair Lutfullah Kakakhel wrote:
> Reduce duplication in MIPS variants now that the MACHINEOVERRIDES
> variable is defined
> 
> Signed-off-by: Zubair Lutfullah Kakakhel 
> ---
>  meta/recipes-extended/ghostscript/ghostscript_9.19.bb | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.19.bb 
> b/meta/recipes-extended/ghostscript/ghostscript_9.19.bb
> index fe2016b..52f6fe3 100644
> --- a/meta/recipes-extended/ghostscript/ghostscript_9.19.bb
> +++ b/meta/recipes-extended/ghostscript/ghostscript_9.19.bb
> @@ -46,8 +46,8 @@ EXTRA_OECONF = "--without-x --with-system-libtiff 
> --without-jbig2dec \
>  --with-cups-datadir=${datadir}/cups \
>  "
>  
> -EXTRA_OECONF_append_mips = " --with-large_color_index=0"
> -EXTRA_OECONF_append_mipsel = " --with-large_color_index=0"
> +EXTRA_OECONF_append_mipsarcho32 = " --with-large_color_index=0"
> +EXTRA_OECONF_append_mipsarcho32el = " --with-large_color_index=0"

Now that you have opened the pandora box
Can there be something like

mipsarch = "common for LE and BE"
mipsarcheb = "BE"
mipsarchel = "LE"

most of the times options are endian independent but LE suffers because its
not default and we assume without qualifying endianness its BE

>  
>  # Explicity disable libtiff, fontconfig,
>  # freetype, cups for ghostscript-native
> 
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] packagegroup-core-sdk: Disable sanitizers for mips64el

2016-11-07 Thread Khem Raj


On 11/7/16 12:15 AM, jackie.hu...@windriver.com wrote:
> From: Jackie Huang 
> 
> These are not available on mips64el yet, so disable them.

this is ok

> 
> Signed-off-by: Jackie Huang 
> ---
>  meta/recipes-core/packagegroups/packagegroup-core-sdk.bb | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb 
> b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
> index aceba78..9c4ea9b 100644
> --- a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
> +++ b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
> @@ -31,6 +31,7 @@ SANITIZERS_aarch64 = ""
>  SANITIZERS_mips = ""
>  SANITIZERS_mipsel = ""
>  SANITIZERS_mips64 = ""
> +SANITIZERS_mips64el = ""
>  SANITIZERS_mips64n32 = ""
>  SANITIZERS_nios2 = ""
>  SANITIZERS_powerpc64 = ""
> 
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] musl: Upgrade to master tip

2016-11-07 Thread Khem Raj
Drop backported patch

Signed-off-by: Khem Raj 
---
 meta/recipes-core/musl/files/CVE-2016-8859.patch | 79 
 meta/recipes-core/musl/musl_git.bb   |  3 +-
 2 files changed, 1 insertion(+), 81 deletions(-)
 delete mode 100644 meta/recipes-core/musl/files/CVE-2016-8859.patch

diff --git a/meta/recipes-core/musl/files/CVE-2016-8859.patch 
b/meta/recipes-core/musl/files/CVE-2016-8859.patch
deleted file mode 100644
index 82da86f..000
--- a/meta/recipes-core/musl/files/CVE-2016-8859.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From c3edc06d1e1360f3570db9155d6b318ae0d0f0f7 Mon Sep 17 00:00:00 2001
-From: Rich Felker 
-Date: Thu, 6 Oct 2016 18:34:58 -0400
-Subject: [PATCH] fix missing integer overflow checks in regexec buffer size
- computations
-
-most of the possible overflows were already ruled out in practice by
-regcomp having already succeeded performing larger allocations.
-however at least the num_states*num_tags multiplication can clearly
-overflow in practice. for safety, check them all, and use the proper
-type, size_t, rather than int.
-
-also improve comments, use calloc in place of malloc+memset, and
-remove bogus casts.
-
-Upstream-Status: Backport
-CVE: CVE-2016-8859
-
-Signed-off-by: Armin Kuster 
-

- src/regex/regexec.c | 23 ++-
- 1 file changed, 18 insertions(+), 5 deletions(-)
-
-diff --git a/src/regex/regexec.c b/src/regex/regexec.c
-index 16c5d0a..dd52319 100644
 a/src/regex/regexec.c
-+++ b/src/regex/regexec.c
-@@ -34,6 +34,7 @@
- #include 
- #include 
- #include 
-+#include 
- 
- #include 
- 
-@@ -206,11 +207,24 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void 
*string,
- 
-   /* Allocate memory for temporary data required for matching.This 
needs to
-  be done for every matching operation to be thread safe.  This allocates
-- everything in a single large block from the stack frame using alloca()
-- or with malloc() if alloca is unavailable. */
-+ everything in a single large block with calloc(). */
-   {
--int tbytes, rbytes, pbytes, xbytes, total_bytes;
-+size_t tbytes, rbytes, pbytes, xbytes, total_bytes;
- char *tmp_buf;
-+
-+/* Ensure that tbytes and xbytes*num_states cannot overflow, and that
-+ * they don't contribute more than 1/8 of SIZE_MAX to total_bytes. */
-+if (num_tags > SIZE_MAX/(8 * sizeof(int) * tnfa->num_states))
-+  goto error_exit;
-+
-+/* Likewise check rbytes. */
-+if (tnfa->num_states+1 > SIZE_MAX/(8 * sizeof(*reach_next)))
-+  goto error_exit;
-+
-+/* Likewise check pbytes. */
-+if (tnfa->num_states > SIZE_MAX/(8 * sizeof(*reach_pos)))
-+  goto error_exit;
-+
- /* Compute the length of the block we need. */
- tbytes = sizeof(*tmp_tags) * num_tags;
- rbytes = sizeof(*reach_next) * (tnfa->num_states + 1);
-@@ -221,10 +235,9 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void 
*string,
-   + (rbytes + xbytes * tnfa->num_states) * 2 + tbytes + pbytes;
- 
- /* Allocate the memory. */
--buf = xmalloc((unsigned)total_bytes);
-+buf = calloc(total_bytes, 1);
- if (buf == NULL)
-   return REG_ESPACE;
--memset(buf, 0, (size_t)total_bytes);
- 
- /* Get the various pointers within tmp_buf (properly aligned). */
- tmp_tags = (void *)buf;
--- 
-2.7.4
-
diff --git a/meta/recipes-core/musl/musl_git.bb 
b/meta/recipes-core/musl/musl_git.bb
index 1ee56b6..63f3334 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -3,7 +3,7 @@
 
 require musl.inc
 
-SRCREV = "39494a273eaa6b714e0fa0c59ce7a1f5fbc80a1e"
+SRCREV = "7597fc25a2743d49500926a286da71f8e033936c"
 
 PV = "1.1.15+git${SRCPV}"
 
@@ -11,7 +11,6 @@ PV = "1.1.15+git${SRCPV}"
 
 SRC_URI = "git://git.musl-libc.org/musl \
file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
-   file://CVE-2016-8859.patch \
   "
 
 S = "${WORKDIR}/git"
-- 
2.10.2

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


[OE-core] [PATCH][V2] lib/oe/qa: handle binaries with segments outside the first 4kb

2016-11-07 Thread Ross Burton
The ELF parser was assuming that the segment tables are in the first 4kb of the
binary.  Whilst this generally appears to be the case, there have been instances
where the segment table is elsewhere (offset 2MB, in this sample I have).  Solve
this problem by mmap()ing the file instead.

Also clean up the code a little whilst chasing the problem.

Signed-off-by: Ross Burton 
---
 meta/lib/oe/qa.py | 82 +++
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
index fbe719d..22d76dc 100644
--- a/meta/lib/oe/qa.py
+++ b/meta/lib/oe/qa.py
@@ -1,4 +1,4 @@
-import os, struct
+import os, struct, mmap
 
 class NotELFFileError(Exception):
 pass
@@ -23,9 +23,9 @@ class ELFFile:
 EV_CURRENT   = 1
 
 # possible values for EI_DATA
-ELFDATANONE  = 0
-ELFDATA2LSB  = 1
-ELFDATA2MSB  = 2
+EI_DATA_NONE  = 0
+EI_DATA_LSB  = 1
+EI_DATA_MSB  = 2
 
 PT_INTERP = 3
 
@@ -34,51 +34,46 @@ class ELFFile:
 #print "'%x','%x' %s" % (ord(expectation), ord(result), self.name)
 raise NotELFFileError("%s is not an ELF" % self.name)
 
-def __init__(self, name, bits = 0):
+def __init__(self, name):
 self.name = name
-self.bits = bits
 self.objdump_output = {}
 
-def open(self):
-if not os.path.isfile(self.name):
-raise NotELFFileError("%s is not a normal file" % self.name)
+# Context Manager functions to close the mmap explicitly
+def __enter__(self):
+return self
+
+def __exit__(self, exc_type, exc_value, traceback):
+self.data.close()
 
+def open(self):
 with open(self.name, "rb") as f:
-# Read 4k which should cover most of the headers we're after
-self.data = f.read(4096)
+try:
+self.data = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
+except ValueError:
+# This means the file is empty
+raise NotELFFileError("%s is empty" % self.name)
 
+# Check the file has the minimum number of ELF table entries
 if len(self.data) < ELFFile.EI_NIDENT + 4:
 raise NotELFFileError("%s is not an ELF" % self.name)
 
+# ELF header
 self.my_assert(self.data[0], 0x7f)
 self.my_assert(self.data[1], ord('E'))
 self.my_assert(self.data[2], ord('L'))
 self.my_assert(self.data[3], ord('F'))
-if self.bits == 0:
-if self.data[ELFFile.EI_CLASS] == ELFFile.ELFCLASS32:
-self.bits = 32
-elif self.data[ELFFile.EI_CLASS] == ELFFile.ELFCLASS64:
-self.bits = 64
-else:
-# Not 32-bit or 64.. lets assert
-raise NotELFFileError("ELF but not 32 or 64 bit.")
-elif self.bits == 32:
-self.my_assert(self.data[ELFFile.EI_CLASS], ELFFile.ELFCLASS32)
-elif self.bits == 64:
-self.my_assert(self.data[ELFFile.EI_CLASS], ELFFile.ELFCLASS64)
+if self.data[ELFFile.EI_CLASS] == ELFFile.ELFCLASS32:
+self.bits = 32
+elif self.data[ELFFile.EI_CLASS] == ELFFile.ELFCLASS64:
+self.bits = 64
 else:
-raise NotELFFileError("Must specify unknown, 32 or 64 bit size.")
+# Not 32-bit or 64.. lets assert
+raise NotELFFileError("ELF but not 32 or 64 bit.")
 self.my_assert(self.data[ELFFile.EI_VERSION], ELFFile.EV_CURRENT)
 
-self.sex = self.data[ELFFile.EI_DATA]
-if self.sex == ELFFile.ELFDATANONE:
-raise NotELFFileError("self.sex == ELFDATANONE")
-elif self.sex == ELFFile.ELFDATA2LSB:
-self.sex = "<"
-elif self.sex == ELFFile.ELFDATA2MSB:
-self.sex = ">"
-else:
-raise NotELFFileError("Unknown self.sex")
+self.endian = self.data[ELFFile.EI_DATA]
+if self.endian not in (ELFFile.EI_DATA_LSB, ELFFile.EI_DATA_MSB):
+raise NotELFFileError("Unexpected EI_DATA %x" % self.endian)
 
 def osAbi(self):
 return self.data[ELFFile.EI_OSABI]
@@ -90,16 +85,20 @@ class ELFFile:
 return self.bits
 
 def isLittleEndian(self):
-return self.sex == "<"
+return self.endian == ELFFile.EI_DATA_LSB
 
 def isBigEndian(self):
-return self.sex == ">"
+return self.endian == ELFFile.EI_DATA_MSB
+
+def getStructEndian(self):
+return {ELFFile.EI_DATA_LSB: "<",
+ELFFile.EI_DATA_MSB: ">"}[self.endian]
 
 def getShort(self, offset):
-return struct.unpack_from(self.sex+"H", self.data, offset)[0]
+return struct.unpack_from(self.getStructEndian() + "H", self.data, 
offset)[0]
 
 def getWord(self, offset):
-return struct.unpack_from(self.sex+"i", self.data, offset)[0]
+return struct.unpack_from(self.getStructEndian() + "i", self.data, 
offset)[0]
 

Re: [OE-core] [OE-Core][Patch 00/13] MIPS: Use MACHINEOVERRIDES and reduce duplication

2016-11-07 Thread Mark Hatle

I've looked over the set, it all looks reasonable to me.

Acked-by: Mark Hatle 

--Mark

On 11/7/16 9:01 AM, Zubair Lutfullah Kakakhel wrote:
> Hi,
> 
> This patch series adds a few MACHINEOVERRIDES options in arch-mips
> to reduce duplicate configurations in various recipes.
> 
> Further info in 
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=10404
> 
> Regards,
> ZubairLK
> 
> Zubair Lutfullah Kakakhel (13):
>   arch-mips: Add MACHINEOVERRIDES variables to reduce duplication
>   bitbake.conf: Reduce duplication in MIPS variants
>   fts: Reduce duplication in MIPS variants.
>   glibc: Reduce duplication in MIPS variants
>   packagegroup: Reduce duplication in MIPS variants.
>   gcc-runtime: Reduce duplication in MIPS variants.
>   gdb: Reduce duplication in MIPS variants.
>   mmc-utils: Reduce duplication in MIPS variants.
>   valgrind: Reduce duplication in MIPS variants.
>   ghostscript: Reduce duplication in MIPS variants.
>   ltp: Reduce duplication in MIPS variants.
>   mdadm: Reduce duplication in MIPS variants.
>   webkit: Reduce duplication in MIPS variants.
> 
>  meta/conf/bitbake.conf  | 11 +--
>  meta/conf/machine/include/mips/arch-mips.inc|  7 +++
>  meta/recipes-core/fts/fts.bb|  5 +
>  meta/recipes-core/glibc/glibc-ld.inc| 17 
> ++---
>  .../recipes-core/packagegroups/packagegroup-core-sdk.bb |  5 +
>  .../packagegroups/packagegroup-core-tools-profile.bb| 10 ++
>  meta/recipes-devtools/gcc/gcc-runtime.inc   |  9 +
>  meta/recipes-devtools/gdb/gdb-common.inc|  7 +--
>  meta/recipes-devtools/mmc/mmc-utils_git.bb  |  6 --
>  meta/recipes-devtools/valgrind/valgrind_3.12.0.bb   |  3 +--
>  meta/recipes-extended/ghostscript/ghostscript_9.19.bb   |  4 ++--
>  meta/recipes-extended/ltp/ltp_20160126.bb   |  3 ++-
>  meta/recipes-extended/mdadm/mdadm_3.4.bb|  6 --
>  meta/recipes-sato/webkit/webkitgtk_2.14.1.bb|  3 +--
>  14 files changed, 30 insertions(+), 66 deletions(-)
> 

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


[OE-core] [OE-Core][Patch 06/13] gcc-runtime: Reduce duplication in MIPS variants.

2016-11-07 Thread Zubair Lutfullah Kakakhel
Reduce duplication in MIPS variants now that the MACHINEOVERRIDES
variable is defined

Signed-off-by: Zubair Lutfullah Kakakhel 
---
 meta/recipes-devtools/gcc/gcc-runtime.inc | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc 
b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 15252f1..d56f82a 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -17,14 +17,7 @@ EXTRA_OECONF_PATHS = "\
 EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
 
 RUNTIMELIBITM = "libitm"
-RUNTIMELIBITM_mips = ""
-RUNTIMELIBITM_mipsel = ""
-RUNTIMELIBITM_mips64 = ""
-RUNTIMELIBITM_mips64el = ""
-RUNTIMELIBITM_mipsisa32r6 = ""
-RUNTIMELIBITM_mipsisa32r6el = ""
-RUNTIMELIBITM_mipsisa64r6 = ""
-RUNTIMELIBITM_mipsisa64r6el = ""
+RUNTIMELIBITM_mipsarch = ""
 RUNTIMELIBITM_nios2 = ""
 RUNTIMELIBITM_microblaze = ""
 
-- 
2.10.2

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


[OE-core] [OE-Core][Patch 11/13] ltp: Reduce duplication in MIPS variants.

2016-11-07 Thread Zubair Lutfullah Kakakhel
Reduce duplication in MIPS variants now that the MACHINEOVERRIDES
variable is defined

Signed-off-by: Zubair Lutfullah Kakakhel 
---
 meta/recipes-extended/ltp/ltp_20160126.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-extended/ltp/ltp_20160126.bb 
b/meta/recipes-extended/ltp/ltp_20160126.bb
index 7631e0e..41670a5 100644
--- a/meta/recipes-extended/ltp/ltp_20160126.bb
+++ b/meta/recipes-extended/ltp/ltp_20160126.bb
@@ -23,7 +23,8 @@ DEPENDS = "attr libaio libcap acl openssl zip-native"
 DEPENDS_append_libc-musl = " fts "
 EXTRA_OEMAKE_append_libc-musl = " LIBC=musl "
 CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__"
-CFLAGS_append_mips64 = " -D__SANE_USERSPACE_TYPES__"
+CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__"
+CFLAGS_append_mipsarchn64el = " -D__SANE_USERSPACE_TYPES__"
 SRCREV = "fce797676b14f50406718e7ef640b50da66c9b36"
 
 SRC_URI = "git://github.com/linux-test-project/ltp.git \
-- 
2.10.2

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


[OE-core] [OE-Core][Patch 12/13] mdadm: Reduce duplication in MIPS variants.

2016-11-07 Thread Zubair Lutfullah Kakakhel
Reduce duplication in MIPS variants now that the MACHINEOVERRIDES
variable is defined

Signed-off-by: Zubair Lutfullah Kakakhel 
---
 meta/recipes-extended/mdadm/mdadm_3.4.bb | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/mdadm/mdadm_3.4.bb 
b/meta/recipes-extended/mdadm/mdadm_3.4.bb
index 261054e..ee792e1 100644
--- a/meta/recipes-extended/mdadm/mdadm_3.4.bb
+++ b/meta/recipes-extended/mdadm/mdadm_3.4.bb
@@ -34,8 +34,10 @@ EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}"'
 # to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get
 # int-ll64.h included
 CFLAGS_append_powerpc64 = ' -D__SANE_USERSPACE_TYPES__'
-CFLAGS_append_mips64 = ' -D__SANE_USERSPACE_TYPES__'
-CFLAGS_append_mips64n32 = ' -D__SANE_USERSPACE_TYPES__'
+CFLAGS_append_mipsarchn64 = ' -D__SANE_USERSPACE_TYPES__'
+CFLAGS_append_mipsarchn64el = ' -D__SANE_USERSPACE_TYPES__'
+CFLAGS_append_mipsarchn32 = ' -D__SANE_USERSPACE_TYPES__'
+CFLAGS_append_mipsarchn32el = ' -D__SANE_USERSPACE_TYPES__'
 
 do_compile() {
oe_runmake SYSROOT="${STAGING_DIR_TARGET}"
-- 
2.10.2

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


[OE-core] [OE-Core][Patch 13/13] webkit: Reduce duplication in MIPS variants.

2016-11-07 Thread Zubair Lutfullah Kakakhel
Reduce duplication in MIPS variants now that the MACHINEOVERRIDES
variable is defined

Signed-off-by: Zubair Lutfullah Kakakhel 
---
 meta/recipes-sato/webkit/webkitgtk_2.14.1.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/recipes-sato/webkit/webkitgtk_2.14.1.bb 
b/meta/recipes-sato/webkit/webkitgtk_2.14.1.bb
index a2586de..a67ff0a 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.14.1.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.14.1.bb
@@ -82,8 +82,7 @@ EXTRA_OECMAKE_append_mips64 = " -DUSE_LD_GOLD=OFF "
 EXTRA_OECMAKE_append_toolchain-clang = " -DUSE_LD_GOLD=OFF "
 
 # JIT not supported on MIPS either
-EXTRA_OECMAKE_append_mips = " -DENABLE_JIT=OFF "
-EXTRA_OECMAKE_append_mips64 = " -DENABLE_JIT=OFF "
+EXTRA_OECMAKE_append_mipsarch = " -DENABLE_JIT=OFF "
 
 SECURITY_CFLAGS_remove_aarch64 = "-fpie"
 SECURITY_CFLAGS_append_aarch64 = " -fPIE"
-- 
2.10.2

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


[OE-core] [OE-Core][Patch 10/13] ghostscript: Reduce duplication in MIPS variants.

2016-11-07 Thread Zubair Lutfullah Kakakhel
Reduce duplication in MIPS variants now that the MACHINEOVERRIDES
variable is defined

Signed-off-by: Zubair Lutfullah Kakakhel 
---
 meta/recipes-extended/ghostscript/ghostscript_9.19.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.19.bb 
b/meta/recipes-extended/ghostscript/ghostscript_9.19.bb
index fe2016b..52f6fe3 100644
--- a/meta/recipes-extended/ghostscript/ghostscript_9.19.bb
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.19.bb
@@ -46,8 +46,8 @@ EXTRA_OECONF = "--without-x --with-system-libtiff 
--without-jbig2dec \
 --with-cups-datadir=${datadir}/cups \
 "
 
-EXTRA_OECONF_append_mips = " --with-large_color_index=0"
-EXTRA_OECONF_append_mipsel = " --with-large_color_index=0"
+EXTRA_OECONF_append_mipsarcho32 = " --with-large_color_index=0"
+EXTRA_OECONF_append_mipsarcho32el = " --with-large_color_index=0"
 
 # Explicity disable libtiff, fontconfig,
 # freetype, cups for ghostscript-native
-- 
2.10.2

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


[OE-core] [OE-Core][Patch 07/13] gdb: Reduce duplication in MIPS variants.

2016-11-07 Thread Zubair Lutfullah Kakakhel
Reduce duplication in MIPS variants now that the MACHINEOVERRIDES
variable is defined

Signed-off-by: Zubair Lutfullah Kakakhel 
---
 meta/recipes-devtools/gdb/gdb-common.inc | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/meta/recipes-devtools/gdb/gdb-common.inc 
b/meta/recipes-devtools/gdb/gdb-common.inc
index 33a5ce9..5b8087c 100644
--- a/meta/recipes-devtools/gdb/gdb-common.inc
+++ b/meta/recipes-devtools/gdb/gdb-common.inc
@@ -6,12 +6,7 @@ DEPENDS = "expat zlib ncurses virtual/libiconv ${LTTNGUST}"
 LTTNGUST = "lttng-ust"
 LTTNGUST_aarch64 = ""
 LTTNGUST_libc-uclibc = ""
-LTTNGUST_mips = ""
-LTTNGUST_mipsel = ""
-LTTNGUST_mips64 = ""
-LTTNGUST_mips64el = ""
-LTTNGUST_mips64n32 = ""
-LTTNGUST_mips64eln32 = ""
+LTTNGUST_mipsarch = ""
 LTTNGUST_sh4 = ""
 LTTNGUST_libc-musl = ""
 
-- 
2.10.2

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


[OE-core] [OE-Core][Patch 02/13] bitbake.conf: Reduce duplication in MIPS variants

2016-11-07 Thread Zubair Lutfullah Kakakhel
Reduce duplication in MIPS variants now that the MACHINEOVERRIDES
variable is defined

Signed-off-by: Zubair Lutfullah Kakakhel 
---
 meta/conf/bitbake.conf | 11 +--
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 9f445bb..1472e8f 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -533,16 +533,7 @@ BUILDSDK_LDFLAGS = "-Wl,-O1"
 
 LINKER_HASH_STYLE ??= "gnu"
 # mips does not support GNU hash style therefore we override
-LINKER_HASH_STYLE_mips = "sysv"
-LINKER_HASH_STYLE_mipsel = "sysv"
-LINKER_HASH_STYLE_mips64 = "sysv"
-LINKER_HASH_STYLE_mips64el = "sysv"
-LINKER_HASH_STYLE_mips64n32 = "sysv"
-LINKER_HASH_STYLE_mips64eln32 = "sysv"
-LINKER_HASH_STYLE_mipsisa32r6 = "sysv"
-LINKER_HASH_STYLE_mipsisa32r6el = "sysv"
-LINKER_HASH_STYLE_mipsisa64r6 = "sysv"
-LINKER_HASH_STYLE_mipsisa64r6el = "sysv"
+LINKER_HASH_STYLE_mipsarch = "sysv"
 
 TARGET_LINK_HASH_STYLE ?= 
"${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_STYLE', True) != 'gnu']}"
 
-- 
2.10.2

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


[OE-core] [OE-Core][Patch 08/13] mmc-utils: Reduce duplication in MIPS variants.

2016-11-07 Thread Zubair Lutfullah Kakakhel
Reduce duplication in MIPS variants now that the MACHINEOVERRIDES
variable is defined

Signed-off-by: Zubair Lutfullah Kakakhel 
---
 meta/recipes-devtools/mmc/mmc-utils_git.bb | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/mmc/mmc-utils_git.bb 
b/meta/recipes-devtools/mmc/mmc-utils_git.bb
index 2cba860..9732609 100644
--- a/meta/recipes-devtools/mmc/mmc-utils_git.bb
+++ b/meta/recipes-devtools/mmc/mmc-utils_git.bb
@@ -13,8 +13,10 @@ SRC_URI = 
"git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branc
 S = "${WORKDIR}/git"
 
 CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__"
-CFLAGS_append_mips64 = " -D__SANE_USERSPACE_TYPES__"
-CFLAGS_append_mips64n32 = " -D__SANE_USERSPACE_TYPES__"
+CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__"
+CFLAGS_append_mipsarchn64el = " -D__SANE_USERSPACE_TYPES__"
+CFLAGS_append_mipsarchn32 = " -D__SANE_USERSPACE_TYPES__"
+CFLAGS_append_mipsarchn32el = " -D__SANE_USERSPACE_TYPES__"
 
 do_install() {
 install -d ${D}${bindir}
-- 
2.10.2

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


[OE-core] [OE-Core][Patch 01/13] arch-mips: Add MACHINEOVERRIDES variables to reduce duplication

2016-11-07 Thread Zubair Lutfullah Kakakhel
In some cases, each MIPS variant in a recipe requires a duplicate
line. Even if the passed flag is the same.

Add global MACHINEOVERRIDES variables for the following
 * mipsarch : All MIPS
 * mipsarchr6   : All MIPS R6
 * mipsarcho32{el}  : All MIPS o32
 * mipsarchn32{el}  : All MIPS n32
 * mipsarchn64{el}  : All MIPS n64

This is intended to reduce duplications in recipes

[YOCTO #10404]

Signed-off-by: Zubair Lutfullah Kakakhel 
---
 meta/conf/machine/include/mips/arch-mips.inc | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/meta/conf/machine/include/mips/arch-mips.inc 
b/meta/conf/machine/include/mips/arch-mips.inc
index 6069ca1..5b42841 100644
--- a/meta/conf/machine/include/mips/arch-mips.inc
+++ b/meta/conf/machine/include/mips/arch-mips.inc
@@ -50,6 +50,13 @@ MIPSPKGSFX_32R6 = "${@bb.utils.contains('TUNE_FEATURES', 
'mipsisa32r6', 'isa32',
 TUNE_ARCH = 
"mips${MIPSPKGSFX_32R6}${MIPSPKGSFX_64R6}${MIPSPKGSFX_BYTE}${MIPSPKGSFX_R6}${MIPSPKGSFX_ENDIAN}"
 TUNE_PKGARCH = 
"${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}"
 
+# Various Global Machine Overrides
+MACHINEOVERRIDES =. "mipsarch:"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'r6', 
'mipsarchr6:', '' ,d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'n32', 
'mipsarchn32${MIPSPKGSFX_ENDIAN}:', '' ,d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'o32', 
'mipsarcho32${MIPSPKGSFX_ENDIAN}:', '' ,d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'n64', 
'mipsarch64${MIPSPKGSFX_ENDIAN}:', '' ,d)}"
+
 # Base tunes
 AVAILTUNES += "mips mips64-n32 mips64 mipsel mips64el-n32 mips64el mips-nf 
mips64-nf-n32 mips64-nf mipsel-nf mips64el-nf-n32 mips64el-nf"
 TUNE_FEATURES_tune-mips = "o32 bigendian fpu-hard"
-- 
2.10.2

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


[OE-core] [OE-Core][Patch 05/13] packagegroup: Reduce duplication in MIPS variants.

2016-11-07 Thread Zubair Lutfullah Kakakhel
Reduce duplication in MIPS variants now that the MACHINEOVERRIDES
variable is defined

Signed-off-by: Zubair Lutfullah Kakakhel 
---
 meta/recipes-core/packagegroups/packagegroup-core-sdk.bb   |  5 +
 .../packagegroups/packagegroup-core-tools-profile.bb   | 10 ++
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb 
b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
index aceba78..327cd8e 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
@@ -28,10 +28,7 @@ RDEPENDS_packagegroup-core-sdk = "\
 
 SANITIZERS = "libasan-dev libubsan-dev"
 SANITIZERS_aarch64 = ""
-SANITIZERS_mips = ""
-SANITIZERS_mipsel = ""
-SANITIZERS_mips64 = ""
-SANITIZERS_mips64n32 = ""
+SANITIZERS_mipsarch = ""
 SANITIZERS_nios2 = ""
 SANITIZERS_powerpc64 = ""
 SANITIZERS_sparc = ""
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb 
b/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
index dd98445..31ad82b 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
@@ -36,10 +36,7 @@ PERF_libc-musl = ""
 SYSTEMTAP = "systemtap"
 SYSTEMTAP_libc-uclibc = ""
 SYSTEMTAP_libc-musl = ""
-SYSTEMTAP_mips = ""
-SYSTEMTAP_mipsel = ""
-SYSTEMTAP_mips64 = ""
-SYSTEMTAP_mips64n32 = ""
+SYSTEMTAP_mipsarch = ""
 SYSTEMTAP_nios2 = ""
 SYSTEMTAP_aarch64 = ""
 
@@ -65,10 +62,7 @@ BABELTRACE = "babeltrace"
 VALGRIND = "valgrind"
 VALGRIND_libc-uclibc = ""
 VALGRIND_libc-musl = ""
-VALGRIND_mips = ""
-VALGRIND_mipsel = ""
-VALGRIND_mips64 = ""
-VALGRIND_mips64n32 = ""
+VALGRIND_mipsarch = ""
 VALGRIND_nios2 = ""
 VALGRIND_armv4 = ""
 VALGRIND_armv5 = ""
-- 
2.10.2

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


[OE-core] [OE-Core][Patch 09/13] valgrind: Reduce duplication in MIPS variants.

2016-11-07 Thread Zubair Lutfullah Kakakhel
Reduce duplication in MIPS variants now that the MACHINEOVERRIDES
variable is defined

Signed-off-by: Zubair Lutfullah Kakakhel 
---
 meta/recipes-devtools/valgrind/valgrind_3.12.0.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb 
b/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
index a113880..2474bbc 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
@@ -37,8 +37,7 @@ COMPATIBLE_HOST_armv5 = 'null'
 COMPATIBLE_HOST_armv6 = 'null'
 
 # valgrind doesn't like mips soft float
-COMPATIBLE_HOST_mips = "${@bb.utils.contains("TARGET_FPU", "soft", "null", 
".*-linux", d)}"
-COMPATIBLE_HOST_mipsel = "${@bb.utils.contains("TARGET_FPU", "soft", "null", 
".*-linux", d)}"
+COMPATIBLE_HOST_mipsarch = "${@bb.utils.contains("TARGET_FPU", "soft", "null", 
".*-linux", d)}"
 
 inherit autotools ptest
 
-- 
2.10.2

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


[OE-core] [OE-Core][Patch 00/13] MIPS: Use MACHINEOVERRIDES and reduce duplication

2016-11-07 Thread Zubair Lutfullah Kakakhel
Hi,

This patch series adds a few MACHINEOVERRIDES options in arch-mips
to reduce duplicate configurations in various recipes.

Further info in 
https://bugzilla.yoctoproject.org/show_bug.cgi?id=10404

Regards,
ZubairLK

Zubair Lutfullah Kakakhel (13):
  arch-mips: Add MACHINEOVERRIDES variables to reduce duplication
  bitbake.conf: Reduce duplication in MIPS variants
  fts: Reduce duplication in MIPS variants.
  glibc: Reduce duplication in MIPS variants
  packagegroup: Reduce duplication in MIPS variants.
  gcc-runtime: Reduce duplication in MIPS variants.
  gdb: Reduce duplication in MIPS variants.
  mmc-utils: Reduce duplication in MIPS variants.
  valgrind: Reduce duplication in MIPS variants.
  ghostscript: Reduce duplication in MIPS variants.
  ltp: Reduce duplication in MIPS variants.
  mdadm: Reduce duplication in MIPS variants.
  webkit: Reduce duplication in MIPS variants.

 meta/conf/bitbake.conf  | 11 +--
 meta/conf/machine/include/mips/arch-mips.inc|  7 +++
 meta/recipes-core/fts/fts.bb|  5 +
 meta/recipes-core/glibc/glibc-ld.inc| 17 ++---
 .../recipes-core/packagegroups/packagegroup-core-sdk.bb |  5 +
 .../packagegroups/packagegroup-core-tools-profile.bb| 10 ++
 meta/recipes-devtools/gcc/gcc-runtime.inc   |  9 +
 meta/recipes-devtools/gdb/gdb-common.inc|  7 +--
 meta/recipes-devtools/mmc/mmc-utils_git.bb  |  6 --
 meta/recipes-devtools/valgrind/valgrind_3.12.0.bb   |  3 +--
 meta/recipes-extended/ghostscript/ghostscript_9.19.bb   |  4 ++--
 meta/recipes-extended/ltp/ltp_20160126.bb   |  3 ++-
 meta/recipes-extended/mdadm/mdadm_3.4.bb|  6 --
 meta/recipes-sato/webkit/webkitgtk_2.14.1.bb|  3 +--
 14 files changed, 30 insertions(+), 66 deletions(-)

-- 
2.10.2

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


[OE-core] [OE-Core][Patch 04/13] glibc: Reduce duplication in MIPS variants

2016-11-07 Thread Zubair Lutfullah Kakakhel
Reduce duplication in MIPS variants now that the MACHINEOVERRIDES
variable is defined

Signed-off-by: Zubair Lutfullah Kakakhel 
---
 meta/recipes-core/glibc/glibc-ld.inc | 17 ++---
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/meta/recipes-core/glibc/glibc-ld.inc 
b/meta/recipes-core/glibc/glibc-ld.inc
index b982368..e2e2474 100644
--- a/meta/recipes-core/glibc/glibc-ld.inc
+++ b/meta/recipes-core/glibc/glibc-ld.inc
@@ -7,21 +7,8 @@ def ld_append_if_tune_exists(d, infos, dict):
 
 def glibc_dl_info(d):
 ld_info_all = {
-"mips": ["ld.so.1", "FLAG_ELF_LIBC6"],
-"mips64-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
-"mips64": ["ld.so.1", "FLAG_ELF_LIBC6"],
-"mipsel": ["ld.so.1", "FLAG_ELF_LIBC6"],
-"mips64el-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
-"mips64el": ["ld.so.1", "FLAG_ELF_LIBC6"],
-"mips-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
-"mipsisa32r6": ["ld-linux-mipsn8.so.1", "FLAG_ELF_LIBC6"],
-"mipsisa32r6el": ["ld-linux-mipsn8.so.1", "FLAG_ELF_LIBC6"],
-"mips64-nf-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
-"mips64-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
-"mips64el-nf-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
-"mips64el-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
-"mipsisa64r6": ["ld-linux-mipsn8.so.1", "FLAG_ELF_LIBC6"],
-"mipsisa64r6el": ["ld-linux-mipsn8.so.1", "FLAG_ELF_LIBC6"],
+"mipsarch": ["ld.so.1", "FLAG_ELF_LIBC6"],
+"mipsarchr6": ["ld-linux-mipsn8.so.1", "FLAG_ELF_LIBC6"],
 "powerpc": ["ld.so.1", "FLAG_ELF_LIBC6"],
 "powerpc-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
 "powerpc64": ["ld64.so.1", "FLAG_ELF_LIBC6"],
-- 
2.10.2

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


[OE-core] [OE-Core][Patch 03/13] fts: Reduce duplication in MIPS variants.

2016-11-07 Thread Zubair Lutfullah Kakakhel
Reduce duplication in MIPS variants now that the MACHINEOVERRIDES
variable is defined

Signed-off-by: Zubair Lutfullah Kakakhel 
---
 meta/recipes-core/fts/fts.bb | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/meta/recipes-core/fts/fts.bb b/meta/recipes-core/fts/fts.bb
index 9d8230f..de9297e 100644
--- a/meta/recipes-core/fts/fts.bb
+++ b/meta/recipes-core/fts/fts.bb
@@ -22,10 +22,7 @@ S = "${WORKDIR}/${BPN}"
 
 do_configure[noexec] = "1"
 
-HASHSTYLE_mips = "sysv"
-HASHSTYLE_mipsel = "sysv"
-HASHSTYLE_mips64 = "sysv"
-HASHSTYLE_mips64el = "sysv"
+HASHSTYLE_mipsarch = "sysv"
 HASHSTYLE = "gnu"
 
 VER = "0"
-- 
2.10.2

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


Re: [OE-core] [PATCH] u-boot: mkimage: fix build

2016-11-07 Thread Burton, Ross
On 4 November 2016 at 11:06, Stefan Müller-Klieser <
s.mueller-klie...@phytec.de> wrote:

> This fixes the mkimage build for situations where HOSTCC and friends
> need to be overridden and the u-boot makefile defaults don't work.
>

I applied this on top of the u-boot upgrades and it still breaks:

make -f ./scripts/Makefile.build obj=tools
  x86_64-poky-linux-gcc  -m64 -march=corei7 -mtune=corei7 -mfpmath=sse
-msse4.2 --sysroot=/data/poky-master/tmp-glibc/sysroots/intel-corei7-64
-Wp,-MD,tools/.bin2header.d -O2 -pipe -g -feliminate-unused-debug-types
-fdebug-prefix-map=/data/poky-master/tmp-glibc/work/corei7-64-poky-linux/u-boot-mkimage/2016.09.01-r0=/usr/src/debug/u-boot-mkimage/2016.09.01-r0
-fdebug-prefix-map=/data/poky-master/tmp-glibc/sysroots/x86_64-linux=
-fdebug-prefix-map=/data/poky-master/tmp-glibc/sysroots/intel-corei7-64=
 -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat
-Wformat-security -Werror=format-security   -DCONFIG_FIT_SIGNATURE -include
./include/libfdt_env.h -idirafterinclude -idirafter./arch/sandbox/include
-I./lib/libfdt -I./tools -DCONFIG_SYS_TEXT_BASE=0 -DUSE_HOSTCC
-D__KERNEL_STRICT_NAMES -D_GNU_SOURCE  -o tools/bin2header
tools/bin2header.c
...
cat ./Licenses/gpl-2.0.txt | gzip -9 -c | \
tools/bin2header license_gzip > ./include/license.h
/bin/sh: 2: tools/bin2header: not found
tools/Makefile:256: recipe for target 'include/license.h' failed

Looks like HOSTCC isn't being set correctly.

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


[OE-core] [PATCH] lib/oe/qa: handle binaries with segments outside the first 4kb

2016-11-07 Thread Ross Burton
The ELF parser was assuming that the segment tables are in the first 4kb of the
binary.  Whilst this generally appears to be the case, there have been instances
where the segment table is elsewhere (offset 2MB, in this sample I have).  Solve
this problem by mmap()ing the file instead.

Also clean up the code a little whilst chasing the problem.

Signed-off-by: Ross Burton 
---
 meta/lib/oe/qa.py | 78 ++-
 1 file changed, 37 insertions(+), 41 deletions(-)

diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
index fbe719d..3eda923 100644
--- a/meta/lib/oe/qa.py
+++ b/meta/lib/oe/qa.py
@@ -1,4 +1,4 @@
-import os, struct
+import os, struct, mmap
 
 class NotELFFileError(Exception):
 pass
@@ -23,9 +23,9 @@ class ELFFile:
 EV_CURRENT   = 1
 
 # possible values for EI_DATA
-ELFDATANONE  = 0
-ELFDATA2LSB  = 1
-ELFDATA2MSB  = 2
+EI_DATA_NONE  = 0
+EI_DATA_LSB  = 1
+EI_DATA_MSB  = 2
 
 PT_INTERP = 3
 
@@ -34,51 +34,42 @@ class ELFFile:
 #print "'%x','%x' %s" % (ord(expectation), ord(result), self.name)
 raise NotELFFileError("%s is not an ELF" % self.name)
 
-def __init__(self, name, bits = 0):
+def __init__(self, name):
 self.name = name
-self.bits = bits
 self.objdump_output = {}
 
-def open(self):
-if not os.path.isfile(self.name):
-raise NotELFFileError("%s is not a normal file" % self.name)
+# Context Manager functions to close the mmap explicitly
+def __enter__(self):
+return self
+
+def __exit__(self, exc_type, exc_value, traceback):
+self.data.close()
 
+def open(self):
 with open(self.name, "rb") as f:
-# Read 4k which should cover most of the headers we're after
-self.data = f.read(4096)
+self.data = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
 
+# Check the file has the minimum number of ELF table entries
 if len(self.data) < ELFFile.EI_NIDENT + 4:
 raise NotELFFileError("%s is not an ELF" % self.name)
 
+# ELF header
 self.my_assert(self.data[0], 0x7f)
 self.my_assert(self.data[1], ord('E'))
 self.my_assert(self.data[2], ord('L'))
 self.my_assert(self.data[3], ord('F'))
-if self.bits == 0:
-if self.data[ELFFile.EI_CLASS] == ELFFile.ELFCLASS32:
-self.bits = 32
-elif self.data[ELFFile.EI_CLASS] == ELFFile.ELFCLASS64:
-self.bits = 64
-else:
-# Not 32-bit or 64.. lets assert
-raise NotELFFileError("ELF but not 32 or 64 bit.")
-elif self.bits == 32:
-self.my_assert(self.data[ELFFile.EI_CLASS], ELFFile.ELFCLASS32)
-elif self.bits == 64:
-self.my_assert(self.data[ELFFile.EI_CLASS], ELFFile.ELFCLASS64)
+if self.data[ELFFile.EI_CLASS] == ELFFile.ELFCLASS32:
+self.bits = 32
+elif self.data[ELFFile.EI_CLASS] == ELFFile.ELFCLASS64:
+self.bits = 64
 else:
-raise NotELFFileError("Must specify unknown, 32 or 64 bit size.")
+# Not 32-bit or 64.. lets assert
+raise NotELFFileError("ELF but not 32 or 64 bit.")
 self.my_assert(self.data[ELFFile.EI_VERSION], ELFFile.EV_CURRENT)
 
-self.sex = self.data[ELFFile.EI_DATA]
-if self.sex == ELFFile.ELFDATANONE:
-raise NotELFFileError("self.sex == ELFDATANONE")
-elif self.sex == ELFFile.ELFDATA2LSB:
-self.sex = "<"
-elif self.sex == ELFFile.ELFDATA2MSB:
-self.sex = ">"
-else:
-raise NotELFFileError("Unknown self.sex")
+self.endian = self.data[ELFFile.EI_DATA]
+if self.endian not in (ELFFile.EI_DATA_LSB, ELFFile.EI_DATA_MSB):
+raise NotELFFileError("Unexpected EI_DATA %x" % self.endian)
 
 def osAbi(self):
 return self.data[ELFFile.EI_OSABI]
@@ -90,16 +81,20 @@ class ELFFile:
 return self.bits
 
 def isLittleEndian(self):
-return self.sex == "<"
+return self.endian == ELFFile.EI_DATA_LSB
 
 def isBigEndian(self):
-return self.sex == ">"
+return self.endian == ELFFile.EI_DATA_MSB
+
+def getStructEndian(self):
+return {ELFFile.EI_DATA_LSB: "<",
+ELFFile.EI_DATA_MSB: ">"}[self.endian]
 
 def getShort(self, offset):
-return struct.unpack_from(self.sex+"H", self.data, offset)[0]
+return struct.unpack_from(self.getStructEndian() + "H", self.data, 
offset)[0]
 
 def getWord(self, offset):
-return struct.unpack_from(self.sex+"i", self.data, offset)[0]
+return struct.unpack_from(self.getStructEndian() + "i", self.data, 
offset)[0]
 
 def isDynamic(self):
 """
@@ -118,7 +113,7 @@ class ELFFile:
 
 def machine(self):
 """
-We know the sex stored in self.sex and we
+   

Re: [OE-core] [PATCH] libbsd 0.8.3: BBCLASSEXTEND to native and nativesdk

2016-11-07 Thread Nicolas Dechesne
On Mon, Nov 7, 2016 at 10:30 AM, Burton, Ross  wrote:
> On 7 November 2016 at 09:28, Burton, Ross  wrote:
>>
>> Ah.  I might (cough) have a hybrid stable/testing setup as I needed a
>> newer kernel.  I'll have a look.
>
>
> $ grep -r getrandom
> x86_64-linux-gnu/bits/syscall.h:#define SYS_getrandom __NR_getrandom
> x86_64-linux-gnu/bits/syscall.h:#define SYS_getrandom __NR_getrandom
> x86_64-linux-gnu/bits/syscall.h:#define SYS_getrandom __NR_getrandom
> x86_64-linux-gnu/asm/unistd_x32.h:#define __NR_getrandom (__X32_SYSCALL_BIT
> + 318)
> x86_64-linux-gnu/asm/unistd_64.h:#define __NR_getrandom 318
> x86_64-linux-gnu/asm/unistd_32.h:#define __NR_getrandom 355
>
> That's better.  Thanks Phil.

great. Does that mean that this patch can be merged or do you have any
other issue?

It's needed to get the android tools -native.. and we will need a
backport on morty too (but we will send that separately).
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] libbsd 0.8.3: BBCLASSEXTEND to native and nativesdk

2016-11-07 Thread Burton, Ross
On 7 November 2016 at 09:42, Nicolas Dechesne 
wrote:

> great. Does that mean that this patch can be merged or do you have any
> other issue?
>

Yeah, it's queued in my staging branch now. Sorry for user error stalling
this.

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


Re: [OE-core] [PATCH] libbsd 0.8.3: BBCLASSEXTEND to native and nativesdk

2016-11-07 Thread Burton, Ross
On 5 November 2016 at 00:09, Phil Blundell  wrote:

> That would happen if your glibc was compiled against a newer version of
> the kernel headers than you actually have installed (bits/syscall.h is
> auto-generated from the kernel headers at build time). If this is a clean
> Debian install then it does sound like they have messed up the packaging
> somehow.
>

Ah.  I might (cough) have a hybrid stable/testing setup as I needed a newer
kernel.  I'll have a look.

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


Re: [OE-core] [PATCH] libbsd 0.8.3: BBCLASSEXTEND to native and nativesdk

2016-11-07 Thread Burton, Ross
On 7 November 2016 at 09:28, Burton, Ross  wrote:

> Ah.  I might (cough) have a hybrid stable/testing setup as I needed a
> newer kernel.  I'll have a look.
>

$ grep -r getrandom
x86_64-linux-gnu/bits/syscall.h:#define SYS_getrandom __NR_getrandom
x86_64-linux-gnu/bits/syscall.h:#define SYS_getrandom __NR_getrandom
x86_64-linux-gnu/bits/syscall.h:#define SYS_getrandom __NR_getrandom
x86_64-linux-gnu/asm/unistd_x32.h:#define __NR_getrandom (__X32_SYSCALL_BIT
+ 318)
x86_64-linux-gnu/asm/unistd_64.h:#define __NR_getrandom 318
x86_64-linux-gnu/asm/unistd_32.h:#define __NR_getrandom 355

That's better.  Thanks Phil.

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


Re: [OE-core] ✗ patchtest: failure for populate_sdk_ext.bbclass: check unfsd before create it

2016-11-07 Thread Burton, Ross
On 7 November 2016 at 08:55, Patchwork  wrote:

> Test Nametest_signed_off_by_presence
> Proposed Fix Sign off the patch
> Commit shortlog  populate_sdk_ext.bbclass: check unfsd before create it
>

The patch has a s-o-b, so this is a false positive.  Is this checking the
cover letter instead of the patch?

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


Re: [OE-core] [PATCH 1/1] trace-cmd: fix QA warning

2016-11-07 Thread Burton, Ross
On 5 November 2016 at 05:29, Dengke Du  wrote:

> +PACKAGECONFIG ??= ""
> +PACKAGECONFIG[audit] = ",,audit"
> +
>  EXTRA_OEMAKE = "\
>  'prefix=${prefix}' \
>  'bindir=${bindir}' \
> @@ -20,6 +23,7 @@ EXTRA_OEMAKE = "\
>  'libdir=${@oe.path.relative(prefix, libdir)}' \
>  \
>  NO_PYTHON=1 \
> +${@bb.utils.contains('PACKAGECONFIG', 'audit', '', 'NO_AUDIT=1', d)}
> \
>  "
>

A neater way of doing this would be:

PACKAGECONFIG ??= ""
PACKAGECONFIG[audit] = ',NO_AUDIT=1,audit'
EXTRA_OECMAKE = " ${PACKAGECONFIG_CONFARGS}"

This works as the PACKAGECONFIG expansion adds the active expressions to
PACKAGECONFIG_CONFARGS, so you can add that directly to EXTRA_OEMAKE.

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


[OE-core] [PATCH] packagegroup-core-sdk: Disable sanitizers for mips64el

2016-11-07 Thread jackie.huang
From: Jackie Huang 

These are not available on mips64el yet, so disable them.

Signed-off-by: Jackie Huang 
---
 meta/recipes-core/packagegroups/packagegroup-core-sdk.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb 
b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
index aceba78..9c4ea9b 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
@@ -31,6 +31,7 @@ SANITIZERS_aarch64 = ""
 SANITIZERS_mips = ""
 SANITIZERS_mipsel = ""
 SANITIZERS_mips64 = ""
+SANITIZERS_mips64el = ""
 SANITIZERS_mips64n32 = ""
 SANITIZERS_nios2 = ""
 SANITIZERS_powerpc64 = ""
-- 
2.8.3

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


[OE-core] [PATCH 0/1] populate_sdk_ext.bbclass: check unfsd before create it

2016-11-07 Thread Robert Yang
The following changes since commit 58de12eaaac9c60bb8fc84a3a965ef86d2a39ae0:

  distro_check: partial rewrite to make it work again (2016-11-06 23:35:23 
+)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/ext
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/ext

Robert Yang (1):
  populate_sdk_ext.bbclass: check unfsd before create it

 meta/classes/populate_sdk_ext.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

-- 
2.9.0

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


[OE-core] [PATCH 1/1] populate_sdk_ext.bbclass: check unfsd before create it

2016-11-07 Thread Robert Yang
Fixed when nativesdk-unfs3 is installed:
$ bitbake  -c populate_sdk_ext
| Traceback (most recent call last):
|   File "/path/to/oe-core/scripts/lnr", line 21, in 
| os.symlink(target, linkname)
| FileExistsError: [Errno 17] File exists: 
'../../../../tmp/sysroots/x86_64-linux/usr/bin/unfsd' -> 
'/path/to/9.0/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/unfsd'

Signed-off-by: Robert Yang 
---
 meta/classes/populate_sdk_ext.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/populate_sdk_ext.bbclass 
b/meta/classes/populate_sdk_ext.bbclass
index a0856d4..26b5ca6 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -502,9 +502,10 @@ install_tools() {
done
# We can't use the same method as above because files in the sysroot 
won't exist at this point
# (they get populated from sstate on installation)
-   if [ "${SDK_INCLUDE_TOOLCHAIN}" == "1" ] ; then
+   unfsd_path="${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/unfsd"
+   if [ "${SDK_INCLUDE_TOOLCHAIN}" == "1" -a ! -e $unfsd_path ] ; then

binrelpath=${@os.path.relpath(d.getVar('STAGING_BINDIR_NATIVE',True), 
d.getVar('TOPDIR', True))}
-   lnr ${SDK_OUTPUT}/${SDKPATH}/$binrelpath/unfsd 
${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/unfsd
+   lnr ${SDK_OUTPUT}/${SDKPATH}/$binrelpath/unfsd $unfsd_path
fi
touch ${SDK_OUTPUT}/${SDKPATH}/.devtoolbase
 
-- 
2.9.0

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