]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/log
thirdparty/openembedded/openembedded-core-contrib.git
3 years agorust: Fix musl builds
Richard Purdie [Fri, 5 Aug 2022 13:01:22 +0000 (14:01 +0100)] 
rust: Fix musl builds

Musl targets need a sysroot set to find the musl static libraries. Set this
appropriately in musl builds.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust: Enable nativesdk and target builds + replace rust-tools-cross-canadian
Richard Purdie [Fri, 5 Aug 2022 12:55:49 +0000 (13:55 +0100)] 
rust: Enable nativesdk and target builds + replace rust-tools-cross-canadian

Enable rust target builds as well as nativesdk-rust for the sdk. Merge
the builds of rust-tools components into the rust build, packaged separately
since this is a lot more efficient and saves rebuilding core rust multiple
times. The tools are not target specific so nativesdk-rust-tools suffices
and we can drop the cross canadian piece.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust: Drop cross/crosssdk
Richard Purdie [Fri, 5 Aug 2022 12:53:53 +0000 (13:53 +0100)] 
rust: Drop cross/crosssdk

Now that target config json is provided by rust-target-config.bbclass,
the need for the cross and crosssdk recipes is removed. Drop them and
simplify dependencies accordingly.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust-cross-canadian: Simplify and fix
Richard Purdie [Fri, 5 Aug 2022 12:49:47 +0000 (13:49 +0100)] 
rust-cross-canadian: Simplify and fix

Since a copy of rust can target any target and doesn't need to be target
specific, we can simplify rust-cross-canadian to simply contain the json
configuration and envirionment setup scripts.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust-common: Set rustlibdir to match target expectation
Richard Purdie [Fri, 5 Aug 2022 12:48:39 +0000 (13:48 +0100)] 
rust-common: Set rustlibdir to match target expectation

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agocargo: Drop cross-canadian variant and fix/use nativesdk
Richard Purdie [Fri, 5 Aug 2022 12:39:43 +0000 (13:39 +0100)] 
cargo: Drop cross-canadian variant and fix/use nativesdk

The cargo-cross-candian variant made no sense as one version of cargo in
the SDK can work for all targets. Replace it with nativesdk-cargo instead.

Move the SDK env to rust-cross-canadian.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust-common: Simplify libc handling
Richard Purdie [Fri, 5 Aug 2022 12:34:42 +0000 (13:34 +0100)] 
rust-common: Simplify libc handling

The current libc handling code is simply wrong in many cases. Simplify it
to a check of the triplet for musl handling which is much simpler and less
error prone when handling things like nativesdk targets.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust-target-config: Make target workaround generic
Richard Purdie [Fri, 5 Aug 2022 13:05:18 +0000 (14:05 +0100)] 
rust-target-config: Make target workaround generic

Ensure the 'target' data is set for both HOST and TARGET queries
as appropriate to work correctly in cross configurations.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust-common: Update to match cross targets
Richard Purdie [Fri, 5 Aug 2022 13:04:04 +0000 (14:04 +0100)] 
rust-common: Update to match cross targets

Tweak the armv7 workaround to work for cross environments and as a host
triplet and not just as a target.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust.inc: Fix for cross compilation configuration
Richard Purdie [Fri, 5 Aug 2022 12:33:08 +0000 (13:33 +0100)] 
rust.inc: Fix for cross compilation configuration

For cross compilation, build, host and target may be different. Ensure
the main rust config has the appropriate sections added to match the
configurations.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust-llvm: Enable nativesdk variant
Richard Purdie [Fri, 5 Aug 2022 12:31:10 +0000 (13:31 +0100)] 
rust-llvm: Enable nativesdk variant

To allow nativesdk variants of the tools to build, enable a nativesdk
variant of rust-llvm.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agocargo_common: Handle build SYS as well as HOST/TARGET
Richard Purdie [Fri, 5 Aug 2022 12:29:09 +0000 (13:29 +0100)] 
cargo_common: Handle build SYS as well as HOST/TARGET

Improve the common class to handle BUILD_SYS as well as host and target,
removing the need to a workaround in the rust recipe.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust-common/rust: Improve bootstrap BUILD_SYS handling
Richard Purdie [Fri, 5 Aug 2022 12:25:46 +0000 (13:25 +0100)] 
rust-common/rust: Improve bootstrap BUILD_SYS handling

Move the "unknown" vendor workaround used during bootstrap to a
central location so it is applied consistently to all RUST_BUILD_SYS
values rather than some subset.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust: Generate per recipe target configuration files
Richard Purdie [Fri, 5 Aug 2022 12:15:31 +0000 (13:15 +0100)] 
rust: Generate per recipe target configuration files

Instead of generating target configuration files centrally and often getting
it wrong, or having trouble finding the right set, generate them dynamically
from the bbclass into WORKDIR per recipe.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust-target-config: Show clear error when target isn't defined
Richard Purdie [Fri, 5 Aug 2022 11:54:14 +0000 (12:54 +0100)] 
rust-target-config: Show clear error when target isn't defined

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust/mesa: Drop obsolete YOCTO_ALTERNATE_MULTILIB_NAME
Richard Purdie [Fri, 5 Aug 2022 11:50:13 +0000 (12:50 +0100)] 
rust/mesa: Drop obsolete YOCTO_ALTERNATE_MULTILIB_NAME

This variable is no longer used by the llvm patches.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust.inc: Fix cross build llvm-config handling
Richard Purdie [Fri, 5 Aug 2022 11:43:56 +0000 (12:43 +0100)] 
rust.inc: Fix cross build llvm-config handling

We need llvm-config for the target but the cross compiled target binary is
no good. We can copy the native one into the target location where it will
then return the target values though.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust.inc: Rename variables to make code clearer
Richard Purdie [Fri, 5 Aug 2022 11:40:25 +0000 (12:40 +0100)] 
rust.inc: Rename variables to make code clearer

