summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* populate_sdk_ext: Handle spaces within user $PATHKenfe-Mickael Laventure2023-03-111-1/+1
| | | | | | | | | | | | | | The script generated by the sdk_ext_postinst function was not quoting the user existing PATH when updating it causing the export command to fail. Add necessary double quotes around $PATH. (From OE-Core rev: 00e96bf250eaaded839caf465dbc0af5b604aed7) Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts: Handle spaces within user $PATHKenfe-Mickael Laventure2023-03-111-1/+1
| | | | | | | | | | | | | The environment-setup script generated by the recipe was not quoting the user existing PATH when updating it causing the export command to fail. Add necessary double quotes around $PATH. (From OE-Core rev: 42177ff2d45ee70ad00917bb6fbabca49dae4f59) Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* manpages: use an intercept to run mandbRoss Burton2023-03-081-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you build an image with lots of manpages in, then each package will run mandb inside qemu-user at rootfs time. This is a slow operation and should be done once when all of the packages have installed using an intercept instead. The call to mandb has been changed too. mandb doesn't actually allow the configuration file to be read from stdin so that was being ignored, instead write the file to a temporary file and use that. This means we then don't need to tell it where to search explicitly, and it writes the indexes to the correct paths so we don't need to move files afterwards either. Sadly we do still need to run mandb inside qemu-user, as the underlying database is a gdbm file and they are byte-order dependent. For my test case of core-image-base with api-documentation DISTRO_FEATURES and doc-pkgs IMAGE_FEATURES enabled, the performance gain is significant: core-image-base do_rootfs -1303.1s -73.6% 1771.6s -> 468.5s (From OE-Core rev: fbd8a57aa307bfda70a08cb78af3c97f05c39a3a) 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>
* linux: inherit pkgconfig in kernel.bbclassMing Liu2023-03-061-1/+1
| | | | | | | | | | | | pkgconfig is being required to find dependencies for building kernel native tools, move "inherit pkgconfig" to kernel.bbclass so BSP kernel recipes can also benefit from it. (From OE-Core rev: 8a84bd98e3fbc16c782f83064801e469d086911e) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Add kernel specific OBJDUMPKhem Raj2023-03-016-6/+12
| | | | | | | | | | | | | | | | | | | | This helps in switching toolchains cleanly for kernel build between gcc and clang Currently, some kernels allow building with clang but not all the distro might use clang as default system compiler but kernel may demand gcc which is provided via KERNEL_* variables, however kernel does use OBJCOPY at places during build and it maybe set to use llvm objcopy when using clang. That should be a deliberate setting when clang is used for kernel as well, otherwise it should use binutils provided objcopy (From OE-Core rev: 17b409f2fd97894e0943d13c2cb0d52abde647e3) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: fix kernel-meta data detectionUlrich Ölmann2023-02-191-1/+1
| | | | | | | | | Fixes: 7ef7af5c03ba ("kernel-yocto: restore kernel-meta data detection for SRC_URI elements") (From OE-Core rev: c77754f23e3fb49a62602a6c6a04d5525d1cf457) Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cml1: remove redundant addtaskRoss Burton2023-02-171-1/+0
| | | | | | | | | The configure task is added by base.bbclass, no need to do it again. (From OE-Core rev: 2d7897bcab2b70d850bfe02ded42b20eb695eda8) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/populate_sdk_base: Append cleandirsJoshua Watt2023-02-151-1/+1
| | | | | | | | | | | Append to cleandirs in do_populate_sdk so that other classes (specifically, create-spdx-2.2) can add additional directories (From OE-Core rev: 5e6f74b1910a6ddd359b037b975ba29406e1651b) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-alternatives: fix typosUlrich Ölmann2023-02-091-3/+3
| | | | | | | (From OE-Core rev: d3ca05b072c152b76a86edaaddebabdef312ea95) Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: print all QA functions exceptionsMauro Queiros2023-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | For the QA checks in `image.bbclass`, all exceptions other than `oe.utils.ImageQAFailed` always print the following generic message: "Image QA function func_name failed" This can be very misleading, as it may hide python syntax errors and other kind of issues that are hard to detect without more explicit error messages. This change makes sure that the error message of all exceptions are displayed. Before this change: "Image QA function func_name failed" After this change: "Image QA function func_name failed: f-string: empty expression not allowed (<string>, line 13)" (From OE-Core rev: 3d85b30d8704d38b86f5b006748cebc74bd2a4fa) Signed-off-by: Mauro Queiros <maurofrqueiros@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-locale: Fix on target locale generationRichard Purdie2023-02-041-0/+1
| | | | | | | | | If on target locale generation is used, it fails at first boot showing errors about a missing directory. Ensure the directory exists. (From OE-Core rev: f2844c9f1bbb729562063d96a3d1cc9d44dafa0a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scons.bbclass: Make MAXLINELENGTH overridableKhem Raj2023-02-041-4/+5
| | | | | | | | | | | | | | | | older scons do not support MAXLINELENGTH and some packages still may be using older scons, these recipes can clear SCONS_MAXLINELENGTH in them and get going. Set SCONS_MAXLINELENGTH = "" in such recipes. (From OE-Core rev: 34de57d12c0a752f66c962d29e5335c1035db066) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* linux: add loongarch64 supportXiaotian Wu2023-02-041-0/+2
| | | | | | | (From OE-Core rev: 103993845bb8efa3a17df4585b248d775795ac4f) Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: add support for loongarch64Xiaotian Wu2023-02-041-0/+4
| | | | | | | (From OE-Core rev: 759baaceb4dd623d5da12ba0d01540fa080154ba) Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Fix error message to reflect new syntaxAlejandro Hernandez Samaniego2023-02-021-1/+1
| | | | | | | | (From OE-Core rev: ec73d19d78e8f30ff9b817490c23bcdf8ea47c86) 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>
* meta: remove True option to getVar and getVarFlag calls (again)Martin Jansa2023-02-023-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | * True is default since 2016 and most layers were already updated not to pass this parameter where not necessary, e.g. oe-core was updated couple times, first in: https://git.openembedded.org/openembedded-core/commit/?id=7c552996597faaee2fbee185b250c0ee30ea3b5f Updated with the same regexp as later oe-core update: https://git.openembedded.org/openembedded-core/commit/?id=9f551d588693328e4d99d33be94f26684eafcaba with small modification to replace not only d.getVar, but also data.getVar as in e.g.: e.data.getVar('ERR_REPORT_USERNAME', True) and for getVarFlag: sed -e 's|\(d\.getVarFlag \?\)( \?\([^,()]*, \?[^,()]*\), \?True)|\1(\2)|g' \ -i $(git grep -E 'getVarFlag ?\( ?([^,()]*), ?([^,()]*), ?True\)' \ | cut -d':' -f1 \ | sort -u) (From OE-Core rev: 26c74fd10614582e177437608908eb43688ab510) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scons: Pass MAXLINELENGTH to scons invocationKhem Raj2023-01-311-4/+9
| | | | | | | | | | | | | | | | | | | | | | | This helps in overcoming a problem when using scons with ccache enabled. When commands get longer, then it resorts to using response files to do the operations e.g. @/tmp/tmp96j6icra.lnk when this response file is inboked by compiler it works ok, however, this does not when ccache is used to invoke the complilation. We see errors e.g. ccache @/tmp/tmppsyij_0v.lnk ccache: error: execute_noreturn of @/tmp/tmppsyij_0v.lnk failed: No such file or directory Using MAXLINELENGTH setting ensures that we can use ARG_MAX to extend the length of commandline and hence avoid using response files. This issue is also reported in mongodb [1] [1] https://jira.mongodb.org/browse/SERVER-38389 (From OE-Core rev: 29558f6218f4676b459f2c78f82d245339d51c8c) 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>
* qemuboot.bbclass: add QB_NFSROOTFS_EXTRA_OPT for nfs rootfs extra optionXiangyu Chen2023-01-261-0/+3
| | | | | | | | | | This extra options to be appended to the nfs rootfs options in kernel boot arg. (From OE-Core rev: a255a7f350b558445f4f6c29f60e77c33883b08a) Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/fs-uuid: Fix command output decoding issuePawel Zalewski2023-01-261-1/+1
| | | | | | | | | | | The default return value from subprocess.check_output is an encoded byte. The applied fix will decode the value to a string. (From OE-Core rev: 046769fa952a511865c416b80d10af6287147fb7) Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel/linux-kernel-base: Fix kernel build artefact determinism issuesRichard Purdie2023-01-262-3/+4
| | | | | | | | | | | | | With the 6.1 kernel we've seen reproducibility/determinism issues where the kernel seems to rebuild headers referencing the hostname or local user. kernel-devsrc building after the kernel seemed to trigger it in some cases. Moving the definitions to the bbclass used by all the kernel recipe code including kernel-devsrc seems to be the best way to ensure this doesn't happen. (From OE-Core rev: 60681baa97daf4f3856453c34d6be08b6771a81b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo-update-recipe-crates.bbclass: Mark the update_crates task as nostampPeter Kjellerstedt2023-01-261-0/+1
| | | | | | | | | | | | If having devtool modified a recipe and then updated the crate versions, e.g., by doing a git bisect, running the update_crates task needs to always update the .inc file even if the bitbake metadata has not changed. (From OE-Core rev: 137d290ac1f7516a509fc9d264489e51c3004d5d) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native: Implement BBCLASSEXTEND PACKAGES_DYNAMIC handlingRichard Purdie2023-01-261-2/+5
| | | | | | | | | | | Recipes that use native BBCLASSEXTEND and set PACKAGES_DYNAMIC will currently see PREFERRED_PROVIDER warnings. Some recipes work around this but lets fix the core code to handle remapping PACKAGES_DYNAMIC correctly so the workarounds aren't necessary any more. (From OE-Core rev: e74b416231610ce3962e5b7bc21bd382579802ad) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Fix missing leading whitespace with ':append'Niko Mauno2023-01-262-2/+2
| | | | | | | | | | | | Mitigate occurences where ':append' operator is used and leading whitespace character is obviously missing, risking inadvertent string concatenation. (From OE-Core rev: fcd340ec53ff8352b8cae0eb351810072b025a08) Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native: Drop special variable handlingRichard Purdie2023-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Back when it was merged in https://git.yoctoproject.org/poky/commit/?id=c4257ed8b1040a5a0e9a95846d81961741239116 it appeared special handling in setVar was necessary. Likely due to other fixes and improvements it no longer appears to be. The results of "bitbake world -g" before and after this change are identical for oe-core and meta-openembedded. Therefore drop the "parsing=True" special parameter to setVar() meaning overrides can now be cleared. This means that something like: DEPENDS:append = " bash" now functions as expected, adding bash to the target recipe and bash-native to the native BBCLASSEXTENDED version. Without this change, it would add bash to the native version as well as bash-native which is clearly incorrect. [YOCTO #15010] (From OE-Core rev: 99a5105f7b5303cd36077b5910c662a865c1782c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-bin.bbclass: remove unused classMichael Opdenacker2023-01-151-154/+0
| | | | | | | (From OE-Core rev: 693e6bf7936f446c18b5db4d33605a88cb843cd4) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python_pep517: use python3-build, not picobuildRoss Burton2023-01-131-3/+4
| | | | | | | | | | | | | | | | Now that the bootstrap sequence for pypa/build is just python3-packaging, and python3-pyproject-hooks, we can use build instead of picobuild. The only change visible outside of this class is that the variable PEP517_PICOBUILD_OPTS is now PEP517_BUILD_OPTS, but I'm only aware of one recipe that used that variable. (From OE-Core rev: 202c2e3c9481a8841af2556862a76e27d703246d) 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>
* toolchain-scripts: compatibility with unbound variable protectionJan Kircher2023-01-121-1/+1
| | | | | | | | | | Fixed an error when Bash's unbound variable protection is enabled (set -u) and variable "LD_LIBRARY_PATH" does not exist. (From OE-Core rev: 85685370b0ad93291cda59fb091a15eeecf5e0d5) Signed-off-by: Jan Kircher <openembedded@hetsh.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* baremetal-helloworld: Enable x86 and x86-64 portsAlejandro Hernandez Samaniego2023-01-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The qemux86 port for helloworld-baremetal builds in the standard way, however, it uses NASM syntax for the startup code, hence we include a dependency to nasm-native, QEMU forces us to use an ELF file rather than a bin file to boot from this architecture using the -kernel parameter. - QEMU refuses to boot using the -kernel parameter for files containing an ELF64 header [1], instead, it requires a multiboot2 compatible image. We could create an image that contains a multiboot2 header by piggybacking into grub2-native, specifically grub-mkrescue, but it requires some extra runtime dependencies (xorriso which is currently part of meta-oe), and assumes a grub installation exists on the host. Due to host contamination and dependency complications, we dont rely on grub2, but rather do this process manually instead, the x86-64 port contains a stage1 bootloader, stage2 bootloader and a 64 bit baremetal app (multiboot2 compatible), booting into real (16 bit), protected (32 bit) and long (64 bit) modes, eventually running the helloworld-baremetal app. This is the reason why we need the code changes to use a separate Makefile, and create an image specifically for qemux86-64. $ runqemu nographic Booting from ROM.. Hello OpenEmbedded on x86! $ runqemu nographic Starting Stage 1 Bootloader Loading Stage 2 Bootloader Stage 2 Loaded. Jumping to Stage2 Bootloader In Stage 2 Done Hello OpenEmbedded on x86-64! [1] https://gitlab.com/qemu-project/qemu/-/blob/v7.2.0/hw/i386/multiboot.c#L199 (From OE-Core rev: 1dffd81b2991f90ab95cb36d8ff7626efd21434f) 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>
* rust: Do not use default compiler flags defined in CC crateAnton Antonov2023-01-122-9/+35
| | | | | | | | | | | | | | | | | | | | | Rust crates build dependecy C libraries using "CC" crate. This crate adds some default compiler parameters depending on target arch. For some targets these parameters conflict with the parameters defined by OE. Warnings/errors like this can be seen in the case: cc1: error: switch '-mcpu=cortex-a15' conflicts with switch '-march=armv7-a+fp' [-Werror] Lets use only the OE parameters by exporting CRATE_CC_NO_DEFAULTS. https://github.com/rust-lang/cc-rs#external-configuration-via-environment-variables This patch fixes https://bugzilla.yoctoproject.org/show_bug.cgi?id=14947 (From OE-Core rev: 0c07089bdf7e0d7d8f37552db0bcd75f860979d9) Signed-off-by: Anton Antonov <Anton.Antonov@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes, classes: Avoid adding extra whitespace to PACKAGESPLITFUNCSPeter Kjellerstedt2023-01-125-6/+6
| | | | | | | | | | | | This is a follow-up to commit 846ff49465 to remove the extra whitespace that is no longer needed after converting :append and :prepend to += and =+. (From OE-Core rev: 5a38be49e451c9f9d973b10a33c3972507f7b18a) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: Allow user to select dtb when multiple dtb existsSandeep Gundlupet Raju2023-01-121-1/+15
| | | | | | | | | | | | | | | | | | | Allow user to select the default DTB for FIT image when multiple dtb's exists. From machine.conf or local.conf user can specify the default dtb for FIT image as shown below. FIT_CONF_DEFAULT_DTB = "board-default.dtb" Also fallback to avaialable dtb when FIT_CONF_DEFAULT_DTB doesn't exits or empty. (From OE-Core rev: 160f2c58d68a049a87ddc7aedb2055152ac6ff4e) Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: Adjust order of dtb/dtbo filesSandeep Gundlupet Raju2023-01-121-2/+3
| | | | | | | | | | | | | | | | | | | | | The dtb files must be before the dtbo files, otherwise the overlays may not be applied correctly. From Bruce Ashfield: We can split between dtbs and dtbos, they just need to be sorted for reproducibility reasons. Of course, this was only working by luck previously (before the sort), since it has always been gathering dtbs and dtbo's with find, depending on filesystem ordering for the order in the fitimage). (From OE-Core rev: bcb3c0272f6ab846c3232548df1e1182bcc67486) Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: image: Set empty weak default IMAGE_LINGUASAlex Kiernan2023-01-061-2/+1
| | | | | | | | | | | | This is already set in default-distrovars.inc and so this assignment will almost never succeed. Rather than leaving it to confuse, set an empty weak default. (From OE-Core rev: eb402948158659da7de0fbbb1bb403c8dad06e2b) 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>
* 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>