Re: [OE-core] [PATCH 0/6] Add opengl to REQUIRED_DISTRO_FEATURES for some recipes

2017-01-04 Thread Patrick Ohly
On Wed, 2017-01-04 at 23:49 +, Burton, Ross wrote:
> 
> On 4 January 2017 at 22:57, Christopher Larson 
> wrote:
> These aren't buildable without it, and adding it fixes oe-core
> world builds
> with nodistro (which does not have the opengl feature by
> default).
> 
> 
> Am I still the only person who thinks skipping of recipes should be
> recursive, so if say libx11 throws a SkipRecipe then everything else
> that depends on it is also magically skipped?

Not at all, I'd also prefer that. If recipe "foo" has some obscure
conditions when it can be built, then repeating those conditions in any
recipe depending on "foo" is a maintenance headache.

Last time I brought this up, it was mentioned as advantage of the
current approach that conditions are explicit and thus less surprising.
There's some truth to that, but I don't believe that it outweighs the
disadvantages.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



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


Re: [OE-core] [PATCH] gnupg: specify explicitly tar path

2017-01-04 Thread Wenlin Kang

On 2016年12月20日 17:47, Wenlin Kang wrote:

On 2016年12月19日 19:39, Burton, Ross wrote:


On 19 December 2016 at 07:01, Wenlin Kang > wrote:


+- AC_PATH_PROG(TAR,"tar")
+-_mytar=$ac_cv_path_TAR


You don't need to patch configure.ac  as you can 
just set pass ac_cv_path_TAR=${base_bindir/tar in EXTRA_OECONF.


Ross


Your means is that we should only set --with-tar=${base_bindir}/tar in 
EXTRA_OECONF, not to modify configure.ac, right?
If that, the configure code will skip directly "ustar format check 
code", not check whether tar supports "ustar format",
and think it doesn't support ustar format, so I think we need to 
modify the configure(related m4/tar-ustar.m4 file)

when set  --with-tar=${base_bindir}/tar in EXTRA_OECONF.

--
Thanks,
Wenlin Kang




ping ..

--
Thanks,
Wenlin Kang

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


[OE-core] [PATCH] curl: upgrade to 7.52.1

2017-01-04 Thread Oleksandr Kravchuk
Signed-off-by: Oleksandr Kravchuk 
---
 meta/recipes-support/curl/{curl_7.51.0.bb => curl_7.52.1.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-support/curl/{curl_7.51.0.bb => curl_7.52.1.bb} (94%)

diff --git a/meta/recipes-support/curl/curl_7.51.0.bb 
b/meta/recipes-support/curl/curl_7.52.1.bb
similarity index 94%
rename from meta/recipes-support/curl/curl_7.51.0.bb
rename to meta/recipes-support/curl/curl_7.52.1.bb
index a9589b8..2882bc0 100644
--- a/meta/recipes-support/curl/curl_7.51.0.bb
+++ b/meta/recipes-support/curl/curl_7.52.1.bb
@@ -14,8 +14,8 @@ SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
 #
 SRC_URI += " file://configure_ac.patch"
 
-SRC_URI[md5sum] = "09a7c5769a7eae676d5e2c86d51f167e"
-SRC_URI[sha256sum] = 
"7f8240048907e5030f67be0a6129bc4b333783b9cca1391026d700835a788dde"
+SRC_URI[md5sum] = "dd014df06ff1d12e173de86873f9f77a"
+SRC_URI[sha256sum] = 
"d16185a767cb2c1ba3d5b9096ec54e5ec198b213f45864a38b3bda4bbf87389b"
 
 CVE_PRODUCT = "libcurl"
 inherit autotools pkgconfig binconfig multilib_header
-- 
2.7.4

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


[OE-core] [PATCH 1/1] selftest/eSDK.py: fix sstate dir not found error

2017-01-04 Thread Chen Qi
Fix the error below when SSTATE_DIR is not "${BUILDDIR}/sstate-cache".

  FileNotFoundError: [Errno 2] No such file or directory: '/xxx/../sstate-cache'

Signed-off-by: Chen Qi 
---
 meta/lib/oeqa/selftest/eSDK.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/eSDK.py b/meta/lib/oeqa/selftest/eSDK.py
index 9d5c680..b43a452 100644
--- a/meta/lib/oeqa/selftest/eSDK.py
+++ b/meta/lib/oeqa/selftest/eSDK.py
@@ -55,7 +55,7 @@ class oeSDKExtSelfTest(oeSelfTest):
 @classmethod
 def setUpClass(cls):
 # Start to serve sstate dir
-sstate_dir = os.path.join(os.environ['BUILDDIR'], 'sstate-cache')
+sstate_dir = get_bb_var('SSTATE_DIR')
 cls.http_service = HTTPService(sstate_dir)
 cls.http_service.start()
 
-- 
1.9.1

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


[OE-core] [PATCH 0/1] selftest/eSDK.py: fix sstate dir not found error

2017-01-04 Thread Chen Qi
The following changes since commit dbb247cac5fbf7b037e4955f9793828451723924:

  bitbake: cookerdata: Convert multiconfig to use BB_CURRENT_MC (2016-12-22 
12:36:40 +)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib ChenQi/eSDK-sstate_dir
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/eSDK-sstate_dir

Chen Qi (1):
  selftest/eSDK.py: fix sstate dir not found error

 meta/lib/oeqa/selftest/eSDK.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.9.1

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


Re: [OE-core] [PATCH RFC] kernel.bbclass: symlink initramfs kernel bundle to kernel

2017-01-04 Thread Bruce Ashfield

On 2017-01-04 3:57 PM, California Sullivan wrote:

Image creation seems to always grab ${type} (usually bzImage), even if
we specifically use INITRAMFS_IMAGE_BUNDLE to create a bundled
initramfs/kernel. Work around this by linking ${type}.initramfs to
${type} as a final step when it exists.

Signed-off-by: California Sullivan 
---
I've been experimenting with initramfs stuff lately and discovered that
despite the bundled initramfs being built, it isn't being used by image
creation by default. This is one way to solve the issue, but ultimately
its probably a deficiency with image creation. Anyone with more
knowledge in this area have some thoughts?


I'm also not clear why the image creation wouldn't be grabbing whatever
is named in the INITRAMFS variables.

Is there some interaction between the python in image.bbclass and 
kernel.bbclass ? I see both trying to set the depends on

do_image_complete when INITRAMFS_IMAGE is defined.

.. but yah, other than creating the dependency on the initramfs build,
I don't see the image creation with any extra conditionals to switch to
the initramfs bundled kernel.

So your change should hold up, but I agree it doesn't feel right.

Bruce



 meta/classes/kernel.bbclass | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 3630042..5b5a642 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -618,6 +618,10 @@ kernel_do_deploy() {
initramfs_symlink_name=${type}-initramfs-${MACHINE}
install -m 0644 ${KERNEL_OUTPUT_DIR}/${type}.initramfs 
${DEPLOYDIR}/${initramfs_base_name}.bin
ln -sf ${initramfs_base_name}.bin 
${DEPLOYDIR}/${initramfs_symlink_name}.bin
+   if [ x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
+   echo "INITRAMFS_IMAGE_BUNDLE is set. Linking to 
${type}..."
+   ln -sf ${initramfs_base_name}.bin 
${DEPLOYDIR}/${type}
+   fi
fi
done
 }



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


[OE-core] [PATCH] nettle: Modify configure script to get consistent build.

2017-01-04 Thread Haiqing Bai
The original configure script detects the header files
of openssl to set variable like 'HAVE_OPENSSL_AES_H' in
config.h and ignore the value of '--enable-openssl', this
may cause inconsistent build.

Signed-off-by: Haiqing Bai 
---
 ...k-header-files-of-openssl-only-if-enable_.patch | 38 ++
 ...k-header-files-of-openssl-only-if-enable_.patch | 38 ++
 meta/recipes-support/nettle/nettle_2.7.1.bb|  1 +
 meta/recipes-support/nettle/nettle_3.3.bb  |  4 +++
 4 files changed, 81 insertions(+)
 create mode 100644 
meta/recipes-support/nettle/nettle-2.7.1/check-header-files-of-openssl-only-if-enable_.patch
 create mode 100644 
meta/recipes-support/nettle/nettle-3.3/check-header-files-of-openssl-only-if-enable_.patch

diff --git 
a/meta/recipes-support/nettle/nettle-2.7.1/check-header-files-of-openssl-only-if-enable_.patch
 
b/meta/recipes-support/nettle/nettle-2.7.1/check-header-files-of-openssl-only-if-enable_.patch
new file mode 100644
index 000..38d9107
--- /dev/null
+++ 
b/meta/recipes-support/nettle/nettle-2.7.1/check-header-files-of-openssl-only-if-enable_.patch
@@ -0,0 +1,38 @@
+From c369dd7049f5a198f8b6c96fde6e294ce5146c2f Mon Sep 17 00:00:00 2001
+From: Haiqing Bai 
+Date: Fri, 9 Dec 2016 16:16:45 +0800
+Subject: [PATCH] nettle: check header files of openssl only if
+ 'enable_openssl=yes'.
+
+The original configure script checks openssl header files to generate
+config.h even if 'enable_openssl' is not set to yes, this made inconsistent
+building for nettle.
+
+Upstream-Status: Pending
+Signed-off-by: Haiqing Bai 
+---
+ configure.ac | 8 +---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 78a3d4e..4f16a98 100644
+--- a/configure.ac
 b/configure.ac
+@@ -603,9 +603,11 @@ AC_CHECK_ALIGNOF(uint64_t)
+ ALIGNOF_UINT64_T="$ac_cv_alignof_uint64_t"
+ AC_SUBST(ALIGNOF_UINT64_T)
+ 
+-AC_CHECK_HEADERS([openssl/blowfish.h openssl/des.h openssl/cast.h 
openssl/aes.h],,
+-[enable_openssl=no
+- break])
++if test "x$enable_openssl" = "xyes"; then
++  AC_CHECK_HEADERS([openssl/blowfish.h openssl/des.h openssl/cast.h 
openssl/aes.h],,
++  [enable_openssl=no
++  break])
++fi
+ 
+ LSH_FUNC_ALLOCA
+ LSH_FUNC_STRERROR
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-support/nettle/nettle-3.3/check-header-files-of-openssl-only-if-enable_.patch
 
b/meta/recipes-support/nettle/nettle-3.3/check-header-files-of-openssl-only-if-enable_.patch
new file mode 100644
index 000..e7216ba
--- /dev/null
+++ 
b/meta/recipes-support/nettle/nettle-3.3/check-header-files-of-openssl-only-if-enable_.patch
@@ -0,0 +1,38 @@
+From ffee6b5f6204a0210f717968ec6ce514d70acca1 Mon Sep 17 00:00:00 2001
+From: Haiqing Bai 
+Date: Fri, 9 Dec 2016 15:23:17 +0800
+Subject: [PATCH] nettle: check header files of openssl only if
+ 'enable_openssl=yes'.
+
+The original configure script checks openssl header files to generate
+config.h even if 'enable_openssl' is not set to yes, this made inconsistent
+building for nettle.
+
+Upstream-Status: Pending
+Signed-off-by: Haiqing Bai 
+---
+ configure.ac | 8 +---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4ead52c..982760f 100644
+--- a/configure.ac
 b/configure.ac
+@@ -185,9 +185,11 @@ AC_HEADER_TIME
+ AC_CHECK_SIZEOF(long)
+ AC_CHECK_SIZEOF(size_t)
+ 
+-AC_CHECK_HEADERS([openssl/blowfish.h openssl/des.h openssl/cast.h 
openssl/aes.h openssl/ecdsa.h],,
+-[enable_openssl=no
+- break])
++if test "x$enable_openssl" = "xyes"; then
++  AC_CHECK_HEADERS([openssl/blowfish.h openssl/des.h openssl/cast.h 
openssl/aes.h openssl/ecdsa.h],,
++  [enable_openssl=no
++  break])
++fi
+ 
+ AC_CHECK_HEADERS([valgrind/memcheck.h])
+ 
+-- 
+1.9.1
+
diff --git a/meta/recipes-support/nettle/nettle_2.7.1.bb 
b/meta/recipes-support/nettle/nettle_2.7.1.bb
index ae8e311..2006146 100644
--- a/meta/recipes-support/nettle/nettle_2.7.1.bb
+++ b/meta/recipes-support/nettle/nettle_2.7.1.bb
@@ -13,6 +13,7 @@ SRC_URI[sha256sum] = 
"bc71ebd43435537d767799e414fce88e521b7278d48c860651216e1fc6
 SRC_URI += "\
 file://CVE-2015-8803_8805.patch \
 file://CVE-2015-8804.patch \
+file://check-header-files-of-openssl-only-if-enable_.patch \
 "
 
 DISABLE_STATIC = ""
diff --git a/meta/recipes-support/nettle/nettle_3.3.bb 
b/meta/recipes-support/nettle/nettle_3.3.bb
index c723e27..b76babf 100644
--- a/meta/recipes-support/nettle/nettle_3.3.bb
+++ b/meta/recipes-support/nettle/nettle_3.3.bb
@@ -7,5 +7,9 @@ LIC_FILES_CHKSUM = 
"file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6
 
file://serpent-decrypt.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e
 \
 
file://serpent-set-key.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e"
 

Re: [OE-core] [meta-oe][PATCH v3] devtools: Add recipe for Chromium Embedded Controller utilities

2017-01-04 Thread Khem Raj
On Wed, Jan 4, 2017 at 12:39 PM, Burton, Ross  wrote:
>
> On 4 January 2017 at 20:25, Moritz Fischer  wrote:
>>
>> Good catch, thanks. I submitted it upstream. I'll just wait for that
>> to resubmit my v4 here, maybe by then I don't need the patch anymore
>> then.
>
>
> Is there a good rationale to put this in oe-core, instead of a BSP layer or
> meta-oe?  How widespread are boards that use this tool?

it should be in meta-oe imo

>
> Ross
>
>
> --
> ___
> 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 0/6] Add opengl to REQUIRED_DISTRO_FEATURES for some recipes

2017-01-04 Thread Khem Raj
On Wed, Jan 4, 2017 at 5:13 PM, Christopher Larson  wrote:
>
> On Wed, Jan 4, 2017 at 4:49 PM, Burton, Ross  wrote:
>>
>> On 4 January 2017 at 22:57, Christopher Larson  wrote:
>>>
>>> These aren't buildable without it, and adding it fixes oe-core world
>>> builds
>>> with nodistro (which does not have the opengl feature by default).
>>
>>
>> Am I still the only person who thinks skipping of recipes should be
>> recursive, so if say libx11 throws a SkipRecipe then everything else that
>> depends on it is also magically skipped?
>
>
> I’d agree with that. It’d be a nice improvement. The user would see an
> explicit error if they try to build it, as is always the case with skipped
> recipes, but it’d be silently excluded from world the way skipped recipes
> usually are.

excluding from world builds is a fair argument.

> --
> Christopher Larson
> kergoth at gmail dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Senior Software Engineer, Mentor Graphics
>
> --
> ___
> 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 0/6] Add opengl to REQUIRED_DISTRO_FEATURES for some recipes

2017-01-04 Thread Christopher Larson
On Wed, Jan 4, 2017 at 4:49 PM, Burton, Ross  wrote:

> On 4 January 2017 at 22:57, Christopher Larson  wrote:
>
>> These aren't buildable without it, and adding it fixes oe-core world
>> builds
>> with nodistro (which does not have the opengl feature by default).
>>
>
> Am I still the only person who thinks skipping of recipes should be
> recursive, so if say libx11 throws a SkipRecipe then everything else that
> depends on it is also magically skipped?


I’d agree with that. It’d be a nice improvement. The user would see an
explicit error if they try to build it, as is always the case with skipped
recipes, but it’d be silently excluded from world the way skipped recipes
usually are.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 0/6] Add opengl to REQUIRED_DISTRO_FEATURES for some recipes