Instead of reusing a "target_section" variable, name them host and build
section instead. This patch sets things up for other improvementsm,
separating out the renaming.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust: Switch to use RUST_XXX_SYS consistently
Richard Purdie [Fri, 5 Aug 2022 11:28:45 +0000 (12:28 +0100)] 
rust: Switch to use RUST_XXX_SYS consistently

The code was using a mixture of XXX_SYS and RUST_XXX_SYS. Use
RUST_XXX_SYS consistently and add the variables to the global exclsion
on signatures as they're reflected in the directory triplets and trying
to filter them out the hashes separately is too painful.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust: Work around reproducibility issues
Richard Purdie [Wed, 3 Aug 2022 14:10:00 +0000 (15:10 +0100)] 
rust: Work around reproducibility issues

Add a patch which removes the sections of code which encode buildpaths. Whilst
not ideal, the patches at least show where the problematic data is coming from
and should allow more focused work to resovle it by someone who has a better
understanding of rust and what this code is doing. It does look unlikely we
actually need this code in our usecases anyway.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust-common: Rework wrappers to handle musl
Richard Purdie [Fri, 5 Aug 2022 11:01:32 +0000 (12:01 +0100)] 
rust-common: Rework wrappers to handle musl

For musl we need to be able to add a library to the end of the linker commandline.
Rework the wrapper code to be able to do this through a new variable.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust-common: Drop export directive from wrappers
Richard Purdie [Fri, 5 Aug 2022 11:03:18 +0000 (12:03 +0100)] 
rust-common: Drop export directive from wrappers

These variables don't need to be exported into the environment, which reduces
the scope of rebuilds when variable values change.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust-common: Add CXXFLAGS
Richard Purdie [Fri, 5 Aug 2022 10:52:10 +0000 (11:52 +0100)] 
rust-common: Add CXXFLAGS

Similarly to CC and CCLD, handle CXX flags too.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust-target-config: Add mips n32 target information
Richard Purdie [Tue, 26 Jul 2022 21:45:07 +0000 (22:45 +0100)] 
rust-target-config: Add mips n32 target information

Add MIPS n32 target information. This appears to be correct but
building libstd-rs for the target doesn't work.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agoconf/distro/no-static-libs: Allow static musl for rust
Richard Purdie [Wed, 27 Jul 2022 10:59:16 +0000 (11:59 +0100)] 
conf/distro/no-static-libs: Allow static musl for rust

When building rust for musl targets we need the static library from musl,
so enable it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agoselftest/reproducible: Exclude rust/rust-dbg for now until we can fix
Richard Purdie [Wed, 3 Aug 2022 22:19:08 +0000 (23:19 +0100)] 
selftest/reproducible: Exclude rust/rust-dbg for now until we can fix

There looks to be a reproducibility issue left in one of the rust
libraries. It doesn't appear to be a string issue but some binary
problem. Disable rust from the reproducibility testing until we can
get to the bottom of the issue (allowing wider testing of all the
other improvements).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agopopulate_sdk_base: Disable rust SDK for MIPS n32
Richard Purdie [Wed, 3 Aug 2022 22:13:34 +0000 (23:13 +0100)] 
populate_sdk_base: Disable rust SDK for MIPS n32

The n32 MIPS rust SDK doesn't quite build (libstd-rs fails with an llvm
register issue). Disable it for now, someone with interest in having it working
can fix if/as/when.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agonativesdk: Clear TUNE_FEATURES
Richard Purdie [Wed, 27 Jul 2022 10:19:27 +0000 (11:19 +0100)] 
nativesdk: Clear TUNE_FEATURES

Similarly to what native.bbclass does, clear TUNE_FEATURES since these
aren't appropriate to the nativesdk build. This saves us having to change
down signature issues due to data in this variable.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agooeqa/selftest/sstate: Ensure tests are deterministic
Richard Purdie [Wed, 27 Jul 2022 10:19:49 +0000 (11:19 +0100)] 
oeqa/selftest/sstate: Ensure tests are deterministic

glob.glob() depends on the order of files on disk and selecting [0]
is race prone. We should cover all the nativesdk files so rework
the function to do this.

Spotted as some oe-selftests failed, some passed and it raised a question
of why!

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agoimage_types_wic.bbclass: fix cross binutils dependency
Chen Qi [Thu, 4 Aug 2022 03:43:20 +0000 (20:43 -0700)] 
image_types_wic.bbclass: fix cross binutils dependency

Enable multilib and wic at the same time and we'll meet the
following error.

  ERROR: Nothing PROVIDES 'virtual/i686-wrsmllib32-linux-binutils'

Adjust the dependency to take multilib into consideration.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agopython3-pip: upgrade 22.1.2 -> 22.2.1
wangmy [Wed, 3 Aug 2022 23:56:14 +0000 (07:56 +0800)] 
python3-pip: upgrade 22.1.2 -> 22.2.1

reproducible.patch
refreshed for new version.

0001-change-shebang-to-python3.patch
removed as not needed since upstream has removed the shebang lines.

License-Update:
 src/pip/_vendor/html5lib/LICENSE: removed since it's not it new version
 src/pip/_vendor/chardet/LICENSE: file format modified, change St to Street
 src/pip/_vendor/pygments/LICENSE: Copyright year updated to 2022

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agopybootchartgui: write the max values in the graph legend
Martin Jansa [Wed, 3 Aug 2022 15:12:30 +0000 (17:12 +0200)] 
pybootchartgui: write the max values in the graph legend

* easier to find than searching for the highest value in the graph, when the graph is really wide

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agopybootchartgui: fix 2 SyntaxWarnings
Martin Jansa [Wed, 3 Aug 2022 15:12:29 +0000 (17:12 +0200)] 
pybootchartgui: fix 2 SyntaxWarnings

scripts/pybootchartgui/pybootchartgui/draw.py:820: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if (OPTIONS.show_pid or OPTIONS.show_all) and ipid is not 0:
scripts/pybootchartgui/pybootchartgui/draw.py:918: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if i is not 0:

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agopython3-pygobject: upgrade 3.42.1 -> 3.42.2
wangmy [Wed, 3 Aug 2022 08:59:57 +0000 (16:59 +0800)] 
python3-pygobject: upgrade 3.42.1 -> 3.42.2

