summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* package_rpm: Allow compression mode overrideNiko Mauno2023-11-011-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 4a4d5f78a6962dda5f63e9891825c80a8a87bf66 ("package_rpm: use zstd instead of xz") changed the rpm package compressor from 'xz' to 'zstd' which results in decompression failure with BusyBox-provided 'rpm2cpio' applet and 'rpm' applet when given the '-i' (Install package) option: rpm2cpio: no gzip/bzip2/xz magic Introduce a variable which makes it possible to use a different compression mode, making it possible to override the default value for example like RPMBUILD_COMPMODE = "${@'w6T%d.xzdio' % int(d.getVar('XZ_THREADS'))}" to enable rpm decompression without including the full rpm package in the resulting root filesystem. (From OE-Core rev: a40d9258148e28cbee2168c93179cd4c1232fb62) (From OE-Core rev: ad4ea9f225b0dd6396088cc70b34f886c5fa62b4) Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* uboot-extlinux-config.bbclass: fix missed override syntax migrationQuentin Schulz2023-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | uboot-extlinux-config allows to specify multiple "labels" (entries in a menu, à-la grub) and each of them have their own values for some fields. Each "base" variable, e.g. UBOOT_EXTLINUX_FDT can be overridden for each label. This is done via the OVERRIDES mechanism based on the label name, e.g. UBOOT_EXTLINUX_FDT:linux if linux is a label. However, OVERRIDES doesn't contain the label globally because it's only necessary in one task. Therefore, the OVERRIDES itself is modified within the task. This means that the sigdata will not be told the dependency on UBOOT_EXTLINUX_FDT:linux, because it cannot know about it. For this reason, we need to explicitly specify which variables this task depends on via vardeps varflag for the task. This was done in the past, but we missed updating it during the override syntax migration so the cache wouldn't get invalidated if someone modifies UBOOT_EXTLINUX_FDT:linux from a configuration file or a bbappend for example. Let's fix this by migrating it to the new syntax. (From OE-Core rev: 5570e49791b770271f176a4deeb5f6f1a028cb4a) Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b4dd9d873508128adbbf5ff6cf0a3df3d2ffbcf6) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* fontcache.bbclass: avoid native recipes depending on target fontconfigMartin Jansa2023-10-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | * this caused liberation-font-native to depend on TUNE_PKGARCH target fontconfig because ${MLPREFIX}fontconfig-utils is added to RDEPENDS in anonymous python * the dependency tree for liberation-font-native got much shorter (just quilt-native and liberation-font-native itself): 2 after/pn-buildlist 78 before/pn-buildlist * fixes graphviz-native signature issue as well as detected with sstate-diff-machines.sh $ bitbake-diffsigs \ sstate-after/mako/x86_64-linux/graphviz-native/8.1.0.do_populate_sysroot.sigdata.184d4fd355f1e7a2d7d929ef4b5f62b94e2071df9dd674b2067ec21bfc7bcc1b \ sstate-after/qemux86-64/x86_64-linux/graphviz-native/8.1.0.do_populate_sysroot.sigdata.35da674d2dbc275bac02869dfce4165466315023910bdef65a6026e2cb942a46 Hash for task dependency liberation-fonts-native:do_populate_sysroot changed from 310d3da04ad9abf8ee99997e53d1ffa71c2b7d9d60fb0e8de85171a9ab6a77d3 to 048420ad1410c2b8d95498fc3c11681207335a2c722836f1f3e683cc449814da (From OE-Core rev: 098d4ca85c2bc77949843f117c6e336d5b77271d) Signed-off-by: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel.bbclass: Add force flag to rm callsRyan Eatmon2023-09-301-2/+2
| | | | | | | | | | | | | | | | The latest 6.5 kernels do not appear to create the source file in ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source so the recipe errors out when trying to remove it. Simple fix is to add the -f (force) flag to the call. (From OE-Core rev: 2e669bf797b15d803e7d6a700e449bdc467a4bcc) (From OE-Core rev: 7e177848f97eb9958619c28b5e5dadee12f67507) Signed-off-by: Ryan Eatmon <reatmon@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* cml1: Fix KCONFIG_CONFIG_COMMAND not conveyed fully in do_menuconfigJaeyoon Jung2023-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Variable overrides in KCONFIG_CONFIG_COMMAND do not work as expected due to double quote mismatches. The issue is reproducible in an environment where gold is the default linker. Below is an example snippet of run.do_terminal generated by do_menuconfig. do_terminal() { exec sh -c "make menuconfig CC="aarch64-webos-linux-gcc ..." LD="aarch64-webos-linux-ld.bfd ..." ... } Although LD override is set to bfd correctly, it is not passed to make and make menuconfig ends up with messages like: | gold linker is not supported as it is not capable of linking the kernel proper. | scripts/Kconfig.include:56: Sorry, this linker is not supported. (From OE-Core rev: 9c483765db762dbe8020423c8778518612b7e5f7) (From OE-Core rev: 536c477838fb1a318c5b283475de7f0eac99c872) Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d4664d2b7974354e73d891762ebb2c8a12d62438) Backported: File was renamed between kirkstone and master. Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* cargo.bbclass: set up cargo environment in common do_compileAlexander Kanavin2023-09-232-1/+4
| | | | | | | | | | | | | | | | | cargo_do_compile runs only if the recipe is built using cargo as the top level tool. Some recipes hide usage of cargo inside setuptools (or autoconf) and use do_compile definitions specific to those, and so the environment isn't properly set up. This was exposed by latest versions of python3-cryptography. (From OE-Core rev: a3f566fcbfc02e0a3b3f6a676d6dde88a5b50506) 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> (cherry picked from commit 9f4ff643a028d7f5670d80861f2ce19ca2d90faa) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* externalsrc: fix dependency chain issuesPeter Suti2023-09-231-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of deleting setscene tasks, now SSTATE_SKIP_CREATION is set instead. This seems to fix the compile issues where the populate_sysroot task was not run when an externalsrc recipe was built as a dependency. [YOCTO #15164] [RP addition: The deltask was added by me in 2012 when the class was created. The trouble is bitbake assumes 'sstate' tasks have a setscene task and by deleting the setscene task, bitbake stops thinking the task can be accelerated. There is other code in the sysroot code which assumes some tasks are always sstate tasks. We cannot delete the task without changes to the way bitbake learns about 'setscene' tasks so the patch is correct, avoiding creating files is the better approach given the way the world works now. There would be concerns about exisitng sstate reuse however this shouldn't occur since SRC_URI changes and that will change the underlying hashes. Hash equivalency could potentially cause issues by joining hashes together again however if the output matches, that shouldn't in theory cause any issue.] (From OE-Core rev: f6bb8438a18dfa2a520ad6fa65662d908f4ef0ed) Signed-off-by: Peter Suti <peter.suti@streamunlimited.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ee4667a24ccdd8c9d547e73aecf661e6a1283890) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel: Fix path comparison in kernel staging dir symlinkingStaffan Rydén2023-08-261-3/+4
| | | | | | | | | | | | | | | | | | | | Due to an oversight in the do_symlink_kernsrc function, the path comparison between "S" and "STAGING_KERNEL_DIR" is broken. The code obtains both variables, but modifies the local copy of "S" before comparing them, causing the comparison to always return false. This can cause the build to fail when the EXTERNALSRC flag is enabled, since the code will try to create a symlink even if one already exists. This patch resolves the issue by comparing the variables before they are modified. (From OE-Core rev: cf2267f80ec44b24c627347df7efbd492a07dcfa) Signed-off-by: Staffan Rydén <staffan.ryden@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit afd2038ef8a66a5e6433be31a14e1eb0d9f9a1d3) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* npm.bbclass: avoid DeprecationWarning with new pythonMartin Jansa2023-08-191-1/+1
| | | | | | | | | | | meta/classes-recipe/npm.bbclass:85: DeprecationWarning: invalid escape sequence '\.' '--transform', 's,^\./,package/,', (From OE-Core rev: a7078ff976ba720f25e94ddeddd3f82900b483be) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* meson.bbclass: Point to llvm-config from native sysrootKhem Raj2023-08-021-0/+1
| | | | | | | | | | | | | | | Default search in meson would grok /usr/bin for llvm-config and if found will use it, which might add wrong paths into cflags/ldflags, since we depend on llvm-native when building gallium support ( thats when llvm-config is effective), its better to point llvm-config into native sysroot so it can add correct paths into compiler/linker cmdline (From OE-Core rev: 8e6b616066ba0f7f452f929dc7c412e620da9101) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit cc73360b9728812ed6123e30559b77d8e89cc21c) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* uboot-extlinux-config.bbclass: fix old override syntax in commentQuentin Schulz2023-08-021-4/+4
| | | | | | | | | | | | | | | | | The comment specifies how to use the variables but uses the older and now unsupported override syntax. Let's update to match the newer syntax. Cc: Quentin Schulz <foss+yocto@0leil.net> (From OE-Core rev: 0a381eea4d50ff1c6e7c7d0d4df62eb581454b48) (From OE-Core rev: 0e9a70ee3c8f78db746d3cb627c6b212e1b4e4e4) Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit bb64f3fed29b9532e6ddc9a2ba0283d373622d87) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel: add missing path to search for debug filesAndrej Valek2023-08-021-0/+1
| | | | | | | | | | | | | | Since explicit debug package creation via ${KERNEL_PACKAGE_NAME}-dbg has been added to kernel, it has to cover all PACKAGE_DEBUG_SPLIT_STYLE options. For ex. when the variable "debug-file-directory" package search path has to be set explicitly, otherwise it will not find any files. (From OE-Core rev: 9adbda8450c57f49edf85e3b3433304e8ac8267e) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9c39da147683dcaaa244b3ddc4531c4408ad5c9e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* package.bbclass: moving field data process before variable process in ↵Xiangyu Chen2023-07-261-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | process_pkgconfig Currently, the latest version abseil-cpp contains a new library named "absl_log_internal_format", it's basic package config(.pc file) as below: prefix=/usr exec_prefix=${prefix} ...... Requires: absl_config = 20230125, absl_core_headers = 20230125, absl_log_internal_append_truncated = 20230125, absl_log_internal_config = 20230125, absl_log_internal_globals = 20230125, absl_log_severity = 20230125, absl_strings = 20230125, absl_str_format = 20230125, absl_time = 20230125, absl_span = 20230125 ...... Normally, the process_pkgconfig() would process variable data before field data in a .pc file, but in the absl_log_internal_format, the field data in "Requires" section contains "xxxx = xxxx" format, the process_pkgconfig() treats them as normal variable and using the setVar() in bitbake's data_smart.py try to process. The absl_log_internal_format field data contains "_append_", this hit the setVar() checking and finally bitbake stop building and reporting an error as below: "Variable xxx contains an operation using the old override syntax. Please convert this layer/metadata before attempting to use with a newer bitbake." This patch move the field data process before variable process to avoid the process_pkgconfig() treat the field data as variable. (From OE-Core rev: e7d3e02a624f7ce23d012bb11ad1df2049066b37) Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> (cherry picked from commit a73e269d3e591a10bb397b94b82e3fb960112d33) Signed-off-by: Clément Péron <peron.clem@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* wic: Add dependencies for erofs-utilsHeiko Thole2023-07-211-1/+1
| | | | | | | | | In order to build erofs filesystems, wic must have the erofs-utils package installed into its sysroot. (From OE-Core rev: c349c7fcb299b123824da9a13ee58222a6cbf9ec) Signed-off-by: Heiko Thole <heiko.thole@entwicklung.eq-3.de> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* useradd-staticids.bbclass: improve error messageMikko Rapeli2023-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | Current error message is difficult to read: ERROR: Nothing PROVIDES 'image' trs-image was skipped: image - image: normal username test does not have a static ID defined. Add test to one of these files It's not clear that first "image" is recipe name, second "image" is binary package name and that "test" is the user account which does not have a static ID defined. Improve the error message so that these are more explicit. Now the error message looks like: image was skipped: Recipe image, package image: normal username "test" does not have a static ID defined. (From OE-Core rev: 572c507736b2fcc31f7f13cb3da0d5be361838f5) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 07898218f3908a83e07178b6530dfa48d55d4ec2) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* image_types: Fix reproducible builds for initramfs and UKI imgFrieder Paape2023-07-121-2/+3
| | | | | | | | | | | | | | | | | | | | | I've encountered issues reproducing initramfs and UKI image builds, which will be fixed with this patch. 1. initramfs There's a symbolic link to /sbin/init, which is appended to the cpio archive after creation. The links timestamp needs to be static and the cpio append command needs the '--reproducible' flag to produce deterministic outcomes. 2. Unified Kernel Image '--preserve-dates' is required for a static 'Time/Date' entry. I've added '--enable-deterministic-archives' although in my case this didn't change anything. (From OE-Core rev: 0d8890f7c1fbea5036acefa3031dcd442b316725) Signed-off-by: Frieder Paape <frieder@konvera.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit fd027729bafb4e085ba0949e38e724f3a8cad102) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* staging.bbclass: do not add extend_recipe_sysroot to prefuncs of ↵Chen Qi2023-06-231-1/+1
| | | | | | | | | | | | | | | | | | prepare_recipe_sysroot When running prepare_recipe_sysroot task, the extend_recipe_sysroot is run twice. What prepare_recipe_sysroot does is executing extend_recipe_sysroot, there's no need to add extend_recipe_sysroot to its prefuncs. (From OE-Core rev: dad053c4b99d4aefebe40459500ad53a2b458fa0) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit bf7584a2ac16ee46ff5b41536b06bb46d0cbada7) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel: don't force PAHOLE=falseBruce Ashfield2023-06-231-1/+1
| | | | | | | | | | | | | | | | | | | If a specific kernel provider or configuration wants to enable BTF and pahole analysis, it isn't currently possible due to the explicit definition to false in the base kernel build arguments. pahole is now detected by the kernel built itself, so unless pahole-native is enabled, the result is the same. If a kernel does require an explicit disable of pahole, it is better to carry PAHOLE=false in those specific recipes. (From OE-Core rev: 44b75c7442b05a2fedcc0d73982566c2bef84357) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b1e4851a36ed47ce6ba880a49264b9a57c78cf4f) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* go.bbclass: don't use test to check output from lsMartin Jansa2023-06-231-1/+1
| | | | | | | | | | | | * avoids possibly confusing error message in log.do_install like: ls: cannot access 'etcd/3.5.7-r0/build/bin/linux_arm64/': No such file or directory (From OE-Core rev: f9b1a56c50a96ad6300a48bf74a540579b352411) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 2f1777e6ac5269a71203b6a2c562a43503be95ae) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* cve-update-nvd2-native: new CVE database fetcherMarta Rybczynska2023-06-211-2/+2
| | | | | | | | | | | | | | | | | | | | Add new fetcher for the NVD database using the 2.0 API [1]. The implementation changes as little as possible, keeping the current database format (but using a different database file for the transition period), with a notable exception of not using the META table. Minor changes that could be visible: - the database starts in 1999 instead of 2002 - the complete fetch is longer (30 minutes typically) [1] https://nvd.nist.gov/developers/vulnerabilities (From OE-Core rev: b8ae26aabe825c1bc8d84fd7e0ee197695f1dee7) Signed-off-by: Marta Rybczynska <marta.rybczynska@syslinbit.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit fb62c4c3dbca4e58f7ce6cf29d4b630a06411a97) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel-devicetree: recursively search for dtbsRandolph Sapp2023-06-011-4/+4
| | | | | | | | | | | | | | | | Upstream's dtb directory structure has no real standard. They just tend to idle around the 2/3 directory depth. Recursively search for the dtb/dtbo files instead of assuming anything. Fixes: 04ab57d200 (kernel-devicetree: allow specification of dtb directory, 2023-05-02) (From OE-Core rev: 717b9f18a51e9c9fd5a471238aa2ea4de439ef17) Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* package: enable recursion on file globsRandolph Sapp2023-06-011-1/+1
| | | | | | | | | | | | | | | Enable recursion of file globs. This just allows the use of '**' in file globs to match 0 or more subdirectories, it should not make all current globs recursive [1]. [1] https://docs.python.org/3.6/library/glob.html#glob.glob (From OE-Core rev: 90855ef11e3bd85eea718532f20878b72aa729b4) Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel-devicetree: make shell scripts posix compliantMartin Jansa2023-06-012-3/+3
| | | | | | | | | | | | | | | | Use the notation suggested by Martin Jansa to avoid a bashism. Also switch KERNEL_DTBVENDORED to the more common 0/1 notation instead of true/false. Fixes: 04ab57d200 (kernel-devicetree: allow specification of dtb directory, 2023-05-02) (From OE-Core rev: b7d6fc07462e6fca09d0db7f43a62920250ef053) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel-devicetree: allow specification of dtb directoryRandolph Sapp2023-06-012-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | Fedora/Redhat and Arch are somewhat standardized on their dtb directory structure. Let's add some flags to configure yocto to mimic that behavior. Add the following variables to the kernel class: - KERNEL_DTBDEST (controls the destination directory for dtbs) - KERNEL_DTBVENDORED (controls if vendor subdirectories are to be respected) Currently KERNEL_DTBDEST is expected to be a subdir of KERNEL_IMAGEDEST and KERNEL_DTBVENDORED is expected to be "true"/"false". This only applies to the package directory structure. The deploydir structure is purposely left untouched for compatibility with existing recipes. By default this is configured to behave the same as the current recipe and produce a flat dtb directory at KERNEL_IMAGEDEST. (From OE-Core rev: 77d6118e20751f68ad7104edec8f14dbb5ba6ec1) Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* license.bbclass: Include LICENSE in the output when it fails to parsePeter Kjellerstedt2023-05-301-1/+1
| | | | | | | | | | (From OE-Core rev: 1dd008511cc62bd32f85b529f8d6031bd57e4cd2) 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> (cherry picked from commit 1a5197760da3890cc80ac7da8d589766612d9051) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* update-alternatives.bbclass: fix old override syntaxPeter Bergin2023-05-121-2/+2
| | | | | | | | | | | | | | | | Function 'gen_updatealternativesvardeps' still used old override syntax when fetching variable flags. Update to use ':' instead to match recipe meta data. This was found by review and no real issue encountered but it is a bug that affects variable dependencies and can affect rebuilds as task hashes might not be accurate. (From OE-Core rev: d5fd577c066fa2fddbd16c286f2dde2883cc7828) Signed-off-by: Peter Bergin <peter.bergin@windriver.com> Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5691f554b2cd50f256a8cbb1d96781e9eb6b930e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel: improve initramfs bundle processing timeBruce Ashfield2023-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial fix for bugzilla 15059 [https://bugzilla.yoctoproject.org/show_bug.cgi?id=15059] It has been noted by several people that when an initramfs is bundled: - a lot of the kernel is rebuilt - it takes a really long time When looking at the logs, the second kernel compilation (that performs the bundle) is not using the parallel make settings, and builds with -j1. We are already explicitly passing PARALLEL_MAKE when building kernel modules, and by extending that explicit use to the main kernel compilation, we ensure that we always get a parallel build. Build times chnaged from more than 30 minutes for the bundle, to 3 minutes in local testing. The question of whether or not too much is rebuilding during the bundle step is still an open question, but with this tweak, at least the build time is back in the realm of acceptable. (From OE-Core rev: a2a889b760785474dbc04e3ec11521f6da90161d) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 88fd394ecf0f2174b792075d409d87046896426b) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* populate_sdk_ext.bbclass: set METADATA_REVISION with an DISTRO overrideMartin Jansa2023-05-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * otherwise it ends '<unknown>' inside esdk, because of parsing order: # $METADATA_REVISION [3 operations] # set /OE/build/test-D/conf/local.conf:43 # "f2da54ef432eac89b0f18eaad68e602b6990b5de" # immediate /OE/build/test-D/layers/poky/meta/classes/metadata_scm.bbclass:9 # "${@oe.buildcfg.detect_revision(d)}" # set /OE/build/test-D/layers/poky/meta/classes/metadata_scm.bbclass:10 # [vardepvalue] "${METADATA_REVISION}" # pre-expansion value: # "<unknown>" METADATA_REVISION="<unknown>" * This causes base-files.do_install and following tasks to have different signatures between esdk and the build directory where this esdk was created: bitbake-diffsigs {test-D,poky/build-uninative-disabled}/tmp/stamps/qemux86_64-poky-linux/base-files/*do_install*sigdata* NOTE: Starting bitbake server... basehash changed from 5b6981cf58bfd57d416b0e31611b73a26baae635dd1ac31c08d46f95064c3ffc to dbdce042da4d7813d632b6d1cc87a16f728ad20e55fecbc392830e6acf72babd Variable METADATA_REVISION value changed from '<unknown>' to 'f2da54ef432eac89b0f18eaad68e602b6990b5de' and an warning from "python3 /OE/build/test-D/ext-sdk-prepare.py" when eSDK is being prepared for use: WARNING: The base-files:do_install sig is computed to be 83b9c9a6ef1145baac5a1e0d08814b9156af239c58fc42df95c25a9cd8a7f201, but the sig is locked to 3dc22233059075978e5503691e98e79e7cc60db94259dfcd886bca2291c0add7 in SIGGEN_LOCKEDSIGS_t-qemux86-64 [RP: Add commit about why we need the override for future reference] (From OE-Core rev: da6f6340f97e80cb1b21f6083ef5d0a9a856eef5) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 675ea7281c17f77bf5dea17cfd4d9da0928382a0) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* populate_sdk_base: add zip optionsChristoph Lauer2023-05-031-1/+3
| | | | | | | | | | | | | Add SDK_ZIP_OPTIONS to remove symbolic link creation in zip archive or add options, e.g. for encryption of the zip archive. (From OE-Core rev: 04b62f9459b401c276255f166d0738b6f902a576) (From OE-Core rev: 4f5bf144bfe4f34adfc22d86783d6ce29e9f6e15) Signed-off-by: Christoph Lauer <christoph.lauer@xtronic.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* cmake: add CMAKE_SYSROOT to generated toolchain filePascal Bach2023-05-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This already got fixed in the toolchain file that is used during development in https://github.com/openembedded/openembedded-core/commit/cb42802f2fe1760f894a435b07286bca3a220364 The toolchain file generated by the cmake.bbclass however does not set CMAKE_SYSROOT. Under certain circumstances this also leads to the error: `"stdlib.h: No such file or directory #include_next <stdlib.h>"` during the build of a recipe. An example where this accured was during the upgrade of the Apache Thrift recipe in meta-openembedded to 0.11.0. With this change the build works out of the box. CMAKE_SYSROOT must only be set when crosscompiling, otherwise it will interfere with the native compiler headers. (From OE-Core rev: 1105c67d554bcd155e8247cb16efc8d6a642444f) Signed-off-by: Pascal Bach <pascal.bach@siemens.com> (from http://lists.openembedded.org/pipermail/openembedded-core/2018-August/154791.html ) Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Poonam Jadhav <poonam.jadhav@kpit.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* package.bbclass: correct check for /build in copydebugsources()Peter Marko2023-04-191-1/+1
| | | | | | | | | | | | | | | | | | | Newly introduced kirkstone-only commit https://git.openembedded.org/openembedded-core/commit/?h=kirkstone&id=80839835ec9fcb63069289225a3c1af257ffdef7 broke builds with externalsrc in Gitlab-CI. This is yocto-4.0.9 regression. It checks if directory starts with "build" instead of if checking if it equals to "build". Gitlab-CI uses directory "/builds" which matches the check but directory /build does not exist, only /builds. After successful check it tries to move this non-existent directory which does not exists and thus do_package fails. (From OE-Core rev: b67e714b367a08fdeeeff68c2d9495ec9bc07304) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* patchelf: replace a rejected patch with an equivalent uninative.bbclass tweakAlexander Kanavin2023-04-111-0/+2
| | | | | | | | | | | | | | | | | This was the original reason to add the patch: https://git.openembedded.org/openembedded-core/commit/?id=18efcbcb896239c64fedd009ce57f3f0c668cbc0 and this is the upstream discussion which suggests handling read-only files explicitly outside of patchelf: https://github.com/NixOS/patchelf/pull/89 (From OE-Core rev: 163e2d5defebab262a5ec6fa9885deedace538f2) 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> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Fix false negative version issueGeoffrey GIRY2023-04-111-1/+4
| | | | | | | | | | | | | | | | | NVD DB store version and update in the same value, separated by '_'. The proposed patch check if the version from NVD DB contains a "_", ie 9.2.0_p1 is convert to 9.2.0p1 before version comparison. [YOCTO #14127] Reviewed-by: Yoann CONGAL <yoann.congal@smile.fr> (From OE-Core rev: f331c80df6c447d3073ebe3f00102c78ced242f3) Signed-off-by: Geoffrey GIRY <geoffrey.giry@smile.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 7d00f6ec578084a0a0e5caf36241d53036d996c4) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: fix multiubi var initRomuald Jeanne2023-03-281-0/+3
| | | | | | | | | | | | | | | | | Make sure to expand all MKUBIFS_ARGS_<label> and UBINIZE_ARGS_<label> vars in 'do_image_multiubi' task to use them to init the local 'mkubifs_args' and 'ubinize_args' vars. See [YOCTO #15065] (From OE-Core rev: 0fce158e59918172b9e42558fc63342384edf657) Signed-off-by: Romuald JEANNE <romuald.jeanne@st.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 09d05215cf61981c7bc828cc0ff64c2fd5edc43c) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd.bbclass: Add /usr/lib/systemd to searchpaths as wellKhem Raj2023-03-281-0/+1
| | | | | | | | | | | | | | | | | | | Some packages like lirc places its unit files into $systemd_user_unitdir and also uses them in SYSTEMD_SERVICE list in recipe. This fails in do_package ERROR: Didn't find service unit 'lircmd.service', specified in SYSTEMD_SERVICE:lirc. here lircmd.service is installed in /usr/lib/systemd/system/lircmd.service (From OE-Core rev: 7582421fc3a711e5ed23add75ed49207e699c422) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 12808a4159835b67d8d53d32bc9135811701a779) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: Handle spaces within user $PATHKenfe-Mickael Laventure2023-03-231-1/+1
| | | | | | | | | | | | | | | | The script generated by the sdk_ext_postinst function was not quoting the user existing PATH when updating it causing the export command to fail. Add necessary double quotes around $PATH. (From OE-Core rev: d2800e00bb4a1d169e0a91b758d3fb2ec5e35f74) Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 00e96bf250eaaded839caf465dbc0af5b604aed7) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts: Handle spaces within user $PATHKenfe-Mickael Laventure2023-03-231-1/+1
| | | | | | | | | | | | | | | The environment-setup script generated by the recipe was not quoting the user existing PATH when updating it causing the export command to fail. Add necessary double quotes around $PATH. (From OE-Core rev: 64dd672193b43b1364acc73918a54abaa93645e4) Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 42177ff2d45ee70ad00917bb6fbabca49dae4f59) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging/multilib: Fix manifest corruptionRichard Purdie2023-03-232-3/+5
| | | | | | | | | | | | | | | | The previous fix wasn't enough to address all the possible ways the manifests might be ordered. Rework the previous fix so it is tied to the multilib cross-canadian code which is causing the problem. RECIPE_SYSROOT_MANIFEST_SUBDIR is not documented as I'd hope nobody ever needs to use this outside the core multilib code. (From OE-Core rev: 0aa703c06bf101114836ac701bbb524302c0753a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit beab42e00713880cd95a04729c892f8662fbcbed) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Separate out different multiconfig manifestsRichard Purdie2023-03-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | """ require conf/multilib.conf MACHINE = "qemuarm64" MULTILIBS = "multilib:lib32" DEFAULTTUNE:virtclass-multilib-lib32 = "armv7athf-neon" bitbake gcc-cross-canadian-arm """ and then inspecting the lib32* manifest files under recipe-sysroot-native shows them referencing lib32-recipe-sysroot instead of recipe-sysroot as used by gcc-cross-canadian recipes. To fix this separate out the manifest by multilib. It is caching mechanism to optimise disk usage so this doesn't break anything, just separated out some files. (From OE-Core rev: 29f7390add28d3a6fb6854bc750d1db3d969f027) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 891d3faa3ed3d1cc231da58e5fa1325f05d5ade5) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* linux: inherit pkgconfig in kernel.bbclassMing Liu2023-03-201-1/+1
| | | | | | | | | | | | | | pkgconfig is being required to find dependencies for building kernel native tools, move "inherit pkgconfig" to kernel.bbclass so BSP kernel recipes can also benefit from it. (From OE-Core rev: e09c50e01d0f5cf45b9622ab0ed33df12bdeb7ee) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 8a84bd98e3fbc16c782f83064801e469d086911e) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: fix kernel-meta data detectionUlrich Ölmann2023-03-091-1/+1
| | | | | | | | | | | | Fixes: 7ef7af5c03ba ("kernel-yocto: restore kernel-meta data detection for SRC_URI elements") (From OE-Core rev: c92593af46ef2ccbaaff89bb75eac46b3ac8b856) Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c77754f23e3fb49a62602a6c6a04d5525d1cf457) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclase: Add check for /build in copydebugsources()Saul Wold2023-03-091-0/+7
| | | | | | | | | | | | | | | | This is needed when the SDK or eSDK is installed in a /build top level directory as it conflicts with the build directory within the existing /usr/src/debug/build (which is really a link). Rename it and then do the copy, this is not an issue with master currently due to some other changes that occurred in master. Fixes: [YOCTO #15026] (From OE-Core rev: 80839835ec9fcb63069289225a3c1af257ffdef7) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devshell: Do not add scripts/git-intercept to PATHPeter Kjellerstedt2023-02-241-2/+0
| | | | | | | | | | | | | | | The use of scripts/git-intercept was introduced in commit 3266c327df (install/devshell: Introduce git intercept script due to fakeroot issues) and later reverted in commit af27c81eaf (scripts: Make git intercept global). (From OE-Core rev: 70ee5f9d50bec6e708cd2006c11ef3d0bd7cab42) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit f6c260c8e2a33e282a35afc99de4ef8cc1791b08) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: print all QA functions exceptionsMauro Queiros2023-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the QA checks in `image.bbclass`, all exceptions other than `oe.utils.ImageQAFailed` always print the following generic message: "Image QA function func_name failed" This can be very misleading, as it may hide python syntax errors and other kind of issues that are hard to detect without more explicit error messages. This change makes sure that the error message of all exceptions are displayed. Before this change: "Image QA function func_name failed" After this change: "Image QA function func_name failed: f-string: empty expression not allowed (<string>, line 13)" (From OE-Core rev: 6c53d8d8c88fb06b19fbf5bdd754960b21531074) Signed-off-by: Mauro Queiros <maurofrqueiros@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3d85b30d8704d38b86f5b006748cebc74bd2a4fa) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-alternatives: fix typosUlrich Ölmann2023-02-241-3/+3
| | | | | | | | | | (From OE-Core rev: 6b6f3cfe8995663b31482e70285863266dfd9d80) Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d3ca05b072c152b76a86edaaddebabdef312ea95) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipe_sanity: fix old override syntaxUlrich Ölmann2023-02-151-1/+1
| | | | | | | | | | (From OE-Core rev: 381fcdba555d0b56fcd4525d82bec851b3da95ec) Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 18eeea6fcd8ade49390a978134f51646da2f7764) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-locale: Fix on target locale generationRichard Purdie2023-02-151-0/+1
| | | | | | | | | | | | If on target locale generation is used, it fails at first boot showing errors about a missing directory. Ensure the directory exists. (From OE-Core rev: 258115c2a7d78f0416f952122c9448a805dab08f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f2844c9f1bbb729562063d96a3d1cc9d44dafa0a) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Fix error message to reflect new syntaxAlejandro Hernandez Samaniego2023-02-151-1/+1
| | | | | | | | | | | (From OE-Core rev: 03eced200a69ee64cb0efdca164e0d287314beac) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ec73d19d78e8f30ff9b817490c23bcdf8ea47c86) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVar and getVarFlag calls (again)Martin Jansa2023-02-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * True is default since 2016 and most layers were already updated not to pass this parameter where not necessary, e.g. oe-core was updated couple times, first in: https://git.openembedded.org/openembedded-core/commit/?id=7c552996597faaee2fbee185b250c0ee30ea3b5f Updated with the same regexp as later oe-core update: https://git.openembedded.org/openembedded-core/commit/?id=9f551d588693328e4d99d33be94f26684eafcaba with small modification to replace not only d.getVar, but also data.getVar as in e.g.: e.data.getVar('ERR_REPORT_USERNAME', True) and for getVarFlag: sed -e 's|\(d\.getVarFlag \?\)( \?\([^,()]*, \?[^,()]*\), \?True)|\1(\2)|g' \ -i $(git grep -E 'getVarFlag ?\( ?([^,()]*), ?([^,()]*), ?True\)' \ | cut -d':' -f1 \ | sort -u) (From OE-Core rev: de7bf6689a19dc614ce4b39c84ffd825bee1b962) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 26c74fd10614582e177437608908eb43688ab510) Signed-off-by: Steve Sakoman <steve@sakoman.com> (cherry picked from commit 24a86d0c55ee89ae0dc77975e1d0ee02898d2289) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scons.bbclass: Make MAXLINELENGTH overridableKhem Raj2023-02-151-4/+5
| | | | | | | | | | | | | | | | | | | older scons do not support MAXLINELENGTH and some packages still may be using older scons, these recipes can clear SCONS_MAXLINELENGTH in them and get going. Set SCONS_MAXLINELENGTH = "" in such recipes. (From OE-Core rev: b4eaa248077305b75c551acb94223dbc524fc7a3) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 34de57d12c0a752f66c962d29e5335c1035db066) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>