Commit Graph

7759 Commits

Author SHA1 Message Date
Davide Gardenal
284b61d386 create-spdx: delete virtual/kernel dependency to fix FreeRTOS build
When building FreeRTOS this dependency generates an error because
bitbake cannot find any provider for "virtual/kernel".
>From a dependency analysis the task is executed independently from
this so it can be safely removed.

This patch has been discussed in this ML thread:
https://lists.openembedded.org/g/openembedded-core/topic/90602531

(From OE-Core rev: 1c02b768a71ec88bfe1cc0c4443683de8b66056e)

Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-26 18:26:40 +01:00
Peter Kjellerstedt
d7300f37a3 devshell.bbclass: Allow devshell & pydevshell to use the network
Otherwise it will fail if using OE_TERMINAL = "xterm" with the not so
helpful error:

  xterm: Xt error: Can't open display: localhost:0.0

(From OE-Core rev: ba53fc3bcecfe32401471dc1008c7ead96504150)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-26 18:25:08 +01:00
Khem Raj
468b732703 qemu.bbclass: Extend ppc/ppc64 extra options
Some recipes are marked machine specific which need qemu usermode during
build eg. if they use meson build system, which means they wont get
right -cpu settings to run qemu-ppc/qemu-ppc64 and build fails, this
ensures that we set the right options when PACKAGE_ARCH is set to
MACHINE_ARCH on ppc/ppc64 qemu

(From OE-Core rev: 9f71bbe65a458f08cd8ede6522c8b988603202a0)

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>
2022-04-26 18:25:08 +01:00
Paul Gortmaker
2155919951 install/devshell: Introduce git intercept script due to fakeroot issues
In a devshell, recent versions of git will complain if the repo is owned
by someone other than the current UID - consider this example:

 ------
  bitbake -c devshell linux-yocto

  [...]

  kernel-source#git branch
  fatal: unsafe repository ('/home/paul/poky/build-qemuarm64/tmp/work-shared/qemuarm64/kernel-source' is owned by someone else)
  To add an exception for this directory, call:

        git config --global --add safe.directory /home/paul/poky/build-qemuarm64/tmp/work-shared/qemuarm64/kernel-source
  kernel-source#
 ------

Of course the devshell has UID zero and the "real" UID is for "paul" in
this case.  And so recent git versions complain.

As the whole purpose of the devshell is to invoke a shell where development
can take place, having a non-functional git is clearly unacceptable.

Richard suggested we could use PSEUDO_UNLOAD=1 to evade this issue, and I
suggested we probably will see other similar instances like this and should
make use of PATH to intercept via devshell wrappers - conveniently we already
have examples of this.

Here, we copy the existing "ar" example and tune it to the needs of git to
combine Richard's suggestion and mine.

As such we now also can store commit logs and use send-email with our user
specific settings, instead of "root", so in additon to fixing basic
commands like "git branch" it should also increase general usefulness.

RP: Tweaked the patch so the PATH change only applies to the devshell task
and is a generic git intercept rather than devshell specific.

RP: Also apply the PATH change to do_install tasks since that also runs under
fakeroot and several software projects inject "git describe" output into
their binaries (systemd, iputils, llvm, ipt-gpu-tools at least) causing
reproducibility issues from systems with different git versions.

(From OE-Core rev: 3266c327dfa186791e0f1e2ad63c6f5d39714814)

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-22 08:27:21 +01:00
Russ Dill
ce94e33aef kernel-yocto.bbclass: Fixup do_kernel_configcheck usage of KMETA
The do_kernel_configcheck task requires a meta directory, normally
set by ${KMETA}. The meta directory is taken as a relative path
from ${S}:

        outfile = "{}/{}/cfg/mismatch.txt".format( s, kmeta )

However, when checking for the presence of ${KMETA} the current
working directory is searched. This will almost always fail and
"kgit --meta" is used instead. If the user does have a path in
their current working directory that matches the ${KMETA}
variable but the path is not present within the kernel source
directory, the build will fail if it tries to write config errors/
warnings to that path.

If ${KMETA} is not set, the same problem exists with the hard-coded
"meta" directory.

Fix these issues by checking for ${KMETA} within ${S} rather than
the current working directory. Additionally, drop the hardcoded
backup directory "meta" as it hasn't been functioning and
probably has no users

(From OE-Core rev: f4a3e80a4a6f4f709d09940dcaf45b2b00654496)

