summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
Commit message (Collapse)AuthorAgeFilesLines
* recipes/classes: Drop prepend/append usage with PACKAGESPLITFUNCSRichard Purdie2023-01-055-5/+5
| | | | | | | | | | As far as I can tell, none of these uses of PACKAGESPLITFUNCS need append/prepend operators, the standard += and =+ can work just fine. Since OE-Core is copied a lot, use the preferred syntax which is also simpler to parse and change. (From OE-Core rev: 846ff49465337dddd75a83161f41f48117f6571c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Move pkgdata handling functions to oe.packagedataRichard Purdie2023-01-052-7/+9
| | | | | | | | | To avoid reparsing the bbclass code all the time, move the functions to the packagedata python function library code which is more efficient. (From OE-Core rev: f520a3039540b1183b1b2bdaaf8b9195995c0187) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* tcmode-default.inc: set LLVMVERSION to a major version wildcardAlexander Kanavin2022-12-261-1/+1
| | | | | | | | | | | | | | | There is no longer need to be specific: none of the recipes using this variable in core need to know the particular version of llvm exactly when using the default one set via PREFERRED_VERSION from LLVMVERSION. This as well enables automated version updates of llvm for minor releases. (From OE-Core rev: f0ab1736438f6f23603e3694dc2f0b724b103722) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Enable baremetal targetsAlejandro Hernandez Samaniego2022-12-212-1/+10
| | | | | | | | | | | | | | | | | | | | | | | Allow rust to build for baremetal targets by generating the proper target triple, follow the format specified by rusts Triple [1], that is: <arch>-<vendor>-<os>-<abi> This is done automatically based on both TARGET_OS and TCLIBC. For example, a riscv64 baremetal target triple would look like this: riscv64gc-poky-none-elf matching rusts own target triple for riscv64 according to platform-support [2] [1] https://docs.rs/target-lexicon/latest/target_lexicon/struct.Triple.html [2] https://doc.rust-lang.org/stable/rustc/platform-support.html (From OE-Core rev: 3bff689f0c5ea73076ce0510872b0552e8660cbe) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot.bbclass: make sure runqemu boots bundled initramfs kernel imageJagadeesh Krishnanjanappa2022-12-211-1/+2
| | | | | | | | | | | | | | | | | The QB_DEFAULT_KERNEL is set to pick bundled initramfs kernel image if the Linux kernel image is generated with INITRAMFS_IMAGE_BUNDLE="1". This makes runqemu to automatically pick bundled initramfs kernel image instead of explicitly mentioning bundled initramfs kernel image in runqemu. [YOCTO #14748] (From OE-Core rev: 52371624313184e1a825519160c3833e282df8b9) Signed-off-by: Jagadeesh Krishnanjanappa <workjagadeesh@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson: no need to rebuild on installRoss Burton2022-12-171-1/+1
| | | | | | | | | | | | | | On install, Meson will rebuild targets which don't define their dependencies, as it can't know if they need to be rebuilt or not. This includes gtk-doc, which can be slow to run. As we control the execution of meson we know that a rebuild isn't required, so we can pass --no-rebuild and speed up the install task. (From OE-Core rev: da7e8bbb75bfb1a1c820b310196e510c05fc67c7) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "kernel-fitimage: reduce dependency to the cpio"Richard Purdie2022-12-131-1/+1
| | | | | | | | | This reverts commit ef0d0734866505c1c6e0528a0423e7248afb3ff8. We can't do this since the initramfs needs to use DEPLOY_DIR_IMAGE which isnt ready until do_image_complete. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: reduce dependency to the cpioPatrick Williams2022-12-131-1/+1
| | | | | | | | | | | | | | In order to build a fitimage, we don't need the image to be "complete" but we need the cpio portion of it built since the cpio is what ends up inside the FIT. By reducing the dependency to `do_image_cpio` we are able to include an image's rootfs as the ramdisk for a FIT and then bundle that FIT into a larger SPI flash layout. (From OE-Core rev: ef0d0734866505c1c6e0528a0423e7248afb3ff8) Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson: always use meson subcommandsRoss Burton2022-12-131-3/+3
| | | | | | | | | | | | | | Invoking meson with just paths is a deprecated use of the binary and causes warnings, so call 'meson setup' explicitly. Whilst doing this cleanup, we can also call 'meson compile' and 'meson install' instead of ninja. (From OE-Core rev: b248cb1ada04f57a5c4590c7e5efa04f68bc8843) 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>
* baremetal-image: Avoid overriding qemu variables from IMAGE_CLASSESAlejandro Hernandez Samaniego2022-12-091-9/+11
| | | | | | | | | | | | | | | | | Since qemuboot is part of IMAGE_CLASSES via qemu.inc it is being inherited before we set the QB_FOO variables. Since our variables have conditional definitions and at that point they've already been defined by qemuboot, we can no longer define them in our class. Move the IMAGE_CLASSES inherit to execute it after we set the QB_FOO variables to fix booting via runqemu. (From OE-Core rev: 8ed78ec262b2502dc3b673b24a868a3eec616a20) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool/friends: Use LAYERSERIES_CORENAMES when generating ↵4.2_M1Richard Purdie2022-12-081-2/+1
| | | | | | | | | | | | | | | | | | LAYERSERIES_COMPAT entries It seems some layers want to subvert the intent of LAYERSERIES_COMPAT so bitbake is going to have to become stricter about the values there. To work with this, use LAYERSERIES_CORENAMES to generate the entries in LAYERSERIES_COMPAT instead of the current magic LAYERSERIES_COMPAT_core value which may not continue to work. The downside to this is when migating between releases, people would need to update devtool workspace layer.conf files. I guess you could argue this is a feature! (From OE-Core rev: 96ff9baa8ead57504f40f362ed3a4aaa776d1b58) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: remove empty module directories to prevent QA issuesOvidiu Panait2022-12-081-2/+2
| | | | | | | | | | | | | | | | | | | | Currently, allyesconfig test runs for x86_64 fail with: ERROR: linux-yocto-5.19.17+gitAUTOINC+0cba9aa404_aaf4490d18-r0 do_package: QA Issue: linux-yocto: Files/directories were installed but not shipped in any package: /lib/modules/5.19.17/kernel/drivers/nvdimm With CONFIG_NVDIMM_TEST_BUILD=m, an empty nvdimm directory is created during modules_install, which triggers the QA issue. Extend kernel_do_install() to also remove inner empty directories that might get created by modules_install. (From OE-Core rev: 7120b09a33af4c9a18063c0f2e51fb598697e39c) Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* 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>