2017-01-04 Thread Khem Raj
On Wed, Jan 4, 2017 at 3:49 PM, Burton, Ross  wrote:
>
> On 4 January 2017 at 22:57, Christopher Larson  wrote:
>>
>> These aren't buildable without it, and adding it fixes oe-core world
>> builds
>> with nodistro (which does not have the opengl feature by default).
>
>
> Am I still the only person who thinks skipping of recipes should be
> recursive, so if say libx11 throws a SkipRecipe then everything else that
> depends on it is also magically skipped?

Somewhere, we need to flag that user is shooting his own foot by
skipping a given recipe.

>
> Ross
>
> --
> ___
> 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 3/6] ksize.py: Python 3 fixes

2017-01-04 Thread Khem Raj
On Wed, Jan 4, 2017 at 2:18 PM, Alejandro Hernandez
 wrote:
> Hey Khem,
>
> Ok, now I'm actually awake when reading this, are you saying these changes
> should go in the same patch as the one for ksum.py?
>

yes thats right.

>
>
> On 01/04/2017 12:21 PM, Alejandro Hernandez wrote:
>>
>> Hey Khem,
>>
>>
>> Its an old script fro Tom, but as far as I remember it worked fine on
>> python3, although thanks for checking and sending the patch!
>>
>> Cheers
>>
>> Alejandro
>>
>>
>> On 01/04/2017 12:39 AM, Khem Raj wrote:
>>>
>>> On Tue, Jan 3, 2017 at 2:30 PM, Alejandro Hernandez
>>>  wrote:

 From: Tom Zanussi 

 String errors and partial __cmp__ fix.
>>>
>>> may be fold it into previous patch.
>>>
 Signed-off-by: Tom Zanussi 
 ---
   scripts/tiny/ksize.py | 17 -
   1 file changed, 12 insertions(+), 5 deletions(-)

 diff --git a/scripts/tiny/ksize.py b/scripts/tiny/ksize.py
 index b9d2b19..ea1ca7f 100755
 --- a/scripts/tiny/ksize.py
 +++ b/scripts/tiny/ksize.py
 @@ -41,7 +41,7 @@ def usage():
   class Sizes:
   def __init__(self, glob):
   self.title = glob
 -p = Popen("size -t " + glob, shell=True, stdout=PIPE,
 stderr=PIPE)
 +p = Popen("size -t " + str(glob), shell=True, stdout=PIPE,
 stderr=PIPE)
   output = p.communicate()[0].splitlines()
   if len(output) > 2:
   sizes = output[-1].split()[0:4]
 @@ -62,18 +62,18 @@ class Report:
   r = Report(filename, title)
   path = os.path.dirname(filename)

 -p = Popen("ls " + path + "/*.o | grep -v built-in.o",
 +p = Popen("ls " + str(path) + "/*.o | grep -v built-in.o",
 shell=True, stdout=PIPE, stderr=PIPE)
   glob = ' '.join(p.communicate()[0].splitlines())
 -oreport = Report(glob, path + "/*.o")
 -oreport.sizes.title = path + "/*.o"
 +oreport = Report(glob, str(path) + "/*.o")
 +oreport.sizes.title = str(path) + "/*.o"
   r.parts.append(oreport)

   if subglob:
   p = Popen("ls " + subglob, shell=True, stdout=PIPE,
 stderr=PIPE)
   for f in p.communicate()[0].splitlines():
   path = os.path.dirname(f)
 -r.parts.append(Report.create(f, path, path +
 "/*/built-in.o"))
 +r.parts.append(Report.create(f, path, str(path) +
 "/*/built-in.o"))
   r.parts.sort(reverse=True)

   for b in r.parts:
 @@ -116,6 +116,13 @@ class Report:
  self.deltas["data"], self.deltas["bss"]))
   print("\n")

 +def __lt__(this, that):
 +if that is None:
 +return 1
 +if not isinstance(that, Report):
 +raise TypeError
 +return this.sizes.total < that.sizes.total
 +
   def __cmp__(this, that):
   if that is None:
   return 1
 --
 2.6.6

 --
 ___
 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 0/6] Add opengl to REQUIRED_DISTRO_FEATURES for some recipes

2017-01-04 Thread Burton, Ross
On 4 January 2017 at 22:57, Christopher Larson  wrote:

> These aren't buildable without it, and adding it fixes oe-core world builds
> with nodistro (which does not have the opengl feature by default).
>

Am I still the only person who thinks skipping of recipes should be
recursive, so if say libx11 throws a SkipRecipe then everything else that
depends on it is also magically skipped?

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


[OE-core] [PATCH] oe-selftest: Improve BUILDDIR environment handling

2017-01-04 Thread Richard Purdie
Its possible something (like bitbake/tinfoil2) may mess around with the
environment and using the enviroment as a global variable store isn't
particularly nice anyway.

This patch changes the BUILDDIR usages so that the environment isn't used
as a global store and a global variable is used instead. Whilst that
is still not perfect, it does avoid the current double and triple backtraces
we're seeing where tinfoil2/bitbake has trampled the enviroment leading
to failures of failures making debugging even harder.

Signed-off-by: Richard Purdie 
---
 scripts/oe-selftest | 19 +--
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/scripts/oe-selftest b/scripts/oe-selftest
index bfcea66..e166521 100755
--- a/scripts/oe-selftest
+++ b/scripts/oe-selftest
@@ -111,9 +111,13 @@ def get_args_parser():
 help='Submit test results to a repository')
 return parser
 
+builddir = None
+
 
 def preflight_check():
 
+global builddir
+
 log.info("Checking that everything is in order before running the tests")
 
 if not os.environ.get("BUILDDIR"):
@@ -135,7 +139,7 @@ def preflight_check():
 return True
 
 def add_include():
-builddir = os.environ.get("BUILDDIR")
+global builddir
 if "#include added by oe-selftest.py" \
 not in ftools.read_file(os.path.join(builddir, "conf/local.conf")):
 log.info("Adding: \"include selftest.inc\" in local.conf")
@@ -149,7 +153,7 @@ def add_include():
 "\n#include added by oe-selftest.py\ninclude bblayers.inc")
 
 def remove_include():
-builddir = os.environ.get("BUILDDIR")
+global builddir
 if builddir is None:
 return
 if "#include added by oe-selftest.py" \
@@ -165,18 +169,21 @@ def remove_include():
 "\n#include added by oe-selftest.py\ninclude bblayers.inc")
 
 def remove_inc_files():
+global builddir
+if builddir is None:
+return
 try:
-os.remove(os.path.join(os.environ.get("BUILDDIR"), 
"conf/selftest.inc"))
+os.remove(os.path.join(builddir, "conf/selftest.inc"))
 for root, _, files in os.walk(get_test_layer()):
 for f in files:
 if f == 'test_recipe.inc':
 os.remove(os.path.join(root, f))
-except (AttributeError, OSError,) as e:# AttributeError may happen if 
BUILDDIR is not set
+except OSError as e:
 pass
 
 for incl_file in ['conf/bblayers.inc', 'conf/machine.inc']:
 try:
-os.remove(os.path.join(os.environ.get("BUILDDIR"), incl_file))
+os.remove(os.path.join(builddir, incl_file))
 except:
 pass
 
@@ -394,7 +401,7 @@ def coverage_setup(coverage_source, coverage_include, 
coverage_omit):
 """ Set up the coverage measurement for the testcases to be run """
 import datetime
 import subprocess
-builddir = os.environ.get("BUILDDIR")
+global builddir
 pokydir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
 curcommit= subprocess.check_output(["git", "--git-dir", 
os.path.join(pokydir, ".git"), "rev-parse", "HEAD"]).decode('utf-8')
 coveragerc = "%s/.coveragerc" % builddir
-- 
2.7.4

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


Re: [OE-core] [PATCH 3/6] libglu: add opengl to REQUIRED_DISTRO_FEATURES

2017-01-04 Thread Phil Blundell
On Wed, 2017-01-04 at 15:57 -0700, Christopher Larson wrote:
> 
>  # Requires libGL.so which is provided by mesa when x11 in
> DISTRO_FEATURES
> -REQUIRED_DISTRO_FEATURES = "x11"
> +REQUIRED_DISTRO_FEATURES = "x11 opengl"

I sort of have the sense that something has gone a bit wrong with the
way {REQUIRED_}DISTRO_FEATURES is now being used.

The original concept with DISTRO_FEATURES was that it would just be a
global way of controlling the PACKAGECONFIG options for each recipe.
 That is, if you have x11 in DISTRO_FEATURES then PACKAGECONFIG[x11]
would be turned on automatically for every recipe that supports it, and
so on.  It was never really intended to be, and I still feel it
probably ought not to be, a filtering mechanism.

Or, to put it another way, just because you don't have x11 in
DISTRO_FEATURES doesn't necessarily mean that your distro refuses to
support x11 at all.  It ought simply to mean that you don't
want packages compiled with X11 support where this is avoidable.

But in the particular case above, if the comment is correct then the
presence of x11 in REQUIRED_DISTRO_FEATURES seems bogus by any
interpretation.  If it's really true that libGLU simply "Requires
libGL.so" then either:

a) it ought to have nothing at all in REQUIRED_DISTRO_FEATURES and
simply express a dependency on virtual/libgl (which would be my
preference); or

b) it ought to mention only opengl in REQUIRED_DISTRO_FEATURES

p.

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


[OE-core] [PATCH 6/6] packagegroup-core-lsb: add opengl to REQUIRED_DISTRO_FEATURES

2017-01-04 Thread Christopher Larson
From: Christopher Larson 

This group pulls in libglu, which needs virtual/libgl, whose providers require
opengl in DISTRO_FEATURES.

Signed-off-by: Christopher Larson 
---
 meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb 
b/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
index 734dda1..3aedf6b 100644
--- a/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
+++ b/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
@@ -11,6 +11,9 @@ inherit packagegroup distro_features_check
 # The libxt, libxtst and others require x11 in DISTRO_FEATURES
 REQUIRED_DISTRO_FEATURES = "x11"
 
+# libglu needs virtual/libgl, which requires opengl in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES += "opengl"
+
 #
 # We will skip parsing this packagegeoup for non-glibc systems
 #
-- 
2.8.0

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


[OE-core] [PATCH 2/6] piglit: add opengl to REQUIRED_DISTRO_FEATURES

2017-01-04 Thread Christopher Larson
From: Christopher Larson 

This recipe depend on virtual/libgl, whose providers require the opengl distro
feature.

Signed-off-by: Christopher Larson 
---
 meta/recipes-graphics/piglit/piglit_git.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-graphics/piglit/piglit_git.bb 
b/meta/recipes-graphics/piglit/piglit_git.bb
index 82adcde..b9cdce8 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -22,6 +22,9 @@ inherit cmake python3native distro_features_check 
bash-completion
 # depends on virtual/libx11
 REQUIRED_DISTRO_FEATURES = "x11"
 
+# depends on virtual/libgl
+REQUIRED_DISTRO_FEATURES += "opengl"
+
 # The built scripts go into the temporary directory according to tempfile
 # (typically /tmp) which can race if multiple builds happen on the same 
machine,
 # so tell it to use a directory in ${B} to avoid overwriting.
-- 
2.8.0

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


[OE-core] [PATCH 3/6] libglu: add opengl to REQUIRED_DISTRO_FEATURES

2017-01-04 Thread Christopher Larson
From: Christopher Larson 

This requires libgl, and mesa requires the opengl distro feature.

Signed-off-by: Christopher Larson 
---
 meta/recipes-graphics/mesa/libglu_9.0.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/mesa/libglu_9.0.0.bb 
b/meta/recipes-graphics/mesa/libglu_9.0.0.bb
index 010998d..8b94613 100644
--- a/meta/recipes-graphics/mesa/libglu_9.0.0.bb
+++ b/meta/recipes-graphics/mesa/libglu_9.0.0.bb
@@ -24,7 +24,7 @@ DEPENDS = "virtual/libgl"
 inherit autotools pkgconfig distro_features_check
 
 # Requires libGL.so which is provided by mesa when x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
+REQUIRED_DISTRO_FEATURES = "x11 opengl"
 
 # Remove the mesa-glu dependency in mesa-glu-dev, as mesa-glu is empty
 RDEPENDS_${PN}-dev = ""
-- 
2.8.0

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


[OE-core] [PATCH 0/6] Add opengl to REQUIRED_DISTRO_FEATURES for some recipes

2017-01-04 Thread Christopher Larson
From: Christopher Larson 

These aren't buildable without it, and adding it fixes oe-core world builds
with nodistro (which does not have the opengl feature by default).

The following changes since commit 425afe2484707640ac71194885fdb263e95e9950:

  lib/oe/utils: Drop python2 compatibility code (2016-12-22 08:50:21 +)

are available in the git repository at:

  git://github.com/kergoth/openembedded-core without-opengl-fixes
  https://github.com/kergoth/openembedded-core/tree/without-opengl-fixes

Christopher Larson (6):
  waffle: add opengl to REQUIRED_DISTRO_FEATURES
  piglit: add opengl to REQUIRED_DISTRO_FEATURES
  libglu: add opengl to REQUIRED_DISTRO_FEATURES
  eglinfo-x11: add opengl to REQUIRED_DISTRO_FEATURES
  packagegroup-self-hosted: add opengl to REQUIRED_DISTRO_FEATURES
  packagegroup-core-lsb: add opengl to REQUIRED_DISTRO_FEATURES

 meta/recipes-core/packagegroups/packagegroup-self-hosted.bb  | 3 +++
 meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb | 3 +++
 meta/recipes-graphics/eglinfo/eglinfo-x11_1.0.0.bb   | 3 ++-
 meta/recipes-graphics/mesa/libglu_9.0.0.bb   | 2 +-
 meta/recipes-graphics/piglit/piglit_git.bb   | 3 +++
 meta/recipes-graphics/waffle/waffle_1.5.2.bb | 3 +++
 6 files changed, 15 insertions(+), 2 deletions(-)

-- 
2.8.0

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


[OE-core] [PATCH 4/6] eglinfo-x11: add opengl to REQUIRED_DISTRO_FEATURES

2017-01-04 Thread Christopher Larson
From: Christopher Larson 

The .inc already included this, but the x11 version was overriding it. This is
a problem, as the x11 version still needs opengl as well as x11. Append
instead.

Signed-off-by: Christopher Larson 
---
 meta/recipes-graphics/eglinfo/eglinfo-x11_1.0.0.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/eglinfo/eglinfo-x11_1.0.0.bb 
b/meta/recipes-graphics/eglinfo/eglinfo-x11_1.0.0.bb
index 3427fdf..db00f76 100644
--- a/meta/recipes-graphics/eglinfo/eglinfo-x11_1.0.0.bb
+++ b/meta/recipes-graphics/eglinfo/eglinfo-x11_1.0.0.bb
@@ -6,7 +6,8 @@ include eglinfo.inc
 DEPENDS += "virtual/libx11"
 
 inherit distro_features_check
+
 # depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
+REQUIRED_DISTRO_FEATURES += "x11"
 
 SUMMARY += "(X11 version)"
-- 
2.8.0

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


[OE-core] [PATCH 5/6] packagegroup-self-hosted: add opengl to REQUIRED_DISTRO_FEATURES

2017-01-04 Thread Christopher Larson
From: Christopher Larson 

This rdepends on libgl.

Signed-off-by: Christopher Larson 
---
 meta/recipes-core/packagegroups/packagegroup-self-hosted.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb 
b/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
index 73430b8..c1bbdfc 100644
--- a/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
@@ -10,6 +10,9 @@ inherit packagegroup  distro_features_check
 # rdepends on libx11-dev
 REQUIRED_DISTRO_FEATURES = "x11"
 
+# rdepends on libgl
+REQUIRED_DISTRO_FEATURES += "opengl"
+
 PACKAGES = "\
 packagegroup-self-hosted \
 packagegroup-self-hosted-debug \
-- 
2.8.0

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


[OE-core] [PATCH 1/6] waffle: add opengl to REQUIRED_DISTRO_FEATURES

2017-01-04 Thread Christopher Larson
From: Christopher Larson 

Multiple packageconfigs depend upon virtual/libgl, whose providers require the
opengl distro feature.

Signed-off-by: Christopher Larson 
---
 meta/recipes-graphics/waffle/waffle_1.5.2.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-graphics/waffle/waffle_1.5.2.bb 
b/meta/recipes-graphics/waffle/waffle_1.5.2.bb
index f7db1bc..9d6b0e0 100644
--- a/meta/recipes-graphics/waffle/waffle_1.5.2.bb
+++ b/meta/recipes-graphics/waffle/waffle_1.5.2.bb
@@ -20,6 +20,9 @@ PACKAGECONFIG ??= "glx"
 # libx11 requires x11 in DISTRO_FEATURES.
 REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'glx', 
'x11', '', d)}"
 
+# virtual/libgl requires opengl in DISTRO_FEATURES.
+REQUIRED_DISTRO_FEATURES += "${@bb.utils.contains('DEPENDS', 'virtual/libgl', 
'opengl', '', d)}"
+
 # I say virtual/libgl, actually wants gl.pc
 PACKAGECONFIG[glx] = "-Dwaffle_has_glx=1,-Dwaffle_has_glx=0,virtual/libgl 
libx11"
 
-- 
2.8.0

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


Re: [OE-core] [PATCH 3/6] ksize.py: Python 3 fixes

2017-01-04 Thread Alejandro Hernandez

Hey Khem,

Ok, now I'm actually awake when reading this, are you saying these 
changes should go in the same patch as the one for ksum.py?



On 01/04/2017 12:21 PM, Alejandro Hernandez wrote:

Hey Khem,


Its an old script fro Tom, but as far as I remember it worked fine on 
python3, although thanks for checking and sending the patch!


Cheers

Alejandro


On 01/04/2017 12:39 AM, Khem Raj wrote:

On Tue, Jan 3, 2017 at 2:30 PM, Alejandro Hernandez
 wrote:

From: Tom Zanussi 

String errors and partial __cmp__ fix.

may be fold it into previous patch.


Signed-off-by: Tom Zanussi 
---
  scripts/tiny/ksize.py | 17 -
  1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/scripts/tiny/ksize.py b/scripts/tiny/ksize.py
index b9d2b19..ea1ca7f 100755
--- a/scripts/tiny/ksize.py
+++ b/scripts/tiny/ksize.py
@@ -41,7 +41,7 @@ def usage():
  class Sizes:
  def __init__(self, glob):
  self.title = glob
-p = Popen("size -t " + glob, shell=True, stdout=PIPE, 
stderr=PIPE)
+p = Popen("size -t " + str(glob), shell=True, stdout=PIPE, 
stderr=PIPE)

  output = p.communicate()[0].splitlines()
  if len(output) > 2:
  sizes = output[-1].split()[0:4]
@@ -62,18 +62,18 @@ class Report:
  r = Report(filename, title)
  path = os.path.dirname(filename)

-p = Popen("ls " + path + "/*.o | grep -v built-in.o",
+p = Popen("ls " + str(path) + "/*.o | grep -v built-in.o",
shell=True, stdout=PIPE, stderr=PIPE)
  glob = ' '.join(p.communicate()[0].splitlines())
-oreport = Report(glob, path + "/*.o")
-oreport.sizes.title = path + "/*.o"
+oreport = Report(glob, str(path) + "/*.o")
+oreport.sizes.title = str(path) + "/*.o"
  r.parts.append(oreport)

  if subglob:
  p = Popen("ls " + subglob, shell=True, stdout=PIPE, 
stderr=PIPE)

  for f in p.communicate()[0].splitlines():
  path = os.path.dirname(f)
-r.parts.append(Report.create(f, path, path + 
"/*/built-in.o"))
+r.parts.append(Report.create(f, path, str(path) + 
"/*/built-in.o"))

  r.parts.sort(reverse=True)

  for b in r.parts:
@@ -116,6 +116,13 @@ class Report:
 self.deltas["data"], self.deltas["bss"]))
  print("\n")

+def __lt__(this, that):
+if that is None:
+return 1
+if not isinstance(that, Report):
+raise TypeError
+return this.sizes.total < that.sizes.total
+
  def __cmp__(this, that):
  if that is None:
  return 1
--
2.6.6

--
___
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


[OE-core] [PATCH RFC] kernel.bbclass: symlink initramfs kernel bundle to kernel

2017-01-04 Thread California Sullivan
Image creation seems to always grab ${type} (usually bzImage), even if
we specifically use INITRAMFS_IMAGE_BUNDLE to create a bundled
initramfs/kernel. Work around this by linking ${type}.initramfs to
${type} as a final step when it exists.