Signed-off-by: Russ Dill <russ.dill@nikolamotor.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-21 20:58:15 +01:00
Russ Dill
f2016af039 package.bbclass: Prevent perform_packagecopy from removing /sysroot-only
The files in /sysroot-only are intended to make it into the
recipes sysroot output, but not into the package. However, if
do_package is run before do_populate_sysroot, the files are
removed.

Use a smaller hammer to avoid copying the files into the package so
they are still around when do_populate_sysroot runs.

(From OE-Core rev: 493145c6f1bc92ab2b7a23e181641b09df87c9ff)

Signed-off-by: Russ Dill <russ.dill@nikolamotor.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-21 20:58:15 +01:00
Joerg Vehlow
460012e04a go: Always pass interpreter to linker
When gos internal linker is used, it uses hardcoded paths to the
interpreter (dynamic linker). For x86_64 this hardcoded path is
/lib64/ld-linux-x86-64.so.2, but yocto's default dynamic linker path
is /lib64/ld-linux-x86-64.so.2.
Most of the time, the internal linker is not used and binutils linker
sets the correct path, but sometimes the internal linker is used and
the resulting binary will not work on x86_64.

To ensure the path is always correct, pass  it to the linker.

(From OE-Core rev: 6b54215074d7f3dbba07f096f16b9c0acf51527c)

Signed-off-by: Joerg Vehlow <joerg.vehlow@aox.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-19 14:42:20 +01:00
Davide Gardenal
41fd30c430 create-spdx: fix error when symlink cannot be created
If IMAGE_NAME and IMAGE_LINK_NAME are the same an
exception is raised in image_combine_spdx because
it cannot create a symlink with the same exact
path of the original file. In that case there is
no point in creating a link in the first place.

Refactor image_combine_spdx to avoid code duplication

(From OE-Core rev: 88f76bba705007a7fcda506c79f743060d8f2e52)

Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-19 14:14:12 +01:00
Ferry Toth
af0655441f package_manager: fix missing dependency on gnupg when signing deb package feeds
When signing the deb package feed gpg tools are a soft requirement. If gnupg-native
is not declared a dependancy the version from hosttools is used. Unfortunately the
gpg-agent version from Ubuntu 16.04 on the autobuilders is incompatible with the package_index task
and fails during oe-selftest. Fix by making gnupg-native a dependency.

Fixes: 0b4231b5 "package_manager: sign DEB package feeds"
Reported-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Suggested-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(From OE-Core rev: c063b658e30a24be9214abc23cd2a16c0260e93e)

Signed-off-by: Ferry Toth <ftoth@exalondelft.nl>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-19 14:14:11 +01:00
Alex Kiernan
7973b38018 kernel: Delete unused KERNEL_LOCALVERSION variable
This has been unused since:

  commit fb61dc1430
  Author: Richard Purdie <richard@openedhand.com>
  Date:   Mon Jan 8 21:05:18 2007 +0000

      kernel.bbclass: Drop KERNEL_RELEASE variable

      git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1123 311d38ba-8fff-0310-9ca6-ca027cbcb966

(From OE-Core rev: 320da1c2b9add9fecd74e7f33ddc5418b326c786)

Signed-off-by: Alex Kiernan <alexk@zuma.ai>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-14 09:47:00 +01:00
Richard Purdie
6bef16bde3 sanity: Show a warning that make 4.2.1 is buggy on non-ubuntu systems
We keep seeing hangs on the autobuilder with make 4.2.1 on Centos8, Alma8
and OpenSuse workers. The hang occurs in perl and kernel builds in particular.
The issue is fixed in 4.3 and has been patched on Ubuntu systems:

https://git.savannah.gnu.org/cgit/make.git/commit/?id=78b5fec6898c26956d00548427cda1101cb80f8a
https://savannah.gnu.org/bugs/?51400

Add a sanity test for make 4.2.1 and error for non-ubuntu systems. We're
making a buildtools-make-tarball available which can be used to
allow systems with the broken version to use the project.