Changelog:
=========
 Error out instead of crashing when marshaling unsupported fundamental types in some cases !180
 Add a workaround for a PyPy 3.9+ bug when threads are used !200
 Fix crashes when marshaling zero terminated arrays for certain item types !191
 Fix a crash/refcounting error in case marshaling a hash table fails !191
 Make the test suite pass again with PyPy !191
 tests: support running tests with (MSVC) CPython 3.8+ on Windows !206
 interface: Fix leak when overriding GInterfaceInfo !204
 setup.py: look up pycairo headers without importing the module (helps with building on Windows and MSVC CPython 3.8+) !205

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agopython3-setuptools: upgrade 63.2.0 -> 63.3.0
wangmy [Wed, 3 Aug 2022 08:44:06 +0000 (16:44 +0800)] 
python3-setuptools: upgrade 63.2.0 -> 63.3.0

Merge with pypa/distutils@129480b, including substantial delinting and cleanup,
some refactoring around compiler logic, better messaging in cygwincompiler (pypa/distutils#161).

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agopython3-scons: upgrade 4.3.0 -> 4.4.0
wangmy [Wed, 3 Aug 2022 08:44:05 +0000 (16:44 +0800)] 
python3-scons: upgrade 4.3.0 -> 4.4.0

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agopython3-jsonschema: upgrade 4.7.2 -> 4.9.0
wangmy [Wed, 3 Aug 2022 08:44:03 +0000 (16:44 +0800)] 
python3-jsonschema: upgrade 4.7.2 -> 4.9.0

Changelog:
===========
-Fix relative $ref resolution when the base URI is a URN or other scheme (#544).
-pkgutil.resolve_name is now used to retrieve validators provided on the command
 line. This function is only available on 3.9+, so 3.7 and 3.8 (which are still
 supported) now rely on the pkgutil_resolve_name backport package. Note however
 that the CLI itself is due to be deprecated shortly in favor of check-jsonschema.
-best_match no longer traverses into anyOf and oneOf when all of the errors
 within them seem equally applicable. This should lead to clearer error messages
 in some cases where no branches were matched.

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agopython3-hatchling: upgrade 1.5.0 -> 1.6.0
wangmy [Wed, 3 Aug 2022 08:40:30 +0000 (16:40 +0800)] 
python3-hatchling: upgrade 1.5.0 -> 1.6.0

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agopython3-dbusmock: upgrade 0.28.1 -> 0.28.4
wangmy [Wed, 3 Aug 2022 08:40:29 +0000 (16:40 +0800)] 
python3-dbusmock: upgrade 0.28.1 -> 0.28.4

Changelog:
==========
    setup.py: Fix ModuleNotFoundError
    ofono template: Fix conversion to f-strings (Debian #1015286)
    Ship FMF tests in release tarballs

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agopython3-cython: upgrade 0.29.30 -> 0.29.32
wangmy [Wed, 3 Aug 2022 08:40:28 +0000 (16:40 +0800)] 
python3-cython: upgrade 0.29.30 -> 0.29.32

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agopython3-attrs: upgrade 21.4.0 -> 22.1.0
wangmy [Wed, 3 Aug 2022 08:40:27 +0000 (16:40 +0800)] 
python3-attrs: upgrade 21.4.0 -> 22.1.0

License-Update: add "and the attrs contributors" to Copyright

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agoqemu: CVE-2022-35414 can perform an uninitialized read on the translate_fail path...
Hitendra Prajapati [Wed, 3 Aug 2022 04:50:19 +0000 (10:20 +0530)] 
qemu: CVE-2022-35414 can perform an uninitialized read on the translate_fail path, leading to an io_readx or io_writex crash

Upstream-Status: Backport [https://github.com/qemu/qemu/commit/418ade7849ce7641c0f7333718caf5091a02fd4c]
CVE: CVE-2022-35414
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agopybootchartgui: render memory pressure as well
Martin Jansa [Tue, 2 Aug 2022 19:11:26 +0000 (21:11 +0200)] 
pybootchartgui: render memory pressure as well

* memory pressure is already collected in buildstats, render it as well
  when available

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agocreate-spdx: ignore packing control files from ipk and deb
Jose Quaresma [Tue, 2 Aug 2022 09:29:24 +0000 (10:29 +0100)] 
create-spdx: ignore packing control files from ipk and deb

Otherwise spdx can have references for data that is not packed
in the package delivered because this contol data is temporarly
and only exist while the package is been write.

During do_package_write_ipk task in do_package_ipk the control
files is cleaned up at the end. This can create a race condiction
when the do_create_spdx task runs the add_package_files function
and these files is been deleted at same time in the
task do_package_write_ipk.

ERROR: alsa-topology-conf-1.2.5.1-r0 do_create_spdx: Error executing a python function in exec_func_python() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:do_create_spdx(d)
     0003:
File: '/srv/oe/build/conf/../../layers/openembedded-core/meta/classes/create-spdx.bbclass', lineno: 567, function: do_create_spdx
     0563:            package_doc.add_relationship(package_doc, "DESCRIBES", spdx_package)
     0564:
     0565:            package_archive = deploy_dir_spdx / "packages" / (package_doc.name + ".tar.zst")
     0566:            with optional_tarfile(package_archive, archive_packaged) as archive:
 *** 0567:                package_files = add_package_files(
     0568:                    d,
     0569:                    package_doc,
     0570:                    spdx_package,
     0571:                    pkgdest / package,
File: '/srv/oe/build/conf/../../layers/openembedded-core/meta/classes/create-spdx.bbclass', lineno: 234, function: add_package_files
     0230:                            info.mtime = source_date_epoch
     0231:
     0232:                        archive.addfile(info, f)
     0233:
 *** 0234:                sha1 = bb.utils.sha1_file(filepath)
     0235:                sha1s.append(sha1)
     0236:                spdx_file.checksums.append(oe.spdx.SPDXChecksum(
     0237:                        algorithm="SHA1",
     0238:                        checksumValue=sha1,
File: '/srv/oe/bitbake/lib/bb/utils.py', lineno: 559, function: sha1_file
     0555:    """
     0556:    Return the hex string representation of the SHA1 checksum of the filename
     0557:    """
     0558:    import hashlib
 *** 0559:    return _hasher(hashlib.sha1(), filename)
     0560:
     0561:def sha384_file(filename):
     0562:    """
     0563:    Return the hex string representation of the SHA384 checksum of the filename
File: '/srv/oe/bitbake/lib/bb/utils.py', lineno: 528, function: _hasher
     0524:
     0525:def _hasher(method, filename):
     0526:    import mmap
     0527:
 *** 0528:    with open(filename, "rb") as f:
     0529:        try:
     0530:            with mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) as mm:
     0531:                for chunk in iter(lambda: mm.read(8192), b''):
     0532:                    method.update(chunk)
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/srv/oe/build/tmp-lmp/work/all-lmp-linux/alsa-topology-conf/1.2.5.1-r0/packages-split/alsa-topology-conf/CONTROL/control'

ERROR: Logfile of failure stored in: /srv/oe/build/tmp-lmp/work/all-lmp-linux/alsa-topology-conf/1.2.5.1-r0/temp/log.do_create_spdx.998864
INFO: recipe alsa-topology-conf-1.2.5.1-r0: task do_create_spdx: Failed

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agolttng-modules: Fix build failure for kernel v5.15.58
He Zhe [Tue, 2 Aug 2022 02:01:43 +0000 (10:01 +0800)] 
lttng-modules: Fix build failure for kernel v5.15.58

Backport from upstream d8254360c7f2ff9b3f945e9668d89c0b56b9bd91
("fix: net: skb: introduce kfree_skb_reason() (v5.15.58..v5.16)")

tmp-glibc/work/qemuarm-wrs-linux-gnueabi/lttng-modules/2.13.3-r0/
lttng-modules-2.13.3/src/probes/../../include/lttng/
tracepoint-event-impl.h:133:6:
error: conflicting types for 'trace_kfree_skb'; have 'void(struct sk_buff *, void *)'
  133 | void trace_##_name(_proto);
      |      ^~~~~~

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agodevtool/upgrade: catch bb.fetch2.decodeurl errors
Alexander Kanavin [Mon, 1 Aug 2022 15:44:34 +0000 (17:44 +0200)] 
devtool/upgrade: catch bb.fetch2.decodeurl errors

Otherwise, workspace cleanup (removing bogus recipe and source tree)
will not happen, leaving breakage behind.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agodevtool/upgrade: correctly clean up when recipe filename isn't yet known
Alexander Kanavin [Mon, 1 Aug 2022 15:44:33 +0000 (17:44 +0200)] 
devtool/upgrade: correctly clean up when recipe filename isn't yet known

There is a coding error in the second invocation of _upgrade_error:
rf is passed into it before it is initialized in the try: block. And so
bogus recipes are left behind in the workspace, causing breakage.

Instead, rewrite the functions to take the recipe directory name in the
workspace layer, which can be calculated in advance.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agoclasses/sanity: Add comment about github & gitlab archives
Joshua Watt [Thu, 4 Aug 2022 14:58:31 +0000 (09:58 -0500)] 
classes/sanity: Add comment about github & gitlab archives

Add a comment so that users grepping for "github" or "gitlab" will find
this code (since the regex wont).

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agowic/bootimg-efi: Add support for loading devicetree files
Jan Kiszka [Sat, 30 Jul 2022 08:24:43 +0000 (10:24 +0200)] 
wic/bootimg-efi: Add support for loading devicetree files

For device tree using systems, add support to set a custom devices tree
during UEFI boot. This requires to copy the DTB file to the boot
partition and to add the respective loader entries to the configuration
files.

Both grub and systemd-boot support only loading a specific device tree.
Therefore refuse to work if the 'dtb' parameter contains more than one
entry.

Out of scope for now are overlays (only supported by systemd-boot).

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
[Luca: rebased on commit 98e9d435b278 ("wic/bootimg-efi: use cross objcopy when building unified kernel image")]

3 years agowic/bootimg-efi: Factor out some common bits
Jan Kiszka [Sat, 30 Jul 2022 08:24:04 +0000 (10:24 +0200)] 
wic/bootimg-efi: Factor out some common bits

The paths for configuring grub and systemd-boot have some common bits
around copying the initrd files. This will even grow when adding dtb
support. Factor this out into a class function.

Along this, avoid evaluating 'create-unified-kernel-image' multiple
times in do_configure_systemdboot and suppress a bogus warning about
"Ignoring missing initrd" when it is turned on.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agovim: update from 9.0.0063 to 9.0.0115
Randy MacLeod [Mon, 1 Aug 2022 12:52:34 +0000 (08:52 -0400)] 
vim: update from 9.0.0063 to 9.0.0115

Drop crosscompile.patch which was merged as part of:
   509695c1c (tag: v9.0.0065) patch 9.0.0065: \
      cross-compiling doesn't work because of timer_create check

Also drop: racefix.patch which may have been fixed upstream
and is being tracked by:
   https://github.com/vim/vim/pull/10776
where upstream is asking if the different approach resolves the
race condition. Let's see what's out there!

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agorepo: upgrade 2.27 -> 2.28
Changhyeok Bae [Sat, 30 Jul 2022 21:18:21 +0000 (21:18 +0000)] 
repo: upgrade 2.27 -> 2.28

Signed-off-by: Changhyeok Bae <changhyeok.bae@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agohdparm: Fix build with glibc 2.36
Khem Raj [Fri, 29 Jul 2022 20:11:49 +0000 (13:11 -0700)] 
hdparm: Fix build with glibc 2.36

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agogcc-sanitizers: Fix mount.h glibc 2.36 conflict
Khem Raj [Fri, 29 Jul 2022 19:36:14 +0000 (12:36 -0700)] 
gcc-sanitizers: Fix mount.h glibc 2.36 conflict

backport a sanitizers upstream patch

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agoscripts/oe-setup-builddir: make it known where configurations come from
Alexander Kanavin [Mon, 1 Aug 2022 09:33:12 +0000 (11:33 +0200)] 
scripts/oe-setup-builddir: make it known where configurations come from

"with some default values" isn't clear; if the user wants to change or
inspect the default values and their history, we should help them find
where they are. This becomes especially important when using template
configs other than poky's.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agouboot-config.bbclass: Raise error for bad key
Tom Hochstein [Thu, 28 Jul 2022 18:44:36 +0000 (13:44 -0500)] 
uboot-config.bbclass: Raise error for bad key

If an invalid key is used, the class ignores the error, with an
indeterminate result. In my case, the problem surfaced in do_deploy:

```
| cp: cannot stat '/.../build/tmp/work/imx6qdlsabresd-fsl-linux-gnueabi/u-boot-imx-mfgtool/2022.04-r0/deploy-u-boot-imx-mfgtool/u-boot.imx': No such file or
| directory
```

The root cause of this was that the uboot config key did not match
a valid option. With the fix, the error is caught by the class:

```
ERROR: Nothing PROVIDES 'u-boot-imx-mfgtool'
u-boot-imx-mfgtool was skipped: The selected UBOOT_CONFIG key ['mfgtool'] has no match in dict_keys(['sd-fslc', 'sd-imx', 'sd-optee-imx', 'sata-imx', 'mfgtool-imx']).
```

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agobtrfs-tools: Use linux/mount.h instead of sys/mount.h
Khem Raj [Thu, 28 Jul 2022 14:30:44 +0000 (07:30 -0700)] 
btrfs-tools: Use linux/mount.h instead of sys/mount.h

This fixes the conflict thats with mount.h from glibc 2.36+ and kernel
[1]

[1] https://sourceware.org/glibc/wiki/Release/2.36

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agolibarchive: Avoid mount.h conflict between kernel and glibc
Khem Raj [Thu, 28 Jul 2022 14:30:43 +0000 (07:30 -0700)] 
libarchive: Avoid mount.h conflict between kernel and glibc

glibc 2.36 implements fsconfig_command but it now conflicts with kernel
mount.h and there is no workaround, code in apps have to be adjusted to
use correct API see [1]

[1] https://sourceware.org/glibc/wiki/Release/2.36

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agoltp: fix build with ld-is-gold in DISTRO_FEATURES
Martin Jansa [Thu, 28 Jul 2022 11:40:44 +0000 (13:40 +0200)] 
ltp: fix build with ld-is-gold in DISTRO_FEATURES

* backport one more commit for LD call which conflicts with the
  0001-kvm-use-LD-instead-of-hardcoding-ld.patch we already had
  and replace this 2nd patch with the rebased version which is
  now merged upstream

* then backport additional patch which introduces KVM_LD variable
  which we can set to use .bfd suffix in LD when ld-is-gold is
  in DISTRO_FEATURES to work around gold incompatibility reported:
  https://github.com/linux-test-project/ltp/pull/948#issuecomment-1193138866
  https://lists.openembedded.org/g/openembedded-core/message/168193

  http://errors.yoctoproject.org/Errors/Details/663094/

  x86_64-oe-linux-ld --sysroot=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/ltp/20220527-r0/recipe-sysroot   -z noexecstack -r -T /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/ltp/20220527-r0/git/testcases/kernel/kvm/linker/payload.lds --oformat=elf64-x86-64 -o kvm_pagefault01-payload.o kvm_pagefault01-payload.bin
  x86_64-oe-linux-ld: error: kvm_pagefault01-payload.bin:1:1: invalid character
  make: *** [Makefile:53: kvm_pagefault01-payload.o] Error 1

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agocmake: remove CMAKE_ASM_FLAGS variable in toolchain file
Martin Beeger [Mon, 18 Jul 2022 16:50:23 +0000 (18:50 +0200)] 
cmake: remove CMAKE_ASM_FLAGS variable in toolchain file

As discussied in [YOCTO #14717] cmake contains a OEToolchainConfig.cmake
file to configure the toolchain correctly in cross-compile build for recipes
using cmake. The CMAKE_ASM_FLAGS are the configuration are meant for  assembly,
but the spelling is incorrect and the Flag is ASFLAGS for gcc and other compilers.
So this variable might neever have worked and it is better for
recipes to specify their own.

Signed-off-by: Martin Beeger <martin.beeger@online.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agowic: depend on cross-binutils
Ross Burton [Wed, 27 Jul 2022 11:11:55 +0000 (12:11 +0100)] 
wic: depend on cross-binutils

Wic can build an unified kernel image, but this needs the cross-objcopy
from binutils.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agowic/bootimg-efi: use cross objcopy when building unified kernel image
Ross Burton [Wed, 27 Jul 2022 11:11:54 +0000 (12:11 +0100)] 
wic/bootimg-efi: use cross objcopy when building unified kernel image

We can't rely on the host objcopy knowing how to process target binaries,
so use the cross objcopy in the sysroot instead.

Also construct the command argument-by-argument as the format expression
was getting unwieldy.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agowic: add target tools to PATH when executing native commands
Ross Burton [Wed, 27 Jul 2022 11:11:53 +0000 (12:11 +0100)] 
wic: add target tools to PATH when executing native commands

We might want to run a cross tool, such as objcopy, in wic.  These are
in a TARGET_SYS/ subdirectory under /usr/bin, so add that directory to
the search path too.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 years agooeqa/sdk/rust: Fix file deletion for multilib SDKs
Richard Purdie [Mon, 1 Aug 2022 13:17:21 +0000 (14:17 +0100)] 
oeqa/sdk/rust: Fix file deletion for multilib SDKs

We need to use shutil.rmtree here since removedirs() only covers
directories. Make the exception for specific too to make errors
easier to catch.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agoltp: Add post release runtime fixes
Petr Vorel [Sat, 23 Jul 2022 20:30:14 +0000 (22:30 +0200)] 
ltp: Add post release runtime fixes

Backport various post 20220527 release runtime fixes:
* The concept of max runtime
* tst_test.sh: Cleanup getopts usage
* mountns0[1-3]: wait for umount completed in thread_b

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agocreate-spdx: Fix supplier field
Mihai Lindner [Wed, 27 Jul 2022 17:09:18 +0000 (20:09 +0300)] 
create-spdx: Fix supplier field

The correct field name is "supplier" according to SPDX schema.
The "supplier" field translates to "PackageSupplier", but that's for
tag-value format.

Signed-off-by: Mihai Lindner <mihai.lindner@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agoselftest/meta_ide: add a test for running SDK tests directly in a yocto build
Alexander Kanavin [Fri, 22 Jul 2022 18:39:16 +0000 (20:39 +0200)] 
selftest/meta_ide: add a test for running SDK tests directly in a yocto build

There's been a recent discussion about how we can make the Yocto SDK
experience better [1]. One of the ideas was to eliminate the SDK
as a separate artefact altogether and simply provide everything
that the SDK and eSDKs do directly in a yocto build. This does not
mean that people have to 'learn Yocto', but rather that the integrators
should provide a well-functioning sstate cache infrastructure (same as
with minimal eSDK, really), and a few wrapper scripts for setting up the build
and the SDK environment that run layer setup and bitbake behind the scenes.

[1] https://lists.openembedded.org/g/openembedded-architecture/topic/thoughts_on_the_esdk/90990557

So without further ado, here's how you get a 'SDK' without building one:

1. Set up all the needed layers and a yocto build directory.

2. Run:
$ bitbake meta-ide-support
$ bitbake -c populate_sysroot gtk+3
(or any other target or native item that the application developer would need)
$ bitbake populate-sysroots

3. Set up the SDK environment:
. tmp/deploy/images/qemux86-64/environment-setup-core2-64-poky-linux
(adjust accordingly)

Et voila! The Unix environment is now set up to use the cross-toolchain from
Yocto, exactly as in the SDK. And devtool/bitbake are available to extend it,
exactly as in the eSDK.

Theare are numerous benefits here: no need to produce, test, distribute and maintain
separate SDK artifacts. No two separate environments for the yocto build and the SDK.
Less code paths where things can go wrong. Less awkward, gigantic tarballs. Less
SDK update headaches: 'updating the SDK' simply means updating the yocto layers with
git fetch or layer management tooling. Built-in SDK extensibility: just run bitbake
again to add more things to the sysroot, or add layers if even more things are required.

How is this tested?

Exactly same as the regular SDK:
$ bitbake -c testsdk meta-ide-support

This runs the same toolchain tests from meta/lib/oeqa/sdk/cases as the regular
sdk testing does.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agomeson: provide relocation script and native/cross wrappers also for meson-native
Alexander Kanavin [Fri, 22 Jul 2022 18:39:15 +0000 (20:39 +0200)] 
meson: provide relocation script and native/cross wrappers also for meson-native

When using meson-native directly from bitbake this has no effect and
everything works as before; the use case is being able to build
meson-driven projects from the 'direct SDK' environment. Build systems
like cmake/autotools are entirely driven by environment variables,
but meson needs configuration files, and so this replicates how SDKs
set things up.

In particular, with this change the libepoxy build test from the SDK
test suite is able to pass.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agooeqa/sdk: allow epoxy/galculator tests to run in esdk and direct yocto builds
Alexander Kanavin [Fri, 22 Jul 2022 18:39:14 +0000 (20:39 +0200)] 
oeqa/sdk: allow epoxy/galculator tests to run in esdk and direct yocto builds

Other tests already have similar tweaks.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agooeqa/sdk: add a test class for running SDK tests directly in a Yocto build
Alexander Kanavin [Fri, 22 Jul 2022 18:39:13 +0000 (20:39 +0200)] 
oeqa/sdk: add a test class for running SDK tests directly in a Yocto build

This is a simpler version of the same class in testsdk.py, as it does not
need to unpack and set up the SDK, and can proceed to the tests straight away.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agometa-ide-support: adjust to provide (e)SDK experience directly in a yocto build
Alexander Kanavin [Fri, 22 Jul 2022 18:39:12 +0000 (20:39 +0200)] 
meta-ide-support: adjust to provide (e)SDK experience directly in a yocto build

Specifically:
1. Add a few more toolchain items to DEPENDS so they're available in the recipe sysroot.
2. Use deploy mechanism to place the SDK environment setup file and testdata for testing it
into the image deploy directory.
3. Add ability to run SDK tests via the testsdk class and task. This also requires providing
a testdata json file.
4. Ensure sysroot population always runs, as those items are mean to be picked up
by 'bitbake build-sysroots' into the unified sysroot.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agotoolchain-scripts.bbclass: adjust toolchain_create_tree_env_script to better replicat...
Alexander Kanavin [Fri, 22 Jul 2022 18:39:11 +0000 (20:39 +0200)] 
toolchain-scripts.bbclass: adjust toolchain_create_tree_env_script to better replicate (e)SDK

Specifically:
1. Place the environment setup file into $B and not into $TMPDIR,
so that the recipe using the class can itself better decide what to do with the file.

2. Use global, unified sysroots (provided through build-sysroots recipe)
and not recipe-specific ones, as this allows flexible on-the-fly management of what
libraries are available to build applications, without having to modify any
recipes, similar to eSDK 'extensible' part.

This also requires adjustment of the sstate sametune_samegsigs test, as meta-ide-support
becomes dependent on $MACHINE (unified sysroots have it in their paths)
and needs to be excluded from the test.

3. Add a few missing settings that have been added to SDK environment files.

4. Add a snippet to the environment setup file that also runs the relocation scripts.
In regular SDKs this is executed by the SDK installer, in direct SDK we can do it when
setting up the environment.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agoarchiver.bbclass: remove unsed do_deploy_archives[dirs]
Jose Quaresma [Fri, 22 Jul 2022 12:31:22 +0000 (13:31 +0100)] 
archiver.bbclass: remove unsed do_deploy_archives[dirs]

Remove as commit b3afe7d redifines it.

https://git.openembedded.org/openembedded-core/commit/?id=b3afe7d9bd25a943e947de3ec064ea245173c5a8

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agopopulate_sdk_base: Fix mingw override name
Richard Purdie [Wed, 27 Jul 2022 10:39:10 +0000 (11:39 +0100)] 
populate_sdk_base: Fix mingw override name

Correct the override name used for rust toolchain removal from the mingw sdk.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agomesa: fix compile error when debug build enabled
Kai Kang [Wed, 27 Jul 2022 07:29:56 +0000 (15:29 +0800)] 
mesa: fix compile error when debug build enabled

It fails to compile mesa{,-native} when DEBUG_BUILD is enabled:

../mesa-22.1.3/src/compiler/nir/nir_inline_helpers.h: In function ‘nir_opt_move_block’:
../mesa-22.1.3/src/compiler/nir/nir_opt_move.c:55:1: error: inlining failed in call to
  always_inline ‘src_is_ssa’: indirect function call with a yet undetermined callee
 src_is_ssa(nir_src *src, void *state)
 ^~~~~~~~~~

Backport patch from mesa merge request to fix it.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agosystemd: Fix conflict between glibc mount.h and kernel mount.h
Khem Raj [Wed, 27 Jul 2022 03:19:04 +0000 (23:19 -0400)] 
systemd: Fix conflict between glibc mount.h and kernel mount.h

See glibc documentation [1] for details

[1] https://sourceware.org/glibc/wiki/Release/2.36

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agoelfutils: Microblaze does not support symvers
Mark Hatle [Tue, 26 Jul 2022 23:11:47 +0000 (18:11 -0500)] 
elfutils: Microblaze does not support symvers

Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agoopenssl: Move microblaze to linux-latomic config
Mark Hatle [Tue, 26 Jul 2022 23:11:46 +0000 (18:11 -0500)] 
openssl: Move microblaze to linux-latomic config

When building with the previous a number of atomic functions come back as
undefined.  Switching to linux-latomic fixes this.

Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agodefault-distrovars: seccomp doesn't support microblaze
Mark Hatle [Tue, 26 Jul 2022 23:11:45 +0000 (18:11 -0500)] 
default-distrovars: seccomp doesn't support microblaze

Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorunqemu: Add missing space on default display option
Mark Hatle [Tue, 26 Jul 2022 23:11:44 +0000 (18:11 -0500)] 
runqemu: Add missing space on default display option

Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorng-tools: Change systemd service name to work with sysvinit
Aníbal Limón [Tue, 26 Jul 2022 19:33:22 +0000 (14:33 -0500)] 
rng-tools: Change systemd service name to work with sysvinit

Change systemd service name from rngd -> rng-tools to avoid load twice
the service when sysvinit compatibility is enabled,

...
root@:~# ps  | grep rng
   23 root         0 SW   [hwrng]
13109 root      3528 R    /usr/sbin/rngd -f -r /dev/hwrng
13117 root      2348 S    grep rng
29418 root     12756 S    /usr/sbin/rngd -r /dev/hwrng
...

Signed-off-by: Aníbal Limón <limon.anibal@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agodevtool: error out when workspace is using old override syntax
Roland Hieber [Sat, 23 Jul 2022 23:51:19 +0000 (01:51 +0200)] 
devtool: error out when workspace is using old override syntax

When the workspace bbappends are still using the old override syntax
with EXTERNALSRC_pn-*, externalsrc_re will not match, and pn will never
be assigned, leading to a nondescript UnboundLocalError being raised on
the user's terminal. Try to detect that situation and give the user a
hint how to solve it.

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agopopulate_sdk: Add SDK toolchain language selection support
Richard Purdie [Mon, 25 Jul 2022 11:56:31 +0000 (12:56 +0100)] 
populate_sdk: Add SDK toolchain language selection support

Add a new variable SDK_TOOLCHAIN_LANGS to allow different language support
to be selected within SDKs. Initially supported options are rust and go.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agooeqa/sdk: Add basic rust cargo test
Otavio Salvador [Wed, 20 Jul 2022 19:06:01 +0000 (16:06 -0300)] 
oeqa/sdk: Add basic rust cargo test

Add a QA test to the SDK to test that a basic cargo build works.

[RP: Tweaked to work for multilibs and updated to match toolchain changes]

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agonative: Clear TUNE_FEATURES/ABIEXTENSION
Richard Purdie [Mon, 25 Jul 2022 10:59:19 +0000 (11:59 +0100)] 
native: Clear TUNE_FEATURES/ABIEXTENSION

Some recipes reference these. Rather than continually trying to chase down the references
and taskhash issues, clear the variables for an easier life and simpler code. These
wouldn't convey anything useful in a native build.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust-target-config: Allow the targets generated to be configurable
Richard Purdie [Sat, 23 Jul 2022 12:48:24 +0000 (13:48 +0100)] 
rust-target-config: Allow the targets generated to be configurable

Remove further code duplication by allowing the main function to be
configurable.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust-target-config: Create new class to contain target json config generation
Richard Purdie [Sat, 23 Jul 2022 12:41:38 +0000 (13:41 +0100)] 
rust-target-config: Create new class to contain target json config generation

Currently most of the rust recipes use this code but it is all piecemeal.
Turn the code into a class where things can start to be rationalised. Ultimately
some of the data and python code should be moved to a python library but one step
at a time.

No functionality changes.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust-common/rust-cross: Clean up target json generation code
Richard Purdie [Sat, 23 Jul 2022 12:25:32 +0000 (13:25 +0100)] 
rust-common/rust-cross: Clean up target json generation code

Some of the subtleties in the different codepaths for target rust json generation
were not easy to spot. Start to simplfy the code to make this clearer.

This patch should not have any functionality change although ABIEXTENSION
has to be excluded from the function signature, the triplet would normally
cover anything set there.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust-cross: Simplfy the rust_gen_target calls
Richard Purdie [Sat, 23 Jul 2022 11:08:07 +0000 (12:08 +0100)] 
rust-cross: Simplfy the rust_gen_target calls

Match the code in rust-cross-canadian so that further simplifications
can be considered in future.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust-cross/rust-common: Merge arm target handling code to fix cross-canadian
Richard Purdie [Sat, 23 Jul 2022 11:03:43 +0000 (12:03 +0100)] 
rust-cross/rust-common: Merge arm target handling code to fix cross-canadian

rust-cross had special handling for armv7 targets but we also need this
for cross-canadian. Merge the code into the main function so everything is
consistent.

Also then fix the arm definition to be arm-eabi since ABI is correctly
being looked up.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust-cross-canadian: Fix ordering of target json config generation
Richard Purdie [Sat, 23 Jul 2022 10:54:33 +0000 (11:54 +0100)] 
rust-cross-canadian: Fix ordering of target json config generation

Based upon a patch from Otavio Salvador <otavio@ossystems.com.br>,
ensure the target json files are written in the correct order with
the most specific last incase it overwrites earlier files if the prefixes
match.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agorust-common: Set llvm-target correctly for cross SDK targets
Richard Purdie [Sat, 23 Jul 2022 10:47:42 +0000 (11:47 +0100)] 
rust-common: Set llvm-target correctly for cross SDK targets

When a 'BUILD' target is requested we shouldn't be looking at TARGET_SYS but
at BUILD_SYS. Due to the way rust mangles triplets, we need the HOST_SYS triplet
to work with existing code - fixing that issue is a separate patch.

Also drop the arch_abi argument, it doens't make any sense to a getVar() call
and was a copy and paste error.

Based on a patch from Otavio Salvador <otavio@ossystems.com.br> but separated out
and tweaked.

Fixes: bd36593ba3 ("rust-common: Drop LLVM_TARGET and simplify")
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agocargo-cross-canadian: Use SDK's flags during target linking
Otavio Salvador [Sun, 10 Jul 2022 16:43:00 +0000 (13:43 -0300)] 
cargo-cross-canadian: Use SDK's flags during target linking

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agostrace: set COMPATIBLE_HOST for riscv32
Mingli Yu [Tue, 5 Jul 2022 07:03:18 +0000 (15:03 +0800)] 
strace: set COMPATIBLE_HOST for riscv32

Disable the build on riscv32 as it's not supported on riscv32 [1].

[1] https://github.com/strace/strace/commit/69ff62ea5087506ad36a27599db088096db215da

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agoqemu: add io_uring PACKAGECONFIG
Ross Burton [Mon, 25 Jul 2022 13:21:29 +0000 (14:21 +0100)] 
qemu: add io_uring PACKAGECONFIG

io_uring is enabled or disabled depending on whether liburing is available,
so add a PACKAGECONFIG to make this explicit, disabled by default.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agooeqa/gotoolchain: set CGO_ENABLED=1
Ross Burton [Mon, 25 Jul 2022 15:53:44 +0000 (16:53 +0100)] 
oeqa/gotoolchain: set CGO_ENABLED=1

In cross-compiles CGO_ENABLED=1 needs to be set explicitly, as otherwise
Go refuses to use it even if CC is already set.

This fixes the selftest on setups where the host and the SDK target
don't have matching architectures.

[ YOCTO #14859 ]

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agooeqa/gotoolchain: put writable files in the Go module cache
Ross Burton [Mon, 25 Jul 2022 15:53:43 +0000 (16:53 +0100)] 
oeqa/gotoolchain: put writable files in the Go module cache

By default 'go mod' creates read-only files, but that just complicates
things.  Add -modcacherw to make the cache read/write, so it can be
cleaned up without needing to chmod.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agokernel.bbclass: pass LD also in savedefconfig
Martin Jansa [Sun, 24 Jul 2022 19:33:05 +0000 (21:33 +0200)] 
kernel.bbclass: pass LD also in savedefconfig

* similar to:
  https://git.openembedded.org/openembedded-core/commit/?id=66c1f4b0abd3483759f9e4141a80f982eaf8ccfd
  https://git.openembedded.org/openembedded-core/commit/?id=36fe2efc91fec5a52374a2dc4814a69076a2d28e
  but for savedefconfig task
* otherwise with ld-is-gold it will fail with:
  gold linker is not supported as it is not capable of linking the kernel proper.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agopython3-setuptools: move patch from 'files' to 'python3-setuptools'
Martin Jansa [Sun, 24 Jul 2022 19:33:04 +0000 (21:33 +0200)] 
python3-setuptools: move patch from 'files' to 'python3-setuptools'

* it's not used by any other recipe AFAIK
* meta-python2 has own copy for python-setuptools there in:
  meta-python2/recipes-devtools/python/python-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 years agolinux-firwmare: restore WHENCE_CHKSUM variable
Dmitry Baryshkov [Sun, 24 Jul 2022 17:21:58 +0000 (20:21 +0300)] 
linux-firwmare: restore WHENCE_CHKSUM variable

Restore WHENCE_CHKSUM variable which is used to hold the WHENCE file
checksum. It is necessary to allow easily overriding it from local.conf
if the devupstream version is selected:

PREFERRED_VERSION_linux-firmware = "1:20220708+git%"
SRCREV:class-devupstream = "${AUTOREV}"
WHENCE_CHKSUM:class-devupstream:pn-linux-firmware = "abf1077491eeb261ecdcb680a34fc059"

Without the WHENCE_CHECKSUM one would need to manually patch the
LIC_FILES_CHKSUM variable to change the checksum of WHENC (e.g. using
the anonymous python function or remove expression).

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>