summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
Commit message (Collapse)AuthorAgeFilesLines
* The poky repository master branch is no longer being updated.Richard Purdie2025-11-07160-19243/+0
| | | | | | | | | | | | | | | | | | | | | You can either: a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs b) use the new bitbake-setup You can find information about either approach in our documentation: https://docs.yoctoproject.org/ Note that "poky" the distro setting is still available in meta-yocto as before and we continue to use and maintain that. Long live Poky! Some further information on the background of this change can be found in: https://lists.openembedded.org/g/openembedded-architecture/message/2179 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands.bbclass: add a note to the login banner when ↵Alexander Kanavin2025-11-031-1/+8
| | | | | | | | | | | | | | | | | | | | root-with-empty-password logins are enabled When enabled, users will see: === Poky (Yocto Project Reference Distro) 5.2.99+snapshot-1dac0d15f2d979128cb449b59bf5fd69b4ba5084 qemux86-64 ttyS0 Type 'root' to login with superuser privileges (no password will be asked). qemux86-64 login: === (From OE-Core rev: 53631281573c7e7d8ca45dd30af990f8dd7b8e39) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: check that root-login-with-empty-password image features ↵Alexander Kanavin2025-11-031-1/+11
| | | | | | | | | | | | | | | | are present More or less all of testimage relies on logging in as root, without password, both on console and over ssh. Previously this was enabled by default in poky and core, but now that it isn't, testimage will error out on timeouts in both console and ssh login attempts. This commit adds an earlier check and provides a hint to the users about what they should do. (From OE-Core rev: c0ac4a4b694a7550bda0b6c14e42f3705ca0a499) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* barebox.bbclass: set KBUILD_OUTPUTEnrico Jörns2025-10-301-0/+2
| | | | | | | | | | | | | | | | Sets KBUILD_OUTPUT to the build directory to ensure using the valid path in e.g. menuconfig or devshell. An externally set KBUILD_OUTPUT could otherwise confuse the build process and create the .config from an invalid folder. This is what the kernel recipes also do. (From OE-Core rev: 7e72477b8f4c323e3ea0497877c1b6486b2547a5) Signed-off-by: Enrico Jörns <ejo@pengutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: Fix ABI override for powerpc64le targetDeepesh Varatharajan2025-10-301-1/+1
| | | | | | | | | | | | Ensure the powerpc64le check is exclusive by using `elif`, preventing the powerpc64 condition from overriding it. This keeps the ABI as elfv2 for PPC64LE and fixes related build failures. (From OE-Core rev: 1d4067329d0b84f94aaf2f63d282bb9c99ba5557) Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-config.bbclass: fix obsolete commentAdrian Freihofer2025-10-301-1/+1
| | | | | | | | | | fitImage is no longer a supported KERNEL_IMAGETYPE. The comment is wrong. (From OE-Core rev: a511c29a8fb26cb583edd3fb9509f435c835c8c9) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "kernel-fit-image: control kernel section with FIT_LINUX_BIN"Adrian Freihofer2025-10-301-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts the commit (Oe-core 0d17c4fb514f0b9f2117a844cdf00ed52631380a) which recently introduced the FIT_LINUX_BIN variable to control kernel section inclusion in FIT images. The original change aimed to provide flexibility by: - Enabling FIT images without kernel sections for specific use cases by setting FIT_LINUX_BIN to an empty value. - Supporting alternative kernel binary filenames instead of hardcoding "linux.bin" in multiple places. However, the current implementation is incomplete. The filename customization is not implemented - the code still hardcodes "linux.bin" and doesn't actually use the variable in a consistent way. There is also no test coverage for this new functionality. Rather than completing the partial implementation, Qualcomm decided to develop a solution that better aligns with their specific requirements and may be independent of the kernel-fit-image class. The revert restores the previous consistent behavior with unconditional kernel section inclusion. This saves us from adding test coverage, documentation and maintenance for this new but currently known to be unused and incomplete feature. This feature can be reintroduced later if there is a clear need and a complete implementation. (From OE-Core rev: 6eae261b6f52ebfad4d6644cbdad4afe22423ec6) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd.bbclass: support template files with dotsJason M. Bills2025-10-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the SYSTEMD_SERVICE variable contains a template instance that has dots in the name such as "xyz.openbmc_project.my@instance.service", the regex splits on all the dots resulting in the following python exception: Exception: ValueError: too many values to unpack (expected 3) To continue to support service files with dots in the name, this changes to first split only on the '@' to isolate the name, then split the second half on the last dot to get the remaining two parameters. Splitting on the last dot allows dots in the instance name, as well. Confirmed when building that the three parameters for template instances without dots came out the same and that template instances with dots include the full name with dots in the first parameter. Confirmed when using an instance name with dots that the full instance name came out correctly with dots. CC: Ross Burton <Ross.Burton@arm.com> (From OE-Core rev: 09a37ecf0aeff674e49d7bddd5421011a885da2e) Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* spdx-3.0: replace SPDX3_LIB_DEP_FILES with SPDX3_DEP_FILESJose Quaresma2025-10-272-5/+5
| | | | | | | | | | | We can have more files types in the chain of dependencies and not just libs. (From OE-Core rev: f400ba75f2d7987abb177a43f94874a7fdc1ec0a) Signed-off-by: Jose Quaresma <jose.quaresma@oss.qualcomm.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fit-image: Split signing variablesRyan Eatmon2025-10-271-2/+6
| | | | | | | | | | | | | | | | | | Right now all signing is done with a single variable: UBOOT_SIGN_ENABLE. This has the side effect of not allowing for signing the fitImage while not signing the uboot files. This patch creates three new variables specific to FIT_KERNEL and defaults them to the corresponding UBOOT variables. That way all existing code will remain the same, but we can selectively control just signing the fitImage without also signing the uboot files. (From OE-Core rev: 313ff06fdfec36a09328dbd60471bd53127fabe3) Signed-off-by: Ryan Eatmon <reatmon@ti.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/cargo_common: ensure B is cleanRoss Burton2025-10-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | The cargo class defaults to out-of-tree builds in WORKDIR/build, but at no point was that directory cleaned. This causes problems with the rust standard library recipe (libstd-rs) which installs manually with cp, so rebuilds can be contaminated with the contents of previous builds. I believe that post-release we should switch cargo.bbclass to mandating out-of-tree builds to reduce the complexity, but for now in out-of-tree builds we can just delete the ${B}/target directory. Note that we use ${B}/target because there at least were reasons to use that name[1], it is unclear if these limitations still hold. We can't simply clean ${B} because that will break recipes that use cargo and something else to build, for example librsvg. [1] https://github.com/rust-lang/cargo/pull/1657 (From OE-Core rev: 1452ac7a44196454a52f3f6d883290ddcccfd3f8) (From OE-Core rev: 9d9ce457630ea7403ffe7028e3370647db0b83fa) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: PPC64 targets require explicit ABI selection to avoid ↵Deepesh Varatharajan2025-10-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | build failures with rustc. Without a specified ABI, rustc panics with the following error: | thread 'rustc' panicked at compiler/rustc_codegen_ssa/src/back/metadata.rs:394:21: | No ABI specified for this PPC64 ELF target. This issue was occuring because of the following Rust commit: https://github.com/rust-lang/rust/commit/9c1180b6238d163fc384d60d85647385d9210343 As noted in the upstream changes: If the flags do not correctly indicate the ABI, linkers such as ld.lld assume that the ppc64 object files are always ELFv2, which leads to broken binaries if ELFv1 is used for the object files. Because of this, it is now required to explicitly specify the ABI for PPC64 targets using one of the following: "elfv1" => EF_PPC64_ABI_ELF_V1, "elfv2" => EF_PPC64_ABI_ELF_V2, If no ABI is specified, the Rust compiler will panic with the error: No ABI specified for this PPC64 ELF target To address this: - Set 'elfv2' for powerpc64le (little-endian), which mandates ELFv2 ABI. - Set 'elfv1' for powerpc64 (big-endian), which defaults to ELFv1 ABI. (From OE-Core rev: 6cee30b7941c22eef52011b6bac0d3c0d7944abe) Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* u-boot: Make sure the build dir is unique for each UBOOT_CONFIGRyan Eatmon2025-10-131-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each UBOOT_CONFIG entry is run in a different directory under ${B} so that the files can be generated, compiled, and installed differently from each other. Currently that unique directory name was just the defconfig used for each UBOOT_CONFIG. One potential conflict arises when you want build the same defconfig twice, but pass in different make options. Then we get directory collision. Simple fix is to include both the defconfig name and the UBOOT_CONFIG type in the directory name. This change has the potential to be backwards breaking if a layer is using the UBOOT_CONFIG flow and overriding/appending any of the do_* shell functions. Each of those will either need to change to using: ${B}/${config} -> ${B}/${config}-${type} or for append functions they can use the new variable in the parent function: ${B}/${config} -> ${B}/${builddir} (From OE-Core rev: 22e96b32b0be02ec0971c9334d4b1df7c9ef8d84) Signed-off-by: Ryan Eatmon <reatmon@ti.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* core-image.bbclass: Document two image features that were missingPeter Kjellerstedt2025-10-131-0/+2
| | | | | | | | | | | This adds documentation of overlayfs-etc and read-only-rootfs-delayed-postinsts. (From OE-Core rev: be4882e38e9bc00c1b927982d4ef6a559f5905f7) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* core-image.bbclass: Tweak the descriptions of the image featuresPeter Kjellerstedt2025-10-131-14/+13
| | | | | | | | | | | | Some minor grammatical changes, and removal of some duplicate information. Also note which features were previously part of the debug-tweaks feature. (From OE-Core rev: 377e6e7bc4be086c217f92db11f5c6101b52d88c) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* core-image.bbclass: Improve the documentation of available image featuresPeter Kjellerstedt2025-10-131-8/+15
| | | | | | | | | | | Group the features based on what they are used for, and also sort the features within each group. (From OE-Core rev: b670cb573a0b8015ebff5e78fe2926c843247b9b) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* core-image.bbclass: Sort the FEATURE_PACKAGES_*Peter Kjellerstedt2025-10-131-21/+20
| | | | | | | | | | This is primarily a preparation for the next commit. (From OE-Core rev: cc70aa42c5548c2759cada8f93ca001b07f25599) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* core-image, populate_sdk_base: Add zsh-completion-pkgs image featureAdam Nilsson2025-10-132-0/+2
| | | | | | | | | | | | | Add a zsh-completion-pkgs image feature to install *-zsh-completion packages into an image. This is similar to the existing bash-completion-pkgs feature. Suggested-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> (From OE-Core rev: c2d4228197ed0d0d00bb464237fa151a928eba76) Signed-off-by: Adam Nilsson <Adam.X.Nilsson@axis.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* u-boot: Add specifying make options as part the config loopingRyan Eatmon2025-10-091-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a need to generate alternative versions of the uboot files using the existing config looping system, but we need to add additional settings to the make call rather simply specifying a different config. Specifically we have two use cases: 1) We want to sign the same uboot files with two different keys where the key will be passed on the make call. 2) We want to include the alternative defconfigs from a different repository and need to add the path to this new location on the make command line. This introduces a fourth value for the UBOOT_CONFIG settings: config,images,binary,make_opts The values are placed into a new generated variable UBOOT_CONFIG_MAKE_OPTS which is a '?' separated list since space can be present if you need to specify multiple options. This is handled by changing IFS in the shell code when looping over the variable. Additionally, add in a new variable UBOOT_MAKE_OPTS which is added to the make calls in the various do_compile functions that do the actual compiling. (From OE-Core rev: 3338330e0c46b83e33c7e982c012459c89a7ec5c) Signed-off-by: Ryan Eatmon <reatmon@ti.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/classes-recipe/toolchain-scripts.bbclass: eliminate bash-ismAlexander Kanavin2025-10-091-1/+1
| | | | | | | | | | | | | | | Sourcing a script with arguments is a non-standard bash extension and doesn't work with other shells (e.g. dash, which is used on Debian and derivatives). This used to work by coincidence when running against integrated poky repo without having to separately specify where bitbake is, but no longer does. Using set is a POSIX standard. (From OE-Core rev: 933686b7c6307778d171967c49b3a7b6645c31c0) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts.bbclass: fix bitbake-setup compatibilityAdrian Freihofer2025-10-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass the BITBAKEDIR parameter to oe-init-build-env when called from the environment-setup script. This fixes compatibility with bitbake-setup, which places bitbake in a different directory structure than the standard poky repository layout where bitbake is located alongside oe-init-build-env. The issue was discovered when running the oe-selftest test DevtoolIdeSdkTests.test_devtool_ide_sdk_shared_sysroots, which failed because the environment-setup script was not able to find bitbake. File ".../openembedded-core/meta/lib/oeqa/selftest/cases/devtool.py", line 2955, in test_devtool_ide_sdk_shared_sysroots self.assertExists(cmake_native) ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ File ".../openembedded-core/meta/lib/oeqa/selftest/case.py", line 251, in assertExists raise self.failureException(msg) AssertionError: 'Error: The bitbake directory (/tmp/devtoolqah9ndff2x/bitbake) does not exist! Please ensure a copy of bitbake exists at this location or specify an alternative path on the command line\n .../build-st/tmp/sysroots/x86_64/usr/bin/cmake' does not exist (From OE-Core rev: f31903ca484bad68708ec510e25ea33234f5c0ce) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: Update to toolcfg.confRichard Purdie2025-10-091-9/+4
| | | | | | | | | Add handling for toolcfg to the eSDK generation. Take the opporunity to clean up the code duplication too. (From OE-Core rev: ba8a64935f43bfda92a11758b13590bbb3632ff2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: extra partition pluginPierre-Loup GOSSE2025-10-061-0/+1
| | | | | | | | | | | | | | | | The extra_partition plugin allows populating an extra partition with files listed in the new IMAGE_EXTRA_PARTITION_FILES variable. The implementation is similar to the bootimg_partition plugin. This plugin provides an easy way to install files that are not part of the rootfs, from the deploy directory. (From OE-Core rev: 3892912bd7e047a3b122ae910ac5fbd5a85117b8) Signed-off-by: Pierre-Loup GOSSE <pierre-loup.gosse@smile.fr> Reviewed-by: Yoann CONGAL <yoann.congal@smile.fr> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: do not require CONF_VERSION (e.g. local.conf version) to ↵Alexander Kanavin2025-10-021-1/+7
| | | | | | | | | | | | | | | | | | be set The version checks for local.conf/site.conf/bblayers.conf are all optional, and aren't enforced (by insane class) if the versions aren't set. As bitbake-setup writes out a blank local.conf, it doesn't put a version in it either. Also, esdk bundle has a fixed set of layers and is not at risk of needing to update its own local.conf. The same condition is already in place for esdk's bblayers.conf for similar reasons. (From OE-Core rev: d83ff28157aaa9322f98b8da5dd50b562085085a) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: Update the data layout for ppc64 targets.Deepesh Varatharajan2025-10-011-2/+2
| | | | | | | | | | | Rust commit for updating the data layouts: https://github.com/rust-lang/rust/commit/0680155a171d47772302fc4da4cbbfa466378d81 (From OE-Core rev: cf1972b7b96bb38b48e90654a8c840568e4646cf) Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/cmake: unset LDFLAGS in toolchain-native.bbclassRoss Burton2025-10-011-0/+9
| | | | | | | | | | | | | | | | | | | | | | If a recipe is using toolchain-native.cmake to build native portion in a non-native build, the target LDFLAGS from the environment will leak into the native build. This was noticed as building a SDK with clang means that LDFLAGS contains a --dynamic-loader argument, so native binaries were trying to use the target loader. There are several variables that are set from LDFLAGS[1] so instead of setting them all, we can simply unset the environment variable in the toolchain. [1] https://cmake.org/cmake/help/latest/envvar/LDFLAGS.html (From OE-Core rev: f9fa240a6788188174c8080a78018ed9ce402f54) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Upgrade 1.89.0 -> 1.90.0Yash Shinde2025-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://blog.rust-lang.org/2025/09/18/Rust-1.90.0/ * Recent changes in rustc require 'target-c-int-width' to be an integer, not a string. This fixes type consistency when generating target specs. https://github.com/rust-lang/rust/pull/142352. * Rebase existing patches with v1.90.0. * Drop merged patches with rust v1.90.0. - backport-fix-test-string-merging.patch https://github.com/rust-lang/rust/commit/2d51acd2fbcbadb6f30709c5dd305494d413d388 * The "remote-test-server" bin is now generated in stage1-tools-bin dir rather than stage2. Update the test suite accordingly. The tests/{assembly/codegen} dirs are renamed to tests/{assembly,codegen}-llvm. Update the test suite and patches accordingly. https://github.com/rust-lang/rust/pull/144249/commits * Use "//@ ignore-riscv64" tag for tests failing on riscv-64 instead of previous "only-<target_arch>" tags. Test results summary: rust v1.90.0 +-----------+--------+---------+ | Machine | Passed | Ignored | +-----------+--------+---------+ | arm-32 | 29,517 | 1,529 | | arm-64 | 29,608 | 1,471 | | x86-32 | 29,508 | 1,507 | | x86-64 | 29,903 | 1,275 | | riscv-64 | 29,584 | 1,494 | +-----------+--------+---------+ Test results difference (1.90 - 1.89): +-----------+--------+---------+ | Machine | Passed | Ignored | +-----------+--------+---------+ | arm-32 | +278 | +61 | | arm-64 | +279 | +59 | | x86-32 | +277 | +58 | | x86-64 | +419 | +50 | | riscv-64 | +280 | +58 | +-----------+--------+---------+ (From OE-Core rev: 86d09ec9cdbcea6e076ebac6e1243f9e20fb4378) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd: use if..then in prerm scriptletDaniel McGregor2025-09-251-1/+2
| | | | | | | | | | | | | Using the [ test ] && foo construct in the prerm scriptlet causes the prerm scriptlet to fail if the final test condition fails, which with rpm prevents the removal of the package. Switch to using if;then;fi instead, since it doesn't cause the scriptlet to fail. (From OE-Core rev: a5327fc16b76db28dd1da37463a046e69713dbac) Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/cython: also process .cpp filesRoss Burton2025-09-251-1/+1
| | | | | | | | | | | | | Some Python packages, such as python3-frozenlist, generate .cpp files with cython so we should also process those. Frustratingly this doesn't actually solve the reproducible problem with frozenlist as the path is a temporary directory... (From OE-Core rev: 07f156731a9dd7cade56e1d64444dafa18f57e6f) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/cmake: set CMAKE_CROSSCOMPILING explicitlyRoss Burton2025-09-251-0/+1
| | | | | | | | | | Let's be explicit and ensure that CMAKE_CROSSCOMPILING is explicitly set to true when we're cross-compiling. (From OE-Core rev: 82ae2d5497e8ddd825c0350250ed555588a37727) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/cmake: CMAKE_RANLIB needs to be a filename without argumentsRoss Burton2025-09-251-1/+1
| | | | | | | | | | | | | | | | | CMAKE_RANLIB is the path to the binary without any arguments. However, gcc-native.bbclass sets BUILD_RANLIB to "ranlib -D" which means that CMake looks for a binary called "ranlib;-D". This is expected behaviour upstream[1] and as there's no variable for "ranlib flags", we should just set CMAKE_RANLIB to the first element of the list. [1] https://gitlab.kitware.com/cmake/cmake/-/issues/23554 (From OE-Core rev: 598fa6761488bffb09ba0cbe115b562fb95df959) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: add lz4-native dependency for Image.lz4Tudor Ambarus2025-09-221-0/+1
| | | | | | | | | | | | | | | | | | | | | The pixel6 kernel build fails with "lz4: command not found" when KERNEL_IMAGETYPE is set to `Image.lz4`. Upstream commit 0c7dc5bae1 ("bitbake.conf: Drop lz4 from HOSTTOOLS") dropped lz4 from the global `HOSTTOOLS` variable. This meant that the lz4 binary was no longer automatically provided to build tasks, causing the compilation to fail. Add a conditional dependency on `lz4-native` directly to `kernel.bbclass`. It ties the dependency directly to the image type that requires it, making the build more robust. Suggested-by: André Draszik <andre.draszik@linaro.org> (From OE-Core rev: 42b85e1532d5448dc88dcb0d068e746f0220ee84) Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pypi.bbclass: add / to UPSTREAM_CHECK_URI valueAlexander Kanavin2025-09-151-1/+1
| | | | | | | | | | | This avoid an unnecessary 301 redirect and is matching the spec: https://packaging.python.org/en/latest/specifications/simple-repository-api/#project-detail (From OE-Core rev: 783ce696f2ac841903ea0015f64e6a370ccc7530) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: preserve debugfs tarball with checksum fstypeManuel Leonhardt2025-09-111-1/+2
| | | | | | | | | | | | | | | Previously, when adding checksum fstypes to IMAGE_FSTYPES_DEBUGFS, e.g. IMAGE_FSTYPES_DEBUGFS = "tar.bz2 tar.bz2.sha256sum", only the checksum file remained in DEPLOY_DIR while the tarball file was removed. The underlying issue was that inside gen_conversion_cmds, removing the debugfs_ prefix from type broke the comparison with alltypes where the prefix was expected. (From OE-Core rev: 560c7676b81fb344b7db538d65973a49807ab140) Signed-off-by: Manuel Leonhardt <mleonhardt@arri.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd.bbclass: Make systemd_postinst run as intendedPeter Kjellerstedt2025-09-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the switch from using a systemctl written in Python to using the official version of systemctl from the systemd project, the systemd_postinst function has effectively not been executed during the rootfs creation. The reason is that systemctl provided by systemctl-native fails if run without arguments (as systemd_postinst does): Failed to connect to system scope bus via local transport: Operation not permitted (consider using --machine=<user>@.host --user to connect to bus of other user) This is not seen in the logs since stderr is sent to /dev/null, and the only way to tell that there is a problem is because systemd services that are expected to be enabled aren't running. The reason this has gone unnoticed is because systemd_handle_machine_id in rootfs-postcommands.bbclass will call systemctl preset-all, which in most cases will create the missing links to enable the systemd services. This change effectively reverts commit a52e66762c0c51918b1ba3d4622759637b6e920a (systemd.bbclass: update command to check systemctl available) and instead only runs systemctl without arguments (to determine that it can communicate with systemd) when executed on target. (From OE-Core rev: 5b86efb5c9ca782fd0f8ff306f82583ec1e5e909) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gettext, gettext-minimal-native: upgrade 0.23.1 -> 0.26Gyorgy Sarvari2025-09-081-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changelog: 0.24: https://lists.gnu.org/archive/html/info-gnu/2025-02/msg00010.html 0.25: https://lists.gnu.org/archive/html/info-gnu/2025-05/msg00000.html 0.26: https://lists.gnu.org/archive/html/info-gnu/2025-07/msg00007.html - gettext-minimal-native recipe adapted to the new macro name (aclocal_DATA -> macros_DATA) - install Makevars.template to gettext-minimal-native to be able to update missing variables The file is renamed in the desitanion to Makevars.template.minimal, to avoid clashing with the full gettext package (some recipes have both as dependency). - autotools.bbclass: search for all po folders, and update the Makefile.in.in file in each of them. This is required, because without this the old Makefile.in.in files in these non ${S}/po folders are not updated with the new version of gettext, and the compilation routinely fails due to this. As part of the same change, also concatenate the source's Makevars files with the gettext Makevars.template: this allows all variables to be defined, even the new ones that the source didn't contain originally. First set the gettext template, and then append the source's original Makevars to it, so it should override the variables that it was setting originally, and keep the new variables at their default value. - Add new PACKAGECONFIG to use libselinux, and also fix libselinux discovery in autotools (use pkg-config instead of autotools discovery, because autotools' library search doesn't respect custom sysroot) Ptest results: ======================= All 626 tests passed (40 tests were not run) ======================= DURATION: 36 END: /usr/lib/gettext/ptest 2025-08-30T17:49 STOP: ptest-runner TOTAL: 1 FAIL: 0 With the previous version: All 545 tests passed (34 tests were not run) (From OE-Core rev: f4b240b4d2c4b424e5dc8f739d8702c736f32d13) Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config.bbclass: move target generation before do_configureGyorgy Sarvari2025-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The rust_get_targets task from the rust-target-config class generates some Rust compiler configurations for different the target and host machine, which is used by Rust during compiling a recipe. These configurations supposed to be available by the time the Rust compiler is used for the first time. By default, this task is executed "before do_compile" - it assumes that this is the first task that would use this configuration. However this is not always the case, especially with projects which are not pure Cargo projects, rather Cargo/Rust is called by a different build system. As an example librsvg uses meson, and during the do_configure step Meson probes the Rust compiler, trying to gather some library info from Rust. In case the rust_gen_targets task was executed before the do_configure task, then everything works. However this is not always the case - sometimes the job is executed between the configure and compile steps, in which case the configuration fails. To avoid such problems, generate these targets before the do_configure step. (From OE-Core rev: 1d3c02553122982daedfe32c6ce09fac9e091952) Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest-cargo.bbclass: sort binaries for reproducibilityGyorgy Sarvari2025-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | When compiling tests with cargo, the produced binaries are created in a non-deterministic order. The list of binaries themselves are taken from some of the log info produced by cargo, which contains them in the order as they were created. The class later writes this list of binaries in the run-ptest script in the order that it found them. In case the test suite contains more than 1 or 2 binaries, then the order of these binaries is different almost each run, making the resulting ptest package non-reproducible. To avoid this, sort the list of test binaries before storing them. (From OE-Core rev: 0fdc3ce4e3ecc6519aef680884d88f33c805a20d) Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fit-image: control kernel section with FIT_LINUX_BINKavinaya S2025-09-081-6/+8
| | | | | | | | | | | | Update kernel-fit-image.bbclass to conditionally include the kernel section based on FIT_LINUX_BIN variable. Suggested-by: Adrian Freihofer <adrian.freihofer@siemens.com> (From OE-Core rev: 9c8ef2119949900bee222ddc0fdfb23424a032d0) Signed-off-by: Kavinaya S <kavinaya@qti.qualcomm.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* grub-efi.bbclass: fix racing issue on grub-efi imageHongxu Jia2025-09-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In recipe grub-efi, the deploy task installed grub-efi image to deploy dir. In image-live.bbclass, the do_bootimg task called build_iso -> efi_iso_populate -> efi_populate. In image-live.bbclass, the do_bootimg task called build_hddimg -> efi_hddimg_populate -> efi_populate. In grub-efi.bbclass, efi_populate called efi_populate_common for grub-efi to installed grub-efi image from deploy dir to ISO/HDDDIR. Explicitly make do_bootimg depend on grub-efi:deploy otherwise a racing issue on grub-efi image in deploy dir ... |DEBUG: Executing shell function build_iso |NOTE: Trying to install tmp/deploy/images/qemux86-64/bzImage as tmp/work/qemux86_64-wrs-linux/ wrlinux-image-installer/1.0/sources/wrlinux-image-installer-1.0/iso/bzImage |install: cannot stat 'tmp/deploy/images/qemux86-64/grub-efi-bootx64.efi': No such file or directory |WARNING: tmp/work/qemux86_64-wrs-linux/wrlinux-image-installer/1.0/temp/run.build_iso.954273:419 exit 1 from 'install -m 0644 tmp/deploy/images/qemux86-64/$2-bootx64.efi ${DEST}/EFI/BOOT/bootx64.efi' ... (From OE-Core rev: bf0a53af7801a13b39734c3d720f127f212d08f1) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go-mod-update-modules.bbclass: Update license findingChristian Lindeberg2025-09-081-18/+12
| | | | | | | | | | | | | Use ${GO_INSTALL} when listing package dependencies. Look for licenses for each package dependency continuing upwards, but not above the module root, until some license is found. (From OE-Core rev: 26368cfb9180664b66bed5caf900931d08e44d38) Signed-off-by: Christian Lindeberg <christian.lindeberg@axis.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: fix nativesdk-libstd-rs build with baremetalOvidiu Panait2025-09-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | If TCLIBC='baremetal' is set in local.conf, nativesdk-libstd-rs build fails with: | error[E0412]: cannot find type `c_char` in the crate root | --> /usr/src/debug/libstd-rs/1.75.0/rustc-1.75.0-src/vendor/libc/src/unix/mod.rs:56:29 | | | 6 | pub type c_schar = i8; | | ---------------------- similarly named type alias `c_schar` defined here | ... | 56 | pub gr_name: *mut ::c_char, | | ^^^^^^ This happens because rust_gen_target() sets os="none" when TCLIBC is 'baremetal' - even for nativesdk targets. However, nativesdk packages are built against glibc, so the correct 'os' value should be "linux". Fix this by setting the os field based on {TARGET,HOST,BUILD}_OS variables, as it is already done in rust_base_triple(), instead of relying on TCLIBC. (From OE-Core rev: 3eaf2cd5647585a1e6df03fc20e2753da27bb692) Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest-cargo: move run-ptest rc variable initialisationYoann Congal2025-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | ptest-cargo run-ptest can be generated in two fashions: generated from scratch or appended to an exiting run-ptest file. The rc variable used to track tests failure was only initialized in "generated from scratch" case. Which lead to errors in the "appended" case. Move the rc variable initialisation to the common code of both case to fix this problem. Only initialize rc if it was not already affected in the recipe provided run-ptest. (From OE-Core rev: 177c47b7decd8e2d1e24738d10b0f7db2777a772) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Cc: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk: Remove go from SDK_TOOLCHAIN_LANGS for powerpcPeter Tatrai2025-09-011-0/+1
| | | | | | | | | | | PowerPC 32bit port of go compiler does not exist, remove it from list Fixes SDK builds for qemupowerpc and other powerpc machines (From OE-Core rev: 7308913fc007d1d5ea719aef6cb48079f402f417) Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: handle softfp fpuPeter Marko2025-08-281-1/+1
| | | | | | | | | | | | | | | | | With TARGET_FPU set to "softfp" stdlib-rs fails with: error: Error loading target specification: ARM targets must specify their float ABI. Run `rustc --print target-list` for a list of built-in targets This fpu type is set for example for arm in file meta/conf/machine/include/arm/feature-arm-vfp.inc when TUNE_FEATURES do not contain "callconvention-hard", e.g. when using tune DEFAULTTUNE = "cortexa8" (From OE-Core rev: 4d50135cb902037380915966ecc97399d32e9f74) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk: Remove go from SDK_TOOLCHAIN_LANGS for rv32Khem Raj2025-08-281-0/+1
| | | | | | | | | | | RISCV32 port of go compiler does not yet exist remove it from list Fixes SDK builds for qemuriscv32 and other rv32 machines (From OE-Core rev: 9af3029cb19fd644d17f54a54da3806b7aa3e244) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: Add has-thread-local optionPer x Johansson2025-08-251-0/+1
| | | | | | | | | | | | | | | The "has-elf-tls" option was removed by the commit 8e1614a906086fb46c5dd7b7f2dffab91194165c. However is should have been renamed to "has-thread-local", since it was renamed and not removed in rust by this commit. https://github.com/rust-lang/rust/commit/391332c5d9d5a5e97a0d36e011a87ad43045cfd3 Change-Id: Ia1fdf7698ebeef62a88052713645d5b499164353 (From OE-Core rev: 18a87dd1724e0934a669aefae36d20374c06c493) Signed-off-by: Per x Johansson <perxjoh@axis.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd.bbclass: deduplicate template and instance lines in preset fileKhang D Nguyen2025-08-211-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If SYSTEMD_SERVICE contains both template and instance names, the preset file will contain two lines: one describing the template name and one describing the instance names. This is problematic because systemd.preset only use the first matching one [1], leading to the instances not getting enabled. For example, openbmc's obmc-console recipe has the following final SYSTEMD_SERVICE variable: ``` SYSTEMD_SERVICE:obmc-console = " \ obmc-console@.service \ obmc-console-ssh@.service \ obmc-console-ssh@2200.service \ " ``` The resulting preset file will contain lines with the same name: ``` enable obmc-console@.service enable obmc-console-ssh@.service enable obmc-console-ssh@.service 2200 ``` Fix this by interpreting the template name as a special case of empty instances. Tested: preset files are generated correctly: ``` enable obmc-console@.service enable obmc-console-ssh@.service 2200 ``` [1]: https://www.freedesktop.org/software/systemd/man/257/systemd.preset.html#Preset%20File%20Format Fixes: f33d9b1f434e ("systemd.bbclass: generate preset for templates") (From OE-Core rev: 7cdf10840c200a327b6336775698342af7212ee4) Signed-off-by: Khang D Nguyen <khangng@os.amperecomputing.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fragments/autobuilder: add go to SDK_TOOLCHAIN_LANGSAlexander Kanavin2025-08-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | For reasons unknown, only rust was listed, which means nativesdk-go was not built or tested, which lead to breakage like one fixed in https://git.yoctoproject.org/poky/commit/?id=a669cd2e0c760da9d7e872daea9590fc9e86d766 Note that with this change only building and installing go into SDKsis tested, but no tests are performed with the toolchain itself in testsdk/testimage. For that, a bug has been filed: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15953 Remove go from x32 and mingw targets as it will not build for them. (next to similar removals for rust) (From OE-Core rev: 7f9e3c2c60a2d73b3728d07519471f0614c03130) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* goarch.bbclass: do not leak TUNE_FEATURES into crosssdk task signaturesAlexander Kanavin2025-08-211-0/+3
| | | | | | | | | | | | | | | The default assignments look like this: TARGET_GO386 = "${@go_map_386(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}" TUNE_FEATURES is a target-specific variable, and so should be used only for target builds. The change is similar to what is already done for native packages. (From OE-Core rev: cfff8e968257c44880caa3605e158764ed5c6a2a) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>