Tim Orling [Wed, 20 Oct 2021 18:57:24 +0000 (18:57 +0000)]
python3-setuptools: _distutils/sysconfig fix
Add patch to append STAGING_LIBDIR python-sysconfigdata to sys.path so
that packages which set SETUPTOOLS_USE_DISUTILS='local' cross-compile
properly with python3-setuptools-native.
Fixes:
ModuleNotFoundError: No module named '_sysconfigdata'
Ross Burton [Wed, 20 Oct 2021 17:30:07 +0000 (18:30 +0100)]
oeqa/runtime: search sys.path explicitly for modules
The controller module loading code needs to be told what directories
to search for modules via the target_modules_path keyword argument, which
is set to BBPATH.
However, as the actual module loading is done via importlib this relies
on the paths being on sys.path, which it is as base.bbclass puts each
layer's lib/ in sys.path.
Simplify the code by removing this indirection, and simply search
sys.path directly.
Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Jose Quaresma [Wed, 20 Oct 2021 17:25:46 +0000 (18:25 +0100)]
sstate: fix touching files inside pseudo
running the 'id' command inside the sstate_create_package
function shows that this funcion run inside the pseudo:
uid=0(root) gid=0(root) groups=0(root)
The check for touch files [ ! -w ${SSTATE_PKG} ]
will always return true and the touch can fail
when the real user don't have permission or
in readonly filesystem.
As the documentation refers, the file test operator "-w"
check if the file has write permission (for the user running the test).
We can avoid this test running the touch and mask any return errors
that we have.
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Peter Hoyes [Tue, 19 Oct 2021 13:47:27 +0000 (14:47 +0100)]
u-boot: Fix syntax error in ${UBOOT_ENV}.scr compilation
A previous commit (a3d3c2d4ac421a0dde2a20825eab4434f16b2452) introduced
support for compiling a U-Boot boot script, but the logic contained a
syntax error which was only visible in the build log. Fix the error by
using separate []s for each expression in the if statement.
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Thomas Perrot [Mon, 18 Oct 2021 23:21:23 +0000 (01:21 +0200)]
image_types: allow the creation of block devices on top of UBI volumes
Currently, the function multiubi_mkfs doesn't allow using anything else than
UBIFS over UBI.
Here, we propose to introduce two variables that allow to customize the ubinize
configuration and the image dependency, in order to be able to build UBI
images using the ubiblock abstraction layer and block filesystems.
For example, with this change it is possible to build a UBI volume using a
compressed squashfs, with the following configuration:
UBI_VOLTYPE ?= "static"
UBI_IMGTYPE ?= "squasfs-lz4"
Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Jose Quaresma [Sun, 3 Oct 2021 21:54:05 +0000 (22:54 +0100)]
sstate.bbclass: count the files on mirrors using the pre local files
We don't need extra python collections to count the found files
on the sstate cache and sstate mirrors.
The main found collections provides all the files that were found.
Then we only need to store the nunber of files that found on the
local sstate cache and the files that found on the sstate cache
mirror is derived from that.
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Ross Burton [Tue, 19 Oct 2021 11:35:29 +0000 (12:35 +0100)]
gawk: reduce strictness of the time test
The time.awk test does a sleep() and verifies that the actual delay is
close to the requested time. However on a loaded system the range of
acceptable durations is quite tight and will occasionally fail.
Solve this by increasing the range of acceptable delays slightly to
between 50% and 200% of the requested delay.
[ YOCTO #14371 ]
Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Contains 'Make YUV formats we're going to emulate external-only' [1]
was applied in 21.2.4. This fixes red label issues on video for VC4,
Freedreno and others.
Deletes meta/recipes-graphics/mesa/files/without-neon.patch [2]
already in Mesa since 21.2.
Tim Orling [Sun, 17 Oct 2021 01:41:20 +0000 (01:41 +0000)]
python3-tomli: add recipe for 1.2.1
A lil' TOML parser
This is a runtime dependency for setuptools-scm upgrade as well as for
several other Python Packaging Authority (pypa) tools that will be
replacing distutils and setuptools in the future.
Upstream does not have a setup.py, but rather relies on flit_core to
build. This introduces a circular dependency, as flit_core has a runtime
dependency on tomli.
Borrow a setup.py from Gentoo until a better solution is found by
upstream Python Packaging Authority (pypa).
Signed-off-by: Tim Orling <timothy.t.orling@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Andrej Valek [Sat, 16 Oct 2021 20:01:47 +0000 (22:01 +0200)]
kernel-fitimage: use correct kernel image
Even if initramfs_bundle_path was used, a wrong compression was reflected
in output its template file. Use linux.bin as universal kernel image.
The linux.bin file covers both cases because it's beying created from
vmlinux.
We know, that vmlinux is created inside compressed directory already,
so no external compression will be used.
Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Walter Schweizer <walter.schweizer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Andrej Valek [Sat, 16 Oct 2021 20:01:46 +0000 (22:01 +0200)]
featimage: refactor style
- use bash variable notation without {} where possible
- just to make sure it looks like bash variable not bitbake variable one
- fix indent style in "cat" commands
- replace "! -z" -> "-n"
- make debug info in ramdisk section creation more verbose
Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Khem Raj [Sat, 16 Oct 2021 16:49:01 +0000 (09:49 -0700)]
opensbi-payloads: Add dependency on kernel if fdt is set
fdts are built as part of kernel, so add missing dependency on kernel
deploy task
Fixes opensbi build errors
| make: *** No rule to make target '/mnt/b/yoe/master/build/tmp/deploy/images/unmatched/hifive-unmatched-a00.dtb', needed
by '/mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux-musl/opensbi/0.9+gitAUTOINC+bd355213bf-r0/git/build/platform/gene
ric/firmware/fw_dynamic.o'. Stop.
Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Ross Burton [Thu, 14 Oct 2021 16:33:19 +0000 (17:33 +0100)]
sstate: don't silently handle all exceptions in sstate_checkhashes
If checkstatus returns an exception we should silently handle
FetchError, as this means the fetch failed for 'normal' reasons such as
file not found. However, other exceptions may be raised, and these
should be made visible.
Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Ross Burton [Thu, 14 Oct 2021 16:33:18 +0000 (17:33 +0100)]
oe/utils: log exceptions in ThreadedWorker functions
If the function a ThreadedWorker is executing raises an exception, don't
use print() as that mostly disappears. Instead, output it to the logger.
This is done using bb.mainlogger.debug directly instead of bb.debug() as
this allows us to pass the exception instance directly, which is then
incorporated into the log stream.
Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Mike Crowe [Fri, 15 Oct 2021 14:39:54 +0000 (15:39 +0100)]
insane,license,license_image: Allow treating license problems as errors
Use the same WARN_WA and ERROR_QA variables as insane.bbclass to allow
individual recipes, the distro or other configuration to determine
whether the various detected license errors should be treated as a
warning (as now) or as an error.
oe.qa.handle_error isn't immediately fatal, so oe.qa.exit_if_errors must
be called at the end of do_populate_lic to fail the task.
Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Mike Crowe [Fri, 15 Oct 2021 14:39:53 +0000 (15:39 +0100)]
lib/oe/qa,insane: Move extra error handling functions to library
Extract package_qa_write_error, package_qa_handle_error and
package_qa_add_message functions from insane.bbclass to lib/oe/qa.py and
drop the package_qa_ prefixes.
Update various bbclasses to use the new functions. No import is required
since base.bbclass puts oe.qa in OE_IMPORTS.
Stop requiring callers to manually track whether a fatal error has been
encountered via a "sane" flag. Instead replace the QA_SANE variable with
QA_ERRORS_FOUND and call oe.qa.exit_if_errors or
oe.qa.exit_with_message_if_errors at the end of each task.
Inspired by discussion resulting from
https://lists.openembedded.org/g/openembedded-core/message/156793 and
https://lists.openembedded.org/g/openembedded-core/message/156900
Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>