summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
Commit message (Collapse)AuthorAgeFilesLines
* fontcache.bbclass: avoid native recipes depending on target fontconfigMartin Jansa2023-10-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | * this caused liberation-font-native to depend on TUNE_PKGARCH target fontconfig because ${MLPREFIX}fontconfig-utils is added to RDEPENDS in anonymous python * the dependency tree for liberation-font-native got much shorter (just quilt-native and liberation-font-native itself): 2 after/pn-buildlist 78 before/pn-buildlist * fixes graphviz-native signature issue as well as detected with sstate-diff-machines.sh $ bitbake-diffsigs \ sstate-after/mako/x86_64-linux/graphviz-native/8.1.0.do_populate_sysroot.sigdata.184d4fd355f1e7a2d7d929ef4b5f62b94e2071df9dd674b2067ec21bfc7bcc1b \ sstate-after/qemux86-64/x86_64-linux/graphviz-native/8.1.0.do_populate_sysroot.sigdata.35da674d2dbc275bac02869dfce4165466315023910bdef65a6026e2cb942a46 Hash for task dependency liberation-fonts-native:do_populate_sysroot changed from 310d3da04ad9abf8ee99997e53d1ffa71c2b7d9d60fb0e8de85171a9ab6a77d3 to 048420ad1410c2b8d95498fc3c11681207335a2c722836f1f3e683cc449814da (From OE-Core rev: 7956db86a7377bc3afefcbbb6f92aae9161df715) Signed-off-by: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 998d4da9d89aea77dc0f2cbac60ea64258331756) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* uboot-extlinux-config.bbclass: fix missed override syntax migrationQuentin Schulz2023-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | uboot-extlinux-config allows to specify multiple "labels" (entries in a menu, à-la grub) and each of them have their own values for some fields. Each "base" variable, e.g. UBOOT_EXTLINUX_FDT can be overridden for each label. This is done via the OVERRIDES mechanism based on the label name, e.g. UBOOT_EXTLINUX_FDT:linux if linux is a label. However, OVERRIDES doesn't contain the label globally because it's only necessary in one task. Therefore, the OVERRIDES itself is modified within the task. This means that the sigdata will not be told the dependency on UBOOT_EXTLINUX_FDT:linux, because it cannot know about it. For this reason, we need to explicitly specify which variables this task depends on via vardeps varflag for the task. This was done in the past, but we missed updating it during the override syntax migration so the cache wouldn't get invalidated if someone modifies UBOOT_EXTLINUX_FDT:linux from a configuration file or a bbappend for example. Let's fix this by migrating it to the new syntax. (From OE-Core rev: 585544b99c62d3e4edebd7c4e9225f70069a5176) Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b4dd9d873508128adbbf5ff6cf0a3df3d2ffbcf6) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel.bbclass: Add force flag to rm callsRyan Eatmon2023-10-041-2/+2
| | | | | | | | | | | | | | The latest 6.5 kernels do not appear to create the source file in ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source so the recipe errors out when trying to remove it. Simple fix is to add the -f (force) flag to the call. (From OE-Core rev: f4422831cce168d0b113fb47eebbb480d157cebb) Signed-off-by: Ryan Eatmon <reatmon@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2e669bf797b15d803e7d6a700e449bdc467a4bcc) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* cml1: Fix KCONFIG_CONFIG_COMMAND not conveyed fully in do_menuconfigJaeyoon Jung2023-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Variable overrides in KCONFIG_CONFIG_COMMAND do not work as expected due to double quote mismatches. The issue is reproducible in an environment where gold is the default linker. Below is an example snippet of run.do_terminal generated by do_menuconfig. do_terminal() { exec sh -c "make menuconfig CC="aarch64-webos-linux-gcc ..." LD="aarch64-webos-linux-ld.bfd ..." ... } Although LD override is set to bfd correctly, it is not passed to make and make menuconfig ends up with messages like: | gold linker is not supported as it is not capable of linking the kernel proper. | scripts/Kconfig.include:56: Sorry, this linker is not supported. (From OE-Core rev: 9c483765db762dbe8020423c8778518612b7e5f7) (From OE-Core rev: 75f8485d7862b08e2f96f919e992d203df6c8d9c) Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d4664d2b7974354e73d891762ebb2c8a12d62438) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* cmake.bbclass: fix allarch override syntaxChen Qi2023-09-201-4/+4
| | | | | | | | | | | | The override syntax should be ":allarch" instead of "_allarch". (From OE-Core rev: 72d3ecb22fea59d2520997b3f0a0651557d69ae7) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit bea74c9942a3bb4f71aca0f722b4a7306ae52fb4) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel: don't fail if Modules.symvers doesn't existJoel Stanley2023-08-181-2/+2
| | | | | | | | | | | | | | | Kernels that do not use modules do not have the Modules.symvers file, which causes the previous one-liner to fail. Invert the logic so that the absence of the Modules.symvers is a passing situation but we still get failure checking on the install operation. (From OE-Core rev: 6fff6ce35864cfef70ffd10db3b7d5f090dd3f62) Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 856c916ffbf3438d8cf5d8bed344473bde03b56e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel: Fix path comparison in kernel staging dir symlinkingStaffan Rydén2023-08-151-3/+4
| | | | | | | | | | | | | | | | | | | | Due to an oversight in the do_symlink_kernsrc function, the path comparison between "S" and "STAGING_KERNEL_DIR" is broken. The code obtains both variables, but modifies the local copy of "S" before comparing them, causing the comparison to always return false. This can cause the build to fail when the EXTERNALSRC flag is enabled, since the code will try to create a symlink even if one already exists. This patch resolves the issue by comparing the variables before they are modified. (From OE-Core rev: 76ca96ebde8c318e32d4bf65714a6241965b0b8f) Signed-off-by: Staffan Rydén <staffan.ryden@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit afd2038ef8a66a5e6433be31a14e1eb0d9f9a1d3) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* Revert "rootfs-postcommands.bbclass: add post func remove_unused_dnf_log_lock"Alexander Kanavin2023-08-151-7/+0
| | | | | | | | | | | | | This was not well researched or explained, and obscures a problem elsewhere: if dnf leaves lock files around, the problem should be fixed at the source, and not in an after-the-fact function. (From OE-Core rev: d38e40661acfbd84197a7731f0dd02d16fba7c59) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 49bad18012a4079f0dbfe6c541a46ec508940f28) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* rootfs_rpm: don't depend on opkg-native for update-alternativesRoss Burton2023-08-011-3/+1
| | | | | | | | | | | | | | | opkg-native hasn't provided update-alternatives since 2014[1] so this is the wrong dependency, and image.bbclass depends on the virtual provider virtual/update-alternatives-native already. [1] oe-core 1e2c38ce13f8e4b25d8656d237343380cbc970aa (From OE-Core rev: 49be8045a6595cb98413519d2e65e94345f026c1) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 51004376be9a6b9a4c38585d14d2516d90138319) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* meson.bbclass: Point to llvm-config from native sysrootKhem Raj2023-08-011-0/+1
| | | | | | | | | | | | | | | Default search in meson would grok /usr/bin for llvm-config and if found will use it, which might add wrong paths into cflags/ldflags, since we depend on llvm-native when building gallium support ( thats when llvm-config is effective), its better to point llvm-config into native sysroot so it can add correct paths into compiler/linker cmdline (From OE-Core rev: aa91fb2f0af1a32809ab1755598da5986b2dd06d) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit cc73360b9728812ed6123e30559b77d8e89cc21c) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* uboot-extlinux-config.bbclass: fix old override syntax in commentQuentin Schulz2023-08-011-4/+4
| | | | | | | | | | | | | | | | | The comment specifies how to use the variables but uses the older and now unsupported override syntax. Let's update to match the newer syntax. Cc: Quentin Schulz <foss+yocto@0leil.net> (From OE-Core rev: 0a381eea4d50ff1c6e7c7d0d4df62eb581454b48) (From OE-Core rev: 0bbafc8b4d0c401a2af7c4b80e86d3e3fe01bed5) Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit bb64f3fed29b9532e6ddc9a2ba0283d373622d87) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel-module-split add systemd modulesloaddir and modprobedir configJose Quaresma2023-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Because busybox doesn't support other path than /etc [1] we can't change the default path unconditionally so change it only for systemd. The modules-load.d [2] - Configure kernel modules to load at boot should install their configuration files in /usr/lib/modules-load.d. The modprobe.d [3] - Configuration directory for modprobe should install their configuration files in /lib/modprobe.d [1] https://git.busybox.net/busybox/tree/modutils/modprobe.c?id=669c40ed8ebf480c95ce36135104e474e361a7e6#n658 [2] https://man7.org/linux/man-pages/man5/modules-load.d.5.html [3] https://man7.org/linux/man-pages/man5/modprobe.d.5.html [YOCTO #12212] https://bugzilla.yoctoproject.org/show_bug.cgi?id=12212 (From OE-Core rev: 174b446b7c8167934b13ec679407093924d324e3) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 075c309bd28bc8e19a82569a2e75da14fa5795dd) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* testimage/oeqa: Drop testimage_dump_host functionalityThomas Roos2023-07-202-24/+2
| | | | | | | | | | | | | | | | | | | The intent behind these functions was to dump the system state when issues occured but it has never really worked as we'd planned. Regular monitoring as the build runs has largely replaced this as that allows a trend to be seen rather than a spot value which was never really useful. The code is bitrotting and not functioning correctly so drop it. [YOCTO #13872] RP: Reword commit message (From OE-Core rev: 8d1bc34cffdd9f054e51db4e880747c79bf834fe) Signed-off-by: Thomas Roos <throos@amazon.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit dea37ba49a236029da73d5cfbfc069bffc38b508) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel-module-split: make autoload and probeconf distribution specificJose Quaresma2023-07-201-5/+8
| | | | | | | | | | | | | | | | | | | | | | The modules-load.d [1] - Configure kernel modules to load at boot should install their configuration files in /usr/lib/modules-load.d. The modprobe.d [2] - Configuration directory for modprobe should install their configuration files in /lib/modprobe.d [1] https://man7.org/linux/man-pages/man5/modules-load.d.5.html [2] https://man7.org/linux/man-pages/man5/modprobe.d.5.html [YOCTO #12212] https://bugzilla.yoctoproject.org/show_bug.cgi?id=12212 CC: Ola x Nilsson <Ola.x.Nilsson@axis.com> CC: Peter Kjellerstedt <peter.kjellerstedt@axis.com> (From OE-Core rev: 6725922eadd093e8ee6a41898b596b5563eab0f3) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 347830e67c5ad72b4da165d644e3add69c20acb8) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel-module-split: use context manager to open filesJose Quaresma2023-07-201-13/+10
| | | | | | | | | (From OE-Core rev: 8fbf05a91667a054083b45632c1f8afb6b8e1367) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit fc9c9471952042395bb405e7f6cf507bb2b72f31) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel-module-split: install config modules directories only when they are ↵Jose Quaresma2023-07-201-22/+13
| | | | | | | | | | | | | | | needed Instaed of allways create the directories and removing it at the if they are not used, we can just do it when there are modules configuration to be created. So the best thing to do is install the directories only when necessary. (From OE-Core rev: 455baf41550431c22047fe718c8eaae71924b23f) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 71460993f350bca3d5a22115fd5551696f955c9f) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel: config modules directories are handled by kernel-module-splitJose Quaresma2023-07-201-2/+0
| | | | | | | | | (From OE-Core rev: e5b478fb435c96f6d6e8c2a93d6c54df996957e1) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 38dc75c0e5eb7427ffcf201113fb45e0d5dad453) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* rust-common.bbclass: move musl-specific linking fix from rust-source.incAlexander Kanavin2023-07-201-0/+4
| | | | | | | | | | | | | This needs to be done for any item that is linked under rustc, and not just rust itself. Latest python-cryptography exposes the issue. (From OE-Core rev: 967d847a9815df43d0c92ca61cc544e1fe5dcc03) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d3811228747590ea06e8d68be4785d45ec9c478f) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* cargo.bbclass: set up cargo environment in common do_compileAlexander Kanavin2023-07-202-1/+4
| | | | | | | | | | | | | | | | | cargo_do_compile runs only if the recipe is built using cargo as the top level tool. Some recipes hide usage of cargo inside setuptools (or autoconf) and use do_compile definitions specific to those, and so the environment isn't properly set up. This was exposed by latest versions of python3-cryptography. (From OE-Core rev: a1946efdbec608d47f9e992c1b5cf3c671a204fc) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9f4ff643a028d7f5670d80861f2ce19ca2d90faa) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* rootfs-postcommands.bbclass: add post func remove_unused_dnf_log_lockChangqing Li2023-07-071-0/+7
| | | | | | | | | | | | Remove log_lock.pid which maybe created during do_rootfs. In commit [dnf: only write the log lock to root for native dnf], native dnf changed to write log lock to root, and target dnf still use /var/log, so log_lock.pid need to be removed post do_rootfs. (From OE-Core rev: 595fbe4c9ad25e52e88d7bcf1d1864fe5ec324a5) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* image_types: Fix reproducible builds for initramfs and UKI imgFrieder Paape2023-06-301-2/+3
| | | | | | | | | | | | | | | | | | | | | I've encountered issues reproducing initramfs and UKI image builds, which will be fixed with this patch. 1. initramfs There's a symbolic link to /sbin/init, which is appended to the cpio archive after creation. The links timestamp needs to be static and the cpio append command needs the '--reproducible' flag to produce deterministic outcomes. 2. Unified Kernel Image '--preserve-dates' is required for a static 'Time/Date' entry. I've added '--enable-deterministic-archives' although in my case this didn't change anything. (From OE-Core rev: 7bf9463665c46e331f40f9ca4f04733d14f9ab44) Signed-off-by: Frieder Paape <frieder@konvera.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit fd027729bafb4e085ba0949e38e724f3a8cad102) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* cmake.bbclass: do not search host paths for find_program()Chen Qi2023-06-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM[1] controls the search behavior of find_program(). When this variable's value was first used in OE, it was deliberately set to BOTH to allow searching of host tools. This is to ensure the necessary tools from host could be used. The downside is that the configure behavior may differ on different host environments. Later, this cmake.bbclass was added the ability to search tools under the HOSTTOOLS_DIR. This means we no longer needs cmake to search the host paths. So we remove the class-native setting of BOTH. [1] https://cmake.org/cmake/help/latest/variable/CMAKE_FIND_ROOT_PATH_MODE_PROGRAM.html (From OE-Core rev: 1e2866eb0ce0c10a2668fbd66bc28526eec30f4d) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f4ea12f6635125ee793f4dd801c538c0186f9dc3) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel: don't force PAHOLE=falseBruce Ashfield2023-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | If a specific kernel provider or configuration wants to enable BTF and pahole analysis, it isn't currently possible due to the explicit definition to false in the base kernel build arguments. pahole is now detected by the kernel built itself, so unless pahole-native is enabled, the result is the same. If a kernel does require an explicit disable of pahole, it is better to carry PAHOLE=false in those specific recipes. (From OE-Core rev: c6f13dcb3e04655c8076c1100ceada760ffb1ddb) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b1e4851a36ed47ce6ba880a49264b9a57c78cf4f) Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* image-live.bbclass: respect IMAGE_MACHINE_SUFFIXMartin Jansa2023-06-141-1/+1
| | | | | | | | | | | | | | * fixes: ERROR: core-image-minimal-1.0-r0 do_bootimg: /OE/build/poky/build/tmp/deploy/images/qemux86-64/core-image-minimal-initramfs-qemux86-64.cpio.gz is invalid. initrd image creation failed. ERROR: core-image-minimal-1.0-r0 do_bootimg: ExecutionError('/OE/build/poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/run.build_hddimg.2001892', 1, None, None) when IMAGE_MACHINE_SUFFIX is set to empty in local.conf (From OE-Core rev: ac1977fea5a5d68c197d948a59447472e7c7747b) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit ed072d2a0abe5a22330160f67ee5e83c2eae1dac) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* go.bbclass: don't use test to check output from lsMartin Jansa2023-06-141-1/+1
| | | | | | | | | | | | * avoids possibly confusing error message in log.do_install like: ls: cannot access 'etcd/3.5.7-r0/build/bin/linux_arm64/': No such file or directory (From OE-Core rev: 6f9b6145b473a1adcaf39c1af0d17bec00547ede) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 2f1777e6ac5269a71203b6a2c562a43503be95ae) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* populate_sdk_base.bbclass: respect MLPREFIX for ptest-pkgs's ptest-runnerMartin Jansa2023-06-061-1/+1
| | | | | | | | | | | | | | | | | | * since "populate_sdk_base: ensure ptest-pkgs pulls in ptest-runner" change: https://git.openembedded.org/openembedded-core/commit/?id=ecff0642be5781f7f6cca617158b04ac9a0e85f0 in multilib build when building lib32-foo-image it can pick wrong ptest-runner package if it was built in the same TMPDIR before the image, do_rootfs then fails to find it, if the package manager config doesn't have 64-bit feed enabled: opkg_prepare_url_for_install: Couldn't find anything to satisfy 'ptest-runner' (From OE-Core rev: 3cdfdeb8f18dd467e2c5c6e9d6e3739aaf5c0c3d) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 4d24749e7e94881bb952f5c927f0012eb70d4390) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* python3targetconfig.bbclass: Extend PYTHONPATH instead of overwritingJohannes Schrimpf2023-05-181-1/+1
| | | | | | | | | | | | | | | | | | [YOCTO #15108] -- https://bugzilla.yoctoproject.org/show_bug.cgi?id=15108 Since the latest change, the PYTHONPATH is overwritten instead of extended. This leads to changed behavior and build errors of recipes where the PYTHONPATH is set before setup_target_config is run. Fixes: c9617c03bcee ("python3targetconfig.bbclass: use PYTHONPATH to point to the target config") (From OE-Core rev: cf31424aa7ce3308373899181aef0e503ead4776) Signed-off-by: Johannes Schrimpf <dev@loewen-email.de> [Luca: add Fixes: tag] Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2442ab92f8610784d28d8d83056b643bd95b0b4e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* populate_sdk_ext.bbclass: redirect stderr to stdout so that both end in LOGFILEMartin Jansa2023-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * this in the end doesn't help much, I was debugging warning (about base-files.do_install signature being different than expected) from: python3 $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}' this shows the warning on console, but it doesn't end in $LOGFILE, because it writes only contents of cooker log into the $LOGFILE with: with open(logfile, 'a') as logf: logf.write('Preparing SDK for %s...\n' % ', '.join(sdk_targets)) ret = run_command_interruptible('BB_SETSCENE_ENFORCE=1 bitbake --quiet %s' % ' '.join(sdk_targets)) if not ret: ret = run_command_interruptible('bitbake --quiet build-sysroots') lastlog = get_last_consolelog() if lastlog: with open(lastlog, 'r') as f: for line in f: logf.write(line) if ret: print('ERROR: SDK preparation failed: error log written to %s' % logfile) return ret maybe we could remove whole support for $LOGFILE parameter and just redirect the output like other commands on this line (From OE-Core rev: 766c6f7ae72576cfab3654362ae949688f42acce) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 719f22df160ebde303274ccfc04049cffdb51577) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* update-alternatives.bbclass: fix old override syntaxPeter Bergin2023-05-101-2/+2
| | | | | | | | | | | | | | | | Function 'gen_updatealternativesvardeps' still used old override syntax when fetching variable flags. Update to use ':' instead to match recipe meta data. This was found by review and no real issue encountered but it is a bug that affects variable dependencies and can affect rebuilds as task hashes might not be accurate. (From OE-Core rev: 27b4fb60c7c66c245ba50607c8e178390fc41014) Signed-off-by: Peter Bergin <peter.bergin@windriver.com> Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5691f554b2cd50f256a8cbb1d96781e9eb6b930e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel: improve initramfs bundle processing timeBruce Ashfield2023-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial fix for bugzilla 15059 [https://bugzilla.yoctoproject.org/show_bug.cgi?id=15059] It has been noted by several people that when an initramfs is bundled: - a lot of the kernel is rebuilt - it takes a really long time When looking at the logs, the second kernel compilation (that performs the bundle) is not using the parallel make settings, and builds with -j1. We are already explicitly passing PARALLEL_MAKE when building kernel modules, and by extending that explicit use to the main kernel compilation, we ensure that we always get a parallel build. Build times chnaged from more than 30 minutes for the bundle, to 3 minutes in local testing. The question of whether or not too much is rebuilding during the bundle step is still an open question, but with this tweak, at least the build time is back in the realm of acceptable. (From OE-Core rev: 126cbad716377f024dae5cc8e2faee9bd661f5c5) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 88fd394ecf0f2174b792075d409d87046896426b) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* populate_sdk_ext.bbclass: set METADATA_REVISION with an DISTRO overrideMartin Jansa2023-05-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * otherwise it ends '<unknown>' inside esdk, because of parsing order: # $METADATA_REVISION [3 operations] # set /OE/build/test-D/conf/local.conf:43 # "f2da54ef432eac89b0f18eaad68e602b6990b5de" # immediate /OE/build/test-D/layers/poky/meta/classes/metadata_scm.bbclass:9 # "${@oe.buildcfg.detect_revision(d)}" # set /OE/build/test-D/layers/poky/meta/classes/metadata_scm.bbclass:10 # [vardepvalue] "${METADATA_REVISION}" # pre-expansion value: # "<unknown>" METADATA_REVISION="<unknown>" * This causes base-files.do_install and following tasks to have different signatures between esdk and the build directory where this esdk was created: bitbake-diffsigs {test-D,poky/build-uninative-disabled}/tmp/stamps/qemux86_64-poky-linux/base-files/*do_install*sigdata* NOTE: Starting bitbake server... basehash changed from 5b6981cf58bfd57d416b0e31611b73a26baae635dd1ac31c08d46f95064c3ffc to dbdce042da4d7813d632b6d1cc87a16f728ad20e55fecbc392830e6acf72babd Variable METADATA_REVISION value changed from '<unknown>' to 'f2da54ef432eac89b0f18eaad68e602b6990b5de' and an warning from "python3 /OE/build/test-D/ext-sdk-prepare.py" when eSDK is being prepared for use: WARNING: The base-files:do_install sig is computed to be 83b9c9a6ef1145baac5a1e0d08814b9156af239c58fc42df95c25a9cd8a7f201, but the sig is locked to 3dc22233059075978e5503691e98e79e7cc60db94259dfcd886bca2291c0add7 in SIGGEN_LOCKEDSIGS_t-qemux86-64 [RP: Add commit about why we need the override for future reference] (From OE-Core rev: a857360c078aa5e03cf113dc2dc87069b0e0201c) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 675ea7281c17f77bf5dea17cfd4d9da0928382a0) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel-fitimage: Fix the default dtb config checkArslan Ahmad2023-05-101-10/+26
| | | | | | | | | | | | | | | | The current check for default dtb image checks if the file exists and is not empty but appends a slash to the path due to which the file is never found. It also doesn't replace slash in filename with _ as done when populating the DTB variable. A better way to check the existence of the device tree would be from the list of DTBs since this is used during compilation. (From OE-Core rev: f8efe7d50860e44cd22a91685d0438c5c73d8557) Signed-off-by: Arslan Ahmad <arslan_ahmad@mentor.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit e8e31e11b158837804d029e85f5f8ed3c219a4ea) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* devicetree.bbclass: fix typoLuca Ceresoli2023-04-061-1/+1
| | | | | | | (From OE-Core rev: d523079bbea54f791039bf40db3bbc5c5e857ca3) Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo-update-recipe-crates.bbclass: Do not add name= to crate:// URIsPeter Kjellerstedt2023-04-061-1/+1
| | | | | | | | | | | | | With the recent change to the crate fetcher, which automatically sets the name to for each crate to be versioned, there is no longer a need to explicitly set the name= parameter for each URI. This also results in generated files that are compatible with the crate fetcher in Kirkstone and Langdale. (From OE-Core rev: eb272afcd9a12ce2b2f43436b3f84f52cb6cdfb7) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes-recipe/setuptools3-base: clean up FILES assignmentsRoss Burton2023-04-041-10/+3
| | | | | | | | | | | Simply inheriting setuptools3-base should put everything in $libdir in PN, and there's no need to replicate the pkgconfig packaging rules as those are the defaults. (From OE-Core rev: 56a32e31d4fdfb908f0edf513d21bc0f2b8c721e) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: respect IMAGE_LINK_NAMEMartin Jansa2023-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * when searching for qemuboot.conf * don't assume that IMAGE_LINK_NAME is always <rootfs>-<machine> (with <rootfs>-<machine>.qemuboot.conf) * runqemu: use IMAGE_LINK_NAME set by testimage.bbclass or query with bitbake -e * testimage.bbclass was setting DEPLOY_DIR which I don't see used anywhere else, so I assume it was supposed to be DEPLOY_DIR_IMAGE as mentioned in corresponding runqemu code, do the same with IMAGE_LINK_NAME variable * add virtual/kernel as bitbake -e target in run_bitbake_env to make sure IMAGE_LINK_NAME is defined (kernel-artifact-names.bbclass inherits image-artifact-names.bbclass as well) * improve .qemuboot.conf search 1st search for file matching the rootfs and only when not found try again with .rootfs suffix removed [YOCTO #12937] (From OE-Core rev: 716eb55bb963db7b02d985849cb025898aabc855) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo-update-recipe-crates: force name overridesFrederic Martinsons2023-04-011-19/+16
| | | | | | | | | | | | | | | | | | | | A project can have multiple Cargo.lock (provides multiple binaries for example) and each one can depends on differenct version of the same crates. Even within the same Cargo.lock file, it is possible to have different version of same crates. To avoid conflicts, override the name with the version for all crates checksum Moreover, when searching for Cargo.lock, we should ignore specific dir like .git (no use to walk down there) and .pc (because it can have a Cargo.lock if this file was patched) (From OE-Core rev: 1795e98a04ad09b011afcc7cc3bf6dc49475b19a) Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo_common.bbclass: add support of user in url for patchFrederic Martinsons2023-04-011-1/+4
| | | | | | | | | To handle url like git://git@repo/project (From OE-Core rev: ad99ede096aff03c974b8725d90d3c9d1056bae0) Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo_common.bbclass: Support local github reposAlex Kiernan2023-04-011-0/+30
| | | | | | | | | | | | | | | | | | | | | | Since disable network was added cargo configurations which reference git repos fail as they attempt to fetch across the network as part of do_compile, even if EXTRA_OECARGO_PATHS to add them as part of `paths` is used, as this is documented as only working for packages which exist in crates.io. Add parsing of the SRC_URIs for git repos and include `[patch]` sections to redirect to the checked out source repos which the bitbake fetcher has already populated. There are still cases which don't work - if you have multiple copies of the same repo with different revisions, there's currently no way to represent that and anything using a repo which has a virtual manifest will fail to build (see https://github.com/rust-lang/cargo/issues/4934). (From OE-Core rev: 684a8af41c5bb70db68e75f72bdc4c9b09630810) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo-update-recipe-crates: generate checksum for each cratesFrederic Martinsons2023-03-301-4/+40
| | | | | | | | | | | | | | | | | This is related to checksum verification introduction from https://patchwork.yoctoproject.org/project/bitbake/patch/20230315131513.50635-1-frederic.martinsons@gmail.com/ I also choose to raise an exception if: - no crates can be found - no Cargo.lock file exist Otherwise the generated inc file will silently be emptied. (From OE-Core rev: c75b924a3de02625aa90ad4db4403f00d1ffeba2) Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* class-recipe: add support for loongarch64Jialing Zhang2023-03-233-1/+15
| | | | | | | | | (From OE-Core rev: ec88f703f753efcbad5c077d866a5dc44ad54db0) Signed-off-by: Jialing Zhang <zhangjialing@loongson.cn> Signed-off-by: Qizheng Zhu <zhuqizheng@loongson.cn> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-artifact-names: add IMAGE_MACHINE_SUFFIX variableMartin Jansa2023-03-222-4/+13
| | | | | | | | | | | | | | | | | | | | | * to make it easier for projects to avoid default -${MACHINE} suffix if the ${MACHINE} named DEPLOY_DIR_IMAGE works better for them * also use IMAGE_LINK_NAME in IMAGE_NAME to make it more clear that IMAGE_NAME is the same as IMAGE_LINK_NAME but with version suffix * adding it as separate variable helps us to catch the cases where we didn't respect ${IMAGE_LINK_NAME} variable and just used the common default ${IMAGE_BASENAME}-${MACHINE}. [YOCTO #12937] (From OE-Core rev: 6e82c394e98d57a2fe73e547922477cd6b0620f9) 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>
* image-artifact-names.bbclass: add INITRAMFS_IMAGE_NAME from kernel.bbclassMartin Jansa2023-03-222-1/+3
| | | | | | | | | | | | | | | | | | * move it from kernel.bbclass, because it needs to stay in sync with IMAGE_LINK_NAME structure * image-artifact-names.bbclass is also inheritted from kernel-artifact-names.bbclass so every recipe which needs this variable probably already inherits one of these * fixes kernel-fitimage.bbclass with modified IMAGE_LINK_NAME [YOCTO #12937] (From OE-Core rev: 432d0df0d771c8f0bef1e855ac6b0011b2c3cad2) 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>
* cargo.bbclass: use offline mode for buildingFrederic Martinsons2023-03-161-1/+1
| | | | | | | | | | | | | | | | | | | There should not be any network access during the build step so specify this explicitely to cargo. This will allow better error message, e.g: | Caused by: | can't checkout from 'ssh://git@.../fmartinsons/zbus-git-dep-test.git': you are in the offline mode (--offline) Instead of | Updating git repository `ssh://git@.../fmartinsons/zbus-git-dep-test.git` | warning: spurious network error (2 tries remaining): failed to resolve address for gitlab.com: Temporary failure in name resolution;class=Net (12) (From OE-Core rev: 8e9ec03c73e8c09e223d6f6cce297df363991350) Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm.bbclass: avoid DeprecationWarning with new pythonMartin Jansa2023-03-141-1/+1
| | | | | | | | | | meta/classes-recipe/npm.bbclass:85: DeprecationWarning: invalid escape sequence '\.' '--transform', 's,^\./,package/,', (From OE-Core rev: 47f102cfbbaa83d17999747233a81f1b570f448e) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: fix multiubi var initRomuald Jeanne2023-03-141-0/+3
| | | | | | | | | | | | | | Make sure to expand all MKUBIFS_ARGS_<label> and UBINIZE_ARGS_<label> vars in 'do_image_multiubi' task to use them to init the local 'mkubifs_args' and 'ubinize_args' vars. See [YOCTO #15065] (From OE-Core rev: 09d05215cf61981c7bc828cc0ff64c2fd5edc43c) Signed-off-by: Romuald JEANNE <romuald.jeanne@st.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd.bbclass: Add /usr/lib/systemd to searchpaths as wellKhem Raj2023-03-141-0/+1
| | | | | | | | | | | | | | | | Some packages like lirc places its unit files into $systemd_user_unitdir and also uses them in SYSTEMD_SERVICE list in recipe. This fails in do_package ERROR: Didn't find service unit 'lircmd.service', specified in SYSTEMD_SERVICE:lirc. here lircmd.service is installed in /usr/lib/systemd/system/lircmd.service (From OE-Core rev: 12808a4159835b67d8d53d32bc9135811701a779) 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>
* pypi.bbclass: Set SRC_URI downloadfilename with an optional prefixZoltan Boszormenyi2023-03-141-1/+3
| | | | | | | | | | | | | | | | This allows avoiding clashes between source archives of a main project and a pypi project using the same name and version. The new optional setting is PYPI_ARCHIVE_NAME_PREFIX which is empty by default so previous downloads can be used. Example usage: PYPI_ARCHIVE_NAME_PREFIX = "pypi-" (From OE-Core rev: 6f9a6a3dbe5c8eb9f0d19987410932fec3d6dd1a) Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: fix vname var init in multiubi_mkfs() functionRomuald JEANNE2023-03-141-6/+7
| | | | | | | | | | | | | As vname var is needed in multiubi_mkfs() function, we need to keep it defined and use it as parameter to the new write_ubi_config() function. See [YOCTO #15027] (From OE-Core rev: 8b5e1cce35e129b21d871ab45b03811fdb6eaf8f) Signed-off-by: Romuald JEANNE <romuald.jeanne@st.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest-packagelists: Simplify ptest list/codeRichard Purdie2023-03-141-1/+1
| | | | | | | | | All the usage sites remove the -ptest suffix. Simply the original list instead and clean up the code. (From OE-Core rev: 4a28057849f9edc6ac06d115531f579673d788b5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>