summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
Commit message (Collapse)AuthorAgeFilesLines
* waf.bbclass: Print waf output on unparsable versionYoann Congal2024-02-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On AB runs of reproducible-meta-oe/Repro meta-oe/meta-oe, "waf --version" does not seem to contain the version but an error message with "RuntimeWarning: <something>" [0]. Since the actual output is not saved anywhere, it is quite hard to debug. This patch detects the problematic case and send it to the log where it will be seen and fixed. As a side-effect, this error will now only be a warning. Here is a partial backtrace for this (full back trace visible in [0]): NOTE: recipe mpv-0.35.1-r0: task do_configure: Started ERROR: mpv-0.35.1-r0 do_configure: Error executing a python function in exec_func_python() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_func_python() autogenerated', lineno: 2, function: <module> *** 0002:waf_preconfigure(d) File: '$TOP/meta/classes-recipe/waf.bbclass', lineno: 58, function: waf_preconfigure 0056: result = subprocess.check_output([python, wafbin, '--version'], cwd=subsrcdir, stderr=subprocess.STDOUT) 0057: version = result.decode('utf-8').split()[1] *** 0058: if bb.utils.vercmp_string_op(version, "1.8.7", ">="): [...] File: '$TOP/bitbake/lib/bb/utils.py', lineno: 91, function: split_version *** 0091: e = int(s.split(":")[0]) Exception: ValueError: invalid literal for int() with base 10: 'RuntimeWarning' [0]: https://autobuilder.yoctoproject.org/typhoon/#/builders/155/builds/11/steps/32/logs/stdio line 31883 (From OE-Core rev: 4a82c7ca74075b4c22be94891eecc24238bd0e65) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson: remove TMPDIR workaroundRoss Burton2024-02-151-3/+0
| | | | | | | | | | | | | | | | We had to export TMPDIR because Meson was writing temporary files into /tmp and then trying to run them, but some systems had /tmp mounted noexec. This is now solved upstream as of meson commit 1e182b5 (which was part of Meson 0.52.0), and these temporary files are written to the build tree instead. (From OE-Core rev: 1809d20f92dc0e4eff19cf081ca78a9f30deb611) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands: remove make_zimage_symlink_relative()Enrico Jörns2024-02-141-6/+0
| | | | | | | | | | | This does not seem to have any purpose anymore since the pkg_postinst from kernel.bbclass always creates relative symlinks from zImage to zImage-${KERNEL_VERSION}. (From OE-Core rev: 24ce7e5445962b9b3143036ecb3d44945082ce44) Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-arch: Simplify strip supportRichard Purdie2024-02-131-3/+2
| | | | | | | | | | | | | I think these options to strip were added to mirror the other kernel commandline options. In the strip case, it breaks code such as runstrip() in package.py since only a single command with no options is supported. For that reason I find it unlikely anyone is using this. Drop the problematic variables. (From OE-Core rev: 0d1c5971cafc1b65c000a10f7620e6ba22b53c91) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd.bbclass: Check for existence of the symlink tooPavel Zhukov2024-02-101-1/+1
| | | | | | | | | | | | | | | | | | | If the packages' service file is a link to parameterized service file provided by different package [1] then link is dangling link at do_package stage and os.path.exists(path) returns False even if the link exists. Replace os.path.exists with lexists to fix this issue. [1] An example: Package A provides myservice@.service Package B depends and rdepends on A and provides: myservice@B.service -> myservice@.service (From OE-Core rev: e2b638dcd6b7c51f7ee2cd4bc051d6b12e642d6c) Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* u-boot-sign:uboot-config: support to verify signed FIT imageJamin Lin2024-02-082-0/+13
| | | | | | | | | | | | | It does not verify the signed FIT image of kernel and uboot. To catch the unexpected errors as far as possible at the build time, add uboot-fit-check-sign tool which is provided by u-boot to verify the signed FIT image. (From OE-Core rev: 17d3c8315e7a7adbe27183e11e1b6d588c1a1784) Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign: Fix to install nonexistent dtb fileJamin Lin2024-02-081-1/+3
| | | | | | | | | | Add to check dtb file exist, then install it. (From OE-Core rev: d2d818534d9334213730c169f8b235af8a794b33) Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign: set load address and entrypointJamin Lin2024-02-081-2/+5
| | | | | | | | | | | | | | | | | | | | | According to the design of uboot-sign.bbclass and kernel-fitimage.bbclass, both of them use an UBOOT_LOADADDRESS variable to set the load address of kernel and u-boot image and use an UBOOT_ENTRYPOINT variable to set the entry address of kernel and u-boot image. However, users may want to set the different load address of u-boot and kernel image. Therefore, adds UBOOT_FIT_UBOOT_LOADADDRESS and UBOOT_FIT_UBOOT_ENTRYPOINT variables to set the load address and entry point of u-boot image, respectively. The value of UBOOT_FIT_UBOOT_ENTRYPOINT is UBOOT_LOADADDRESS by default. The value of UBOOT_FIT_UBOOT_ENTRYPOINT is UBOOT_ENTRYPOINT by default. (From OE-Core rev: 2060691a56b45f746efdd04ccdae3fb74df60cb5) Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest.bbclass: Handle the case when Makefile does not exist in ↵Khem Raj2024-02-081-3/+3
| | | | | | | | | | | | | | | | do_install_ptest_base Some recipes e.g. expant generate ninja files and no Makefile may exist, therefore grep -q would fail on a non-existent file, we just need the return code to decide if intall-ptest target should be run or not. Fixes errors like | grep: Makefile: No such file or directory (From OE-Core rev: 01f3966d6bf2442a28b460b67bfc02241cd9ddc2) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: retrieve ptests directory when ptests failAlexis Lothoré2024-02-081-1/+4
| | | | | | | | | | | | | | | | TESTIMAGE_FAILED_QA_ARTIFACTS is set with a default, minimal list of files to retrieve whenever a runtime test fails. Add ptests directory to the list so we can get ptests artifacts (eg: logs) whenever a ptest fails. By appending the ptest directory with the multiconfig component in the path, only failing ptests will lead to corresponding ptest artifacts retrieval, instead of all ptests artifacts retrieval. While doing this addition, reinforce default value using "=" operator to make sure to get the default list in any case. (From OE-Core rev: 9357ab6c47f0a0a7000cb18358bc9775fd54e1f7) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: use --installAdrian Freihofer2024-02-021-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | Since version 3.15 CMake provides a command-line signature to install an already-generated project binary tree. This may be used after building a project to run installation without using the generated build system or the native build tool. This is a small improvement, for regular bitbake calls. CMake does not check the dependencies again which is expected to be faster. The main motivation for this change is using CMake from an SDK context. With this change it is possible to initiate the compile step from an IDE and later on initiating the install step via bitbake which runs the install step on pseudo. This is also what the meson.bbclass already does with the --no-rebuild option. (From OE-Core rev: 72388593d62d45d54790710b9665eb8f13897c8c) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native.bbclass: base_libdir unique from libdirWilliam Hauser2024-01-261-1/+1
| | | | | | | | | | | | Use STAGING_BASE_LIBDIR_NATIVE for the value of base_libdir instead of STAGING_LIBDIR_NATIVE. This will avoid conflicts between the two directories. (From OE-Core rev: 2d7e3d49378257bc02513275b988c8b194e9fd5a) Signed-off-by: William Hauser <william.hauser@meraki.net> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands.bbclass: ignore comment mismatch in systemd_user_checkChen Qi2024-01-261-2/+1
| | | | | | | | | | | | | | | | | | The check was forcing every field to be identical, this is too strict. For example, if the comment differs, there's really no impact. For example, root user's comment is 'root' in passwd, and it's 'Super User' in sysusers.d/basic.conf. Such difference is not worth a warning. In fact, previous codes use 'lower()' to avoid warning between 'nobody' and 'Nobody', and what's more, another patch puts its own basic.conf.in in systemd's SRC_URI, but it changes 'Super User' to 'root'. Such changes are all unnecessary. We should just ignore comment mismatch. (From OE-Core rev: 2a700c3102b2233e71a157f0f88ed88496fa9fbf) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: add Darwin supportEtienne Cordonnier2024-01-211-0/+2
| | | | | | | | | | | | This was initially added by https://git.yoctoproject.org/meta-darwin/commit/?id=97a84e083d0c2812e44231d48fb478e9a9cfac79 to the meta-darwin repository, however having it directly in openembedded-core will make the maintenance of meta-darwin easier. (From OE-Core rev: 8ded801178376a02125e653833d8ff062f80457f) Signed-off-by: Dominik Schnitzer <dominik@snap.com> Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python: update 3.11.5 -> 3.12.1Alexander Kanavin2024-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop distutils and smtpd modules from packaging, as both are gone in 3.12. Rebase: 0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch (drop setup.py chunk as the file is gone) Drop patches: 0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch (setup.py gone, lib/termcap not mentioned anywhere else) 0001-Don-t-search-system-for-headers-libraries.patch (setup.py gone, usr/lib64 not mentioned anywhere else) 0001-Makefile-do-not-compile-.pyc-in-parallel.patch (replaced with COMPILEALL_OPTS= in EXTRA_OEMAKE) 0001-setup.py-Do-not-detect-multiarch-paths-when-cross-co.patch (setup.py gone, add_multiarch_paths not mentioned anywhere else) 0017-setup.py-do-not-report-missing-dependencies-for-disa.patch (has been superseded by Setup.local tweak in do_configure:prepend) 12-distutils-prefix-is-inside-staging-area.patch (distutils has been removed upstream, so this old, unplesant hack can be finally dropped) avoid_warning_about_tkinter.patch (setup.py gone, tkinter detection logic performed in configure.ac) (From OE-Core rev: 716d82352545d3667a658b69d65d6127678dd150) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gobject-introspection-data.bbclass: move do_compile() tweak to g-i classAlexander Kanavin2024-01-192-5/+5
| | | | | | | | | | g-i-data class is strictly for setting GI_DATA_ENABLED. Any build tweaks should be in g-i class. (From OE-Core rev: 49988a49f7c9a19aa2a547d49369996e3e20d452) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/recipes: Switch to use inherit_deferRichard Purdie2024-01-188-10/+12
| | | | | | | | | | | | | | | | | Now that bitbake supports the use of inherit_defer, switch all conditional (variable based) inherits to use this instead. This leads to more a more deterministic user experience since there is no longer an immediate expansion and later changes to the variables in question (e.g. a bbappend) are accounted for. This patch tries to ensure the behaviour before/after remains as unchanged as it reasonably can, e.g. by always inherting populate_sdk_base. native and nativesdk continue to need to be inherited last, hence being used with inherit_defer in a handful of very specific cases. (From OE-Core rev: 451363438d38bd4552d5bcec4a92332f5819a5d4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands: Try and improve ordering constraintsRichard Purdie2024-01-181-9/+4
| | | | | | | | | | | | The current code is in race to see who can set things last. This isn't scalable or sustainable and problemtic in the face of inherit ordering changes. Move the ordering issue into the actual code execution, which isn't ideal but the best of several bad options and at least lets us drop the anonymous python. (From OE-Core rev: 0ffff2c1f80a9b79b133d787764bab164d9abd70) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs: Fix MULTILIB_RE_ALLOW to be inherit order independentRichard Purdie2024-01-182-2/+2
| | | | | | | | | | | | This variable is only used by the ipk backend with multilibs. In order to make it work correctly regardless of inherit order, change the string to be space delimeted, set using += and add in the regex '|' sperator at the end of processing. (From OE-Core rev: 72befdb12568fbc642022ef0a23b269c5b37a638) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* allarch: Fix allarch corner caseRichard Purdie2024-01-181-2/+2
| | | | | | | | | | | | | Most of the allarch code is conditional and only set if the recipe remains marked as allarch. The qemu wrapper handling is not handled in the same way however and is unconditional. Move the code to some slightly uglier inline python to allow it to be conditional and match the way the rest of the code works. (From OE-Core rev: dfd704f1741dccd9a85338c5d45dee4be079064d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* siteinfo.bbclass: add support for darwin19 and darwin21Etienne Cordonnier2024-01-151-0/+4
| | | | | | | | | | | | Ported from the meta-darwin layer which supports darwin19 (honister version) and darwin21 (kirkstone version). (From OE-Core rev: ec4de080691717bf56170f7e39d9fb5bb2d2b2d6) Signed-off-by: Dominik Schnitzer <dominik@snap.com> Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* xmlcatalog: limit to native recipes onlyRoss Burton2024-01-121-2/+6
| | | | | | | | | | | | | The sysroot postinst is explicitly native-only, so use more overrides to ensure that we don't try to run them outside of native recipes. Also add a comment so this doesn't get forgotten again, and link to the related bug. (From OE-Core rev: 38a5fc5dbb33fd3314f0a98c861a842342add064) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson: use pkg-config in the cross filesRoss Burton2024-01-121-2/+2
| | | | | | | | | | | | >From Meson 1.3.0, the "pkgconfig" entry is deprecated and "pkg-config" should be used instead[1]. [1] https://mesonbuild.com/Release-notes-for-1-3-0.html#machine-files-pkgconfig-field-deprecated-and-replaced-by-pkgconfig (From OE-Core rev: d64b307891422e290bbe821d4303b3af526bbe17) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gtk-doc: don't manually call gtkdocizeRoss Burton2024-01-121-10/+0
| | | | | | | | | | | | | | | | | | | The autoreconf call will now call gtkdocize if needed, so we don't need to run it manually here. This obsoletes GTKDOC_DOCDIR. If this is needed then the replacement is to ensure that the configure.ac has a call to GTK_DOC_CHECK which passes --docdir. For example, this is the change required for kmod: -GTK_DOC_CHECK([1.14],[--flavour no-tmpl-flat]) +GTK_DOC_CHECK([1.14],[--flavour no-tmpl-flat --docdir libkmod/docs]) (From OE-Core rev: 57b0201bfccb4552893d72dc4d76eaa855618563) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gtk-doc: remove obsolete logicRoss Burton2024-01-121-9/+2
| | | | | | | | | | | | | This manual disabling of gtk-doc for autotools and meson in native and nativesdk builds is replicating logic above for target builds. Instead, use one assignment for all builds, as we explicitly disable gtk-doc in native builds and it can be useful in nativesdk. (From OE-Core rev: e13b019c61d86f1add32f23795f6e71110c6a70c) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: don't exclude gtkdocizeRoss Burton2024-01-121-1/+1
| | | | | | | | | | gtkdocize can now be ran successfully from autoreconf, so there's no need to exclude it and run it manually. (From OE-Core rev: 891ec38d4c5cc5ac7bc34938276261ebd6f6d54e) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: append to EXTRA_AUTORECONFRoss Burton2024-01-121-1/+1
| | | | | | | | | | Inherit order may mean that this class is inherited after assignments, so extend instead of assign EXTRA_AUTORECONF. (From OE-Core rev: 83958b4bdea90a0bb9331d33c2f266900a108fee) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemu.bbclass: fix a python TypeErrorMing Liu2024-01-091-1/+1
| | | | | | | | | | | | | | QEMU_OPTIONS can be empty which will trigger a exception TypeError: | can only concatenate str (not "NoneType") to str. Fix it by setting a empty string. ALso removed two useless blanks. (From OE-Core rev: b619197bd52a4a99a9989e7ea6fb7032415b1e42) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative-tarball.xz - reproducibility fixRobert Berger2023-12-241-1/+1
| | | | | | | | | | | | added --clamp-mtime --mtime to the tar command see: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15148 (From OE-Core rev: 2ef7c63871ab4fb62a9cea45a23a78bf9d541e4a) Signed-off-by: Robert Berger <Robert.Berger@ReliableEmbeddedSystems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-live.bbclass: LIVE_ROOTFS_TYPE support compressionLudovic Jozeau2023-12-231-1/+1
| | | | | | | | | | | | | | | | | | | | The task for fstypes with compression is the same as the task for the uncompressed fstypes, e.g. when adding tar.xz to `IMAGE_FSTYPES`, it will be included into the do_image_tar task and not creating a separate do_image_tar.xz task. This commit fixes `LIVE_ROOTFS_TYPE` with compressed fstypes by depending on the actual task instead of the non-existent do_image_<fstype>.<compression> task. Fixes [YOCTO #15331] (From OE-Core rev: 67c507e3d42e52a6d452c4a453eeaf7f2e2d68d6) Signed-off-by: Ludovic Jozeau <ludovic.jozeau@smile.fr> Reviewed-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* nativesdk: don't unset MACHINE_FEATURES, let machine-sdk/ set itRoss Burton2023-12-231-1/+1
| | | | | | | | | | | | | | | | | | | There is actually a use for nativesdk MACHINE_FEATURES; for example qemu-usermode being supported, as this is needed to build profile-guided optimised code. We shouldn't use the target MACHINE_FEATURES for this because the target and the SDK can be entirely different, so instead set the MACHINE_FEATURES in nativesdk.bbclass to SDK_MACHINE_FEATURES (which defaults to "") and let the conf/machine-sdk/*.conf files set that as appropriate. (From OE-Core rev: 14571764b7e046507f81bbe589a9f42c5b16665a) Signed-off-by: Ross Burton <ross.burton@arm.com> Link: https://lore.kernel.org/r/20231221170159.1995650-2-ross.burton@arm.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* nativesdk: ensure features don't get backfilledRoss Burton2023-12-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nativesdk aims to run in a slightly different environment than the target build, so it resets MACHINE_FEATURES and filters DISTRO_FEATURES with DISTRO_FEATURES_NATIVESDK. However, feature backfill happens _after_ these operations: $ bitbake-getvar -r nativesdk-glib-2.0 MACHINE_FEATURES # # $MACHINE_FEATURES [5 operations] # set /home/ross/Yocto/poky/meta/conf/machine/include/qemu.inc:14 # "alsa bluetooth usbgadget screen vfat" # set /home/ross/Yocto/poky/meta/conf/documentation.conf:284 # [doc] "Specifies the list of hardware features the MACHINE supports." # set? /home/ross/Yocto/poky/meta/conf/bitbake.conf:893 # "" # set /home/ross/Yocto/poky/meta/classes-recipe/nativesdk.bbclass:18 # "" # append utils.py:132 [features_backfill] # " rtc qemu-usermode" # pre-expansion value: # " rtc qemu-usermode" MACHINE_FEATURES=" rtc qemu-usermode" This is not intentional nor desired as the target machine features are unrelated to the nativesdk environment. (From OE-Core rev: f560ac0a5ccced02b84df337f0f26209cd4b6474) Signed-off-by: Ross Burton <ross.burton@arm.com> Link: https://lore.kernel.org/r/20231221170159.1995650-1-ross.burton@arm.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ipk: Switch to using zstd compressionJoshua Watt2023-12-231-3/+1
| | | | | | | | | | | | | | | | | | | | | Converts IPK package generation to use zstd instead of xz. zstd has a much larger compression/speed tradeoff range allowing users to choose what suits them best, and fast decompression speeds. It also continues to support parallel compression as xz did. A new variable called ZSTD_DEFAULTS is provided to set the defaults for places that want to use zstd for compression; the zst image conversion command is also modified to use this. Finally, in order for this to function properly, opkg must include zstd support, so it is enabled all the time with no PACKAGECONFIG to turn it off. (From OE-Core rev: 1bc3e9bbaa670b6128c74c76b4b5264e60ce3463) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Drop target_dumper and most of monitor_dumperRichard Purdie2023-12-201-16/+0
| | | | | | | | | | | | | | | | The target_dumper code is basically broken. It has been reading binary files over the text base serial communication and runs at every command failure which makes no sense. Each run might overwrite files from the previous run and the output appears corrupted due to confusion from the binary data. For now, remove the commands and the target dumper code as the command and execution point are problematic. Also remove the same pieces of the monitor code but leave the command list since in theory this can be moved to a more useful place in the code. (From OE-Core rev: a24d787987dccc95fdd95b7e85bf525a1c55b285) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Exclude wtmp from target-dumper commandsRichard Purdie2023-12-201-1/+1
| | | | | | | | | | | | wtmp is filled with binary data which the run_serial command can't cope with. Catting this results in confusion of the serial interface and potentially large backlogs of data in the buffers which can hang qemu. Exclude the problematic files from the command. (From OE-Core rev: 599ac08a6f6fb3f6a89a897c8e06367c63c2f979) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes-recipe: add python_maturin.bbclassTim Orling2023-12-171-0/+17
| | | | | | | | | | maturin is a replacement for setuptools_rust and another "backend" for building python wheels. (From OE-Core rev: 1c2f9d8f18ef8154573142638ca10a8f88e43419) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake-qemu.bbclass: make it more usableAdrian Freihofer2023-12-131-8/+12
| | | | | | | | | | | | | Make the cmake-qemu.bbclass more usable: - Drop the CMAKE_EXEWRAPPER_ENABLED variable (which does not make much sense without the second commit of the original patch series). - Inherit qemu to make the cmake-qemu a drop in replacement for cmake. (From OE-Core rev: 5cb05ca6542aa6239e0371dd9df4705b168d245e) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo: Add CARGO_LOCK_PATH for path to Cargo.lockAlex Kiernan2023-12-091-2/+4
| | | | | | | | | | | When building a workspace enabled project, the Cargo.lock is found at the root of the project, not alongside the Cargo.toml. Expose CARGO_LOCK_PATH so it can be explicitly configured. (From OE-Core rev: 30159f88a97c73d234f69c5800ba2adb0e26ad44) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: cargo: Convert single-valued variables to weak defaultsAlex Kiernan2023-12-092-5/+5
| | | | | | | | | | All of these variables are single-valued, so we can use weak-defaults for them and only see the final assignment after parsing. (From OE-Core rev: 3221e82a35a149fdf38fe66dcd5de758ac1b9185) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo: Move CARGO_MANIFEST_PATH/CARGO_SRC_DIR to cargo_commonAlex Kiernan2023-12-092-7/+7
| | | | | | | | | | cargo_common_do_configure uses CARGO_MANIFEST_PATH (which depends on CARGO_SRC_DIR), but their definition was in cargo.bbclass. (From OE-Core rev: 740374a13ad5359767b421666decf50c158ea0df) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo: Rename MANIFEST_PATH -> CARGO_MANIFEST_PATHAlex Kiernan2023-12-083-4/+4
| | | | | | | | | | | This variable is a piece of recipe configurable interface, scope it with the class name to make that clear. (From OE-Core rev: 0101de25832fbed3d08cd522512784133c628cad) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common.bbclass: Define rust arch for x32 platformsKhem Raj2023-12-021-0/+2
| | | | | | | | (From OE-Core rev: 02d6c89ca2e72e95d093282f5626e607060da588) 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>
* cmake-qemu.bbclass: support qemu for cmakeAdrian Freihofer2023-11-301-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | Define the CMAKE_CROSSCOMPILING_EMULATOR variable similar to what the meson bbclass does. This allows for example to execute cross compilied unit tests on the build machine when using an SDK. CMAKE_CROSSCOMPILING_EMULATOR is a semi colon separated list of paramters which could directly handle the -L and the -E parameters. Creating a wrapper script is not absolutely mandatory. But anyway lets do it similar to what the meson.bbclass does and also disable pseudo. Further information can be found in the camke documentation in the CMAKE_CROSSCOMPILING_EMULATOR section. Keep the code optional, as the core does not need this function and does not intend to use it in the future. [YOCTO #15214] (From OE-Core rev: b197d0b0de1fa5f295d32dbda2eb815ca0153299) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-arch: use ccache only for compilerJavier Tia2023-11-221-3/+3
| | | | | | | | | | | | Attempting to use it with other tools is not beneficial, only with the compiler. Confirmation from ccache's maintainer [1]. [1] https://github.com/ccache/ccache/discussions/1346#discussioncomment-7616180 (From OE-Core rev: 47fa8d81083f1ef594f8fe6fcab3e227e9607b3f) Signed-off-by: Javier Tia <javier.tia@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: drop PE, PR from /usr/src/debug pathsMartin Jansa2023-11-201-1/+1
| | | | | | | | (From OE-Core rev: e4931b1d6f147fc7ced080e30c63f0aaf0d1e7ff) Signed-off-by: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf: Drop oldincludedirRichard Purdie2023-11-201-1/+1
| | | | | | | | | | | | | | | | | | | Autoconf defines this as: "The directory for installing C header files for non-GCC compilers." Whilst this is something autoconf does allow changing, I find it hard to believe it has much use in the wild now and that headers don't get split like this in reality, it would probably only be useful on really old unixes.. The values are the same in our configuration anyway. Drop the value and just use includedir everywhere. (From OE-Core rev: 506c91cbc6a604a84e37e53ccff430436369802e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: go-mod: do not pack go mod cacheStefan Herbrechtsmeier2023-11-201-0/+4
| | | | | | | | | | | Clean go module cache from builddir to prevent it of beeing packed. (From OE-Core rev: 328bea56dec8f83b5c118f567e122510f9243087) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sed -i destroys symlinksJoakim Tjernlund2023-11-201-2/+2
| | | | | | | | | | | | If /etc/passwd is a symlink, sed -i on same file will replace the symlink with a new file. Prevent that by adding --follow-symlinks option to sed (From OE-Core rev: 6ec004b2e7b4342465af8e5e6cc66041834821a0) Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gnomebase.bbclass: Use meson as default buildsystemMarkus Volk2023-11-131-1/+1
| | | | | | | | | | | | | | | The vast majority of gnome recipes uses meson. Set it as default and override the few recipes that still use autotools. This way we can remove a lot of lines in meta-oe and more important it would not be needed to explicitly set GNOMEBASEBUILDCLASS = "meson" for newly created gnome recipe anymore. (From OE-Core rev: 8b061ea36f8b94b482c5867fe2ba7213288a5aa3) Signed-off-by: Markus Volk <f_l_k@t-online.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: improve metadata patchingBruce Ashfield2023-11-091-5/+25
| | | | | | | | | | | | | | | | | | | | The ability to patch the kernel-yocto metadata was added to support debug and easier test cycles on kernel-cache provided fragments. As such, it was very simple and has limited functionality. That being said, it is an available feature and can be improved to handle patches that fail to apply. The main kernel patching is already handled by the kern-tools, so we extend the patching of the meta-data to same tools and inherit more functinality from the scripts. [YOCTO #15266] (From OE-Core rev: e867addd6c2f508f7a95e72222e750d37f3d19d8) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>