(From OE-Core rev: ad5829aa1f8a7369509542b913bfd8d21d1b1bc3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-14 09:46:59 +01:00
Richard Purdie
9dff569a07 externalsrc/devtool: Fix to work with fixed export funcition flags handling
If we fix bitbake to correctly handle the cleandirs and fakeroot flags
for tasks handled by EXPORT_FUNCTIONS, we break devtool since it only
considers these for top level functions. Add in extra code to intercept
the cleandirs flags for commonly used sub functions too.

[YOCTO #8621]

(From OE-Core rev: 67fad829f37ed0a8e20c599d2b65635158591d06)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-14 09:46:59 +01:00
Kevin Hao
d429e927d8 kernel.bbclass: Fix the do_strip() malfunction
The BB variable can't be referenced directly in a python function,
this misusage of the variable reference causes strip function to be
always skipped.

Fixed: b9c3db4953e4 ("kernel.bbclass: Use KERNEL_IMAGEDEST instead of hardcoded boot path")
(From OE-Core rev: c405cb4f421a8c964fa59123ee41879ebd5f829c)

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-12 09:43:43 +01:00
Martin Jansa
632c83ab78 license_image.bbclass: close package.manifest file
* fixes:
  NOTE: Executing write_package_manifest ...
  DEBUG: Executing python function write_package_manifest
  /OE/build/oe-core/openembedded-core/meta/classes/license_image.bbclass:23: ResourceWarning: unclosed file <_io.TextIOWrapper name='/OE/build/oe-core/tmp-glibc/deploy/licenses/core-image-minimal-qemux86-64/package.manifest' mode='w+' encoding='UTF-8'>
    'w+').write(output)
  ResourceWarning: Enable tracemalloc to get the object allocation traceback
  DEBUG: Python function write_package_manifest finished

[YOCTO #14772]

(From OE-Core rev: b3114d5d438b7a63a276b4e825b62f3b1ebceed6)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-10 08:31:17 +01:00
Richard Purdie
21f0318abc package_ipk/deb: Fix specific version handling
We recently added a "xxx (= 1.2.3)" style dependency to a recipe and have
been having trouble with the opkg and debian backends with it.

The issues is that for debian, "=" really does mean equals and includes the
PR field. One bitbake recipe does not know the PR of another, nor shoud it.
In other words 1.2.3 != 1.2.3-r0. Debian defaults to a PR of "0", not our
"r0".

The only way I can think of to make this work is to change "=" dependencies
without revision information (no "-r" in the version) into things like:
"xxx (>= 1.2.3), xxx (<< 1.2.3.0)". This appears to work even if it is a
pretty horrible workaround.

(From OE-Core rev: 3ba177a1b8e553716f45606aa65b0a74e55d94c1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-10 08:31:17 +01:00
Sean Anderson
91d6c03464 u-boot: Fix condition for install_spl_helper
The condition for calling install_spl_helper when compiling multiple
configs does not match the condition for a single config. This causes
compilation failures when ${UBOOT_FITIMAGE_ENABLE} is 1 but
${SPL_SIGN_ENABLE} is not.

Fixes: 5af4dfe83c2 ("u-boot: Add infrastructure to SPL verified boot")

(From OE-Core rev: 7dc155961649c022d33cf7c6a5155cdfa5dc2969)

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-05 22:23:40 +01:00
Peter Kjellerstedt
decda506b3 insane.bbclass: Make changes to QA_EMPTY_DIRS trigger package_qa to rerun
If "empty-dirs" is in ERROR_QA, then changes to QA_EMPTY_DIRS should
trigger the package_qa tasks to be rerun.

(From OE-Core rev: 9f21f9b613c5aaf1883b3ad6eb6463014c2764cd)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-03 17:52:24 +01:00
Peter Kjellerstedt
8c9503880e insane.bbclass: Make do_qa_patch() depend on if patch-fuzz is in ERROR_QA
Adding "patch-fuzz" to ERROR_QA should trigger the patch tasks to
rerun to make sure any already existing fuzz is caught. This is
achieved by using bb.utils.filter() to see if "patch-fuzz" is in
ERROR_QA/WARN_QA as it adds whether the filtered strings are set or
not to the task hash.

(From OE-Core rev: 19a88df166862eb04fe6bee487796ef460d08771)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-03 17:52:24 +01:00
Richard Purdie
61d38cd3a2 mirrors: Switch glibc and binutils to use shallow mirror tarballs
These two repositories are large and overload our downloads server as a
premirror but the recipes are easier to maintain as git urls. Compromise
and use shallow clones for them.

In order to be effective, we need premirror entries on where to find
the shallow mirror tarballs.

(From OE-Core rev: 757c09a687a30063041a83dd756f5be769631eee)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-03 17:52:24 +01:00
Alessio Igor Bogani
fb1291ea5f kernel.bbclass: Use KERNEL_IMAGEDEST instead of hardcoded boot path
The behaviour doesn't change because KERNEL_IMAGEDEST is defined as
'boot' in the same file (line 215).

(From OE-Core rev: b9c3db4953e4e7b423ba9ec5b618fd990c378bc1)

Signed-off-by: Alessio Igor Bogani <alessio.bogani@elettra.eu>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-03 10:40:31 +01:00
Ross Burton
da6930c6f4 testimage: inline updateTestData()
updateTestData() is just a simple loop that is only used here, so just
inline it.

(From OE-Core rev: 2dfe2f68307a441fff2f5018408558bca63f7d03)

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>
2022-04-01 23:11:37 +01:00
Ross Burton
c580bc6008 image_types: hddimg and iso only work on x86
These image types use syslinux which is only available on x86, so only
add them to IMAGE_TYPES on x86.

(From OE-Core rev: 2ea047a026dd61a8e0a24c6bbe278849485a2c27)

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>
2022-04-01 23:11:37 +01:00
Richard Purdie
e00f9ea165 base: Clean up module import compatibility code
This code was for old versions of bitbake which we're now long past. Drop it
and simplify the code.

(From OE-Core rev: d5301d008a5cc02a08d660691fce2c18ed8028d7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-01 23:11:37 +01:00
Richard Purdie
61c7c8f175 base: Don't add duplicates to sys.path
We can re-trigger this code and there is little point in stacking a ton of duplicate
paths which just waste time during searches for modules. This could in theory alter
layer module search order but that seems unlikely in common use.

(From OE-Core rev: dadce8468db1c0fd0e04801cdc6cf287c2808477)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-01 23:11:37 +01:00
Jagadeesh Krishnanjanappa
ee5f9d9fdd cmake: support to create per-toolchain cmake file in SDK
The patch creates ${MULTIMACH_TARGET_SYS}-toolchain.cmake file
at ${SDK_INSTALL_DIR}/sysroots/${SDK_SYS}/usr/share/cmake/, which is
per-toolchain CMake toolchain file containing arch-specific values
and independent of OE environment variables.
The file gets created after installing SDK toolchain installer
ined by running "bitbake -c populate_sdk <image>".

The changes are similar to meson-setup.py which is used to
create arch-specific
${SDK_INSTALL_DIR}/sysroots/${SDK_SYS}/usr/share/meson/*-meson.cross

[YOCTO #14644]

Tested-by: Jan Dorniak <jaskij@gmail.com>
(From OE-Core rev: 42e68397ec74b3cd8ae5df45355c8f6254b48cd8)

Signed-off-by: Jagadeesh Krishnanjanappa <workjagadeesh@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-31 17:52:59 +01:00
Richard Purdie
65c43b6894 mirrors: Add missing gitsm entries for yocto/oe mirrors
The missing gitsm:// mappings looks like an oversight, add them.

(From OE-Core rev: 6600b9fca7888fb41647cd000b9efb7f0762dfde)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-31 17:52:58 +01:00
Marta Rybczynska
b3f96e6fea cve-check: add coverage statistics on recipes with/without CVEs
Until now the CVE checker was giving information about CVEs found for
a product (or more products) contained in a recipe. However, there was
no easy way to find out which products or recipes have no CVEs. Having
no reported CVEs might mean there are simply none, but can also mean
a product name (CPE) mismatch.

This patch adds CVE_CHECK_COVERAGE option enabling a new type of
statistics. Then we use the new JSON format to report the information.
The legacy text mode report does not contain it.

This option is expected to help with an identification of recipes with
mismatched CPEs, issues in the database and more.

This work is based on [1], but adding the JSON format makes it easier
to implement, without additional result files.

[1] https://lists.openembedded.org/g/openembedded-core/message/159873

(From OE-Core rev: d1849a1facd64fa0bcf8336a0ed5fbf71b2e3cb5)

Signed-off-by: Marta Rybczynska <marta.rybczynska@huawei.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-30 13:07:41 +01:00
Marta Rybczynska
777f1d42b6 cve-check: add json format
Add an option to output the CVE check in a JSON-based format.
This format is easier to parse in software than the original
text-based one and allows post-processing by other tools.

Output formats are now handed by CVE_CHECK_FORMAT_TEXT and
CVE_CHECK_FORMAT_JSON. Both of them are enabled by default.

The JSON output format gets generated in a similar way to the
text format with the exception of the manifest: appending to
JSON arrays requires parsing the file. Because of that we
first write JSON fragments and then assemble them in one pass
at the end.

(From OE-Core rev: df567de36ae5964bee433ebb97e8bf702034994a)

Signed-off-by: Marta Rybczynska <marta.rybczynska@huawei.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-30 13:07:41 +01:00
Ming Liu
240e5ab3c4 kernel-fitimage.bbclass: introduce FIT_SUPPORTED_INITRAMFS_FSTYPES
It was found when a end user wants to build a squashfs type initramfs
into fitimage, it just fails without printing out any error or warning
messages, which is not right.

Introduce a FIT_SUPPORTED_INITRAMFS_FSTYPES variable to avoid
hard-coding the supported initramfs types, and it could be overridden
in config files. Also break the build when none of a supported
initramfs type is found.

(From OE-Core rev: b0f8d8a4c063936b50d3ec7c066b29157b3c3544)

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-29 15:59:29 +01:00
Ming Liu
dbedfdeed2 kernel-fitimage.bbclass: change 'echo' to 'bbnote'
Change 'echo' usages to 'bbnote' for better logging.

(From OE-Core rev: 3d05ba04824c7f08e42b1972bc0de538164b61ea)

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-29 15:59:29 +01:00
Richard Purdie
c80a6a6e66 create-spdx: Avoid regex warning by quoting correctly
create-spdx.bbclass:43: DeprecationWarning: invalid escape sequence \W
  lic_regex = re.compile(b'^\W*SPDX-License-Identifier:\s*([ \w\d.()+-]+?)(?:\s+\W*)?$', re.MULTILINE)

(From OE-Core rev: 5dfb26d45f69c4d5dc4b6fcef084b830ef9dbf4c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-29 15:59:29 +01:00
Christian Eggers
ccef909c56 rust-common: override RUST_LIBC for crosssdk
For nativesdk/crosssdk, always glibc is used. Fixes build of
rust-crosssdk if TCLIBC is set to musl.

(From OE-Core rev: 67b4e0fdb13c81ab7e79109b6366fd7705b253ba)

Signed-off-by: Christian Eggers <ceggers@arri.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-26 09:33:32 +00:00
Michael Olbrich
aceec5ee12 kernel.bbclass: avoid config changes based on the availability of pahole
CONFIG_PAHOLE_HAS_SPLIT_BTF shows up in the config only when pahole is
installed on the host system. As a result, the config changes depending on
whether pahole is installed or not.

Set PAHOLE=false to ensure that it is never found.

If this is actually needed in the future, then we can add an option for
it and create a host package for pahole.

(From OE-Core rev: 43b0eca2f3fc41a0d2ba7c7679687a3e0eb54b45)

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
[afa: ported from PTXdist 0c0cec2288 to OE-core]
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-26 09:33:32 +00:00
Peter Kjellerstedt
cd369a732e license.bbclass: Remove the available_licenses() function
It is no longer used in OE-Core.

(From OE-Core rev: aa662aae352c65cb5d13172bf98ed4ae3cb46c26)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-24 17:45:29 +00:00
Peter Kjellerstedt
fb0a43cd2f create-spdx.bbclass: Simplify extraction of license text
There is no reason to first search for all available licenses using
avail_licenses() and then search through the same paths looking for
the actual license texts. Just look for the license texts directly
instead.

(From OE-Core rev: 59eb405a80f0a0acf9b754b2b78399bacb0094ae)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-24 17:45:29 +00:00
Richard Purdie
7bea963eed sanity: Add warning for local hasheqiv server with remote sstate mirrors
We're seeing a lot of users configuring an sstate mirror but not realising that
the default hash equivalenve setting will make this ineffective. Add a warning
to highlight this to the user for the common case.

(From OE-Core rev: ae4eb33b5a6a037348e8f66e3d4f19b58dba8fa2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-24 17:45:29 +00:00
Ming Liu
16d7103df1 kernel-fitimage.bbclass: introduce get_fit_replacement_type function
Avoid to set KERNEL_IMAGETYPE_REPLACEMENT in anonymous python function,
otherwise it chould not be overridden in config files, for instance,
it's being set now in meta/lib/oeqa/selftest/cases/fitimage.py.

Introduce a get_fit_replacement_type function to get the default value
of KERNEL_IMAGETYPE_REPLACEMENT, and it could be overridden in config
files.

(From OE-Core rev: 5238facb2f067b65959ac51695d100c0e849d3ee)

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-23 12:13:50 +00:00
Richard Purdie
154e69f118 toaster: Fix broken overrides usage
This fixes data corruption issues with toaster where image data wasn't
being processed correct.

(From OE-Core rev: 95cc2d041ad651cfb81b2e55251acf1b86f9ddfc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-21 10:07:40 +00:00
Ross Burton
e5ab3817aa classes/setuptools_build_meta: rename to python_setuptools_build_meta
Rename this class to be python-prefixed to match the other new Python
build system classes.

(From OE-Core rev: 25d6bf8079797906bde7c0cf63a0466c981ba5bb)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-20 00:02:22 +00:00
Richard Purdie
b688d68c6e cargo: Add missing nativesdk support
Copy the target definition for nativesdk to allow nativesdk builds
to work.

(From OE-Core rev: 40b02f496d6bb9162f9fa36335b047c06937f2f3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-17 16:44:33 +00:00
Ross Burton
7fee41dcef classes/python_pep517: consolidate stub do_configure
As PEP517 doesn't have an explicit configure step, we can stub out the
do_configure task once instead of the calling classes doing it.

(From OE-Core rev: fd17edbd00f1583eb9e1912ab269dd4dc2631a6f)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-17 16:44:33 +00:00
Ross Burton
6f5ee7fffb classes/flit_core: rename to python_flit_core
To be more uniform with the other new Python classes, rename this to
python_flit_core and update the recipes that use it.

(From OE-Core rev: c0e4ca3c7841028a658f21c11619228022d425b4)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-17 16:44:33 +00:00
Ross Burton
fc364f1c55 classes/setuptools_build_meta: use python_pep517_do_compile
Instead of implementing our own do_compile, set PEP517_BUILD_API and
use the generic do_compile.

(From OE-Core rev: 39a05e44f232775560ad79e49ffe4fb17ed6533c)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-17 16:44:33 +00:00
Ross Burton
0f31b46827 classes/python_pep517: add more comments
Remove mention of prebuilt wheels, this is for the full PEP517 build
process and recipes that want to install prebuilt wheels can use
pypa/installer directly.

(From OE-Core rev: d42664a5b5fb460185be996428dbaba6bb81ec3f)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-17 16:44:33 +00:00
Ross Burton
49fe9edcde classes/python_poetry_core: use python_pep517_do_compile
Instead of implementing our own do_compile, set PEP517_BUILD_API and
use the generic do_compile.

(From OE-Core rev: e38afe528f25038f5adb7a7a94a1e007011696ee)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-17 16:44:33 +00:00
Ross Burton
4f22a746d8 classes/python_pep517: implement a standard do_compile
As all PEP517-compliant build systems have a universal API, we can ask
that users of this class set PEP517_BUILD_API to the class that implements
this API and call it ourselves, instead of users needing to implement
near-identical do_compile tasks themselves.

(From OE-Core rev: 862f68f3a05ce48834f4903d9f9a213684061779)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-17 16:44:33 +00:00
Ross Burton
11c36d4f1a classes/flit_core: use python_pep517_do_compile
Instead of implementing our own do_compile, set PEP517_BUILD_API and
use the generic do_compile.

(From OE-Core rev: 0d3e07177e99d925f2807b85d16596455944d0a5)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-17 16:44:33 +00:00
Richard Purdie
10c24d7b66 license: Drop AVAILABLE_LICENSES
This variable is a performance liability and is highly dependent on which
layers are added to the configuration which can cause signature issues
for users. We have no users left in OE-Coreso remove it.

(From OE-Core rev: bf08d9ccb9cbc749a571af3d33140bcae0e252a6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 10:31:41 +00:00
Richard Purdie
e03460b0bc sstate: Allow optimisation of do_create_spdx task dependencies
do_create_spdx tasks don't need their dependencies so we can optimistion
this as we do for some other tasks.

(From OE-Core rev: 6723a045c3a46537bb76111f8306b5960e532522)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 10:31:41 +00:00
Richard Purdie
0ca67e4d97 create-spdx: Use function rather than AVAILABLE_LICENSES
We can directly call the function rather than using the variable indirection.
As this is the last user of the variable, it then allows removal of it in a
followup patch.

(From OE-Core rev: 3ed84651b2f4eff9409bfecba2a080e244124880)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 10:31:41 +00:00