summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
Commit message (Collapse)AuthorAgeFilesLines
* python3targetconfig.bbclass: use PYTHONPATH to point to the target configAlexander Kanavin2022-12-072-1/+2
| | | | | | | | | | | There is no need to patch native python so that it looks in the target sysroot; the same can be achieved with just an environment variable. (From OE-Core rev: c9617c03bceee54dc540318cada392799b137bd5) 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>
* python3: use the standard shell version of python3-configAlexander Kanavin2022-12-071-6/+11
| | | | | | | | | | | | | | | There is really no reason why we can't: it only needs to be available in two versions (native/target), and the correct one can be picked via PATH priority order. This eliminates two un-upstreamable patches, one of which relies on soon to be removed distutils. (From OE-Core rev: d0145ead0f80ba4bde8e24617a8725f38eda8339) 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>
* classes: make TOOLCHAIN more permissive for kernelAlexey Smirnov2022-12-051-1/+1
| | | | | | | | | | | | Currently TOOLCHAIN is strictly set to gcc in kernel-arch.bbclass. And this prevents any TOOLCHAIN changes for any kernel recipe. This change makes TOOLCHAIN configurable as usual. (From OE-Core rev: be1634fc35dcc81f0301d942064a6eed584e0704) Signed-off-by: Alexey Smirnov <pyih.soft@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* u-boot: Fix u-boot signing when building with multiple u-boot configsDavid Bagonyi2022-11-201-1/+3
| | | | | | | | | | | | The prepended code with the i and j variables clash with similar code in uboot.inc, so they need to be unset once we are done using them. This commit fixes the issue that was introduced in d6858c9 "u-boot: Rework signing to remove interdependencies". (From OE-Core rev: 6f668f85d7e5b0a9d36198db865cf1e1a012b2e1) Signed-off-by: David Bagonyi <david.bagonyi@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: make KERNEL_DEBUG_TIMESTAMPS work at rebuildChen Qi2022-11-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the KERNEL_DEBUG_TIMESTAMPS is not working as expected at rebuild. That is, even if we set it to "1", the kernel build time is not changed. The problem could be reproduced by the following steps. 1. bitbake core-image-minimal; start image and check `uname -a` output. 2. set in local.conf: KERNEL_DEBUG_TIMESTAMPS = "1" 3. bitbake core-image-minimal; start image and check `uname -a` output. It's expected that after enabling KERNEL_DEBUG_TIMESTAMPS, the kernel build time will be set to current date. But it's not. This is because the compile.h was not re-generated when do_compile task was re-executed. In mkcompile_h, we have: """ # Only replace the real compile.h if the new one is different, # in order to preserve the timestamp and avoid unnecessary # recompilations. # We don't consider the file changed if only the date/time changed, # unless KBUILD_BUILD_TIMESTAMP was explicitly set (e.g. for # reproducible builds with that value referring to a commit timestamp). # A kernel config change will increase the generation number, thus # causing compile.h to be updated (including date/time) due to the # changed comment in the # first line. """ It has made it very clear that it will not be re-generated unless we have KBUILD_BUILD_TIMESTAMP set explicitly. So we set this variable explicitly in do_compile to fix this issue. (From OE-Core rev: 1b68c2d2d385013a1c535ef81172494302a36d74) 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>
* gnomebase.bbclass: return the whole version for tarball directory if it is a ↵Alexander Kanavin2022-11-111-1/+1
| | | | | | | | | | | | number E.g. if version is '43' without any dots, existing code would return ''. (From OE-Core rev: 38c15322bdbb2423973939e861b5ad1ffb5c8b7f) 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>
* classes/testexport: move to classes-recipeRoss Burton2022-11-111-0/+180
| | | | | | | | | | | | | | | | | This class should be in classes-recipe as, like testimage, it is specific to image recipes. This also solves a regression where simply IMAGE_CLASSES += "testexport" doesn't work if testimage isn't already in IMAGE_CLASSES. The testexport class adds testimage to IMAGE_CLASSES, but by this point it's too late. Now that the class can only be inherited via IMAGE_CLASSES, we can simply inherit testimage directly. (From OE-Core rev: 87fcee9fed915ff3af528b976d7d44737f9f1a95) 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>
* populate_sdk_ext: use ConfigParser instead of SafeConfigParserRoss Burton2022-11-091-1/+1
| | | | | | | | | | | SafeConfigParser was renamed to ConfigParser in 3.2, and the SafeConfigParser alias will be removed in 3.12. (From OE-Core rev: 71b3e7f71727137b4b996cc4160c9cc1581824b8) 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>
* image_types: Add 7-Zip support in conversion types and commandsBenjamin Szőke2022-11-071-1/+7
| | | | | | | | | | | | | | | | | Add 7-Zip support in conversion types and commands. Default arguments of 7-Zip are compression level: 9, method: BZip2, extension: 7z. All these are overridable from local.con for any other use case in user side. First goal was to make an alternative zip conversion which can operate faster in multi-thread systems (on many CPU cores), normal zip is just a single thread compression. 7-Zip can do a compression in multi-thread processing, so it is fine to use and speed up it and 7-Zip is supported also in many platform to use. (From OE-Core rev: 5931b2898b5fa964768c2abf9b5aa556859152b3) Signed-off-by: Benjamin Szőke <egyszeregy@freemail.hu> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Include randstruct seed assets in STAGING_KERNEL_BUILDDIRDiego Sueiro2022-11-071-0/+16
| | | | | | | | | | | | | | When building with CONFIG_MODVERSIONS=y and CONFIG_RANDSTRUCT=y we need to copy the build assets generated for the randstrutc seed to STAGING_KERNEL_BUILDDIR, otherwise the out-of-tree modules build will generate those assets which will result in a different RANDSTRUCT_HASHED_SEED. (From OE-Core rev: b36303158b2e0273ff415bdedefb379f680b30fc) Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo.bbclass: avoid calling which ${RUSTC} with undefined ${RUSTC}Martin Jansa2022-11-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * RUSTC is normally defined in rust.bbclass, but rust-target-config doesn't inherit rust.bbclass and RUSTC is then undefined when calling 'which' in oe_cargo_build * causes which help text ending in log.do_compile, e.g.: | DEBUG: Executing shell function do_compile | NOTE: Using rust targets from /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/openssl-sys/0.9.77-r0/rust-targets/ | NOTE: cargo = /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/openssl-sys/0.9.77-r0/recipe-sysroot-native/usr/bin/cargo | Usage: which [options] [--] COMMAND [...] | Write the full path of COMMAND(s) to standard output. | | --version, -[vV] Print version and exit successfully. | --help, Print this help and exit successfully. | --skip-dot Skip directories in PATH that start with a dot. | --skip-tilde Skip directories in PATH that start with a tilde. | --show-dot Don't expand a dot to current directory in output. | --show-tilde Output a tilde for HOME directory for non-root. | --tty-only Stop processing options on the right if not on tty. | --all, -a Print all matches in PATH, not just the first | --read-alias, -i Read list of aliases from stdin. | --skip-alias Ignore option --read-alias; don't read stdin. | --read-functions Read shell functions from stdin. | --skip-functions Ignore option --read-functions; don't read stdin. | | Recommended use is to write the output of (alias; declare -f) to standard | input, so that which can show aliases and shell functions. See which(1) for | examples. | | If the options --read-alias and/or --read-functions are specified then the | output can be a full alias or function definition, optionally followed by | the full path of each command used inside of those. | | Report bugs to <which-bugs@gnu.org>. | NOTE: rustc = (From OE-Core rev: 0068e82f02354729b953e622889f96ca52468d6c) 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>
* populate_sdk_base: add zip optionsChristoph Lauer2022-11-071-1/+3
| | | | | | | | | | Add SDK_ZIP_OPTIONS to remove symbolic link creation in zip archive or add options, e.g. for encryption of the zip archive. (From OE-Core rev: 04b62f9459b401c276255f166d0738b6f902a576) Signed-off-by: Christoph Lauer <christoph.lauer@xtronic.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo-update-recipe-crates: small improvementsMartin Jansa2022-11-031-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * use 4 spaces * avoid trailing space * add CARGO_LOCK_SRC_DIR to allow searching outside ${S} * use BPN in output filename * First I've used CARGO_LOCK_SRC_DIR as relative to ${S}, because that's what CARGO_SRC_DIR in cargo.bbclass is using: meta/classes-recipe/cargo.bbclass:CARGO_SRC_DIR ??= "" meta/classes-recipe/cargo.bbclass:MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" but change to absolute path (defaulting to ${S}) as requested by Alex: 11:44 < kanavin> JaMa, would prefer CARGO_LOCK_SRC_DIR ??= "${S}" 11:46 < kanavin> otherwise looks good * I've resolved my usecase for CARGO_LOCK_SRC_DIR by changing S back to ${WORKDIR}/git and using CARGO_SRC_DIR to select the right subdirectory to be built, because the Cargo.toml in this subdirectory was also referencing other subdirectories with relative path: https://github.com/solana-labs/solana-program-library/blob/88b147506d5b9515f3a4762421a0b8c309188dc9/token/cli/Cargo.toml#L30 so including all Cargo.lock files in whole ${WORKDIR}/git seems like reasonable approach (From OE-Core rev: 7636a2b8080521ed2ad54b0edce47a8742a12d58) 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>
* rust-common.bbclass: use built-in rust targets for -native buildsAlexander Kanavin2022-11-021-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Rust targets have the form of 'arch-unknown-linux-gnu' while oe's native targets are 'arch-linux-gnu', e.g. omit the vendor. The effect this has on rust-native builds is that rust first builds itself as stage0 for arch-unknown-linux-gnu, then builds itself again for arch-unknown-linux-gnu, then finally uses the compiler from second step to 'cross-compile' a compiler for 'arch-linux-gnu'. This last step is really not necessary, and we could save 4 minutes out of 12 if it is eliminated. Which is what this patch does by setting the target directly to 'arch-unknown-linux-gnu'; rust's build system then shortcuts the build process after the second step. Given a working rust-native will be needed as early as possible in a typical yocto build (e.g. when in a not too distant future making a useful kernel will not be possible without rust), producing it faster is important. (From OE-Core rev: a918ea5645d8a67cedaf3ecf6c382520bbcad85b) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo-update-recipe-crates.bbclass: add a class to generate SRC_URI crate ↵Alexander Kanavin2022-11-011-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | lists from Cargo.lock For better or worse, more and more rust components are appearing that do not include their dependencies in tarballs (or git trees), and rely on cargo to fetch them. On the other hand, bitbake does not use cargo (and quite possible won't ever be able to), and relies on having each item explicitly listed in SRC_URI with a crate:// prefix. This however creates a problem of both making such lists in the first place and updating them when a recipe is updated to a newer version. So this class can be used to perform such updates by implementing a task that does it; the next commit shows the outcome for python3-bcrypt (which has been tested to work and produce a successful build). Note: the python script relies on tomllib library, which appears in Python 3.11 and does not exist in earlier versions - I've tested this by first updating python to 3.11-rc2 in oe-core. (From OE-Core rev: 9eee3631124d64574b18a70a2fc42f446d58bfd2) 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>
* cargo_common.bbclass: Fix typosAlex Kiernan2022-11-011-2/+2
| | | | | | | | (From OE-Core rev: c7a92180b21e75a84f632e4c16e63dc1f4861a00) 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>
* python3: update 3.10.6 -> 3.11.0Alexander Kanavin2022-10-291-1/+1
| | | | | | | | | | | | | | The semaphore fix has landed and is available from 3.11 onwards: https://github.com/python/cpython/commit/1ee0f94d16f150356a4b9b0a39d44ba1d2d5b9fc Drop 0001-Mitigate-the-race-condition-in-testSockName.patch as it is merged upstream. (From OE-Core rev: f10cdc155e47af5627ee999c57e1d083f9382a91) 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>
* kernel-fitimage: skip FDT section creation for applicable symlinksAhmad Fatoum2022-10-281-1/+32
| | | | | | | | | | | | | | | | | | When building a FIT image with device trees, each device tree lands in a FIT section and is referenced by a FIT configuration node. FIT images however also allow referencing the same device tree from multiple configurations. This can be useful to reduce FIT image size while staying compatible with existing bootloaders. Allow kernel-fitimage.bbclass users to take advantage of this by mapping each symlink to a regular device tree included in the FIT to a configuration that references a common device tree section. (From OE-Core rev: 21e240da63239826f3ef50ceef40c9519e9030d8) Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: mangle slashes to underscores as late as possibleAhmad Fatoum2022-10-281-4/+4
| | | | | | | | | | | | | This introduces no functional change, but will come in handy in a later commit where a file lookup will have us using the device tree name. If we keep it like it's now, we will lose the information whether an underscore is an original underscore or a mangled slash. (From OE-Core rev: 8bea426ca59d17715a3b32f7e3caf3e4b6db5ce9) Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: match riscv target names with what rust expectsAlexander Kanavin2022-10-281-14/+26
| | | | | | | | | | | | | | | | | | | | Official rust risc-v targets are prefixed with riscv32gc- and riscv64gc-: https://doc.rust-lang.org/nightly/rustc/platform-support.html Particularly crossbeam-utils make important build time decisions for atomics based on those names, and so we need to match ours with official targets. On the other hand, the actual definitions for those targets do not use the 'gc' suffix in 'arch' and 'llvm-target' fields, and so we need to follow that too, to avoid cryptic mismatch errors from rust-llvm: https://github.com/rust-lang/rust/blob/master/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs (From OE-Core rev: 1cfb9c8a59d98ccc9b0510cd28fb933f72fb6b6c) 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>
* u-boot: Rework signing to remove interdependenciesSean Anderson2022-10-263-280/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The U-Boot signing code is a bit of a mess. The problem is that mkimage determines the public keys to embed into a device tree based on an image that it is signing. This results in all sorts of contortions: U-Boot has to be available to the kernel recipe so that it can have the correct public keys embedded. Then, the signed U-Boot has to be made available to U-Boot's do_deploy. This same dance is then repeated for SPL. To complicate matters, signing for U-Boot and U-Boot SPL is optional, so the whole process must be seamlessly integrated with a non-signed build. The complexity and interdependency of this process makes it difficult to extend. For example, it is not possible to install a signed U-Boot binary into the root filesystem. This is first because u-boot:do_install must run before linux:do_assemble_fitimage, which must run before u-boot:do_deploy. But aside from infrastructure issues, installing a signed U-Boot also can't happen, because the kernel image might have an embedded initramfs (containing the signed U-Boot). However, all of this complexity is accidental. It is not necessary to embed the public keys into U-Boot and sign the kernel in one fell swoop. Instead, we can sign the kernel, stage it, and sign the staged kernel again to embed the public keys into U-Boot [1]. This twice-signed kernel serves only to provide the correct parameters to mkimage, and does not have to be installed or deployed. By cutting the dependency of linux:do_assemble_fitimage on u-boot:do_install, we can drastically simplify the build process, making it much more extensible. The process of doing this conversion is a bit involved, since the U-Boot and Linux recipes are so intertwined at the moment. The most major change is that uboot-sign is no longer inherited by kernel-fitimage. Similarly, all U-Boot-related tasks have been removed from kernel-fitimage. We add a new step to the install task to stage the kernel in /sysroot-only. The logic to disable assemble_fitimage has been removed. We always assemble it, even if the final fitImage will use a bundled initramfs, because U-Boot will need it. On the U-Boot side, much of the churn stems from multiple config support. Previously, we took a fairly ad-hoc approach to UBOOT_CONFIG and UBOOT_MACHINE, introducing for loops wherever we needed to deal with them. However, I have chosen to use a much more structured approach. Each task which needs to use the build directory uses the following pseudocode: do_mytask() { if ${UBOOT_CONFIG}; then for config, type in zip(${UBOOT_CONFIG}, ${UBOOT_MACHINE}); do cd ${config} mytask_helper ${type} done else cd ${B} mytask_helper "" fi } By explicitly placing the work in mytask_helper, we make it easier to ensure that everything is covered, and we also allow bbappends files to more easily extend the task (as otherwise they would need to reimplement the loop themselves). [1] It doesn't particularly matter what we sign. Any FIT will do, but I chose the kernel's because we already went to the trouble of setting it up with the correct hashes and signatures. In the future, we could create a "dummy" image and sign that instead, but it would probably have to happen in the kernel recipe anyway (so we have access to the appropriate variables). (From OE-Core rev: 5e12dc911d0c541f43aa6d0c046fb87e8b7c1f7e) Signed-off-by: Sean Anderson <sean.anderson@seco.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign: Split off kernel-fitimage variablesSean Anderson2022-10-263-15/+32
| | | | | | | | | | In preparation for the next commit, split off several (From OE-Core rev: 60c1a170f1f8c11bc8f42026debf121433b39115) Signed-off-by: Sean Anderson <sean.anderson@seco.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign: Use bitbake variables directlySean Anderson2022-10-261-20/+10
| | | | | | | | | | | | | | | uboot_fitimage_assemble is called from one place with the same arguments. Instead of using shell variables as intermediaries, simplify the function by using the bitbake variables directly. Removing a layer of indirection makes it easier to determine what values are being substituted in. Some variables can't be fully converted, but they will be addressed in the a few commits. (From OE-Core rev: 27f42c9b9a91742d3ee358aa8dc29627379b2539) Signed-off-by: Sean Anderson <sean.anderson@seco.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: Use KERNEL_OUTPUT_DIR where appropriateSean Anderson2022-10-261-8/+8
| | | | | | | | | | | We have a specific variable for the path to the boot directory. Use it instead of open-coding this path. (From OE-Core rev: 725b75e83bc2b2111f2ab5103b7e7f60d6d3f34e) Signed-off-by: Sean Anderson <sean.anderson@seco.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Clear SYSROOT_DIRS instead of replacing sysroot_stage_allSean Anderson2022-10-261-3/+1
| | | | | | | | | | | | Replacing sysroot_stage_all by a no-op recipe makes it difficult for bbappends to stage files intentionally. Instead, just clear SYSROOT_DIRS, allowing other bbappends to easily add new directories. (From OE-Core rev: 849791e7086463a4c7c53c2c1ed9603a6c3a080d) Signed-off-by: Sean Anderson <sean.anderson@seco.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign: Fix using wrong KEY_REQ_ARGSSean Anderson2022-10-261-1/+1
| | | | | | | | | | | | | When generating our SPL-verifying certificate, we use FIT_KEY_REQ_ARGS, which is intended for the U-Boot-verifying certificate. Instead, use UBOOT_FIT_KEY_REQ_ARGS. Fixes: 0e6b0fefa0 ("u-boot: Use a different Key for SPL signing") (From OE-Core rev: a2d939ccb182a1ad29280d236b9f9e1d09527af1) Signed-off-by: Sean Anderson <sean.anderson@seco.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: improve fatal error messages of symbol_why.pyJose Quaresma2022-10-261-5/+5
| | | | | | | | | | | | Improve the fatal error message of the yocto-kernel-tools symbol_why.py and shows the command that generate the error as it can help understand the root cause of the error. (From OE-Core rev: 54ae08779071f2e97bff0ff6514ede3124312c3b) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go-mod.bbclass: Remove repeated wordFabio Estevam2022-10-261-1/+1
| | | | | | | | | | The word 'the' appears repeatedly. Remove one occurrence. (From OE-Core rev: f9c1e43fea5ca119dcba6f57b95d10e78246a491) Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* overlayfs: Allow not used mount pointsVyacheslav Yurkov2022-10-261-1/+5
| | | | | | | | | | | | | When machine configuration defines a mount point, which is not used in any recipe, allow to fall through and only report a note in the logs. This can be expected behavior, when a mount point is defined for several machines, but not used in all of them (From OE-Core rev: a9c604b5e0d943b5b5f7c8bdd5be730c2abcf866) Signed-off-by: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc: move back to classesRoss Burton2022-10-251-272/+0
| | | | | | | | | | | The externalsrc class was moved to classes-recipe as part of oe-core f5c1280, but it can be used in both recipe and global contexts so move it back to classes/. (From OE-Core rev: 7a2edcd4b7cb5a2d829289a11eff62663268fbf3) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base: ensure ptest-pkgs pulls in ptest-runnerRoss Burton2022-10-251-1/+1
| | | | | | | | | | | | | | | | | Since "package_manager: Change complementary package handling to not include soft dependencies"[1], complementary packages don't pull in recommendations, just depends. However, ptest.bbclass has a recommends on ptest-runner, so if ptest packages are in an image via the ptest-pkgs IMAGE_FEATURE, ptest-runner doesn't get installed. [ YOCTO #14928 ] [1] oe-core b44b0b9294675f89aa51ff84f532664f4c479677 (From OE-Core rev: ecff0642be5781f7f6cca617158b04ac9a0e85f0) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc: git submodule--helper list unsupportedJohn Edward Broadbent2022-09-291-9/+10
| | | | | | | | | | | | | | | | | Git has removed support for "git submodule--helper list". https://github.com/git/git/commit/31955475d1c283120d5d84247eb3fd55d9f5fdd9 This change provides an alternate method for gathering the submodules information. Tested: Build recipes with and without submodules (From OE-Core rev: 6d9364e5f3535954f65cbbc694ee7933ac1d664f) Signed-off-by: Carson Labrado <clabrado@google.com> Signed-off-by: John Edward Broadbent <jebr@google.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gtk-icon-cache: Fix GTKIC_CMD if-else conditionDaniel Gomez2022-09-291-1/+1
| | | | | | | | | | | | | | | | | GTKIC_CMD variable gets the wrong assignation leading into a post install script error. Fix if-else condition in GTKIC_CMD variable to assign gtk4-update-icon-cache when GTKIC_VERSION is 4 but gtk-update-icon-cache when is 3. Also, rename gtk-update-icon-cache-3.0.0 to gtk-update-icon-cache-3.0 to match the gtk-update-icon-cache binary name deployed in meta/recipes-gnome/gtk+/gtk+3.inc. (From OE-Core rev: 95fc819fca11115623d0f1f7f0c11e9c46195b21) Signed-off-by: Daniel Gomez <daniel@qtec.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* github-releases: add a class that consolidates version checksAlexander Kanavin2022-09-281-0/+3
| | | | | | | | | | | | | | | | github has recently changed how the releases page is structured: the tarballs are no longer listed directly, but are included via separate 'fragment' URIs. For now, we can change the check to match against the release tags. This also establishes a common base URI to use for both fetching and checking the latest version. (From OE-Core rev: afa57a02ecd12ad176302d9631f4181b26d94f5c) 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>
* rootfs-postcommands: Remove dropbear inconsistent commentDaniel Gomez2022-09-281-0/+1
| | | | | | | | | | | When allow-root-login, remove default dropbear comment 'Disallow root'. (From OE-Core rev: cb80493fa8e2f4fc0f368b0f77ffb35c58ba5b40) Signed-off-by: Daniel Gomez <daniel@qtec.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/dnf: use dnf-test packagesRoss Burton2022-09-261-4/+1
| | | | | | | | | | | | | | | | | | Instead of installing run-postinsts with it's postinst scripts causing systemd restarts, use the new dnf-test-* packages instead. Remove from the installroot tests entirely as they're exercised enough using just busybox. Rewrite the exclude test to be simplier now these packages are not going to be part of an existing dependency chain. [ YOCTO #14787 ] (From OE-Core rev: fb1de2abc53bd742bc55cfecd384b78852c10d80) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/qemurunner: Work around possible control character contaminationRichard Purdie2022-09-131-5/+1
| | | | | | | | | | | | | | | | | Using a binary string as the login banner search expression is fraught with risks. We've seen cases on the autobuilder where "login:" is clearly shown but the code hasn't triggered. The most likely cause is hidden control characters in the output causing the search to fail. Take the opportunity to remove the horrible binary string search, at the expense of decoding the bootlog multiple times. Tweak the logging so we can know which log was printed (self.msg or bootlog) just in case this isn't the issue and we need more information in future. (From OE-Core rev: 91b9e30e08695e715ef14c3df7471e8c99f9deb5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-module-split.bbclass: Pass the kernel package name to depmodwrapperAndrei Gherzan2022-09-131-1/+1
| | | | | | | | | This makes sure that the postrm script it using the right kernel paths. (From OE-Core rev: f7b191f80d4da740089a301062e7ac0b82d1d242) Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Pass the kernel package name to depmodwrapperAndrei Gherzan2022-09-131-1/+1
| | | | | | | | | | This makes sure that the postinstall script it using the right kernel paths. (From OE-Core rev: 5105820df4800673c188366a76c1a3bd387a7148) Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc: Don't wipe out src dir when EXPORT_FUNCTIONS is used.Kristian Amlie2022-09-091-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | When 73fa855f6af5ef9c3 was introduced, the "cleandirs" variable flag started applying to functions exported using EXPORT_FUNCTIONS. The externalsrc class is supposed to remove cleandirs in order to prevent wiping out an external src folder (home directory?), but doesn't take the previous point into account. The result is that cleandirs is still in effect. To fix this, apply the cleandirs manipulation to all variables, not just predefined ones. This is expensive, but since it executes inside an `if externalsrc` clause, and EXTERNALSRC is usually only set for specific single recipes, it won't affect most recipes. Richard Purdie <richard.purdie@linuxfoundation.org> is the original author of this patch. I just submitted it under my name for blame purposes, and also we have been testing it a lot in my company. This is the original discussion: https://lists.openembedded.org/g/openembedded-core/topic/91374926 (From OE-Core rev: 74ad497a55007960a4869905878e3ccbd11e4369) Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: files: Extend overlayfs-etc classVyacheslav Yurkov2022-09-091-1/+4
| | | | | | | | | | | | | Add the ability to expose the lower layer of /etc when mounting overlay. This is the similar to what overlayroot script from initramfs-framework does. By default, this option is turned off to keep an old behavior intact. (From OE-Core rev: 791e8a8bacce5a7f31f4d7bcbfb17df2967fd258) Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Update overlayfs classes to use new bitbake functionalityVyacheslav Yurkov2022-09-092-0/+219
| | | | | | | | | | OverlayFS classes belong to a recipe scope (From OE-Core rev: 7afa7739e82220729566ccabe2675a8991f9485a) Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands.bbclass: avoid moving ssh host keys if etc is writablePeter Bergin2022-09-081-13/+17
| | | | | | | | | | | | | | | | | | | | | | When using IMAGE_FEATURE read-only-rootfs ssh host keys are moved to volatile storage. If the feature overlayfs-etc is used in addition to read-only-rootfs /etc is writable and the move is not wanted. But in the case also the IMAGE_FEATURE stateless-rootfs is used the keys will be moved as storage of keys should not be wanted in a stateless-rootfs. This change only takes effect in the case IMAGE_FEATURE contains read-only-rootfs. In adddition the following cases are handled: IMAGE_FEATURES = "read-only-rootfs" --> ssh keys/config handled as ro root IMAGE_FEATURES = "read-only-rootfs overlayfs-etc" --> ssh keys/config handled as rw root IMAGE_FEATURES = "read-only-rootfs stateless-rootfs" --> ssh keys/config handled as ro root IMAGE_FEATURES = "read-only-rootfs overlayfs-etc stateless-rootfs" --> ssh keys/config handled as ro root (From OE-Core rev: d2ad7aa1f2153955adc044ea4eb11c48086a01d1) Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* core-image.bbclass: Exclude openssh complementary packagesPavel Zhukov2022-09-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Openssh (main) package may be marked for installation via complementary packages mechanism if sftp-server is installed and this causes conflict with dropbear [Yocto #14858] [1]. Excluding openssh complementary packages if packagegroup-core-ssh-dropbear is in PACKAGE_INSTALL fixes this issue. To install openssh complementary packages in the images with ssh-server-dropbear they may be added manually into the list because they will be excluded from the installation even if corresonding class (dev-pkg or dbg-pkgs) inherited. [1] Error: Problem: problem with installed package dropbear-2020.81-r0.core2_64 - package dropbear-2020.81-r0.core2_64 conflicts with openssh provided by openssh-8.9p1-r0.core2_64 - package openssh-8.9p1-r0.core2_64 conflicts with dropbear provided by dropbear-2020.81-r0.core2_64 - package openssh-ptest-8.9p1-r0.core2_64 requires openssh, but none of the providers can be installed - conflicting requests (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages) (From OE-Core rev: fa08030b32c2bf77889c23f964892f46e84994a3) Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Use consistent make flags for menuconfigRichard Purdie2022-09-031-1/+2
| | | | | | | | | | | We're currently only passing in a subset of the kernel make flags to menuconfig. Fix this to be consistent with all the other kernel operations since these are becomming increasingly reliant on host compilers and flags and target toolchains as well. (From OE-Core rev: 8c616bc090d1834a21073a33209323220c05d2e5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Always set CC and LD for the kernel buildRichard Purdie2022-09-031-6/+7
| | | | | | | | | | | | It as been bothering me a bit that we don't set CC and LD consistently for the kernel make calls and this can lead to interesting bugs as the kernel increases in complexity. Add them to EXTRA_OEMAKE so they're always passed in. This makes everything slightly more consistent and less likely to break in future. (From OE-Core rev: afe8c318843e4033dcc07e4f10198df241d8e4f6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: Set SOURCE_DATE_EPOCH for squashfsWilliam A. Kennington III2022-09-011-5/+13
| | | | | | | | | | | | | We want to use the reproducible timestamp for all of the files that is set rootfs-postcommands.bbclass, derived from REPRODUCIBLE_TIMESTAMP_ROOTFS. Without this, we use a hardcoded time that is built into the squashfs sources. (From OE-Core rev: c991f9d603127d2b72a464974f0c5dfcc25727bf) Signed-off-by: William A. Kennington III <wak@google.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-setup-builddir: add a check that TEMPLATECONF is validAlexander Kanavin2022-09-011-1/+2
| | | | | | | | | | | | | | specifically that ../../layer.conf exists, and that second-from-last component in the path is 'templates'. This requires tweaking template.conf creation in eSDK bbclass, as we need to ensure that the path in it is valid, and exists (which may not be the case if the SDK is poky-based). (From OE-Core rev: c6f2b57be8893ee58f20cc29d8ec3a5a6edf7c07) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* baremetal-image.bbclass: Emulate image.bbclass to handle new classes scopeAlejandro Hernandez Samaniego2022-08-311-0/+9
| | | | | | | | | | | | | | | | | | | | The new classes scope implemented on commit 7bd328f9d made testimage.bbclass (and perhaps others) stop working for baremetal-images, the expected way to run testimage is no longer to use INHERIT but to use IMAGE_CLASSES instead, however this functionality was not implemented in the baremetal-image class until now. Emulate image.bbclass allowing the baremetal-image class to use IMAGE_CLASSES to fix this issue. Set defaults for IMAGE_FEATURES to allow bitbake checks to pass properly. (From OE-Core rev: bf083929ecd69a144fedeef5a8725775f632a16c) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: Fix qemuppc target cpu optionRichard Purdie2022-08-311-2/+3
| | | | | | | | | We see a lot of warnings about incorrect processor types on qemuppc, drowning out anything else. Fix the option. (From OE-Core rev: 0371e429d9e127983ddfaec366ce1c38c99158e4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>