summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
Commit message (Collapse)AuthorAgeFilesLines
* cmake: apply parallel build settings to ptest tasksPeter Marko12 days1-0/+2
| | | | | | | | | | | | | | | | | | ptest compile and install tasks do not have parallel build settings for cmake. On powerful build machines this can cause overload situations and oomkills. Observed when building qtgrpc with ptest generally enabled in distro. Having this in ptest class is suboptimal, but creating ptest-cmake class just for these two variables is probably overkill. (From OE-Core rev: 3c311fbf0c2090268e9b83123d762b05b61b4074) (From OE-Core rev: 234f64b64e61cff4a27d2533dfc13e0c2a4fc63b) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* rust-common.bbclass: soft assignment for RUSTLIB pathPedro Ferreira14 days1-1/+1
| | | | | | | | | | | | | | | | | | | | | | As a user i want to override `RUSTLIB` path on a bbclass, lets call it `XYZ.bbclass`. If a certain recipe inherits `cargo.bbclass` and `XYZ.bbclass` the value of `RUSTLIB` is dependent on the order of the inherit. If `cargo.bbclass` is inherit before `XYZ.bbclass` this will reflect the desired value of `RUSTLIB`, on the oposite, if the `XYZ.bbclass` is inherit before `cargo.bbclass` then the `RUSTLIB` defined on `rust-common.bbclass` will prevail. Changed definition of `RUSTLIB` to soft assignment to make it overridable. (From OE-Core rev: b71da7dd831d768d829c74f6137152f2ca6141b0) Signed-off-by: Pedro Silva Ferreira <Pedro.Silva.Ferreira@criticaltechworks.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> (cherry picked from commit 6eeb832f73ffb48f5f05dc47191f60e4599e640f) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* uboot-config: fix devtool modify with kernel-fitimageAdrian Freihofer2025-02-031-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | How to reproduce: - UBOOT_CONFIG must be used. With UBOOT_MACHINE it works fine. A simple example based on oe-core is to modify the beaglebone-yocto.conf file like this: -UBOOT_MACHINE = "am335x_evm_defconfig" +UBOOT_CONFIG = "foo" +UBOOT_CONFIG[foo] = "am335x_evm_defconfig" - A build configuration which inherits the kernel-fitimage.bbclass is needed. For example: MACHINE = "beaglebone-yocto" KERNEL_IMAGETYPE = "Image" KERNEL_IMAGETYPES += " fitImage " KERNEL_CLASSES = " kernel-fitimage " devtool modify linux-yocto devtool build linux-yocto ... | cp: cannot stat '.../linux-yocto-6.6.21+git/am335x_evm_defconfig/.config': No such file or directory | WARNING: .../linux-yocto/6.6.21+git/temp/run.do_configure.2081673:172 exit 1 from 'cp .../linux-yocto-6.6.21+git/am335x_evm_defconfig/.config .../build/workspace/sources/linux-yocto/.config.baseline' The reason for this problem is that the uboot-config.bbclass sets the variable KCONFIG_CONFIG_ROOTDIR to a path that makes sense for u-boot, but not for other recipes. However, the kernel-fitimage.bbclasse, for example, inherits the uboot-config.bbclass, which brings the u-boot-specific path into the kernel build context. This change removes the uboot-specific KCONFIG_CONFIG_ROOTDIR path from recipes other than u-boot itself. (From OE-Core rev: 37835788d0772568f3551532eacbf810a4a6e47b) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from b23581a22619c52724c8e078f29e871e2ee74259) Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* u-boot: kernel-fitimage: Fix dependency loop if UBOOT_SIGN_ENABLE and ↵Marek Vasut2025-02-032-64/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UBOOT_ENV enabled In case both UBOOT_SIGN_ENABLE and UBOOT_ENV are enabled and kernel-fitimage.bbclass is in use to generate signed kernel fitImage, there is a circular dependency between uboot-sign and kernel-fitimage bbclasses . The loop looks like this: kernel-fitimage.bbclass: - do_populate_sysroot depends on do_assemble_fitimage - do_assemble_fitimage depends on virtual/bootloader:do_populate_sysroot - virtual/bootloader:do_populate_sysroot depends on virtual/bootloader:do_install => The virtual/bootloader:do_install installs and the virtual/bootloader:do_populate_sysroot places into sysroot an U-Boot environment script embedded into kernel fitImage during do_assemble_fitimage run . uboot-sign.bbclass: - DEPENDS on KERNEL_PN, which is really virtual/kernel. More accurately - do_deploy depends on do_uboot_assemble_fitimage - do_install depends on do_uboot_assemble_fitimage - do_uboot_assemble_fitimage depends on virtual/kernel:do_populate_sysroot => do_install depends on virtual/kernel:do_populate_sysroot => virtual/bootloader:do_install depends on virtual/kernel:do_populate_sysroot virtual/kernel:do_populate_sysroot depends on virtual/bootloader:do_install Attempt to resolve the loop. Pull fitimage configuration options into separate new configuration file image-fitimage.conf so these configuration options can be shared by both uboot-sign.bbclass and kernel-fitimage.bbclass, and make use of mkimage -f auto-conf / mkimage -f auto option to insert /signature node key-* subnode into U-Boot control DT without depending on the layout of kernel fitImage itself. This is perfectly valid to do, because the U-Boot /signature node key-* subnodes 'required' property can contain either of two values, 'conf' or 'image' to authenticate either selected configuration or all of images when booting the fitImage. For details of the U-Boot fitImage signing process, see: https://docs.u-boot.org/en/latest/usage/fit/signature.html For details of mkimage -f auto-conf and -f auto, see: https://manpages.debian.org/experimental/u-boot-tools/mkimage.1.en.html#EXAMPLES (From OE-Core rev: 259bfa86f384206f0d0a96a5b84887186c5f689e) Fixes: 5e12dc911d0c ("u-boot: Rework signing to remove interdependencies") Reviewed-by: Adrian Freihofer <adrian.freihofer@siemens.com> (From OE-Core rev: d7bd9c6276611c8c8de0c2a24947783eae5d932a) Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* rust-target-config: Fix TARGET_C_INT_WIDTH with correct sizeHarish Sadineni2025-01-251-5/+5
| | | | | | | | | | | | | | | | | | [YOCTO #15600] The TARGET_C_INT_WIDTH value was incorrectly set to 64 instead of 32. It is updated for PPC, Mips, and riscv64 architectures. Discussion links for solution: https://lists.openembedded.org/g/openembedded-core/message/207486 https://lists.openembedded.org/g/openembedded-core/message/207496 (From OE-Core rev: 0e02d0feba8bd48a27c41db875dcd33d46e4dc0d) Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b9df8cd8b29064d115dab3bfd1ea14f94a5c0238) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* classes/qemu: use tune to select QEMU_EXTRAOPTIONS, not package architectureRoss Burton2025-01-241-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Using the package architecture to select the right qemu options to pass to qemu-user is incorrect, and fails for recipes that set PACKAGE_ARCH to MACHINE_ARCH (as the qemuppc workarounds suggest) because there are not typically any options set for the machine name. Solve this by using TUNE_PKGARCH instead: for the majority of recipes this is the same value, but for machine-specific recipes it remains the same instead of changing to the machine name. This means we can remove the qemuppc workarounds, as they're obsolete. Also update the gcc-testsuite recipe which uses the same pattern to use TUNE_PKGARCH, and generalise the else codepath to avoid needing to update the list of architectures. [ YOCTO #15647 ] (From OE-Core rev: 972ca555ff3aa41d32980477850c92915b6395ed) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 414b754a6cbb9cc354b1180efd5c3329568a2537) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* classes/nativesdk: also override TUNE_PKGARCHRoss Burton2025-01-241-0/+1
| | | | | | | | | | | | | | | | The nativesdk class overrides PACKAGE_ARCH and unsets TUNE_FEATURES, but as recipes might want to look at TUNE_PKGARCH too (for example, when setting QEMU_EXTRAOPTIONS) we should also override that variable. Otherwise, a nativesdk recipe will have the TUNE_PKGARCH of the target, which leads to errors (eg passing mips arguments to an arm qemu). (From OE-Core rev: 812cf123af5821c300c630cda35be8faed73b9d5) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 05322beb290e1db30bef49b4364f8a8e6e9f7408) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* populate_sdk_ext: write_local_conf add shutil importMark Hatle2025-01-091-0/+2
| | | | | | | | | | | | | | Add shutil import to resolve error: Exception: NameError: name 'shutil' is not defined, Did you forget to import 'shutil' (From OE-Core rev: 759fb4bb4f5d5cf7f124f64b9314a34e41f58d23) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b64263a43b4d82f1ebba13815bccb8a8cd3127f9) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* cml1.bbclass: do_diffconfig: Don't override .config with .config.origRobert Yang2024-11-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | Fixed: 1) $ bitbake virtual/kernel -cmenuconfig Do some changes and save the new config to default .config. 2) $ bitbake virtual/kernel -cdiffconfig The config fragment is dumped into ${WORKDIR}/fragment.cfg. But the .config which was saved by step #1 is overridden by .config.orig, so the changes will be lost if run 'bitbake virtual/kernel' And the following comment is for subprocess.call(), not for shutil.copy(), so move subprocess.call() to the correct location. # No need to check the exit code as we know it's going to be # non-zero, but that's what we expect. (From OE-Core rev: 7ec97c40696d3b2dda777f68b9ad07430969dc16) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 6cccf6b02f92dad514e65fd779ff659b19eb6be7) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* uboot-sign: fix concat_dtb argumentsClayton Casciato2024-11-261-1/+1
| | | | | | | | | | | | | | Fixes [YOCTO #15642] Ensure empty argument passed from do_uboot_assemble_fitimage is passed to concat_dtb (From OE-Core rev: 583580eb5dbfdf898a70bf9e8f31c5a717e986f4) Signed-off-by: Clayton Casciato <majortomtosourcecontrol@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b3c473785e5ceef677ff2b77c5fc17f5704c622f) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* rootfs-postcommands.bbclass: make opkg status reproducibleJonas Gorski2024-10-301-0/+4
| | | | | | | | | | | | | | | | | | opkg stores the current time as Installed-Time in its status file when installing packages to the rootfs. Make this reproducible by replacing Installed-Time with ${REPRODUCIBLE_TIMESTAMP_ROOTFS}, which then also matches the files' datestamps. Based on OpenWrt's approach for the issue [1]. [1] https://github.com/openwrt/openwrt/blob/main/include/rootfs.mk#L103 (From OE-Core rev: 0520ec21a0f595a68c2869dbe613633f0594d3d3) Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 61a9b1b1cb618ce90ba7886036f41263075c07df) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* image.bbclass: Drop support for ImageQAFailed exceptions in image_qaPeter Kjellerstedt2024-10-181-11/+4
| | | | | | | | | | | | | | | | | | | | | | After commit 905e224849fbbed1719e0add231b00e2d570b3b4 (image_qa: fix error handling), any unexpected exceptions in do_image_qa() would result in a variable being set, but never used, effectively hiding the error. Since image_qa now calls oe.qa.exit_if_errors(), remove the support for oe.utils.ImageQAFailed and instead rely on the called functions to call oe.qa.handle_error() themselves. This matches what do_package_qa() does. Also update the description of do_image_qa() to explain that the called functions are expected to call oe.qa.handle_error() themselves. [ YOCTO #15601 ] (From OE-Core rev: a1b28a88bc7697371ab166b18587b615d6d39c8e) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0c3e111c965af2bc56533633c376b70b7fa5e1de) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* image_qa: fix error handlingLouis Rannou2024-10-181-5/+6
| | | | | | | | | | | | | | | | | | Make ImageQAFailed inherit BBHandledException so exceptions raised in tests are catched when the actual test function is executed by bb.utils.better_exec. Change the do_image_qa tasks so errors are handled with oe.qa.handle_error. Add some comment to explain this requires to list the test in ERROR_QA or WARN_QA. [YOCTO #14807] https://bugzilla.yoctoproject.org/show_bug.cgi?id=14807 (From OE-Core rev: 8fe7aef17eefa70e3f7c07077b8c695e5c00ed5e) Signed-off-by: Louis Rannou <louis.rannou@non.se.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 905e224849fbbed1719e0add231b00e2d570b3b4) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* uboot-sign: fix counters in do_uboot_assemble_fitimagePaul Gerber2024-10-181-1/+2
| | | | | | | | | | | | | | Without unsetting `j` and `k` for each `UBOOT_MACHINE`, `j` and `k` are incremented in the same frequency as `i` and therefore `$j -eq $i` and `$k -eq $i` is always true for the first `type` from `UBOOT_CONFIG` and the first `binary` from `UBOOT_BINARIES`. (From OE-Core rev: 7f81c38e91563d6d77621a3bfcb155cd226c9b74) Signed-off-by: Paul Gerber <paul.gerber@ew.tq-group.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3aef55c7ceb654b0012f20618bfd6ead1ef578b6) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* populate_sdk_base: inherit nopackagesMartin Jansa2024-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | Since this bbclass sets PACKAGES = "", inherit the nopackages class to skip the various packaging functions which wouldn't do anything anyway. This fixes errors from buildhistory changes where packages-split would be empty. e.g. meta-toolchain build now fails with: | DEBUG: Executing shell function buildhistory_list_pkg_files | find: ".../meta-toolchain/1.0/packages-split/*": No such file or directory | WARNING: exit code 1 from a shell command. | DEBUG: Python function buildhistory_emit_pkghistory finished (From OE-Core rev: 2462cceaeec362d85a469ec0668ed92a092e725c) Signed-off-by: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Atharva Nandanwar <atharvanandanwar@outlook.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel-fitimage: fix external dtb checkAdrian Freihofer2024-10-021-1/+1
| | | | | | | | | | | | | | If EXTERNAL_KERNEL_DEVICETREE and dtb_image_sect are empty variables dtb_path ends up as "/" which is available on most Unix systems but probably not the dtb_path which is needed here. Checking for a file makes more sense and also solves the issue with the "/". (From OE-Core rev: 74054f3614922e331620a4dcb37975c5f679ab4e) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c8f629b6991449cc6726f48a607d9e1bd50807ee) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel-fitimage: fix intentationAdrian Freihofer2024-10-021-32/+32
| | | | | | | | | | | | | white space changes only. - python part should be 4 spaces, not 8. - use tabs for shell (From OE-Core rev: 667aab25e83c84c0daccd43eda574ae34c75c8a7) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 000079a973e8c97d496ca721259437880a7ea70d) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* testexport: fallback for empty IMAGE_LINK_NAMEKonrad Weihmann2024-10-021-1/+1
| | | | | | | | | | | | | | if IMAGE_LINK_NAME is set empty to disable the symlinking for image artifacts in deploy, testexport fails, as the path assembly is incorrect. In that case fallback to IMAGE_NAME (From OE-Core rev: bd723b611e937b8532ebcd485db61a3eae46091d) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0c1d098e6dd08fa3a5aafca656457ac6badcef89) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* testimage: fallback for empty IMAGE_LINK_NAMEKonrad Weihmann2024-10-021-2/+2
| | | | | | | | | | | | | | if IMAGE_LINK_NAME is set empty to disable the symlinking for image artifacts in deploy, testimage fails, as the path assembly is incorrect. In that case fallback to IMAGE_NAME (From OE-Core rev: 1b026479e6d86d43d68ba26bed4b31dac91fc327) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c7a4e7e294992acc589c62adcaf6cd32659f2f9b) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* qemuboot: Trigger write_qemuboot_conf task on changes of kernel image realpathWeisser, Pascal.ext2024-08-261-1/+2
| | | | | | | | | | | | | | | | | | | | | The qemuboot.conf file contains the realpath of the kernel image referenced by QB_DEFAULT_KERNEL. So, it must be recreated in case the realpath of the referenced kernel image changes. The variables KERNEL_IMAGE_NAME and KERNEL_IMAGE_BIN_EXT determine the realpath of the kernel image relative to DEPLOY_DIR_IMAGE. Adding both of them to the vardeps of the write_qemuboot_conf task triggers the write_qemuboot_conf task in case the realpath of the kernel image referenced by QB_DEFAULT_KERNEL changes. Fixes: [YOCTO 15525] (From OE-Core rev: fd21b5fa159e4c612475152e998ae85526fd60d9) Signed-off-by: "Weisser, Pascal" <pascal.weisser.ext@karlstorz.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f8b3975a9ce36ea7af5fd76243a823da2842415b) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* populate_sdk_ext.bclass: make sure OECORE_NATIVE_SYSROOT is exported.Gauthier HADERER2024-08-261-1/+1
| | | | | | | | | | | | | | | | Fixes bug 15464. OECORE_NATIVE_SYSROOT is correctly set up and exported in the SDK's environment file. But it's then unset in buildtools/environment-setup-*. The value is restored in the SDK's environment file but is not exported again. (From OE-Core rev: bdf07c1eb23dbb53ad1df415b665c8f459320420) Signed-off-by: Gauthier HADERER <ghaderer@wyplay.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 825c996b7995d3ad510933b1a88229831ca5ea29) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* image_types.bbclass: Use --force also with lz4,lzopNiko Mauno2024-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Several conversion commands already make use of 'force' option in the compression, which enables overwriting existing files without prompting. Since occasionally an existing residual destination file from a previously aborted or failed task can prevent the re-execution of the conversion command task, by enabling the 'force' option also for lz4 and lzop compression commands we can avoid following kind of BitBake failures with these compressors: | DEBUG: Executing shell function do_image_cpio | 117685 blocks | 2 blocks | example-image.cpio.lz4 already exists; do you want to overwrite (y/N) ? not overwritten | Error 20 : example-image.cpio : open file error | WARNING: exit code 20 from a shell command. ERROR: Task (.../recipes-core/images/example-image.bb:do_image_cpio) failed with exit code '1' (From OE-Core rev: 623ab22434909f10aaf613cd3032cc2a2c6e3ff9) (From OE-Core rev: 32904037728bf4d26cbada18ee71e62569ee2cfd) 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>
* create-spdx-3.0/populate_sdk_base: Add SDK_CLASSES inherit mechanism to fix ↵Richard Purdie2024-08-062-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tarball SPDX manifests Currently, "tarball" sdk based recipes don't generate SPDX manifests as they don't include the rootfs generation classes. Split the SPDX 3.0 image class into two so the SDK components can be included where needed. To do this, introduce an SDK_CLASSES variable similar to IMAGE_CLASSES which the SDK code can use. Migrate testsdk usage to this. Also move the image/sdk spdx classes to classes-recipe rather than the general classes directory since they'd never be included on a global level. For buildtools-tarball, it has its own testsdk functions so disable the class there as a deferred inherit would overwrite it. (From OE-Core rev: 95660951a09e2a3fe63eb1017ad8f1d7fc9cd503) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 662396533177b72cc1d83e95841b27f7e42dcb20) Eliminate spdx-3.0 items, not applicable to Scarthgap. Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* create-spdx-*: Support multilibs via SPDX_MULTILIB_SSTATE_ARCHSMark Hatle2024-08-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a create-spdx-* classes is processing documents, it needs to find the document in a path that is related to the SSTATE_ARCH when a packge is generated. The SSTATE_ARCH can be affected by multilib configurations, resulting is something like armv8a-mlib. When the image (or SDK) is being generated and the components are collected, the system has no knowledge of the multilib arch and will fail to find it, such as: ERROR: meta-toolchain-1.0-r0 do_populate_sdk: No SPDX file found for package libilp32-libgcc-dbg, False sstate:libilp32-libgcc:armv8a-ilp32-mllibilp32-elf:14.1.0:r0:armv8a-ilp32:12: sstate:libilp32-libgcc::14.1.0:r0::12: Adding in the new SPDX_MULTILIB_SSTATE_ARCHS will provide a full set of SSTATE_ARCHS including ones that contain the multilib extension which will allow create-spdx-* to correctly find the document it is looking for. This would also be valuable to any other function doing a similar search through SSTATE_ARCH that may have been extended with multilib configurations. (From OE-Core rev: 5c1ce317fff6df6818f72d93197e5ec59ad4c462) Signed-off-by: Mark Hatle <mark.hatle@amd.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f1499c36c1054fc90f7b7268cc95285f2eca72f7) spdx-3.0 items are not application and were removed. spdx-common.bbclass item was moved into create-sdpx-2.2.bbclass. Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* classes/kernel: No symlink in postinst without KERNEL_IMAGETYPE_SYMLINKJörg Sommer2024-08-011-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | The commit “Use a copy of image for kernel*.rpm if fs doesn't support symlinks” [1] added postinst and postrm scripts to the kernel package which create a symlink after package installation. This should not happen if `KERNEL_IMAGETYPE_SYMLINK` is not `1`. Background: The u-boot implementation of jffs2 does not support symlinks. Using a hardlink or removing `${KERNEL_VERSION}` from the file name fails, because the current postinst script replaces the file with the symlink. [1] 8b6b95106a5d4f1f6d34209ec5c475c900270ecd Cc: Bruce Ashfield <bruce.ashfield@gmail.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Yanfei Xu <yanfei.xu@windriver.com> (From OE-Core rev: 6916c19c8a09d8d0334c957ae541aafcbbcf92df) Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 6a763401862d9ee96749ad18378b6344778c2c66) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* cmake-qemu.bbclass: fix if criterionKai Kang2024-08-011-1/+1
| | | | | | | | | | | | | It always executes the scripts whether 'qemu-usermode' in 'MACHINE_FEATURES' or not. Fix the criterion to make it work. (From OE-Core rev: 6f73c5df726eef7db32ab0fd1aa2ea4e45b3493c) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9e163246dcbbd2187c9ba28432c613b0d6c850c6) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* systemd.bbclass: Clarify error messageKhem Raj2024-07-261-1/+1
| | | | | | | | | | | | | | | | | | When this error is triggered, its a bit vague in specifying where the issue is e.g. ERROR: nbd-3.26.1-r0 do_package: nbd does not appear in package list, please add it Some packages may intentionally remove PN from packages and find it confusing as to why the system is still asking this to be in PACKAGES (From OE-Core rev: 1ca6b396e2ac7088e4228a1b86fe25c6f7fb7a21) 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 025a5e4529dff37a6423d305b12b7a51ceedd9e5) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* populate_sdk_ext.bbclass: Fix undefined variable errorJookia2024-07-171-0/+2
| | | | | | | | | | | The variable uninative_checksum is returned without being set, causing a build error. Set it to None by default instead. (From OE-Core rev: 5726348e04381d5c656a530c318775702136ec8c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 69ead1f2d403e6a0e5365ce4e89288f846d3ef33) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* cargo: remove True option to getVar callsPeter Marko2024-07-122-11/+11
| | | | | | | | | | | | Layer cleanup similar to https://git.openembedded.org/openembedded-core/commit/?id=26c74fd10614582e177437608908eb43688ab510 (From OE-Core rev: f419d57e9605dc5430df6828c4b618265db1243f) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9a2ed52473a3e4eb662509824ef8e59520ebdefb) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* linuxloader: add -armhf on arm only for TARGET_FPU 'hard'Jonas Gorski2024-07-031-1/+1
| | | | | | | | | | | | | | | | | | There are two types of soft FPU options for arm, soft and softfp, and if using the latter the wrong dynamic loader will be used. E.g. go will link against ld-linux-armhf.so.3, but libc6 will only ship a ld-linux.so.3, so go programs will fail to start. Fix this by instead checking for TARGET_FPU being 'hard' and then applying the suffix. (From OE-Core rev: f8d96f091844bf4cc0fa3bd3104573533841259a) Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 07b4c7a2bd23f8645810e13439e814caaaf9cd94) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel.bbclass: check, if directory exists before removing empty module ↵Heiko2024-06-191-1/+1
| | | | | | | | | | | | | | | | | directory If the kernel folder does not exist, find will result in an error. This can occur if the kernel has no modules but, for example, custom modules are created. Add check before deleting. (From OE-Core rev: 63856721cab409ae0598cfbff4fcf55c90bfd7e7) Signed-off-by: Heiko Thole <heiko.thole@entwicklung.eq-3.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7ef767d84d56b25498e45db83bb8f9d9caebeaf9) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* classes: image_types: quote variable assignment needed by dashMartin Hundeb?ll2024-06-141-1/+1
| | | | | | | | | | | | | | | | | | | The change in commit 39fc503036 ("classes: image_types: apply EXTRA_IMAGECMD:squashfs* in oe_mksquashfs()") assigns $@ to a local variable without quoting it. While this works with bash, it fails with dash. Here, only the first token of $@ is assigned to the variable, and the reamining tokens are passed as arguments to the "local" keyword. Fix it by adding the missing quotes. (From OE-Core rev: a3b51197f3ce868c83ed5ca415bd6506ecc2575d) Signed-off-by: Martin Hundebøll <martin@geanix.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 14ca134f9f72d518c9180156a8efac19f8bb3ab0) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* classes: image_types: apply EXTRA_IMAGECMD:squashfs* in oe_mksquashfs()Martin Hundebøll2024-05-231-8/+12
| | | | | | | | | | | | | | | | | | | | Since commit c991f9d6031 ("image_types: Set SOURCE_DATE_EPOCH for squashfs"), I assume, the EXTRA_IMAGECMD:squashfs* variable(s) has been ignored. This is due to the override magic, which isn't applied to functions called by IMAGE_CMD:<type>, but only to the IMAGE_CMD:<type> itself. Other image types (e.g. ext*) works around this by passing the EXTRA_IMAGECMD variable as an argument to the called function. To do the same for oe_mksquashfs(), the number of mandatory arguments is fixed to one (with a little logic to handle the zstd filename). This allows passing ${EXTRA_IMAGECMD} as an argument to oe_mksquashfs(), which makes the variable functional again. (From OE-Core rev: 39fc503036312e38ff0b9d8fb90b4c929b5ca7df) Signed-off-by: Martin Hundebøll <martin@geanix.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* Revert "goarch: disable dynamic linking globally"Jose Quaresma2024-05-231-7/+7
| | | | | | | | | | | | | | This reverts commit 827c60b79e7fcafd14e68870f6b69dcc48ac9c39. Fixed with the drop of the linkmode (From OE-Core rev: 137bb70ddf9dce30374cbb366196da0d8cc94205) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8f46f60a703defc3e74adad382320c129cef0b06) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* go: Drop the linkmode completelyJose Quaresma2024-05-231-2/+0
| | | | | | | | | | | | | This will make possible to restore the default dynamic linking globally which is what we had before the 1.20.X release. (From OE-Core rev: 941c8535eaaca5790c9bc2b3d21d8ce402dbb431) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 6ad90fc2fc49c4199a59dfb1c1d81a7ba184a522) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* uboot-sign: fix loop in do_uboot_assemble_fitimageRalph Siemsen2024-05-231-1/+1
| | | | | | | | | | | | | When using multiple u-boot configurations in UBOOT_CONFIG, the helper function uboot_assemble_fitimage_helper() was not called with all combinations of type & binary, due to a copy-n-paste indexing error. (From OE-Core rev: 0862abfede2680ff8d67c5e9ece2017f594cb8a1) Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2d338548a4b745a71eaf6c29231adc93c4165778) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* rootfs-postcommands.bbclass: Only set DROPBEAR_RSAKEY_DIR onceMichael Glembotzki2024-05-031-1/+3
| | | | | | | | | | | | | | If DROPBEAR_RSAKEY_DIR has already been set before, e.g. by overwriting the file dropbear.default, the line will still be appended a second time. DROPBEAR_RSAKEY_DIR="/path/to/dropbear" DROPBEAR_EXTRA_ARGS="-B" DROPBEAR_RSAKEY_DIR=/var/lib/dropbear (From OE-Core rev: b56ec552ac34a41b531bc36a55f46e0216d40baf) Signed-off-by: Michael Glembotzki <Michael.Glembotzki@iris-sensing.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* autotools: update link in comment for cross compilingJörg Sommer2024-04-041-1/+2
| | | | | | | | (From OE-Core rev: bc0a28203334a5925a8f3ea2b955a4cdad87c4c9) Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-live.bbclass: Adjust the default value for INITRD_LIVEKevin Hao2024-04-041-1/+1
| | | | | | | | | | | | | The ${INITRAMFS_FSTYPES} may contains multi filesystem types, such as "cpio.gz cpio.xz". So it can't be used directly in setting of the default INITRD_LIVE. We choose the first filesystem type in ${INITRAMFS_FSTYPES} for the default INITRD_LIVE. (From OE-Core rev: aa1a55a90ea86349734e2b62288d54863e01c7b8) Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext.bbclass: only overwirte lsb string if uninative is usedTimon Bergelt2024-03-301-1/+1
| | | | | | | | | | | Overwriting the lsb string without inheriting from uninative causes shared state cache entries to end up in the wrong path where they are not beeing picked up by the extensible SDK environment. (From OE-Core rev: 6a4c83919f27f0f552e9b79aed11e3da6791b7e9) Signed-off-by: Timon Bergelt <timon.bergelt@pm.me> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cml1: prompt location of updated .config after do_menuconfig()Enrico Jörns2024-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | When modifying the kernel config by invoking '-c menuconfig' manually, a sensible next step is to persist this changed configuration somewhere. A way to do this is to copy the generated .config back to the original config location. For this purpose, emit a copy+pasteable printout of the saved .config path similar to what we have for the fragment location in the 'diffconfig' task already. Example output: | Changed configuration saved at: | /path/to/bsp/build/tmp/work/my-machine-oe-linux/linux-custom/6.6.4/build/.config | Recompile will be forced (From OE-Core rev: b104470763b081f040f4fcac564136fc5562f23b) Signed-off-by: Enrico Jörns <ejo@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cml1: remove needless check for write_taint attributeEnrico Jörns2024-03-301-10/+8
| | | | | | | | | | | | | | | | | The 'FIXME' comment itself says to remove this once the minimum bitbake version has been bumped. This was in 2012. The function was introduced in bitbake commit f7b55a94 ("bitbake: bitbake: ensure -f causes dependent tasks to be re-run") and is already part of bitbake 1.15.3 which is the minimum bitbake version since 'danny'. Remove the check. (From OE-Core rev: 035fe46fbf57ca83baf6610482ee7ee83c825a06) Signed-off-by: Enrico Jörns <ejo@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-module-split.bbclass: enhance objcopy command call for kernel ↵lixiaoyong2024-03-261-2/+2
| | | | | | | | | | | | | | | | compilation with llvm Using meta-clang for llvm kernel compilation previously defaulted to the gcc objcopy tool. To improve flexibility and compatibility, $OBJCOPY is preferred over $HOST_PREFIXobjcopy in the kernel-module-split.bbclass. With $OBJCOPY already defined in bitbake.conf, the empty condition has been removed, simplifying the invocation process. (From OE-Core rev: 45366f9162e5a7707c8a46c46b115e8501d367d0) Signed-off-by: lixiaoyong <lxy204899@163.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/qemuboot: add depends on qemu-system-native and qemu-helper-nativeRoss Burton2024-03-251-0/+2
| | | | | | | | | | | | | | | | | Any image that inherits qemuboot must also add image dependencies on qemu-system-native and qemu-helper-native, otherwise the image won't be able to be booted. Currently this is done by conf/machine/include/qemu.inc, but not every machine that uses qemuboot includes that file. Move the EXTRA_IMAGEDEPENDS from qemu.inc into qemuboot.bbclass, so that the dependencies don't have to be duplicated. (From OE-Core rev: dd54cf058f632e985917ff227483995f368e6a7d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python3_pip517: just count wheels in the directory, not subdirectoriesRoss Burton2024-03-221-1/+1
| | | | | | | | | | | | | | The install task uses a recursive find to check that it can only find one wheel, but then does a non-recursive glob to install. This can lead to false-failures if PEP517_WHEEL_PATH points at a directory with subdirectories. Solve this mismatch by making the find non-recusive. (From OE-Core rev: 0142da4768b7818b94601a89bf867e10a0ba0ec0) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Fix check_oldest_kernelPaul Barker2024-03-181-1/+1
| | | | | | | | | | | | | | The check_oldest_kernel() function requires utsrelease.h to be generated. This file is generated during do_compile, so we need to delay calling check_oldest_kernel() until after this. With this change in place, I now see the expected warning when building Linux 5.10.y. (From OE-Core rev: 525019b30e83ea65021ca4874605589ccd2daf80) Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitImage: only include valid compatible lineChristian Taedcke2024-03-081-1/+7
| | | | | | | | | | | | | | | | | | | | Without this commit the configuration node includes the compatible line 'compatible = [00];' if EXTERNAL_KERNEL_DEVICETREE is not defined, i.e. if PREFERRED_PROVIDER_virtual/dtb is not used. This prevents u-boot from using this configuration and it prints the message "Could not find configuration node". An additional check also ensures that the written compatible line never contains an empty compatible. The functionality to add the compatible line was added in commit f4c82fb6da89 ("kernel-fitImage: add machine compatible to config section"). (From OE-Core rev: f8f3a52b2f924789552e6a3f889162ff07e0887f) Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go.bbclass: set GOPROXYJose Quaresma2024-03-081-0/+1
| | | | | | | | | | | | | | | | | | The GOPROXY is already correctly defined on the native sys root and this can be checked using the bitbake devshell: | $ go env GOPROXY | https://proxy.golang.org,direct The go_do_compile task calls the compiler directly so the GOPROXY env is not seen because it's not defined in the shell. Defining it explicitly solves this problem and was to avoid setting it in the recipes itself. (From OE-Core rev: e0919a3f7bc26b1ea9fb57740de4a9a3b9253f26) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/login: Various code improvements and fixesRichard Purdie2024-03-071-0/+1
| | | | | | | | | | | | | | | | * Allow tools to be found from the host PATH so that imagemagick from a buildtools tarball/sdk can work * Reformat the code to have imports at the start of the file and have more standard formatting and whitespace * Always save copies of the images, the space imapct is negligle compared to the debug win * Write the images to ${T} * Use bb.utils.mkdirhier() instead of more complex code * Restrict the tests to images containing matchbox-desktop (From OE-Core rev: d09989b49517830297654e4d1d150aaa8723c41a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: fix vfat image namesChristian Taedcke2024-03-061-2/+2
| | | | | | | | | | | | | | | | Remove the appended ${IMAGE_NAME_SUFFIX}, since it is already included in ${IMAGE_NAME}. In commit 26d97acc7137 ("image-artifact-names: include ${IMAGE_NAME_SUFFIX} directly in both ${IMAGE_NAME} and ${IMAGE_LINK_NAME}") ${IMAGE_NAME_SUFFIX} was included into ${IMAGE_NAME}. In this commit all other filesystems in image_types.bbclass were adapted. (From OE-Core rev: e3460853cdeae78762b31c6a846210f134bcd9ef) Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>