Signed-off-by: California Sullivan 
---
I've been experimenting with initramfs stuff lately and discovered that
despite the bundled initramfs being built, it isn't being used by image
creation by default. This is one way to solve the issue, but ultimately
its probably a deficiency with image creation. Anyone with more
knowledge in this area have some thoughts?

 meta/classes/kernel.bbclass | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 3630042..5b5a642 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -618,6 +618,10 @@ kernel_do_deploy() {
initramfs_symlink_name=${type}-initramfs-${MACHINE}
install -m 0644 ${KERNEL_OUTPUT_DIR}/${type}.initramfs 
${DEPLOYDIR}/${initramfs_base_name}.bin
ln -sf ${initramfs_base_name}.bin 
${DEPLOYDIR}/${initramfs_symlink_name}.bin
+   if [ x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
+   echo "INITRAMFS_IMAGE_BUNDLE is set. Linking to 
${type}..."
+   ln -sf ${initramfs_base_name}.bin 
${DEPLOYDIR}/${type}
+   fi
fi
done
 }
-- 
2.5.5

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


Re: [OE-core] [meta-oe][PATCH v3] devtools: Add recipe for Chromium Embedded Controller utilities

2017-01-04 Thread Burton, Ross
On 4 January 2017 at 20:25, Moritz Fischer  wrote:

> Good catch, thanks. I submitted it upstream. I'll just wait for that
> to resubmit my v4 here, maybe by then I don't need the patch anymore
> then.
>

Is there a good rationale to put this in oe-core, instead of a BSP layer or
meta-oe?  How widespread are boards that use this tool?

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


Re: [OE-core] [PATCH v2] wic/isoimage-isohybrid: check for grub-mkimage

2017-01-04 Thread Ed Bartosh
On Wed, Jan 04, 2017 at 10:12:55PM +0200, Ed Bartosh wrote:
> On Wed, Jan 04, 2017 at 09:04:43PM +0200, Ioan-Adrian Ratiu wrote:
> > The isohybrid plugin uses grub-mkimage but doesn't make sure it gets built.
> > Add a check to avoid the following error:
> > 
> > Error: A native program grub-mkimage required to build the image was not 
> > found (see details above).
> > 
> > Wic failed to find a recipe to build native grub-mkimage. Please file a bug 
> > against wic.
> > 
> > Signed-off-by: Ioan-Adrian Ratiu 
> > ---
> >  scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 5 +
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py 
> > b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
> > index 849fd8bea3..d616316d61 100644
> > --- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
> > +++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
> > @@ -242,6 +242,11 @@ class IsoImagePlugin(SourcePlugin):
> >  msger.info("Building mtools-native...\n")
> >  exec_cmd("bitbake mtools-native")
> >  
> > +# Make sure grub-mkimage is available in native sysroot
> > +if not os.path.isfile("%s/usr/bin/grub-mkimage" % native_sysroot):
> > +msger.info("Building grub-native...\n")
> > +exec_cmd("bitbake grub-native")
> > +
> >  @classmethod
> >  def do_configure_partition(cls, part, source_params, creator, 
> > cr_workdir,
> > oe_builddir, bootimg_dir, kernel_dir,
> 
> Unfortunately this approach will not work if wic is run from bitbake.
> 
> I'd suggest to simply add grub-native to NATIVE_RECIPES dictionary in
> scripts/lib/wic/utils/oe/misc.py
> It will make error message more informative and useful.
> 
The same should probably be done with the rest of native tools called from
this module. It's better to avoid building them implicitly.

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


Re: [OE-core] [meta-oe][PATCH v3] devtools: Add recipe for Chromium Embedded Controller utilities

2017-01-04 Thread Moritz Fischer
Leonardo,

On Wed, Jan 4, 2017 at 10:36 AM, Leonardo Sandoval
 wrote:
>
>> +}
>> diff --git
>> a/meta/recipes-devtools/chromium-utils/files/0001-build-Add-HOST_LDFLAGS.patch
>> b/meta/recipes-devtools/chromium-utils/files/0001-build-Add-HOST_LDFLAGS.patch
>> new file mode 100644
>> index 000..46e8cad
>> --- /dev/null
>> +++
>> b/meta/recipes-devtools/chromium-utils/files/0001-build-Add-HOST_LDFLAGS.patch
>> @@ -0,0 +1,26 @@
>> +From 56ffeeffea735a6a8f69fc111278ebabe3c7e2d8 Mon Sep 17 00:00:00 2001
>> +From: Moritz Fischer 
>> +Date: Tue, 27 Dec 2016 22:24:07 -0800
>> +Subject: [PATCH] build Add HOST_LDFLAGS
>> +
>
>
> what is the Upstream Status of this patch? At least for oe-core, you need to
> provide it. More info at
> http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines

Good catch, thanks. I submitted it upstream. I'll just wait for that
to resubmit my v4 here, maybe by then I don't need the patch anymore
then.

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


Re: [OE-core] [PATCH v2] wic/isoimage-isohybrid: check for grub-mkimage

2017-01-04 Thread Ed Bartosh
On Wed, Jan 04, 2017 at 09:04:43PM +0200, Ioan-Adrian Ratiu wrote:
> The isohybrid plugin uses grub-mkimage but doesn't make sure it gets built.
> Add a check to avoid the following error:
> 
> Error: A native program grub-mkimage required to build the image was not 
> found (see details above).
> 
> Wic failed to find a recipe to build native grub-mkimage. Please file a bug 
> against wic.
> 
> Signed-off-by: Ioan-Adrian Ratiu 
> ---
>  scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 5 +
>  1 file changed, 5 insertions(+)
> 
> diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py 
> b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
> index 849fd8bea3..d616316d61 100644
> --- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
> +++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
> @@ -242,6 +242,11 @@ class IsoImagePlugin(SourcePlugin):
>  msger.info("Building mtools-native...\n")
>  exec_cmd("bitbake mtools-native")
>  
> +# Make sure grub-mkimage is available in native sysroot
> +if not os.path.isfile("%s/usr/bin/grub-mkimage" % native_sysroot):
> +msger.info("Building grub-native...\n")
> +exec_cmd("bitbake grub-native")
> +
>  @classmethod
>  def do_configure_partition(cls, part, source_params, creator, cr_workdir,
> oe_builddir, bootimg_dir, kernel_dir,

Unfortunately this approach will not work if wic is run from bitbake.

I'd suggest to simply add grub-native to NATIVE_RECIPES dictionary in
scripts/lib/wic/utils/oe/misc.py
It will make error message more informative and useful.

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


[OE-core] [PATCH] mtd-utils: Upgrade to 2.0.0

2017-01-04 Thread Mike Crowe
Upstream has started using automake which means that the recipe must now
inherit from autotools and pkgconfig.

The source tree has been reorganised too which requires the paths in the
patches to be modified. None of the patches appear to have been applied
upstream.

Signed-off-by: Mike Crowe 
---
 meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch  | 4 ++--
 .../mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch   | 2 +-
 meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch  | 4 ++--
 ...-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch | 4 ++--
 meta/recipes-devtools/mtd/mtd-utils_git.bb  | 6 --
 5 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch 
b/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch
index 305be52..6a9bd1c 100644
--- a/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch
+++ b/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch
@@ -14,8 +14,8 @@ Signed-off-by: Khem Raj 
 
 diff --git a/mkfs.jffs2.c b/mkfs.jffs2.c
 index f09c0b2..ed2dc43 100644
 a/mkfs.jffs2.c
-+++ b/mkfs.jffs2.c
+--- a/jffsX-utils/mkfs.jffs2.c
 b/jffsX-utils/mkfs.jffs2.c
 @@ -72,6 +72,7 @@
  #include 
  #include 
diff --git 
a/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch 
b/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch
index 57d6a30..0e3776a 100644
--- 
a/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch
+++ 
b/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch
@@ -1,7 +1,7 @@
 Upstream-Status: Pending
 
 --- /tmp/mkfs.jffs2.c  2009-01-11 15:28:41.0 +0100
-+++ git/mkfs.jffs2.c   2009-01-11 15:59:29.0 +0100
 git/jffsX-utils/mkfs.jffs2.c   2009-01-11 15:59:29.0 +0100
 @@ -100,6 +100,11 @@
struct rb_node hardlink_rb;
  };
diff --git a/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch 
b/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch
index 05f1629..a279d84 100644
--- a/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch
+++ b/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch
@@ -8,8 +8,8 @@ Signed-off-by: Yuanjie Huang 
 
 diff --git a/mkfs.ubifs/key.h b/mkfs.ubifs/key.h
 index d3a02d4..e7e9218 100644
 a/mkfs.ubifs/key.h
-+++ b/mkfs.ubifs/key.h
+--- a/ubifs-utils/mkfs.ubifs/key.h
 b/ubifs-utils/mkfs.ubifs/key.h
 @@ -141,10 +141,12 @@ static inline void data_key_init(union ubifs_key *key, 
ino_t inum,
   */
  static inline void key_write(const union ubifs_key *from, void *to)
diff --git 
a/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch
 
b/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch
index 7207cfc..0f42e73 100644
--- 
a/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch
+++ 
b/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch
@@ -49,8 +49,8 @@ v2 : get length of availble freeoob bytes from oobinfo 
information,
 
 diff --git a/flash_erase.c b/flash_erase.c
 index 933373a..4b9d84b 100644
 a/flash_erase.c
-+++ b/flash_erase.c
+--- a/misc-utils/flash_erase.c
 b/misc-utils/flash_erase.c
 @@ -99,6 +99,7 @@ int main(int argc, char *argv[])
bool isNAND;
int error = 0;
diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb 
b/meta/recipes-devtools/mtd/mtd-utils_git.bb
index 8a3afaf..d09ac84 100644
--- a/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -5,11 +5,13 @@ LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
 
file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
 
+inherit autotools pkgconfig
+
 DEPENDS = "zlib lzo e2fsprogs util-linux"
 
-PV = "1.5.2"
+PV = "2.0.0"
 
-SRCREV = "aea36417067dade75192bafa03af70b6eb2677b1"
+SRCREV = "1bfee8660131fca7a18f68e9548a18ca6b3378a0"
 SRC_URI = "git://git.infradead.org/mtd-utils.git \
file://add-exclusion-to-mkfs-jffs2-git-2.patch \
file://fix-armv7-neon-alignment.patch \
-- 
2.1.4

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


[OE-core] [PATCH v2] wic/isoimage-isohybrid: check for grub-mkimage

2017-01-04 Thread Ioan-Adrian Ratiu
The isohybrid plugin uses grub-mkimage but doesn't make sure it gets built.
Add a check to avoid the following error:

Error: A native program grub-mkimage required to build the image was not found 
(see details above).

Wic failed to find a recipe to build native grub-mkimage. Please file a bug 
against wic.

Signed-off-by: Ioan-Adrian Ratiu 
---
 scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 5 +
 1 file changed, 5 insertions(+)

diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py 
b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index 849fd8bea3..d616316d61 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -242,6 +242,11 @@ class IsoImagePlugin(SourcePlugin):
 msger.info("Building mtools-native...\n")
 exec_cmd("bitbake mtools-native")
 
+# Make sure grub-mkimage is available in native sysroot
+if not os.path.isfile("%s/usr/bin/grub-mkimage" % native_sysroot):
+msger.info("Building grub-native...\n")
+exec_cmd("bitbake grub-native")
+
 @classmethod
 def do_configure_partition(cls, part, source_params, creator, cr_workdir,
oe_builddir, bootimg_dir, kernel_dir,
-- 
2.11.0

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


[OE-core] [PATCH 2/2] populate_sdk_ext: whitelist do_package tasks

2017-01-04 Thread Ed Bartosh
With enabled SSTATE_MIRRORS sstate code expects mirrors to
contain entries for all tasks, which is not the case for ext
installer as it uses reduced sstate cache.

Added do_package tasks to BB_SETSCENE_ENFORCE_WHITELIST to prevent
installer failing with ERROR: Sstate artifact unavailable

[YOCTO #10832]

Signed-off-by: Ed Bartosh 

diff --git a/meta/classes/populate_sdk_ext.bbclass 
b/meta/classes/populate_sdk_ext.bbclass
index fc9cc22..d1b3fb4 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -305,7 +305,7 @@ python copy_buildsystem () {
 f.write('SIGGEN_LOCKEDSIGS_TASKSIG_CHECK = "warn"\n\n')
 
 # Set up whitelist for run on install
-f.write('BB_SETSCENE_ENFORCE_WHITELIST = "%:* *:do_shared_workdir 
*:do_rm_work"\n\n')
+f.write('BB_SETSCENE_ENFORCE_WHITELIST = "%:* *:do_shared_workdir 
*:do_rm_work *:do_package"\n\n')
 
 # Hide the config information from bitbake output (since it's 
fixed within the SDK)
 f.write('BUILDCFG_HEADER = ""\n\n')
-- 
2.1.4

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


[OE-core] [PATCH 1/2] populate_sdk_ext: fix working with uninative sstate

2017-01-04 Thread Ed Bartosh
Mapped uninative sstate directories to make ext SDK installer to
use them when it's run on systems with gcc version different from
gcc version used to build installer.

[YOCTO #10832]

Signed-off-by: Ed Bartosh 

diff --git a/meta/classes/populate_sdk_ext.bbclass 
b/meta/classes/populate_sdk_ext.bbclass
index 0812eea..fc9cc22 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -308,7 +308,10 @@ python copy_buildsystem () {
 f.write('BB_SETSCENE_ENFORCE_WHITELIST = "%:* *:do_shared_workdir 
*:do_rm_work"\n\n')
 
 # Hide the config information from bitbake output (since it's 
fixed within the SDK)
-f.write('BUILDCFG_HEADER = ""\n')
+f.write('BUILDCFG_HEADER = ""\n\n')
+
+# Map gcc-dependent uninative sstate cache for installer usage
+f.write('SSTATE_MIRRORS = "file://universal/(.*) 
file://universal-4.9/\\1\\nfile://universal-4.9/(.*) 
file://universal-4.8/\\1"\n\n')
 
 # Allow additional config through sdk-extra.conf
 fn = bb.cookerdata.findConfigFile('sdk-extra.conf', d)
-- 
2.1.4

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


[OE-core] [PATCH] wic/isoimage-isohybrid: check for grub-mkimage

2017-01-04 Thread Ioan-Adrian Ratiu
The isohybrid plugin uses grub-mkimage but doesn't make sure it gets built.
Add a check to avoid the following error:

Error: A native program grub-mkimage required to build the image was not found 
(see details above).

Wic failed to find a recipe to build native grub-mkimage. Please file a bug 
against wic.

Signed-off-by: Ioan-Adrian Ratiu 
---
 scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 5 +
 1 file changed, 5 insertions(+)

diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py 
b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index 3858fd439b..9c408d046f 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -242,6 +242,11 @@ class IsoImagePlugin(SourcePlugin):
 msger.info("Building mtools-native...\n")
 exec_cmd("bitbake mtools-native")
 
+# Make sure grub-mkconfig is available in native sysroot
+if not os.path.isfile("%s/usr/bin/grub-mkimage" % native_sysroot):
+msger.info("Building grub-native...\n")
+exec_cmd("bitbake grub-native")
+
 @classmethod
 def do_configure_partition(cls, part, source_params, creator, cr_workdir,
oe_builddir, bootimg_dir, kernel_dir,
-- 
2.11.0

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


Re: [OE-core] [meta-oe][PATCH v3] devtools: Add recipe for Chromium Embedded Controller utilities

2017-01-04 Thread Leonardo Sandoval



+}
diff --git 
a/meta/recipes-devtools/chromium-utils/files/0001-build-Add-HOST_LDFLAGS.patch 
b/meta/recipes-devtools/chromium-utils/files/0001-build-Add-HOST_LDFLAGS.patch
new file mode 100644
index 000..46e8cad
--- /dev/null
+++ 
b/meta/recipes-devtools/chromium-utils/files/0001-build-Add-HOST_LDFLAGS.patch
@@ -0,0 +1,26 @@
+From 56ffeeffea735a6a8f69fc111278ebabe3c7e2d8 Mon Sep 17 00:00:00 2001
+From: Moritz Fischer 
+Date: Tue, 27 Dec 2016 22:24:07 -0800
+Subject: [PATCH] build Add HOST_LDFLAGS
+


what is the Upstream Status of this patch? At least for oe-core, you 
need to provide it. More info at 
http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines





+Signed-off-by: Moritz Fischer 
+---
+ Makefile.rules | 2 +-



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


Re: [OE-core] [PATCH 2/6] core-image-tiny-initramfs: Add and image creating image artifacts only

2017-01-04 Thread Leonardo Sandoval

Alex, the patch requires to be signed off.


On 01/03/2017 04:30 PM, Alejandro Hernandez wrote:

From: Tom Zanussi 

Add an image that simply creates image artifacts using
image-live-artifacts support instead of creating an actual image.

The image artifacts can then be subsequently assembled by an external
tool such as wic to create an actual image.

This eliminates redundant image creation when using such tools.
---
  .../images/core-image-tiny-initramfs.bb| 31 ++
  1 file changed, 31 insertions(+)
  create mode 100644 meta/recipes-core/images/core-image-tiny-initramfs.bb

diff --git a/meta/recipes-core/images/core-image-tiny-initramfs.bb 
b/meta/recipes-core/images/core-image-tiny-initramfs.bb
new file mode 100644
index 000..216f3e0
--- /dev/null
+++ b/meta/recipes-core/images/core-image-tiny-initramfs.bb
@@ -0,0 +1,31 @@
+# Simple initramfs image artifact generation for tiny images.
+DESCRIPTION = "Tiny image capable of booting a device. The kernel includes \
+the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
+first 'init' program more efficiently.  core-image-tiny-initramfs doesn't \
+actually generate an image but rather generates boot and rootfs artifacts \
+into a common location that can subsequently be picked up by external image \
+generation tools such as wic."
+
+PACKAGE_INSTALL = "initramfs-live-boot packagegroup-core-boot dropbear 
${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
+
+# Do not pollute the initrd image with rootfs features
+IMAGE_FEATURES = ""
+
+export IMAGE_BASENAME = "core-image-tiny-initramfs"
+IMAGE_LINGUAS = ""
+
+LICENSE = "MIT"
+
+# don't actually generate an image, just the artifacts needed for one
+ARTIFACTS_ONLY ?= "1"
+
+IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
+inherit core-image
+
+IMAGE_ROOTFS_SIZE = "8192"
+IMAGE_ROOTFS_EXTRA_SPACE = "0"
+
+BAD_RECOMMENDATIONS += "busybox-syslog"
+
+# Use the same restriction as initramfs-live-install
+COMPATIBLE_HOST = "(i.86|x86_64).*-linux"


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


Re: [OE-core] [PATCH 3/6] ksize.py: Python 3 fixes

2017-01-04 Thread Alejandro Hernandez

Hey Khem,


Its an old script fro Tom, but as far as I remember it worked fine on 
python3, although thanks for checking and sending the patch!


Cheers

Alejandro


On 01/04/2017 12:39 AM, Khem Raj wrote:

On Tue, Jan 3, 2017 at 2:30 PM, Alejandro Hernandez
 wrote:

From: Tom Zanussi 

String errors and partial __cmp__ fix.

may be fold it into previous patch.


Signed-off-by: Tom Zanussi 
---
  scripts/tiny/ksize.py | 17 -
  1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/scripts/tiny/ksize.py b/scripts/tiny/ksize.py
index b9d2b19..ea1ca7f 100755
--- a/scripts/tiny/ksize.py
+++ b/scripts/tiny/ksize.py
@@ -41,7 +41,7 @@ def usage():
  class Sizes:
  def __init__(self, glob):
  self.title = glob
-p = Popen("size -t " + glob, shell=True, stdout=PIPE, stderr=PIPE)
+p = Popen("size -t " + str(glob), shell=True, stdout=PIPE, stderr=PIPE)
  output = p.communicate()[0].splitlines()
  if len(output) > 2:
  sizes = output[-1].split()[0:4]
@@ -62,18 +62,18 @@ class Report:
  r = Report(filename, title)
  path = os.path.dirname(filename)

-p = Popen("ls " + path + "/*.o | grep -v built-in.o",
+p = Popen("ls " + str(path) + "/*.o | grep -v built-in.o",
shell=True, stdout=PIPE, stderr=PIPE)
  glob = ' '.join(p.communicate()[0].splitlines())
-oreport = Report(glob, path + "/*.o")
-oreport.sizes.title = path + "/*.o"
+oreport = Report(glob, str(path) + "/*.o")
+oreport.sizes.title = str(path) + "/*.o"
  r.parts.append(oreport)

  if subglob:
  p = Popen("ls " + subglob, shell=True, stdout=PIPE, stderr=PIPE)
  for f in p.communicate()[0].splitlines():
  path = os.path.dirname(f)
-r.parts.append(Report.create(f, path, path + "/*/built-in.o"))
+r.parts.append(Report.create(f, path, str(path) + 
"/*/built-in.o"))
  r.parts.sort(reverse=True)

  for b in r.parts:
@@ -116,6 +116,13 @@ class Report:
 self.deltas["data"], self.deltas["bss"]))
  print("\n")

+def __lt__(this, that):
+if that is None:
+return 1
+if not isinstance(that, Report):
+raise TypeError
+return this.sizes.total < that.sizes.total
+
  def __cmp__(this, that):
  if that is None:
  return 1
--
2.6.6

--
___
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 v2] Append KERNEL_VERSION string to kernel module package names

2017-01-04 Thread Leonardo Sandoval
Ola, please follow the commit short log guidelines when submitting 
patches. Basically you need to prefix the target where this change is 
applying then a brief description, for example


kernel-module-split: Append KERNEL_VERSION string to kernel module

More info at 
http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines



On 01/03/2017 08:21 AM, ola.red...@gmail.com wrote:

From: Ola Redell 

The KERNEL_VERSION string is added to kernel module package names in order to
make the kernel modules for different kernel versions distinct packages instead
of different versions of the same package. With this change, when a new kernel
is installed together with its kernel modules (e.g. by upgrade of the packages
kernel and kernel-modules) using some package manager such as apt-get or rpm,
the kernel modules for the older kernel will not be removed. This enables a
fall back to the older kernel if the new one fails.

Signed-off-by: Ola Redell 
---
  meta/classes/kernel-module-split.bbclass | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel-module-split.bbclass 
b/meta/classes/kernel-module-split.bbclass
index efe1b42..13cff51 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -122,7 +122,7 @@ python split_kernel_module_packages () {
  module_regex = '^(.*)\.k?o$'
  
  module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX')

-module_pattern = module_pattern_prefix + 'kernel-module-%s'
+module_pattern = module_pattern_prefix + 'kernel-module-%s-' + 
d.getVar("KERNEL_VERSION", True)
  
  postinst = d.getVar('pkg_postinst_modules')

  postrm = d.getVar('pkg_postrm_modules')


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


[OE-core] [PATCH] Changed order of lines to prevent use of unset variable BUILDSTATS_BASE

2017-01-04 Thread Jochen Jaegers
---
 meta/classes/toaster.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index 4ea2056..a685578 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -157,11 +157,11 @@ python toaster_collect_task_stats() {
 import bb.utils
 import os
 
-toaster_statlist_file = os.path.join(e.data.getVar('BUILDSTATS_BASE'), 
"toasterstatlist")
-
 if not e.data.getVar('BUILDSTATS_BASE'):
 return  # if we don't have buildstats, we cannot collect stats
 
+toaster_statlist_file = os.path.join(e.data.getVar('BUILDSTATS_BASE'), 
"toasterstatlist")
+
 def stat_to_float(value):
 return float(value.strip('% \n\r'))
 
@@ -361,4 +361,4 @@ do_populate_sdk[postfuncs] += "toaster_artifact_dumpdata "
 do_populate_sdk[vardepsexclude] += "toaster_artifact_dumpdata "
 
 do_populate_sdk_ext[postfuncs] += "toaster_artifact_dumpdata "
-do_populate_sdk_ext[vardepsexclude] += "toaster_artifact_dumpdata "
\ No newline at end of file
+do_populate_sdk_ext[vardepsexclude] += "toaster_artifact_dumpdata "
-- 
1.9.1

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


[OE-core] [PATCH 0/1] follow-up for alsa-utils update

2017-01-04 Thread Andreas Müller
This should fix build as reported by Ross [1]

[1] 
http://lists.openembedded.org/pipermail/openembedded-core/2017-January/130726.html

Andreas Müller (1):
  alsa-utils(-scripts): fix compile on build machines with
python-docutils installed

 meta/recipes-multimedia/alsa/alsa-utils_1.1.3.bb | 6 ++
 1 file changed, 6 insertions(+)

-- 
2.5.5

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


[OE-core] [PATCH 1/1] alsa-utils(-scripts): fix compile on build machines with python-docutils installed

2017-01-04 Thread Andreas Müller
Signed-off-by: Andreas Müller 
---
 meta/recipes-multimedia/alsa/alsa-utils_1.1.3.bb | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.1.3.bb 
b/meta/recipes-multimedia/alsa/alsa-utils_1.1.3.bb
index 07c25c4..e6dd5b0 100644
--- a/meta/recipes-multimedia/alsa/alsa-utils_1.1.3.bb
+++ b/meta/recipes-multimedia/alsa/alsa-utils_1.1.3.bb
@@ -26,6 +26,12 @@ SRC_URI = 
"ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
 SRC_URI[md5sum] = "2bf94d3e3410dcc74bb0dae10d46a979"
 SRC_URI[sha256sum] = 
"127217a54eea0f9a49700a2f239a2d4f5384aa094d68df04a8eb80132eb6167c"
 
+# On build machines with python-docutils (not python3-docutils !!) installed
+# rst2man (not rst2man.py) is detected and compile fails with
+# | make[1]: *** No rule to make target 'alsaucm.1', needed by 'all-am'.  Stop.
+# Avoid this by disabling expicitly
+EXTRA_OECONF = "--disable-rst2man"
+
 # lazy hack. needs proper fixing in gettext.m4, see
 # http://bugs.openembedded.org/show_bug.cgi?id=2348
 # please close bug and remove this comment when properly fixed
-- 
2.5.5

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


[OE-core] is there a current recipe to support pptpd?

2017-01-04 Thread Robert P. J. Day

  a colleague wants to add a pptpd server to his build image, and was
using "poptop" on a red hat system previously. i see a fairly old
poptop recipe for OE here:

https://github.com/openembedded/openembedded/tree/master/recipes/poptop

and newer source here:

https://sourceforge.net/p/poptop/git/ci/master/tree/

is there some other recipe that supplies the same functionality?

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday


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


[OE-core] [PATCH] nss: Fix postinstall script

2017-01-04 Thread David Vincent
When installing NSS on a read-only rootfs, the current postinstall
scriptlet exits after having run the signing part. This causes an error
when appending the task because the rest of the script is simply ignored
and therefore never run.

Signed-off-by: David Vincent 
---
 meta/recipes-support/nss/nss_3.27.1.bb | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-support/nss/nss_3.27.1.bb 
b/meta/recipes-support/nss/nss_3.27.1.bb
index 091793899f..a69672b3d8 100644
--- a/meta/recipes-support/nss/nss_3.27.1.bb
+++ b/meta/recipes-support/nss/nss_3.27.1.bb
@@ -208,18 +208,18 @@ do_install_append_class-target() {
 
 pkg_postinst_${PN} () {
 if [ -n "$D" ]; then
-for I in $D/${libdir}/lib*.chk; do
+for I in $D${libdir}/lib*.chk; do
 DN=`dirname $I`
 BN=`basename $I .chk`
 FN=$DN/$BN.so
 shlibsign -i $FN
-   if [ $? -ne 0 ]; then
-  exit 1
-   fi
+if [ $? -ne 0 ]; then
+exit 1
+fi
 done
-exit 0
+else
+signlibs.sh
 fi
-signlibs.sh
 }
 
 PACKAGES =+ "${PN}-smime"
-- 
2.11.0

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


Re: [OE-core] [PATCH 3/3] alsa-utils-scripts: update 1.1.2 -> 1.1.3

2017-01-04 Thread Andreas Müller
On Wed, Jan 4, 2017 at 5:00 PM, Andreas Müller
 wrote:
> On Wed, Jan 4, 2017 at 4:27 PM, Burton, Ross  wrote:
>> This fails to build:
>>
>> | Making all in alsaucm
>> | make[1]: Entering directory
>> '/data/poky-master/tmp-glibc/work/corei7-64-poky-linux/alsa-utils-scripts/1.1.3-r0/build/alsaucm'
>> | x86_64-poky-linux-gcc  -m64 -march=corei7 -mtune=corei7 -mfpmath=sse
>> -msse4.2 --sysroot=/data/poky-master/tmp-glibc/sysroots/intel-corei7-64
>> -DHAVE_CONFIG_H -I. -I../../alsa-utils-1.1.3/alsaucm -I../include  -Wall
>> -I../../alsa-utils-1.1.3/include   -O2 -pipe -g
>> -feliminate-unused-debug-types
>> -fdebug-prefix-map=/data/poky-master/tmp-glibc/work/corei7-64-poky-linux/alsa-utils-scripts/1.1.3-r0=/usr/src/debug/alsa-utils-scripts/1.1.3-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=  -c
>> -o usecase.o ../../alsa-utils-1.1.3/alsaucm/usecase.c
>> | make[1]: *** No rule to make target 'alsaucm.1', needed by 'all-am'.
>> Stop.
>>
>> On 1 January 2017 at 19:53, Andreas Müller 
>> wrote:
>>>
>>> Signed-off-by: Andreas Müller 
>>> ---
>>>  .../alsa/{alsa-utils-scripts_1.1.2.bb => alsa-utils-scripts_1.1.3.bb}
>>> | 0
>>>  1 file changed, 0 insertions(+), 0 deletions(-)
>>>  rename meta/recipes-multimedia/alsa/{alsa-utils-scripts_1.1.2.bb =>
>>> alsa-utils-scripts_1.1.3.bb} (100%)
>>>
>>> diff --git a/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.2.bb
>>> b/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.3.bb
>>> similarity index 100%
>>> rename from meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.2.bb
>>> rename to meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.3.bb
>>> --
>>> 2.5.5
>>>
> Checked: If I am not mistaken target alsaucm.1 builds man-files.
>
> * Native rst2man missing?
> * Can you provide full log.do_compile?
>
Forget the logs. V2 is close

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


Re: [OE-core] [PATCH 3/3] alsa-utils-scripts: update 1.1.2 -> 1.1.3

2017-01-04 Thread Andreas Müller
On Wed, Jan 4, 2017 at 4:27 PM, Burton, Ross  wrote:
> This fails to build:
>
> | Making all in alsaucm
> | make[1]: Entering directory
> '/data/poky-master/tmp-glibc/work/corei7-64-poky-linux/alsa-utils-scripts/1.1.3-r0/build/alsaucm'
> | x86_64-poky-linux-gcc  -m64 -march=corei7 -mtune=corei7 -mfpmath=sse
> -msse4.2 --sysroot=/data/poky-master/tmp-glibc/sysroots/intel-corei7-64
> -DHAVE_CONFIG_H -I. -I../../alsa-utils-1.1.3/alsaucm -I../include  -Wall
> -I../../alsa-utils-1.1.3/include   -O2 -pipe -g
> -feliminate-unused-debug-types
> -fdebug-prefix-map=/data/poky-master/tmp-glibc/work/corei7-64-poky-linux/alsa-utils-scripts/1.1.3-r0=/usr/src/debug/alsa-utils-scripts/1.1.3-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=  -c
> -o usecase.o ../../alsa-utils-1.1.3/alsaucm/usecase.c
> | make[1]: *** No rule to make target 'alsaucm.1', needed by 'all-am'.
> Stop.
>
> On 1 January 2017 at 19:53, Andreas Müller 
> wrote:
>>
>> Signed-off-by: Andreas Müller 
>> ---
>>  .../alsa/{alsa-utils-scripts_1.1.2.bb => alsa-utils-scripts_1.1.3.bb}
>> | 0
>>  1 file changed, 0 insertions(+), 0 deletions(-)
>>  rename meta/recipes-multimedia/alsa/{alsa-utils-scripts_1.1.2.bb =>
>> alsa-utils-scripts_1.1.3.bb} (100%)
>>
>> diff --git a/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.2.bb
>> b/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.3.bb
>> similarity index 100%
>> rename from meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.2.bb
>> rename to meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.3.bb
>> --
>> 2.5.5
>>
Checked: If I am not mistaken target alsaucm.1 builds man-files.

* Native rst2man missing?
* Can you provide full log.do_compile?

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


Re: [OE-core] [PATCH 8/8] oeqa.utils.metadata: add bitbake revision information

2017-01-04 Thread Mariano Lopez


On 28/12/16 07:02, Markus Lehtonen wrote:
> [YOCTO #10590]
>
> Signed-off-by: Markus Lehtonen 
> ---
>  meta/lib/oeqa/utils/metadata.py | 32 +++-
>  1 file changed, 19 insertions(+), 13 deletions(-)
>
> diff --git a/meta/lib/oeqa/utils/metadata.py b/meta/lib/oeqa/utils/metadata.py
> index 6331c21..23449fc 100644
> --- a/meta/lib/oeqa/utils/metadata.py
> +++ b/meta/lib/oeqa/utils/metadata.py
> @@ -10,6 +10,8 @@ from collections.abc import MutableMapping
>  from xml.dom.minidom import parseString
>  from xml.etree.ElementTree import Element, tostring
>  
> +from git import Repo, InvalidGitRepositoryError, NoSuchPathError
> +

It seems not every user running selftest appreciated the requirement of
gitpython, so there was a patch to keep this dependency out. This will
introduce the need of gitpython again.
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 7/8] oeqa.utils.metadata: have layer name as an attribute in xml

2017-01-04 Thread Mariano Lopez


On 28/12/16 07:02, Markus Lehtonen wrote:
> -def dict_to_XML(tag, dictionary):
> +def dict_to_XML(tag, dictionary, **kwargs):
>  """ Return XML element converting dicts recursively. """
>  
> -elem = Element(tag)
> +elem = Element(tag, **kwargs)
>  for key, val in dictionary.items():
> -if isinstance(val, MutableMapping):
> +if tag == 'layers':
> +child = (dict_to_XML('layer', val, name=key))
> +elif isinstance(val, MutableMapping):
>  child = (dict_to_XML(key, val))
>  else:
>  child = Element(key)

I was thinking that this function would be more generic, adding a
comparison to a tag name surely won't keep the function generic, is
there another way to implement this keeping this function generic enough?
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 3/8] oeqa.utils.metadata: drop 'unknown' git data elements

2017-01-04 Thread Mariano Lopez


On 28/12/16 07:02, Markus Lehtonen wrote:
> It's better just to not have the xml elements than to have elements with
> faux data. One could have git branch named 'unknown', for example.
>
>

I don't think is a good idea to completely remove the layer from the
metadata when such layer is not a repository, it would remove valuable
information for later analysis. And if you ask would do such a thing, I
would, I have my own debug layers that can mess with testing.
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 3/3] alsa-utils-scripts: update 1.1.2 -> 1.1.3

2017-01-04 Thread Burton, Ross
This fails to build:

| Making all in alsaucm
| make[1]: Entering directory
'/data/poky-master/tmp-glibc/work/corei7-64-poky-linux/alsa-utils-scripts/1.1.3-r0/build/alsaucm'
| x86_64-poky-linux-gcc  -m64 -march=corei7 -mtune=corei7 -mfpmath=sse
-msse4.2 --sysroot=/data/poky-master/tmp-glibc/sysroots/intel-corei7-64
-DHAVE_CONFIG_H -I. -I../../alsa-utils-1.1.3/alsaucm -I../include  -Wall
-I../../alsa-utils-1.1.3/include   -O2 -pipe -g
-feliminate-unused-debug-types
-fdebug-prefix-map=/data/poky-master/tmp-glibc/work/corei7-64-poky-linux/alsa-utils-scripts/1.1.3-r0=/usr/src/debug/alsa-utils-scripts/1.1.3-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=
 -c -o usecase.o ../../alsa-utils-1.1.3/alsaucm/usecase.c
| make[1]: *** No rule to make target 'alsaucm.1', needed by 'all-am'.
Stop.

On 1 January 2017 at 19:53, Andreas Müller 
wrote:

> Signed-off-by: Andreas Müller 
> ---
>  .../alsa/{alsa-utils-scripts_1.1.2.bb => alsa-utils-scripts_1.1.3.bb}
>  | 0
>  1 file changed, 0 insertions(+), 0 deletions(-)
>  rename meta/recipes-multimedia/alsa/{alsa-utils-scripts_1.1.2.bb =>
> alsa-utils-scripts_1.1.3.bb} (100%)
>
> diff --git a/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.2.bb
> b/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.3.bb
> similarity index 100%
> rename from meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.2.bb
> rename to meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.3.bb
> --
> 2.5.5
>
> --
> ___
> 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] kexec: ARM: fix align issue of add_buffer_phys_virt() for LPAE kernel.

2017-01-04 Thread Burton, Ross
An upgrade to 2.0.14 was recently posted on the list (and is now in
poky-contrib:ross/mut), can you verify that this patch is still required
with that release and rebase?

Ross

On 3 January 2017 at 09:05, Haiqing Bai  wrote:

> If LPAE is enabled, 3 level page table is used and the 'SECTION_SIZE'
> is (1<<21), so add_buffer_phys_virt() should align to (1 << 21).
>
> Signed-off-by: Haiqing Bai 
> ---
>  ...-ARM-fix-add_buffer_phys_virt-align-issue.patch | 52
> ++
>  meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb|  1 +
>  2 files changed, 53 insertions(+)
>  create mode 100644 meta/recipes-kernel/kexec/
> kexec-tools/kexec-ARM-fix-add_buffer_phys_virt-align-issue.patch
>
> diff --git a/meta/recipes-kernel/kexec/kexec-tools/kexec-ARM-fix-add_
> buffer_phys_virt-align-issue.patch b/meta/recipes-kernel/kexec/
> kexec-tools/kexec-ARM-fix-add_buffer_phys_virt-align-issue.patch
> new file mode 100644
> index 000..7d1f95e
> --- /dev/null
> +++ b/meta/recipes-kernel/kexec/kexec-tools/kexec-ARM-fix-add_
> buffer_phys_virt-align-issue.patch
> @@ -0,0 +1,52 @@
> +From 380019f68e19ac863cf32dc7ff6784e8fe1d751f Mon Sep 17 00:00:00 2001
> +From: Haiqing Bai 
> +Date: Mon, 19 Dec 2016 14:52:02 +0800
> +Subject: [PATCH] kexec: ARM: Fix add_buffer_phys_virt() align issue.
> +
> +When "CONFIG_ARM_LPAE" is enabled,3 level page table
> +is used by MMU, the "SECTION_SIZE" is defined with
> +(1 << 21), but 'add_buffer_phys_virt()' hardcode this
> +to (1 << 20).
> +
> +Upstream-Status: Pending
> +
> +Suggested-By:fredrik.markst...@gmail.com
> +Signed-off-by: Haiqing Bai 
> +---
> + kexec/arch/arm/crashdump-arm.c | 5 -
> + 1 file changed, 4 insertions(+), 1 deletion(-)
> +
> +diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-
> arm.c
> +index 38a1401..e41b7fb 100644
> +--- a/kexec/arch/arm/crashdump-arm.c
>  b/kexec/arch/arm/crashdump-arm.c
> +@@ -271,6 +271,7 @@ int load_crashdump_segments(struct kexec_info *info,
> char *mod_cmdline)
> +   void *buf;
> +   int err;
> +   int last_ranges;
> ++  unsigned short align_bit_shift = 20;
> +
> +   /*
> +* First fetch all the memory (RAM) ranges that we are going to
> pass to
> +@@ -295,6 +296,7 @@ int load_crashdump_segments(struct kexec_info *info,
> char *mod_cmdline)
> +
> +   /* for support LPAE enabled kernel*/
> +   elf_info.class = ELFCLASS64;
> ++  align_bit_shift = 21;
> +
> +   err = crash_create_elf64_headers(info, _info,
> +usablemem_rgns.ranges,
> +@@ -315,8 +317,9 @@ int load_crashdump_segments(struct kexec_info *info,
> char *mod_cmdline)
> +* 1MB) so that available memory passed in kernel command line
> will be
> +* aligned to 1MB. This is because kernel create_mapping() wants
> memory
> +* regions to be aligned to SECTION_SIZE.
> ++ * The SECTION_SIZE of LPAE kernel is '1UL << 21' defined in
> pgtable-3level.h
> +*/
> +-  elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << 20,
> ++  elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 <<
> align_bit_shift,
> + crash_reserved_mem.start,
> + crash_reserved_mem.end, -1, 0);
> +
> +--
> +1.9.1
> +
> diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb
> b/meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb
> index 59376c8..3e38923 100644
> --- a/meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb
> +++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb
> @@ -8,6 +8,7 @@ SRC_URI += " \
>  file://0002-powerpc-change-the-memory-size-limit.patch \
>  file://0001-purgatory-Pass-r-directly-to-linker.patch \
>  file://0001-vmcore-dmesg-Define-_GNU_SOURCE.patch \
> +file://kexec-ARM-fix-add_buffer_phys_virt-align-issue.patch \
>   "
>
>  SRC_URI[md5sum] = "10ddaae0e86af54407b164a1f5a39cc3"
> --
> 1.9.1
>
> --
> ___
> 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 3/3] classes/buildstats: don't expand variable pointing to SystemStats

2017-01-04 Thread Patrick Ohly
On Thu, 2016-12-22 at 16:13 +1300, Paul Eggleton wrote:
> We're placing an object into the datastore - it's very definitely not
> something we want to be expanding.

Why does it matter? Is it faster to tell getVar() that expansion isn't
necessary?

I'm fine with the change, I'm just trying to understand whether this
merely cosmetic or has some real impact.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



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


Re: [OE-core] [PATCH 3/9] ovmf: explicitly depend on nasm-native

2017-01-04 Thread Patrick Ohly
On Wed, 2016-12-28 at 02:59 +, Neri, Ricardo wrote:
> On Wed, 2016-12-21 at 14:11 +0100, Patrick Ohly wrote:
> > +DEPENDS_append = " nasm-native"
> > +
> Is this dependency needed for both native and target builds? If not, it
> can be done with DEPENDS_class...

I'm not sure anymore. As it doesn't matter in practice because ovmf
depends on ovmf-native and thys nasm-native is built either way, I'd
prefer to keep it as-is.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



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


[OE-core] [PATCH 2/2] linux-firmware: Modify firmware installation path

2017-01-04 Thread Amarnath Valluri
Install firmware files under ${base_libdir}/firmware instead of hardcoded
/lib/firmare.

Signed-off-by: Amarnath Valluri 
---
 .../linux-firmware/linux-firmware_git.bb   | 180 ++---
 1 file changed, 90 insertions(+), 90 deletions(-)

diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb 
b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
index 1d881d7..6f915b4 100644
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
@@ -195,27 +195,27 @@ do_compile() {
 }
 
 do_install() {
-   install -d  ${D}/lib/firmware/
-   cp -r * ${D}/lib/firmware/
+   install -d  ${D}${base_libdir}/firmware/
+   cp -r * ${D}${base_libdir}/firmware/
 
# Avoid Makefile to be deployed
-   rm ${D}/lib/firmware/Makefile
+   rm ${D}${base_libdir}/firmware/Makefile
 
# Remove unbuild firmware which needs cmake and bash
-   rm ${D}/lib/firmware/carl9170fw -rf
+   rm ${D}${base_libdir}/firmware/carl9170fw -rf
 
# Remove pointless bash script
-   rm ${D}/lib/firmware/configure
+   rm ${D}${base_libdir}/firmware/configure
 
# Libertas sd8686
-   ln -sf libertas/sd8686_v9.bin ${D}/lib/firmware/sd8686.bin
-   ln -sf libertas/sd8686_v9_helper.bin ${D}/lib/firmware/sd8686_helper.bin
+   ln -sf libertas/sd8686_v9.bin ${D}${base_libdir}/firmware/sd8686.bin
+   ln -sf libertas/sd8686_v9_helper.bin 
${D}${base_libdir}/firmware/sd8686_helper.bin
 
# fixup wl12xx location, after 2.6.37 the kernel searches a different 
location for it
-   ( cd ${D}/lib/firmware ; ln -sf ti-connectivity/* . )
+   ( cd ${D}${base_libdir}/firmware ; ln -sf ti-connectivity/* . )
 
 # Copy the iwlwifi ucode
-cp ${WORKDIR}/iwlwifi-8000C-19.ucode ${D}/lib/firmware/
+cp ${WORKDIR}/iwlwifi-8000C-19.ucode ${D}${base_libdir}/firmware/
 }
 
 
@@ -252,21 +252,21 @@ LICENSE_${PN}-ath6k = "Firmware-atheros_firmware"
 LICENSE_${PN}-ath9k = "Firmware-atheros_firmware"
 LICENSE_${PN}-atheros-license = "Firmware-atheros_firmware"
 
-FILES_${PN}-atheros-license = "/lib/firmware/LICENCE.atheros_firmware"
+FILES_${PN}-atheros-license = 
"${base_libdir}/firmware/LICENCE.atheros_firmware"
 FILES_${PN}-ar9170 = " \
-  /lib/firmware/ar9170*.fw \
+  ${base_libdir}/firmware/ar9170*.fw \
 "
 FILES_${PN}-carl9170 = " \
-  /lib/firmware/carl9170*.fw \
+  ${base_libdir}/firmware/carl9170*.fw \
 "
 FILES_${PN}-ath6k = " \
-  /lib/firmware/ath6k \
+  ${base_libdir}/firmware/ath6k \
 "
 FILES_${PN}-ath9k = " \
-  /lib/firmware/ar9271.fw \
-  /lib/firmware/ar7010*.fw \
-  /lib/firmware/htc_9271.fw \
-  /lib/firmware/htc_7010.fw \
+  ${base_libdir}/firmware/ar9271.fw \
+  ${base_libdir}/firmware/ar7010*.fw \
+  ${base_libdir}/firmware/htc_9271.fw \
+  ${base_libdir}/firmware/htc_7010.fw \
 "
 
 RDEPENDS_${PN}-ar9170 += "${PN}-atheros-license"
@@ -280,14 +280,14 @@ LICENSE_${PN}-ar3k-license = "Firmware-qualcommAthos_ar3k"
 LICENSE_${PN}-ath10k = "Firmware-qualcommAthos_ath10k"
 LICENSE_${PN}-ath10k-license = "Firmware-qualcommAthos_ath10k"
 
-FILES_${PN}-ar3k-license = "/lib/firmware/LICENSE.QualcommAtheros_ar3k"
+FILES_${PN}-ar3k-license = 
"${base_libdir}/firmware/LICENSE.QualcommAtheros_ar3k"
 FILES_${PN}-ar3k = " \
-  /lib/firmware/ar3k \
+  ${base_libdir}/firmware/ar3k \
 "
 
-FILES_${PN}-ath10k-license = "/lib/firmware/LICENSE.QualcommAtheros_ath10k"
+FILES_${PN}-ath10k-license = 
"${base_libdir}/firmware/LICENSE.QualcommAtheros_ath10k"
 FILES_${PN}-ath10k = " \
-  /lib/firmware/ath10k \
+  ${base_libdir}/firmware/ath10k \
 "
 
 RDEPENDS_${PN}-ar3k += "${PN}-ar3k-license"
@@ -297,9 +297,9 @@ RDEPENDS_${PN}-ath10k += "${PN}-ath10k-license"
 LICENSE_${PN}-ralink = "Firmware-ralink-firmware"
 LICENSE_${PN}-ralink-license = "Firmware-ralink-firmware"
 
-FILES_${PN}-ralink-license = "/lib/firmware/LICENCE.ralink-firmware.txt"
+FILES_${PN}-ralink-license = 
"${base_libdir}/firmware/LICENCE.ralink-firmware.txt"
 FILES_${PN}-ralink = " \
-  /lib/firmware/rt*.bin \
+  ${base_libdir}/firmware/rt*.bin \
 "
 
 RDEPENDS_${PN}-ralink += "${PN}-ralink-license"
@@ -308,9 +308,9 @@ RDEPENDS_${PN}-ralink += "${PN}-ralink-license"
 LICENSE_${PN}-radeon = "Firmware-radeon"
 LICENSE_${PN}-radeon-license = "Firmware-radeon"
 
-FILES_${PN}-radeon-license = "/lib/firmware/LICENSE.radeon"
+FILES_${PN}-radeon-license = "${base_libdir}/firmware/LICENSE.radeon"
 FILES_${PN}-radeon = " \
-  /lib/firmware/radeon \
+  ${base_libdir}/firmware/radeon \
 "
 
 RDEPENDS_${PN}-radeon += "${PN}-radeon-license"
@@ -322,20 +322,20 @@ LICENSE_${PN}-sd8787 = "Firmware-Marvell"
 LICENSE_${PN}-sd8797 = "Firmware-Marvell"
 LICENSE_${PN}-marvell-license = "Firmware-Marvell"
 
-FILES_${PN}-marvell-license = "/lib/firmware/LICENCE.Marvell"
+FILES_${PN}-marvell-license = "${base_libdir}/firmware/LICENCE.Marvell"
 FILES_${PN}-sd8686 = " \
-  /lib/firmware/libertas/sd8686_v9* 

[OE-core] [PATCH 1/2] kernel: Modify kernel modules installation path.

2017-01-04 Thread Amarnath Valluri
Use ${base_libdir}/modules inplace of /lib/modules for kernel modules 
installation path.

Signed-off-by: Amarnath Valluri 
---
 meta/classes/kernel-module-split.bbclass |  2 +-
 meta/classes/kernel.bbclass  | 12 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/meta/classes/kernel-module-split.bbclass 
b/meta/classes/kernel-module-split.bbclass
index efe1b42..0e4e110 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -127,7 +127,7 @@ python split_kernel_module_packages () {
 postinst = d.getVar('pkg_postinst_modules')
 postrm = d.getVar('pkg_postrm_modules')
 
-modules = do_split_packages(d, root='/lib/modules', 
file_regex=module_regex, output_pattern=module_pattern, description='%s kernel 
module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, 
extra_depends='kernel-%s' % (d.getVar("KERNEL_VERSION")))
+modules = do_split_packages(d, root='${base_libdir}/modules', 
file_regex=module_regex, output_pattern=module_pattern, description='%s kernel 
module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, 
extra_depends='kernel-%s' % (d.getVar("KERNEL_VERSION")))
 if modules:
 metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE')
 d.appendVar('RDEPENDS_' + metapkg, ' '+' '.join(modules))
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 3630042..74517e8 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -296,11 +296,11 @@ kernel_do_install() {
#
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
-   oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install
-   rm "${D}/lib/modules/${KERNEL_VERSION}/build"
-   rm "${D}/lib/modules/${KERNEL_VERSION}/source"
+   oe_runmake DEPMOD=echo 
MODLIB=${D}${base_libdir}/modules/${KERNEL_VERSION} 
INSTALL_FW_PATH=${D}${base_libdir}/firmware modules_install
+   rm "${D}${base_libdir}/modules/${KERNEL_VERSION}/build"
+   rm "${D}${base_libdir}/modules/${KERNEL_VERSION}/source"
# If the kernel/ directory is empty remove it to prevent QA 
issues
-   rmdir --ignore-fail-on-non-empty 
"${D}/lib/modules/${KERNEL_VERSION}/kernel"
+   rmdir --ignore-fail-on-non-empty 
"${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel"
else
bbnote "no modules to install"
fi
@@ -478,7 +478,7 @@ EXPORT_FUNCTIONS do_compile do_install do_configure
 # kernel-image becomes kernel-image-${KERNEL_VERSION}
 PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev 
kernel-modules"
 FILES_${PN} = ""
-FILES_kernel-base = "/lib/modules/${KERNEL_VERSION}/modules.order 
/lib/modules/${KERNEL_VERSION}/modules.builtin"
+FILES_kernel-base = "${base_libdir}/modules/${KERNEL_VERSION}/modules.order 
${base_libdir}/modules/${KERNEL_VERSION}/modules.builtin"
 FILES_kernel-image = ""
 FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* 
${KERNEL_SRC_PATH} /lib/modules/${KERNEL_VERSION}/build"
 FILES_kernel-vmlinux = "/boot/vmlinux-${KERNEL_VERSION_NAME}"
@@ -511,7 +511,7 @@ pkg_postinst_kernel-base () {
 PACKAGESPLITFUNCS_prepend = "split_kernel_packages "
 
 python split_kernel_packages () {
-do_split_packages(d, root='/lib/firmware', 
file_regex='^(.*)\.(bin|fw|cis|csp|dsp)$', output_pattern='kernel-firmware-%s', 
description='Firmware for %s', recursive=True, extra_depends='')
+do_split_packages(d, root='${base_libdir}/firmware', 
file_regex='^(.*)\.(bin|fw|cis|csp|dsp)$', output_pattern='kernel-firmware-%s', 
description='Firmware for %s', recursive=True, extra_depends='')
 }
 
 # Many scripts want to look in arch/$arch/boot for the bootable
-- 
2.7.4

-
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

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


Re: [OE-core] [PATCH 6/9] ovmf_git.bb: enable Secure Boot

2017-01-04 Thread Patrick Ohly
On Wed, 2016-12-28 at 14:54 -0800, Ricardo Neri wrote:
> On Wed, 2016-12-21 at 14:11 +0100, Patrick Ohly wrote:
> > The recipe now compiles OVMF twice, once without Secure Boot, once
> > with. This is the same approach as in
> > https://src.fedoraproject.org/cgit/rpms/edk2.git/tree/edk2.spec
> 
> Besides the fact that Fedora does it, is there a particular reason to
> build twice?

The ${build_dir}/FV/OVMF.fd file changes depending on the configuration.
There's only one such file after a build.

>  On my side, I am able to build with secure boot with a
> single build. Also, the Ubuntu documentation does not mention that two
> builds are needed [1].

Can you build with and without secure boot in a single build? I wasn't
sure how to achieve that, so I just copied what Fedora does.

> Also, I think it would be nice if we could choose between to not have
> secure boot at all for OVMF. Maybe this could be achieved by having a
> common ovmf.inc and two ovmf_git.bb and ovmf_sb_git.bb with the
> different the specific things to support secure boot or not. Maybe all
> that is needed in the secure boot recipe are the extra variables for
> OpenSSL and a prepend to do_compile_class-target with the OpenSSL
> patching. Something to ponder.

I think I would prefer to have a single recipe with a PACKAGECONFIG for
secure boot. Having different recipes doesn't scale when adding more
such options. If you agree, then I'll add that.

> > +( cd ${S}/CryptoPkg/Library/OpensslLib/ && ./Install.sh )
> > +${S}/OvmfPkg/build.sh $PARALLEL_JOBS -a $OVMF_ARCH -b RELEASE -t 
> > ${FIXED_GCCVER} ${OVMF_SECURE_BOOT_FLAGS}
> > +ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/OVMF.secboot.fd
> 
> At this point both ${WORKDIR}/ovmf/OVMF.secboot.fd and
> ${WORKDIR}/ovmf/OVMF.fd will be linked to the same OVMF.fd with secure
> boot support. Maybe this could be fixed by copying the files rather than
> creating a symbolic link.

This is intentionally a hardlink, not a symbolic link, exactly because
of the problem you mentioned ;-)

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



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


Re: [OE-core] [PATCH 4/9] ovmf: deploy firmware in image directory

2017-01-04 Thread Patrick Ohly
On Wed, 2016-12-28 at 13:38 -0800, Ricardo Neri wrote:
> >  do_install_class-target() {
> > -OVMF_DIR_SUFFIX="X64"
> > -if [ "${TARGET_ARCH}" != "x86_64" ] ; then
> > -OVMF_DIR_SUFFIX="Ia32" # Note the different capitalization
> > -fi
> > +# Traditional location.
> >  install -d ${D}${datadir}/ovmf
> > +install -m 0755 ${WORKDIR}/ovmf/OVMF.fd ${D}${datadir}/ovmf/bios.bin
> 
> Now that I think about it. Installing here does not sever any purpose.
> Thus, I think this can be removed by perhaps doing do_install[noexec] =
> "1"

I was trying not to break traditional usage patterns. If we keep the
"bios" runqemu parameters, then we should also keep the bios.bin file.

> > +}
> >  
> > -FIXED_GCCVER=$(fixup_target_tools ${GCC_VER})
> > -build_dir="${S}/Build/Ovmf$OVMF_DIR_SUFFIX/RELEASE_${FIXED_GCCVER}"
> > -install -m 0755 ${build_dir}/FV/OVMF.fd \
> > -   ${D}${datadir}/ovmf/bios.bin
> > +inherit deploy
> 
> I am not sure if there is a right way for inheriting in bitbake.
> However, a quick grep -n inherit reveals that the majority of the
> recipes put their inheritances towards the top of the recipe.

Agreed, that seems to be more common, although there are also examples
where "inherit deploy" is directly in front of "do_deploy". I chose the
latter because it was a more localized change, but will change it in
rev2.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



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


Re: [OE-core] [PATCH 8/9] runqemu: support UEFI with OVMF firmware

2017-01-04 Thread Patrick Ohly
On Wed, 2016-12-28 at 15:33 -0800, Ricardo Neri wrote:
> On Wed, 2016-12-21 at 14:11 +0100, Patrick Ohly wrote:
> > +# File name of a OVMF BIOS file, to be added with -drive
> > if=pflash.
> > +# Found in the same places as the rootfs, with or without one
> > of
> > +# these suffices: qcow2, bin.
> > +# Setting one also adds "-vga std" because that is all that
> > +# OVMF supports.
> > +self.ovmf_bios = ''
> 
> runqemu has the options biosdir and biosfilename. Although the log for
> these options was lost when the script was migrated to python,

You probably mean this:
http://git.openembedded.org/openembedded-core/commit/?id=d302f5683dd736ac4cd4b601a046d22000d41e68
http://git.openembedded.org/openembedded-core/commit/?id=29c9e6f44541b7f8731e21e9d1a0adca9da28e37

>  the
> motivation of adding these options was to use OVMF. It uses the -L and
> -bios options of qemu. To my knowledge, the only custom bios at the
> moment is OVMF. Thus, you would ponder either removing or tweaking these
> options with your approach; which makes more sense to me.

I have no personal opinion about the usefulness of the "biosdir" and
"biosfilename" options. Just looking at what they do, they might have
value also when not using OVMF (for example, the "VGA BIOS" that is
mentioned in the first commit). But if no-one is actually using these
options, then they should indeed be removed to simplify runqemu.

The problem just is to determine whether they are used :-/ As I don't
know, I'd prefer to keep them for now and remove them separately.

Regarding the approach that I proposed for the "ovmf" file(s): what's
your opinion about that? I was a bit worried that too much "magic" is
involved here (special keyword that expands to files and sets -vga), but
it is convenient and quite naturally supports additional use cases
(explicitly selecting files at non-standard locations, separate code and
variable files).

Regarding that last argument: in the current patch series, only the
combined ovmf.fd gets deployed and I argued that this is sufficient. To
test that supporting separate code and variables also works, I've
implemented that locally so that ovmf.fd ovmf_secboot.fd, ovmf_code.fd,
ovmf_secboot_code.fd and ovmf_vars.fd get deployed and runqemu supports
more than one "ovmf" parameter - this worked nicely. Full change below.

Now that I've implemented it, I wonder whether it would be worth
submitting that as part of rev2 of this patch series. Any opinions?

diff --git a/meta/recipes-core/ovmf/ovmf_git.bb 
b/meta/recipes-core/ovmf/ovmf_git.bb
index ef61b16..391274b 100644
--- a/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/meta/recipes-core/ovmf/ovmf_git.bb
@@ -125,6 +125,8 @@ do_compile_class-target() {
 rm -rf ${S}/Build/Ovmf$OVMF_DIR_SUFFIX
 ${S}/OvmfPkg/build.sh $PARALLEL_JOBS -a $OVMF_ARCH -b RELEASE -t 
${FIXED_GCCVER}
 ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/OVMF.fd
+ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/OVMF.code.fd
+ln ${build_dir}/FV/OVMF_VARS.fd ${WORKDIR}/ovmf/OVMF.vars.fd
 
 # See CryptoPkg/Library/OpensslLib/Patch-HOWTO.txt and
 # https://src.fedoraproject.org/cgit/rpms/edk2.git/tree/ for
@@ -137,6 +139,7 @@ do_compile_class-target() {
 ( cd ${S}/CryptoPkg/Library/OpensslLib/ && ./Install.sh )
 ${S}/OvmfPkg/build.sh $PARALLEL_JOBS -a $OVMF_ARCH -b RELEASE -t 
${FIXED_GCCVER} ${OVMF_SECURE_BOOT_FLAGS}
 ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/OVMF.secboot.fd
+ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/OVMF.code.secboot.fd
 for i in Shell.efi EnrollDefaultKeys.efi; do
 ln ${build_dir}/${OVMF_ARCH}/$i ${WORKDIR}/ovmf/$i
 done
@@ -170,8 +173,9 @@ do_deploy() {
 }
 do_deploy_class-target() {
 # For use with "runqemu ovmf".
-qemu-img convert -f raw -O qcow2 ${WORKDIR}/ovmf/OVMF.fd 
${DEPLOYDIR}/ovmf.qcow2
-qemu-img convert -f raw -O qcow2 ${WORKDIR}/ovmf/OVMF.secboot.fd 
${DEPLOYDIR}/ovmf.secboot.qcow2
+for i in OVMF OVMF.secboot OVMF.code OVMF.vars OVMF.code.secboot; do
+qemu-img convert -f raw -O qcow2 ${WORKDIR}/ovmf/$i.fd 
${DEPLOYDIR}/`echo $i | tr A-Z a-z`.qcow2
+done
 }
 addtask do_deploy after do_compile before do_build
 
diff --git a/scripts/runqemu b/scripts/runqemu
index c8b7c8a..c3fed89 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -163,12 +163,12 @@ class BaseConfig(object):
 self.clean_nfs_dir = False
 self.nfs_server = ''
 self.rootfs = ''
-# File name of a OVMF BIOS file, to be added with -drive if=pflash.
+# File name(s) of a OVMF BIOS file or variable store, to be added with 
-drive if=pflash.
 # Found in the same places as the rootfs, with or without one of
 # these suffices: qcow2, bin.
 # Setting one also adds "-vga std" because that is all that
 # OVMF supports.
-self.ovmf_bios = ''
+self.ovmf_bios = []
 self.qemuboot = ''
 self.qbconfload = False