Re: [OE-core] [PATCH 3/3] package.bbclass: Support stripping and debug copy of static libraries

2020-04-16 Thread Peter Kjellerstedt
> -Original Message-
> From: openembedded-core-boun...@lists.openembedded.org  core-boun...@lists.openembedded.org> On Behalf Of Mark Hatle
> Sent: den 7 februari 2020 21:20
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 3/3] package.bbclass: Support stripping and
> debug copy of static libraries
> 
> By default, we won't copy and strip static libraries.  However, this
> functionality can be useful in some cases where people are doing
> development on the target, and don't generally want the larger debug
> capable static libraries.  To enable the new functionality set:
> 
> PACKAGE_DEBUG_STATIC_SPLIT = '1'
> 
> Add a new function splitstaticdebuginfo.  Thus function will copy the
> unmodified static library into the specific debug directory location.
> By keeping an unmodified version, it is possible for a user trying
> to debug something to use -L /usr/lib/.debug-static and their existing
> build commands to switch from stripped to full debug versions.
> 
> The PACKAGE_DEBUG_SPLIT_STYLE will select between two different
> approaches, /usr/lib/debug-static or /.debug-static.
> 
> Additionally you can now choose to strip static libraries to conserve
> space.  If either 'PACKAGE_DEBUG_STATIC_SPLIT' or 'PACKAGE_STRIP_STATIC'
> is set to 1, the static library will be stripped.  (This is not on by
> default, as it could make diagnosing static library usage difficult in
> some cases.)
> 
> Add to insane.bbclass a skip to the staticdev warning for the specific
> -dbg package versions.
> 
> Signed-off-by: Mark Hatle 
> ---
>  meta/classes/insane.bbclass  |  2 +-
>  meta/classes/package.bbclass | 67 ++--
>  meta/conf/bitbake.conf   |  2 +-
>  3 files changed, 66 insertions(+), 5 deletions(-)

[cut]

> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 7080d63287..1efc396ac6 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass

[cut]

