summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* rust-target-config: Drop has-elf-tls optionRichard Purdie2022-08-301-1/+0
| | | | | | | | | | | This option doesn't seem to exist any more and causes lots of warnings. Remove it. (From OE-Core rev: 8e1614a906086fb46c5dd7b7f2dffab91194165c) 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>
* rootfs-postcommands.bbclass: Follow function rename in rootfspostcommands.pyAndrei Gherzan2022-08-251-2/+13
| | | | | | | | | | | | | 'shadow_sort' was renamed to 'tidy_shadowutils_files' in rootfspostcommands.py so we reflect this in SORT_PASSWD_POSTPROCESS_COMMAND. This also creates a deprecation function for 'shadow_sort'. (From OE-Core rev: b474d7598d0803ba92b01944b961b28beec3bfe2) Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm.bbclass: fix architecture mappingEnrico Scholz2022-08-251-13/+11
| | | | | | | | | | | | | | Use the same code as the 'nodejs_16.4.bb recipe' for mapping the OE arch to the NPM arch. A noticeable change (and fix for exiting problems) is the move from 'arm' to 'arm64' for 'aarch64'. (From OE-Core rev: cd773722cb66eea487c6004a006e1b88f0b07a5a) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm.bbclass: fix typo in 'fund' config optionEnrico Scholz2022-08-251-1/+1
| | | | | | | | | | Configuration option is named 'fund', not 'funds'. (From OE-Core rev: a28cde6defe9aefc3df02f321cc293f0b562304a) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo_common.bbclass: Add missing space in shell conditional codeKhem Raj2022-08-211-1/+1
| | | | | | | | | | | | Fixes cofigure errors in rust recipes e.g. tmp/work/riscv32-yoe-linux-musl/rust/1.62.1-r0/temp/run.setup_cargo_environment.3047487: line 215: [: missing `]' (From OE-Core rev: 9ff2817536f4b568e702470789efeab0008d73a0) 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>
* kernel-fitimage.bbclass: only package unique DTBsAwais Belal2022-08-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | The KERNEL_DEVICETREE and related variables could potentially have a device tree listed multiple times and this works okay for most scenarios. However, when we create FIT entries for these we get duplicate nodes and uboot-mkimage fails with fit-image-initramfs-image.its:219.58-229.19: ERROR (duplicate_node_names): /images/fdt-freescale_imx8mp-evk-ecspi-slave.dtb: Duplicate node name fit-image-initramfs-image.its:307.50-317.19: ERROR (duplicate_node_names): /images/fdt-freescale_imx8mp-evk-ndm.dtb: Duplicate node name fit-image-initramfs-image.its:362.54-372.19: ERROR (duplicate_node_names): /images/fdt-freescale_imx8mp-evk-rm67199.dtb: Duplicate node name fit-image-initramfs-image.its:417.56-427.19: ERROR (duplicate_node_names): /images/fdt-freescale_imx8mp-evk-usdhc1-m2.dtb: Duplicate node name fit-image-initramfs-image.its:648.59-658.19: ERROR (duplicate_node_names): /configurations/conf-freescale_imx8mp-evk-ecspi-slave.dtb: Duplicate node name fit-image-initramfs-image.its:744.51-754.19: ERROR (duplicate_node_names): /configurations/conf-freescale_imx8mp-evk-ndm.dtb: Duplicate node name fit-image-initramfs-image.its:804.55-814.19: ERROR (duplicate_node_names): /configurations/conf-freescale_imx8mp-evk-rm67199.dtb: Duplicate node name fit-image-initramfs-image.its:864.57-874.19: ERROR (duplicate_node_names): /configurations/conf-freescale_imx8mp-evk-usdhc1-m2.dtb: Duplicate node name ERROR: Input tree has errors, aborting (use -f to force output) uboot-mkimage: Can't open arch/arm64/boot/fitImage.tmp: No such file or directory We fix this by tracking the DTBs we're compiling in the FIT and only picking up unique ones. (From OE-Core rev: 98acfea1e82a90c920bdd636033f930ac034b318) Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distrooverrides: Move back to classes whilst it's usage is clarifiedRichard Purdie2022-08-181-38/+0
| | | | | | (From OE-Core rev: eb56f89a9b2163bdb8c91dbdc33696fea052d032) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-config.bbclass: Don't bail out early in multi configsKevin Hao2022-08-121-2/+6
| | | | | | | | | | | | | | | | Previously we had the support to build multiple u-boot configs for a machine, but after the change in the commit 801a27d73b10 ("uboot-config.bbclass: Raise error for bad key"), this anonymous function would bail out after handling the first config in UBOOT_CONFIG. This is definitely not what we want. Fix it by making sure all the configs are handled. Fixed: 801a27d73b10 ("uboot-config.bbclass: Raise error for bad key") (From OE-Core rev: 372798afe028569b07ac55e0dc1ff377d83d18bf) Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: rootfs-postcommands: autologin root on serial-gettyJohannes Schneider2022-08-123-1/+22
| | | | | | | | | | | | | | | | when empty-root-password AND serial-autologin-root are part of the IMAGE_FEATURES, save some of the developers time by not having to type the (then still sole) 'root' username on the serial console after each and every reboot this is done by inserting '--autologin root' into the command line of the responsible 'getty' service (From OE-Core rev: 01b3cb46405f814e27cab5290118211786cd63a0) Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Update classes to match new bitbake class scope functionalityRichard Purdie2022-08-12143-0/+17601
Move classes to classes-global or classes-recipe as appropriate to take advantage of new bitbake functionality to check class scope/usage. (From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>