summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
Commit message (Collapse)AuthorAgeFilesLines
...
* uboot-extlinux-config.bbclass: invalidate do_create_extlinux_config on ↵Quentin Schulz2025-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | changes to UBOOT_EXTLINUX_FDTOVERLAYS:x do_create_extlinux_config is using a bit of an odd mechanism which doesn't work well with sstate cache invalidation. BitBake will detect changes to UBOOT_EXTLINUX_FDTOVERLAYS because it's explicitly mentioned in the task, but it'll miss changes to UBOOT_EXTLINUX_FDTOVERLAYS:label because this OVERRIDES is set within the task, so the value of UBOOT_EXTLINUX_FDTOVERLAYS for the label OVERRIDES will only ever change from within the task, while it is running, much later than during parsing. For that to work properly, we need to add the entire variable (including the OVERRIDES part) to the vardeps varflag of the task so that its value is monitored. This is already done for all possible label variables but FDTOVERLAYS was forgotten. Fixes: 3ac21b32b5f5 ("uboot-extlinux-config.bbclass: add support for DTBOs") (From OE-Core rev: a41fd633786a2404b5eee399ed0602e229c4be77) Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* grub-efi-cfg: Add GRUB_TITLE for custom GRUB titlesSimon A. Eugster2025-01-201-1/+7
| | | | | | | | | | | | | | Until now, the default title of a boot entry is its label. The label is a variable which determines the script to run during an early boot stage and is not necessarily human readable. This patch allows to provide a human-readable title for each boot entry. (From OE-Core rev: a5a7f6ada786b7f2c1a317f20b7e642f1e978de9) Signed-off-by: Simon A. Eugster <simon.eu@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autoconf: rename autotools_aclocals and only run in do_configureRoss Burton2025-01-201-4/+3
| | | | | | | | | | | | | | | | | Despite the name, autotools_aclocals() doesn't actually do anything with aclocal. Instead it reads all of the available autoconf site default files[1] and sets CONFIG_SITE appropriately. Rename the function to autotools_sitefiles to make this clear. Also there's no need to do this before do_configure or do_install, as the variable is only checked when configure runs. [1] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Site-Defaults.html (From OE-Core rev: 05080b48a9607e19a251c7396c1b06f08d98ed3b) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: clean up aclocal/ search path assignmentsRoss Burton2025-01-201-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | We need aclocal to look in two different $datadir/aclocal/ directories: the native (eg, for pkg.m4 from pkgconfig) and the target (eg, for alsa.m4 from alsa-lib). aclocal doesn't directly support this pattern, currently we use --system-acdir to specify the target directory and then add the native directory to the user include list. However, since automake 1.17 there is also an --aclocal-path option to augument the search list. As the relocated aclocal from automake-native already knows the correct path for the native aclocal directory we can use --aclocal-path to add the correct target aclocal directory. For simplicity I don't bother only doing this in non-native builds as this just adds the same path to the search twice. This removes ACLOCALDIR and ACLOCALEXTRAPATH. Recipes using these to add search paths should instead use EXTRA_AUTORECONF += "-I path". (From OE-Core rev: 878e1517d4890b31332a506ce903d57e1d7dff87) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/ptest-python-pytest: simplify python ptest file overridingDerek Straka2025-01-141-8/+14
| | | | | | | | | | | | The complexity of overriding files from the bbclass made the behavior at times hard to follow and predict. This change replaces the default file with a heredoc equivalent that creates a default file if the user does not provide their own version of run-ptest in the SRC_URI. (From OE-Core rev: be3db5f4f1b857b93d08211019d9ff796ec389b6) Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: Update the data layout for x86 , ppc , riscv64 , aarch64 ↵Deepesh Varatharajan2025-01-141-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and loongaarch64 targets. ----------------------------------------------------------------------------------------- error: data-layout for target `x86-linux`, `e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128`, differs from LLVM target's `i686-unknown-linux-gnu` default layout, `e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128` error: data-layout for target `powerpc-linux`, `E-m:e-p:32:32-i64:64-n32`, differs from LLVM target's `powerpc-unknown-linux-gnu` default layout, `E-m:e-p:32:32-Fn32-i64:64-n32` error: data-layout for target `x86_64-poky-linux-gnux32`, `e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128`, differs from LLVM target's `x86_64-poky-linux-gnux32` default layout, `e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128` ------------------------------------------------------------------------------------------- Rust commits for updating the data layouts: x86: https://github.com/rust-lang/rust/commit/dbff90c2a7c751cf9d6843cd585429beb100c17d x86_64-x32: https://github.com/rust-lang/rust/commit/ec55a05374d89d206be5140a4759af92f1b42f15 aarch64: https://github.com/rust-lang/rust/commit/4d397d33da8aff64419a03694d152c8250916f19 ppc: https://github.com/rust-lang/rust/commit/ad7ea8b7e690e6000006b6fde630a2c8c4385019 riscv64gc: https://github.com/rust-lang/rust/commit/f414715ebfda201f91f80ef9f28d9923d614d1c4 loongaarch64: https://github.com/rust-lang/rust/commit/4a06a5bc7ad259023e4373e794687adfce252dac (From OE-Core rev: 5136176198d4d150afa39b50dc4e879f5b206909) Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemu/machine: rename QEMU_EXTRAOPTIONS for consistencyRoss Burton2025-01-111-2/+2
| | | | | | | | | | | | | | | | | The per-tune qemu options variable is QEMU_EXTRAOPTIONS_${TUNE_PKGARCH}, but this doesn't follow the pattern of all of the other tune-specific variables in the machine configuration which is VARIABLE:tune-[name]. Rename QEMU_EXTRAOPTIONS_${TUNE_PKGARCH} to QEMU_EXTRAOPTIONS:tune-${TUNE_PKGARCH} for consistency. Note that this will mean that BSPs need to update any assignments of this variable. (From OE-Core rev: 7f981d074442b901f7e64dbdb9db851ff31c3733) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/qemu: move QEMU_EXTRAOPTIONS for PPC to the relevant tunesRoss Burton2025-01-111-9/+0
| | | | | | | | | | Every other architecture has the QEMU_EXTRAOPTIONS assignments in the tune files, so move the PPC ones too. (From OE-Core rev: ba05251c89d8cc243e861886124573c83197e949) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/qemu: use tune to select QEMU_EXTRAOPTIONS, not package architectureRoss Burton2025-01-111-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: 414b754a6cbb9cc354b1180efd5c3329568a2537) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/nativesdk: also override TUNE_PKGARCHRoss Burton2025-01-111-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: 05322beb290e1db30bef49b4364f8a8e6e9f7408) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native: Improve ${PN}-XXX package name handlingRichard Purdie2025-01-101-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a recipe has something like: RPROVIDES:${PN}-xxx = "yyy" then the current code will turn this into: RPROVIDES:${BPN}-native-xxx = "yyy-native" which can lead to errors. Add in some handling for this special case in the class extension code. The corresponding entry in PACKAGES is correctly remapped, the variables aren't remapped to match though. Note that merging this does trigger new dependencies to be exposed, some of which can't be met or are incorrect. These need to be fixed on a case by case basis. There was also a problem in the existing code when handling anonymous python in PACKAGES since it would pass bizarre package names like "d)}" to the remapping code. This patch changes it to ignore anonymous python since in the native case, this likely isn't wanted anyway. This also then avoids ${PN}-ptest in the native case which was a common dependency problem. (From OE-Core rev: e2fd81e221c25fc21d532e020ddd8aaac0c22ede) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: remove aclocal --automake-acdir, relocated so knows the right pathRoss Burton2025-01-101-6/+0
| | | | | | | | | | | | | | A relocated aclocal in the native sysroot has the right paths already: $ cat /work/ross/build/tmp/work/cortexa57-poky-linux/expect/5.45.4/recipe-sysroot-native/usr/bin/aclocal my @automake_includes = ('/work/ross/build/tmp/work/cortexa57-poky-linux/expect/5.45.4/recipe-sysroot-native/usr/share/aclocal-' . $APIVERSION); Thus there is no need to tell aclocal the path explicitly. (From OE-Core rev: 002e03132b8ba1f1b254c8a63ff70db2a5d16518) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: log when we're removing aclocal.m4Ross Burton2025-01-101-0/+1
| | | | | | | | | | | | | Some mysterious autotools errors are because upstream has a custom aclocal.m4 that we're deleting it unless we know we're not even running aclocal. There's a case to be made for removing this deletion logic on the grounds that aclocal should know what it is doing, but for now make it clear that we're deleting a file by saying so in the task log. (From OE-Core rev: d6efd938af8a8260ae464edf4388afea73293ec7) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-extlinux-config.bbclass: add support for DTBOsQuentin Schulz2025-01-081-0/+6
| | | | | | | | | | | | | | | | | | | | Also known as FDTO, DTO or Device Tree Overlay. This adds a new property per label in extlinux.conf for which device tree overlays to apply on top of the base device tree (the one specified in FDT or guessed by the bootloader if only FDTDIR is set). It is a space-separated list of paths to the .dtbo file(s). Note that the base FDT needs to have symbols enabled (DTC_FLAGS needs to have -@ in it) for an overlay to be applicable. This is only applicable for non-FIT setups. (From OE-Core rev: 3ac21b32b5f5616cc7c0641fb3132eec9b27e5b7) Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-extlinux-config.bbclass: simplify FDT/FDTDIR logicQuentin Schulz2025-01-081-6/+4
| | | | | | | | | | | The three blocks share the same LABEL and KERNEL content, so let's factor that part out. (From OE-Core rev: 544c0f72774e17d1dca4664c0bc21f8281dade5b) Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/ptest-python-pytest: add a new class to consolidate pytest ptest ↵Derek Straka2025-01-081-0/+31
| | | | | | | | | | | | | | | | | | | | | functionality A large number of python packages leverage the pytest unit test framework for their ptest functionality. Currently, many of the tests have duplicate code for: 1. Installing pytest files 2. Declaring ptest dependencies 3. Script for executing tests (run-ptes) To simplify adding common pytest based ptests, added a new class enabling base functionality. Users can also override the location of the pytest files in addition to using their own version of run-ptest [RP: Minor whitespace tweaks to shell function and missing prepend space] (From OE-Core rev: d66009e608256d42b2d6573d4614a99eb13fd3f1) Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gettext: update 0.22.5 -> 0.23.1Alexander Kanavin2025-01-041-2/+2
| | | | | | | | | | | | | | | | | Drop patches: parallel.patch (obsolete as no .a files are installed) 0001-intl-Fix-build-failure-with-make-j.patch (backport) Gettext no longer installs anything into $libdir/gettext by default but still creates the directory and so it should be packaged. (From OE-Core rev: a414f47009811fa6886e43fd2b4c928a906a65f3) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image/populate_sdk: Support usrmerge in toolchain SDK buildsPhilip Lorenz2025-01-032-26/+27
| | | | | | | | | | | | | SDKs which aren't built from an image recipe should also come with drop-in symlinks for `/bin`, `/lib` and `/sbin`. Support this by moving the common functionality into `populate_sdk_base` and enabling the symlink creation when the `usrmerge` DISTRO_FEATURE is on. (From OE-Core rev: 8e1e86cc9d5d4e866ff0ab62c8954db0e65c19e6) Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base/features_check: Make PARSE_ALL_RECIPES and SOURCE_MIRROR_FETCH booleanRobert Yang2024-12-231-1/+1
| | | | | | | | | | So that value "0" can turn them off. (From OE-Core rev: 1a2afcd0773c5ec5946d1dfc27bde585c52a5724) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: enable fetching kernel metadata using file fetcherChristian Taedcke2024-12-231-5/+8
| | | | | | | | | | | | If no destsuffix parameter is supplied and the file fetcher is used, the folder name (i.e. basepath) is added to the kernel-meta search directories. (From OE-Core rev: e46cc8159136ce96489e10f126405781abfbd52e) Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: write_local_conf add shutil importMark Hatle2024-12-181-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: b64263a43b4d82f1ebba13815bccb8a8cd3127f9) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/pypi: update the default UPSTREAM_CHECK_URI to use the simple repo APIDerek Straka2024-12-171-3/+17
| | | | | | | | | | | | | | Update the UPSTREAM_CHECK_URI to leverage the simple repo API. The project URLs require javascript which breaks the version checking fetch and subsequent logic. The simple repo API provides similar functionality with a well defined spec which is used by tools such as pip. Also update the UPSTREAM_CHECK_REGEX to be compatible with the information retrieved via the API (From OE-Core rev: 10febb0e8193d15aec8bbf80b849ae6732da3c22) Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd.bbclass: do not automatically add Also servicesAdrian Freihofer2024-12-171-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting a systemd service “Also” does not mean that both services must be in the same package. However, the systemd.bbclass enforces this. Example: a.service: [Install] Also=b.service If a.service is packed in package A, b.service is automatically packed into package A as well. This happens even if b.service is explicitly added to package B using FILES and SYSTEMD_SERVICE variables. The automatic packing of socket files with the corresponding service files is probably a widely used feature of systemd.bbclass. This bahavior does not change. Adding regular service files to a package just because it is another service in the same package that "Also" uses the service is a bug that this commit fixes. (From OE-Core rev: f836d80eb48a2a2f9b1e66980021755cf0ca2a26) 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: refactor adding filesAdrian Freihofer2024-12-171-16/+12
| | | | | | | | | | | | | | | The keys variable was intended as an array of keys. But it looks like this has not been used for more than 10 years now. Adding files automatically to packages needs probably anyway very specific code rather than a generic loop. Lets simplify this a bit. Using python code should also not be slower for these usually small files. (From OE-Core rev: 0eda7131bf743719d6586ccd36d99cbe11c88262) 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>
* rpm: replace use of rpm2cpio with rpm2archiveAlexander Kanavin2024-12-122-2/+0
| | | | | | | | | | | | | | rpm2cpio has been deprecated upstream, so this prepares for its eventual removal. rpm2archive produces a tar archive which can be uncompressed with tar executable from the host. (From OE-Core rev: ed824d3fb23f0c89d8dfdacb2c4ef0b7c21a5144) 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>
* Revert "uboot-sign: fix U-Boot binary with public key"Ryan Eatmon2024-12-091-1/+7
| | | | | | | | | | | | | This reverts commit 0d14e99aa18ee38293df63d585fafc270a4538be. The patch removed logic required for correct handling of UBOOT_SUFFIX=img or UBOOT_SUFFIX=rom. We need to find a better way to handle the fix for [YOCTO #15649]. (From OE-Core rev: 5e82d33451b5662df1e7fe2518a50644d18aa70d) Signed-off-by: Ryan Eatmon <reatmon@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo.bbclass: do not install libraries by defaultAlexander Kanavin2024-12-051-3/+5
| | | | | | | | | | | | | | | 'cargo install' only installs executables and examples into the system, and we should follow that. Libraries are vendored into build trees from the crate registry and then baked directly into executables. Neverthless, there's now a condition variable, so individual recipes can opt into installing libraries if there's a use case for it. (From OE-Core rev: 68990af9630da16fc75362ca09046ceab71a1106) 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>
* meson.bbclass: enable qemu exe wrapper in nativesdkAlexander Kanavin2024-12-051-2/+9
| | | | | | | | | | | | | | nativesdk builds are cross-builds like target ones, and so meson expectations regarding ability to run binaries are the same: either provide the wrapper, or disable the build time options that need executing target binaries during build time (if such options are made available by upstream). (From OE-Core rev: f210fc1d3db2e71f484bddc0b23ab252c36f4062) 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>
* classes: create-spdx: Fix variable dependenciesJoshua Watt2024-12-051-0/+3
| | | | | | | | | | | | A few variable dependencies were incorrect from the SPDX tasks, which prevented rebuilds from occurring, or caused them to occur when they should not. (From OE-Core rev: 38a5dd136b3a3713e63d23598011efe1c4b0f459) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/lib: move buildstats.py and rootfspostcommands.py into oeChen Qi2024-12-051-4/+4
| | | | | | | | | | | These two files are the only ones that are left in meta/lib. They logically belong to meta/lib/oe, so move them there. (From OE-Core rev: c65dd0e3e463d6072b9364ac74e1fef0d998068f) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-uboot: Support lzma compressed algorithmJamin Lin2024-11-281-0/+2
| | | | | | | | | | | | | | | | | | | Linux kernel supports to compress its output binary with lzma algorithm and U-Boot support to decompress lzma compressed image. Both xz and lzma algorithms are identical and users can use xz utility with format parameter to compress Image which supports lzma algorithm. Add the following command to support lzma. This command is refer to Linux kernel, https://github.com/torvalds/linux/blob/master/arch/powerpc/boot/wrapper "xz --format=lzma -f -6 linux.bin" (From OE-Core rev: 211178065bdca293c84c41a9a1e79c10df95b6ad) Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.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 TARGET_C_INT_WIDTH with correct sizeHarish Sadineni2024-11-231-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: b9df8cd8b29064d115dab3bfd1ea14f94a5c0238) Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* spdx: Fix SPDX tasks not running when code changesJoshua Watt2024-11-232-0/+5
| | | | | | | | | | | | | | | | The SPDX code makes heavy use of python classes. While this works very well, the bitbake dependency parser is unable to understand how to deal with them, and thus changes to the class code do not cause rebuilds to occur. To correct this, add the library files that include SPDX code as file checksums for the SPDX tasks. If this method works well for SPDX, we will look at implementing something similar in the bitbake dependency parser that should allow correct checksums without having to explicitly add them to each class. (From OE-Core rev: 6ac3033b77a0d1f7ab15801c5c65931adede3923) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign: fix U-Boot binary with public keyClayton Casciato2024-11-231-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes [YOCTO #15649] The U-Boot binary in the "deploy" directory is missing the public key when the removed logic branch is used. The simple concatenation of the binary and DTB with public key works as expected on a BeagleBone Black. Given: MACHINE = beaglebone-yocto UBOOT_SIGN_KEYNAME = "dev" Post-patch (poky/build/tmp/deploy/images/beaglebone-yocto): $ hexdump -e "16 \"%_p\" \"\\n\"" u-boot-beaglebone-yocto.dtb \ | tr -d '\n' | grep -o 'key-dev' key-dev $ hexdump -e "16 \"%_p\" \"\\n\"" u-boot.img \ | tr -d '\n' | grep -o 'key-dev' key-dev Non-Poky BeagleBone Black testing (Scarthgap): U-Boot 2024.01 [...] [...] Using 'conf-ti_omap_am335x-boneblack.dtb' configuration Verifying Hash Integrity ... sha256,rsa4096:dev+ OK Trying 'kernel-1' kernel subimage [...] (From OE-Core rev: 0d14e99aa18ee38293df63d585fafc270a4538be) Signed-off-by: Clayton Casciato <majortomtosourcecontrol@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes-recipe/python_pep517: remove all RECORD filesRoss Burton2024-11-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python modules install metadata into a .dist-info directory, one of which is RECORD, which contains the files that were installed and their checksum[1]. This is typically used by pip to validate the install, or to know what files to remove when the module is uninstalled. This is slightly problematic when we need to do patching of installed .py files in do_install(), as the RECORD file has already been written at that point. However, the RECORD files only really have a use outside of a system- managed environment, which our python packages are. We already have commands to verify and remove modules (opkg, dpkg, rpm) and the RECORD file existing simply allows people to 'sudo pip' and alter the package- managed directories outside of the package manager. This is not a good idea, and some other distros remove the RECORD file to stop this possibility: - Debian[2] - Fedora[3] - Gentoo[4] We can follow for all packages which inherit python_pep517, which is the majority of the Python packages now. [1] https://peps.python.org/pep-0491/#the-dist-info-directory [2] https://salsa.debian.org/python-team/tools/dh-python/-/blob/master/dhpython/fs.py?ref_type=heads#L185 [3] https://src.fedoraproject.org/rpms/pyproject-rpm-macros/blob/rawhide/f/macros.pyproject#_105 [4] https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73c49f3c00415dee99407dabba8d3b22895c9d25 (From OE-Core rev: 917df5ed022f9512473fe0971db48b5253c97b85) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Handle /var/log being volatileRichard Purdie2024-11-211-0/+1
| | | | | | | | When /var/log is volatile, capturing just the symlink isn't useful. Fix this. (From OE-Core rev: 06bb8069b023c6b71f3c7dd87a6c2bebc5820083) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: change test failure logging from bb.fatal() to bb.error()Mikko Rapeli2024-11-211-2/+2
| | | | | | | | | | | | | | | | | | | | | bb.fatal() exists right away while bb.error() does some cleanup before exiting. Fixes running tests during image build with TESTIMAGE_AUTO multiple times in a row when some of the tests fail: $ killall -9 Cooker ; bitbake -c clean core-image-base ; \ bitbake core-image-base ; \ bitbake core-image-base With bb.fatal() something in cleanup is not done and second image build builds an empty rootfs into .wic image. Workaround is to kill Cooker processes between bitbake calls, or to switch testimage.bbclass from bb.fatal() to bb.error() logging which is done here. (From OE-Core rev: 077bdd26e6c5bd161f082524ceee9e90d56315b5) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cython: swap prefix-mapping patch for an upstream commitRoss Burton2024-11-211-3/+0
| | | | | | | | | | | | | Upstream has solved the absolute path problem differently by taking paths relative to the top of the module. This appears to solve the problem, at least I've not found any cases where it breaks. Drop my patch, and backport the relevant commit from upstream. (From OE-Core rev: 47f7808dd93e50fb3ecddbf980e40e51dd7376cb) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes-recipe/cython: handle builds with no .c sourcesRoss Burton2024-11-181-1/+1
| | | | | | | | | | | | | | | | This didn't seem to be possible considering the entire point of Cython is to generate C bindings, but some Python build systems remove the build tree once the wheel has been generated, so we never get to see the sources. As xargs will call the specified command even without any files this results in sed failing. Pass --no-run-if-empty so that this case doesn't result in an error. (From OE-Core rev: f1c1bdb05ea8f79a14a4b53e110889b70881f4d7) 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>
* python_mesonpy: remove cython-specific INSANE_SKIPsRoss Burton2024-11-121-4/+0
| | | | | | | | | | These INSANE_SKIPs are specific to cython and unrelated to mesonpy, so remove them. The new cython.bbclass should resolve the cause. (From OE-Core rev: abe08a3238d162a1bdbc68172307eb3eb127bbb1) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes-recipe: add cython classRoss Burton2024-11-121-0/+11
| | | | | | | | | | | | | | | Recipes that use Cython typically also do some bespoke fixup. Add a class to centralise the logic: - Set CYTHON_PREFIX_MAP to stop build paths appearing in generated objects - Strip "Cython Metadata" blocks from generated code that ends up in the -src package (From OE-Core rev: 9752da112b618362d2fe1b61c8939b8410e98553) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uki.bbclass: fix debug print logging levelMikko Rapeli2024-11-121-1/+1
| | | | | | | | | Missing/unknown log level triggers a warning. (From OE-Core rev: ab2d1eeb4cad7ef8791954b36f8123cb35b8c000) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign: fix concat_dtb argumentsClayton Casciato2024-11-121-1/+1
| | | | | | | | | | | | Fixes [YOCTO #15642] Ensure empty argument passed from do_uboot_assemble_fitimage is passed to concat_dtb (From OE-Core rev: b3c473785e5ceef677ff2b77c5fc17f5704c622f) Signed-off-by: Clayton Casciato <majortomtosourcecontrol@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes-recipe/core-image: drop debug-tweaks IMAGE_FEATURERoss Burton2024-11-073-14/+15
| | | | | | | | | | | | | | | | | | | Remove the 'debug-tweaks' IMAGE_FEATURE. It sounds friendly and kind to developers, but it results primarily in an image which root can login remotely without a password. This is incredibly useful for local development and testing purposes, but we really want to be explicit that this is what is happening instead of hiding it behind a vague "debug tweaks" statement. To preserve the eixsting behaviour, debug-tweaks should be replaced with these features: allow-empty-password empty-root-password allow-root-login post-install-logging (From OE-Core rev: 2c229f9542c6ba608912e14c9c3f783c3fa89349) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: allow early exit to configuration auditBruce Ashfield2024-11-071-0/+5
| | | | | | | | | | | | | | | | With the ability to tag raw configuration fragments as "hardware", there is a chance that badly behaved fragments throw warnings or cause other issues that are not applicable during development (or you understand the risk). Allow kernel configuration audit to be skipped if KMETA_AUDIT is not set (by default it is), to provide a flag for control over auditing. (From OE-Core rev: a39a1f7cf78ad1ca07438bce634a47e970f25047) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: allow cfg fragments to be specified as requiredBruce Ashfield2024-11-071-1/+4
| | | | | | | | | | | | | | | | | | | | When .scc files are used, a configuration fragment can be declared as "hardware" (required) or "non-hardware" (optional). By default the configuration audit only warns about hardware options. We can extend that default level of auditing to configuration fragments that are on the SRC_URI or in KERNEL_FEATURES by adding the ability to put a specifier after the fragment. i.e. KERNEL_FEATURES:append = 'hardening.config:required' This is particular useful for fragments that are outside of the kernel-cache (in a layer, in a kernel tree, etc) (From OE-Core rev: 0a84a3dd00543adffdef4fcf5381faab2984541e) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: Support in-tree config fragmentsPaul Barker2024-11-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | [This is currently an RFC as it depends on a separate patch to add support for config fragments with .config file extensions in yocto-kernel-tools: https://lists.yoctoproject.org/g/linux-yocto/message/14431] In Linux 6.8, the in-tree rv32_defconfig file for 32-bit RISC-V support was dropped in favour of a Makefile target which combines the RISC-V defconfig with a config fragment '32-bit.config'. So to build for 32-bit RISC-V using the in-tree configuration from an upstream kernel, we need to be able to enable this 32-bit config fragment. We can support this via KERNEL_FEATURES if we add the in-tree arch config directory (arch/${ARCH}/configs) to the search path. While we're here, let's also add the generic config directory (kernel/configs) to the search path so in-tree config fragments such as 'hardening.config' can be used. (From OE-Core rev: e4e50a9a93d606ba5fef8f10f1ec20deaed7ab9c) Signed-off-by: Paul Barker <paul@pbarker.dev> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: support tar.zst SDK_ARCHIVE_TYPEMing Liu2024-10-281-2/+10
| | | | | | | | | | | | | | | | | zst is much faster than the default xz, test result on my Precision 5680 machine: Installing a tar.xz SDK takes 37 seconds while tar.zst only takes 17 seconds. Let's introduce support for tar.zst. Also add a sanity check for supported archive types. (From OE-Core rev: 1d22562a89e91f19b818b8f9bc214be941303980) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes-global/license: Move functions to library codeJoshua Watt2024-10-251-7/+7
| | | | | | | | | | | | | | Moves several of the functions in license.bbclass to be library code New function dependencies were manually verified using bitbake-dumpsigs to ensure that bitbake identified the same dependencies even though they are now in library code (although the new function names mean that the task hashes still change) (From OE-Core rev: 0333e04e353991260c5f67a72f80f3ab9dcf526a) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic bootimg-efi.py: change UKI support from wic plugin to uki.bbclassMikko Rapeli2024-10-251-1/+2
| | | | | | | | | | | | | | | | | | | Remove custom wic plugin implementation and use systemd ukify reference implementation when generating UKI images. Fail if users still have create-unified-kernel-image in wic image config. uki.bbclass use is detected from IMAGE_CLASSES variable ("inherit uki" in image recipe) so export that to wic plugins. If UKI is used, then only generate a minimal loader config for systemd-boot which basically just sets a timeout. Also set 5 second timeout by default instead of failing if wic bootloader config is missing. Boot menu is generated at runtime based on UKI binaries found from ESP partition. (From OE-Core rev: 725fed6ea40c7443b5e0e69dc1dd9c38ac814c56) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>