> @@ -1051,8 +1106,11 @@ python split_and_strip_files () {
>  results = oe.utils.multiprocess_launch(splitdebuginfo, 
> list(elffiles), d, extraargs=(dvar, debugdir, debuglibdir, debugappend, 
> debugsrcdir, d))
> 
>  if debugsrcdir and not targetos.startswith("mingw"):
> -for file in staticlibs:
> -results.append( (file, source_info(file, d, fatal=False)) )
> +if (d.getVar('PACKAGE_DEBUG_STATIC_SPLIT') == '1'):
> +results = oe.utils.multiprocess_launch(splitstaticdebuginfo, 
> staticlibs, d, extraargs=(dvar, debugstaticdir, debugstaticlibdir, 
> debugstaticappend, debugsrcdir, d))
> +else:
> +for file in staticlibs:
> +results.append( (file,source_info(file, d)) )

Why was fatal=False dropped from the call to source_info()?

//Peter

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#137256): 
https://lists.openembedded.org/g/openembedded-core/message/137256
Mute This Topic: https://lists.openembedded.org/mt/72393320/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH] cairo: work around multilib issue resulting in improper handling of licenses

2020-04-16 Thread Quentin Schulz
Hi,

On Thu, Apr 09, 2020 at 12:17:00PM +0100, Paul Barker wrote:
> On Thu,  9 Apr 2020 13:04:23 +0200
> "Quentin Schulz"  wrote:
> 
> > There is currently an issue when a LICENSE for a package is defined
> > differently than how the package is defined in PACKAGES.
> > 
> > See bug tracker: http://bugzilla.yoctoproject.org/show_bug.cgi?id=13865
> > 
> > This results in LICENSE being taken instead of LICENSE_${PN}-gobject
> > because the latter is expanded to LICENSE_lib32-cairo-gobject while the
> > entry in PACKAGES is still cairo-object at the moment of setting
> > LICENSE_EXCLUSION in base.bbclass.
> > 
> > This means that instead of the expected MPL-1.1 | LGPLv2.1 license for
> > lib32-cairo-object, it is (MPL-1.1 | LGPLv2.1) & GPLv3+ which does not
> > work when you have INCOMPATIBLE_LICENSE set to GPLv3.
> > 
> > Same applies to cairo-perf-utils and cairo-script-interpreter.
> > 
> > Let's use ${PN} instead of hardcoded cairo in PACKAGES so that we
> > mitigate the multilib issue on this recipe level.
> > 
> > Signed-off-by: Quentin Schulz 
> > ---
> >  meta/recipes-graphics/cairo/cairo_1.16.0.bb | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/meta/recipes-graphics/cairo/cairo_1.16.0.bb 
> > b/meta/recipes-graphics/cairo/cairo_1.16.0.bb
> > index b772c2ece2..e18159e96c 100644
> > --- a/meta/recipes-graphics/cairo/cairo_1.16.0.bb
> > +++ b/meta/recipes-graphics/cairo/cairo_1.16.0.bb
> > @@ -72,7 +72,7 @@ do_install_append () {
> > rmdir -p --ignore-fail-on-non-empty ${D}${libdir}/cairo
> >  }
> >  
> > -PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
> > +PACKAGES =+ "${PN}-gobject ${PN}-script-interpreter ${PN}-perf-utils"
> >  
> >  SUMMARY_cairo-gobject = "The Cairo library GObject wrapper library"
> >  DESCRIPTION_cairo-gobject = "A GObject wrapper library for the Cairo API."
> 
> Should we also change these entries to `SUMMARY_${PN}-gobject` and
> `DESCRIPTION_${PN}-gobject`? There may be others as well, I'm just looking at
> the diff not the full recipe.
> 

Please ignore, the issue is being worked on by Richard in the linked bugzilla
entry.

Quentin
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#137257): 
https://lists.openembedded.org/g/openembedded-core/message/137257
Mute This Topic: https://lists.openembedded.org/mt/72893891/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH] classes: base|package: check pkgs lics are subset of recipe lics only once

2020-04-16 Thread Quentin Schulz
Yocto bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=10130

Move logic checking that all packages licenses are only a subset of
recipe licenses from base.bbclass to the package.bbclass so that it's
evaluated only once, during packaging.

As explained in the linked bugzilla entry, if a package license is not
part of the recipe license, the warning message gets shown an
unreasonable amount of time because it's evaluated every time a recipe
is parsed.

Signed-off-by: Quentin Schulz 
---

- We may not want this patch if we find it important that this warning is
displayed at parsing time and not only after packaging has been done
(which means dryruns aren't going to detect this issue anymore).
- Do we want separate patches for each class?
- The original bug report isn't very explicit, so hopefully I'm actually
fixing it :) adding Paul, the reporter, in Cc so he can confirm.

 meta/classes/base.bbclass| 13 -
 meta/classes/package.bbclass | 13 -
 2 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 45f9435fd8..7aa2e144eb 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -584,19 +584,6 @@ python () {
 bb.debug(1, "Skipping recipe %s because of 
incompatible license(s): %s" % (pn, ' '.join(incompatible_lic)))
 raise bb.parse.SkipRecipe("it has incompatible 
license(s): %s" % ' '.join(incompatible_lic))
 
-# Try to verify per-package (LICENSE_) values. LICENSE should be a
-# superset of all per-package licenses. We do not do advanced (pattern)
-# matching of license expressions - just check that all license strings
-# in LICENSE_ are found in LICENSE.
-license_set = oe.license.list_licenses(license)
-for pkg in d.getVar('PACKAGES').split():
-pkg_license = d.getVar('LICENSE_' + pkg)
-if pkg_license:
-unlisted = oe.license.list_licenses(pkg_license) - license_set
-if unlisted:
-bb.warn("LICENSE_%s includes licenses (%s) that are not "
-"listed in LICENSE" % (pkg, ' '.join(unlisted)))
-
 needsrcrev = False
 srcuri = d.getVar('SRC_URI')
 for uri in srcuri.split():
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index d4c6a90e84..1e87108e43 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1322,9 +1322,20 @@ python populate_packages () {
 os.umask(oldumask)
 os.chdir(workdir)
 
-# Handle LICENSE_EXCLUSION
+license_set = oe.license.list_licenses(d.getVar('LICENSE'))
 package_list = []
 for pkg in packages:
+# Try to verify per-package (LICENSE_) values. LICENSE should be a
+# superset of all per-package licenses. We do not do advanced (pattern)
+# matching of license expressions - just check that all license strings
+# in LICENSE_ are found in LICENSE.
+pkg_license = d.getVar('LICENSE_' + pkg)
+if pkg_license:
+unlisted = oe.license.list_licenses(pkg_license) - license_set
+if unlisted:
+bb.warn("LICENSE_%s includes licenses (%s) that are not "
+"listed in LICENSE" % (pkg, ' '.join(unlisted)))
+# Handle LICENSE_EXCLUSION
 licenses = d.getVar('LICENSE_EXCLUSION-' + pkg)
 if licenses:
 msg = "Excluding %s from packaging as it has incompatible 
license(s): %s" % (pkg, licenses)
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#137258): 
https://lists.openembedded.org/g/openembedded-core/message/137258
Mute This Topic: https://lists.openembedded.org/mt/73061286/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH] classes: base|package: check pkgs lics are subset of recipe lics only once

2020-04-16 Thread Richard Purdie
On Thu, 2020-04-16 at 20:39 +0200, Quentin Schulz wrote:
> Yocto bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=10130
> 
> Move logic checking that all packages licenses are only a subset of
> recipe licenses from base.bbclass to the package.bbclass so that it's
> evaluated only once, during packaging.
> 
> As explained in the linked bugzilla entry, if a package license is not
> part of the recipe license, the warning message gets shown an
> unreasonable amount of time because it's evaluated every time a recipe
> is parsed.
> 
> Signed-off-by: Quentin Schulz 
> ---
> 
> - We may not want this patch if we find it important that this warning is
> displayed at parsing time and not only after packaging has been done
> (which means dryruns aren't going to detect this issue anymore).
> - Do we want separate patches for each class?
> - The original bug report isn't very explicit, so hopefully I'm actually
> fixing it :) adding Paul, the reporter, in Cc so he can confirm.
> 
>  meta/classes/base.bbclass| 13 -
>  meta/classes/package.bbclass | 13 -
>  2 files changed, 12 insertions(+), 14 deletions(-)
> 
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index 45f9435fd8..7aa2e144eb 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -584,19 +584,6 @@ python () {
>  bb.debug(1, "Skipping recipe %s because of 
> incompatible license(s): %s" % (pn, ' '.join(incompatible_lic)))
>  raise bb.parse.SkipRecipe("it has incompatible 
> license(s): %s" % ' '.join(incompatible_lic))
>  
> -# Try to verify per-package (LICENSE_) values. LICENSE should 
> be a
> -# superset of all per-package licenses. We do not do advanced 
> (pattern)
> -# matching of license expressions - just check that all license 
> strings
> -# in LICENSE_ are found in LICENSE.
> -license_set = oe.license.list_licenses(license)
> -for pkg in d.getVar('PACKAGES').split():
> -pkg_license = d.getVar('LICENSE_' + pkg)
> -if pkg_license:
> -unlisted = oe.license.list_licenses(pkg_license) - 
> license_set
> -if unlisted:
> -bb.warn("LICENSE_%s includes licenses (%s) that are not "
> -"listed in LICENSE" % (pkg, ' '.join(unlisted)))
> -
>  needsrcrev = False
>  srcuri = d.getVar('SRC_URI')
>  for uri in srcuri.split():
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index d4c6a90e84..1e87108e43 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -1322,9 +1322,20 @@ python populate_packages () {
>  os.umask(oldumask)
>  os.chdir(workdir)
>  
> -# Handle LICENSE_EXCLUSION
> +license_set = oe.license.list_licenses(d.getVar('LICENSE'))
>  package_list = []
>  for pkg in packages:
> +# Try to verify per-package (LICENSE_) values. LICENSE should 
> be a
> +# superset of all per-package licenses. We do not do advanced 
> (pattern)
> +# matching of license expressions - just check that all license 
> strings
> +# in LICENSE_ are found in LICENSE.
> +pkg_license = d.getVar('LICENSE_' + pkg)
> +if pkg_license:
> +unlisted = oe.license.list_licenses(pkg_license) - license_set
> +if unlisted:
> +bb.warn("LICENSE_%s includes licenses (%s) that are not "
> +"listed in LICENSE" % (pkg, ' '.join(unlisted)))
> +# Handle LICENSE_EXCLUSION
>  licenses = d.getVar('LICENSE_EXCLUSION-' + pkg)
>  if licenses:
>  msg = "Excluding %s from packaging as it has incompatible 
> license(s): %s" % (pkg, licenses)

I think that this check really belongs in insane.bbclass as its a
validation checking issue. I'd love to move this away from parse time
and to runtime only! I do think its something for the insane class
framework where we can configure it to warn or error for example.

Cheers,

Richard



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#137259): 
https://lists.openembedded.org/g/openembedded-core/message/137259
Mute This Topic: https://lists.openembedded.org/mt/73061286/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH] oeqa/runtime/weston: Enhance weston tests

2020-04-16 Thread Richard Purdie
On Mon, 2020-04-13 at 16:49 +0800, Yeoh Ee Peng wrote:
> Existing weston test available make sure that a process
> for weston-desktop-shell exist when image boot up.
> 
> Enhance weston tests by:
>  - execute weston-info to make sure weston interface(s)
>are initialized
>  - execute weston and make sure it can initialize a
>new wayland compositor
> 
> [YOCTO# 10690]
> 
> Signed-off-by: Yeoh Ee Peng 

I think this fails under testing:

https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/1785

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#137260): 
https://lists.openembedded.org/g/openembedded-core/message/137260
Mute This Topic: https://lists.openembedded.org/mt/72982654/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH v02] oeqa/runtime/weston: Enhance weston tests

2020-04-16 Thread Yeoh Ee Peng
Existing weston test available make sure that a process
for weston-desktop-shell exist when image boot up.

Enhance weston tests by:
 - execute weston-info to make sure weston interface(s)
   are initialized
 - execute weston and make sure it can initialize a
   new wayland compositor (retry checking for
   wayland processes up to 5 times)

[YOCTO# 10690]

Signed-off-by: Yeoh Ee Peng 
---
 meta/lib/oeqa/runtime/cases/weston.py | 40 +++
 1 file changed, 40 insertions(+)

diff --git a/meta/lib/oeqa/runtime/cases/weston.py 
b/meta/lib/oeqa/runtime/cases/weston.py
index f32599a..5c01765 100644
--- a/meta/lib/oeqa/runtime/cases/weston.py
+++ b/meta/lib/oeqa/runtime/cases/weston.py
@@ -6,6 +6,8 @@ from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.data import skipIfNotFeature
 from oeqa.runtime.decorator.package import OEHasPackage
+import threading
+import time
 
 class WestonTest(OERuntimeTestCase):
 
@@ -17,3 +19,41 @@ class WestonTest(OERuntimeTestCase):
 msg = ('Weston does not appear to be running %s' %
   self.target.run(self.tc.target_cmds['ps'])[1])
 self.assertEqual(status, 0, msg=msg)
+
+def get_weston_command(self, cmd):
+return 'export XDG_RUNTIME_DIR=/run/user/0; export DISPLAY=:0; %s' % 
cmd
+
+def run_weston_init(self):
+self.target.run(self.get_weston_command('weston'))
+
+def get_new_wayland_process(self, existing_wl_processes):
+try_cnt = 0
+while try_cnt < 5:
+time.sleep(5 + 5*try_cnt)
+try_cnt += 1
+status, output = self.target.run('pidof weston-desktop-shell')
+self.assertEqual(status, 0, msg='Retrieve existing and new 
weston-desktop-shell processes error: %s' % output)
+wl_processes = output.split(" ")
+new_wl_processes = [x for x in wl_processes if x not in 
existing_wl_processes]
+if new_wl_processes:
+return new_wl_processes, try_cnt
+
+return new_wl_processes, try_cnt
+
+@OEHasPackage(['weston'])
+def test_weston_info(self):
+status, output = 
self.target.run(self.get_weston_command('weston-info'))
+self.assertEqual(status, 0, msg='weston-info error: %s' % output)
+
+@OEHasPackage(['weston'])
+def test_weston_can_initialize_new_wayland_compositor(self):
+status, output = self.target.run('pidof weston-desktop-shell')
+self.assertEqual(status, 0, msg='Retrieve existing 
weston-desktop-shell processes error: %s' % output)
+existing_wl_processes = output.split(" ")
+
+weston_thread = threading.Thread(target=self.run_weston_init)
+weston_thread.start()
+new_wl_processes, try_cnt = 
self.get_new_wayland_process(existing_wl_processes)
+self.assertTrue(new_wl_processes, msg='Check new weston-desktop-shell 
processes error: %s (try_cnt:%s)' % (new_wl_processes, try_cnt))
+for wl in new_wl_processes:
+self.target.run('kill -9 %s' % wl)
-- 
2.7.4

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#137261): 
https://lists.openembedded.org/g/openembedded-core/message/137261
Mute This Topic: https://lists.openembedded.org/mt/73069264/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH] oeqa/runtime/weston: Enhance weston tests

2020-04-16 Thread Yeoh Ee Peng
Hi Richard,

After more testing, I realized that it will take different amount of time for 
each host machine to initialize new wayland compositor. I had added the logic 
to retry the checking of new wayland compositor to comprehend this host machine 
differences. I had submitted the v02 patch. 

Thank you very much!

Thanks,
Yeoh Ee Peng 

-Original Message-
From: Richard Purdie  
Sent: Friday, April 17, 2020 6:35 AM
To: Yeoh, Ee Peng ; 
openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] oeqa/runtime/weston: Enhance weston tests

On Mon, 2020-04-13 at 16:49 +0800, Yeoh Ee Peng wrote:
> Existing weston test available make sure that a process for 
> weston-desktop-shell exist when image boot up.
> 
> Enhance weston tests by:
>  - execute weston-info to make sure weston interface(s)
>are initialized
>  - execute weston and make sure it can initialize a
>new wayland compositor
> 
> [YOCTO# 10690]
> 
> Signed-off-by: Yeoh Ee Peng 

I think this fails under testing:

https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/1785

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#137262): 
https://lists.openembedded.org/g/openembedded-core/message/137262
Mute This Topic: https://lists.openembedded.org/mt/72982654/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH v2] buildall-qemu: automate build testing for qemu MACHINEs

2020-04-16 Thread Randy MacLeod

On 2020-02-25 9:11 a.m., Trevor Gamblin wrote:

buildall-qemu simplifies the process of build testing an upgraded or
patched recipe 


I think this is a useful little script. please rebase and re-submit
once master opens up.

../Randy (will use an alias using the original name: bitbakery) MacLeod


by cycling through the build steps for each available qemu
target, with desired LIBC specified by the user as an option (defaulting
to both glibc and musl if no option is provided). While building, a log
file with the name "-buildall.log" is written, containing a PASS
or FAIL line upon completion of the build for each architecture. For now,
qemu targets are not selectable (i.e. the recipe is built for all qemu
targets found in meta/conf/machine), but this functionality can be added
in the future along with other useful options.

The log file created by buildall-qemu also includes some basic system
info (e.g. build start time, hostname, host OS, host kernel). Since it is
not guaranteed that tools such as lsb_release will be available on the
host (it isn't by default on my Fedora machine), this information is
collected manually. Additionally, the previous run's log is retained for
comparison by renaming it in the format -buildall.log.old once a
new set of builds is triggered for the same recipe.

We've seen multiple variations of this concept in use as one-liners and
as bash functions in dotfiles, so it seemed appropriate to submit it in
script form to oe-core for everyone to use.

Sample log output:

BUILDALL-QEMU LOG FOR aspell
START TIME: 2020-02-11_19:50:02
HOSTNAME: yow-tgamblin-fedora2
HOST OS: Fedora 31 (Server Edition)
HOST KERNEL: 5.4.10-200.fc31.x86_64
===
BUILD RESULTS:
[glibc]
PASS: qemuarmv5
PASS: qemux86
PASS: qemuppc
PASS: qemumips64
PASS: qemux86-64
PASS: qemumips
PASS: qemuarm
PASS: qemuarm64
PASS: qemuriscv64
[musl]
PASS: qemuarmv5
PASS: qemux86
PASS: qemuppc
PASS: qemumips64
PASS: qemux86-64
FAIL: qemumips
FAIL: qemuarm
FAIL: qemuarm64
FAIL: qemuriscv64
===
PASSED: 14
FAILED: 4

Signed-off-by: Trevor Gamblin 
---
  scripts/buildall-qemu | 120 ++
  1 file changed, 120 insertions(+)
  create mode 100755 scripts/buildall-qemu

diff --git a/scripts/buildall-qemu b/scripts/buildall-qemu
new file mode 100755
index 00..ca9aafadf7
--- /dev/null
+++ b/scripts/buildall-qemu
@@ -0,0 +1,120 @@
+#!/bin/sh
+#  Copyright (c) 2020 Wind River Systems, Inc.
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# buildall-qemu: a tool for automating build testing of recipes
+# TODO: Add support for selecting which qemu architectures to build
+# TODO: Add support for queueing up multiple recipe builds
+# TODO: Add more logging options (e.g. local.conf info, bitbake env info)
+
+usage ()
+{
+base=$(basename "$0")
+echo "Usage: $base [options] [recipename/target]"
+echo "Executes a build of a given target for selected LIBCs. With no options, 
default to both libc and musl."
+echo "Options:"
+echo "-l, --libcSpecify one of \"glibc\" or \"musl\""
+}
+
+
+buildall ()
+{
+# Get path to oe-core directory. Since oe-init-build-env prepends $PATH 
with
+# the path to the scripts directory, get it from there
+SCRIPTS_PATH="$(echo "$PATH" | cut -d ":" -f 1)"
+OE_CORE_PATH=$(echo "$SCRIPTS_PATH" | sed 's|\(.*\)/.*|\1|')
+
+# Get target list and host machine information
+TARGET_LIST=$(find "$OE_CORE_PATH"/meta/conf/machine -maxdepth 1 -type f | 
grep qemu | sed 's|.*/||' | sed -e 's/\.conf//')
+
+# Set LIBC value to use for the builds based on options provided by the 
user
+if [ -n "$2" ]
+then
+   LIBC_LIST="$2"
+   echo "$LIBC_LIST"
+else
+   LIBC_LIST="glibc musl"
+   echo "$LIBC_LIST"
+fi
+
+START_TIME=$(date "+%Y-%m-%d_%H:%M:%S")
+LOG_FILE="$1-buildall.log"
+OS_INFO=$(grep "PRETTY_NAME=" /etc/os-release | awk -F "=" '{print $2}' | sed -e 
's/^"//' -e 's/"$//')
+
+# Append an existing log file for this build with .old if one exists
+if [ -f "${LOG_FILE}" ]
+then
+   mv "${LOG_FILE}" "${LOG_FILE}.old"
+else
+  touch "${LOG_FILE}"
+fi
+
+# Fill the log file with build and host info
+echo "BUILDALL-QEMU LOG FOR $1" >> "${LOG_FILE}"
+echo "START TIME: ${START_TIME}" >> "${LOG_FILE}"
+echo "HOSTNAME: $(uname -n)" >> "${LOG_FILE}"
+echo "HOST OS: ${OS_INFO}" >> "${LOG_FILE}"
+echo "HOST KERNEL: $(uname -r)" >> "${LOG_FILE}"
+echo "===" >> "${LOG_FILE}"
+echo "BUILD RESULTS:" >> "${LOG_FILE}"
+
+# start the builds for each MACHINE and TCLIBC
+for j in ${LIBC_LIST}
+do
+   echo "[$j]" >> "${LOG_FILE}"
+   for i in ${TARGET_LIST}
+   do
+   echo "$i" "$j"; \
+   TCLIBC=$j MACHINE=$i bitbake "$1" && echo "PASS: $i" >> "${LOG_FILE}" || echo "FAIL: 
$i" >> "${LOG_FILE}"
+   done
+done
+
+# Get pass/fail totals and add them to the end of the lo