summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
...
* sanity.bbclass: sanity check for if bitbake is present in PATHDorinda2021-01-271-0/+5
| | | | | | | | | | | | | | | If a user executes the environment script instead of sourcing it, there's an error about an empty element in PATH. This is because bitbake isn't present in environment variable PATH. Hence, this patch adds a sanity check to verify if bitbake is present in PATH and if bitbake isn't present issue a warning message. [YOCTO #13822] (From OE-Core rev: e08799913a7f207bc63e085eb98196fd61ed57bc) Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Verify that user isn't building in PSEUDO_IGNORE_PATHSDorinda2021-01-271-0/+7
| | | | | | | | | | | | | If a user builds in a path in PSEUDO_IGNORE_PATHS, random failures are generated. Hence this patch adds a sanity check in sanity.bbclass to ensure that a user isn't building in PSEUDO_IGNORE_PATHS. [YOCTO #14179] (From OE-Core rev: 7a681525e904914e938de25df5cc64209097d15d) Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Add test for native/nativesdk inherit orderTomasz Dziendzielski2021-01-271-1/+27
| | | | | | | | | | | | Classes native/nativesdk should be inherited last to prevent unexpected behaviour. [YOCTO #5729] (From OE-Core rev: 55a0197fe62577fd51d41d87822e6d64d85c7680) Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: replace Looseversion with custom version classLee Chee Yang2021-01-231-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | The way distutils.version.LooseVersion compare version are tricky, it treat all these ( "1.0-beta2", "1.0-rc1", "1.0A", "1.0p2" and "1.0pre1") as greater version than "1.0". This might be right for "1.0A" and "1.0p1" but not for the rest, also these version could be confusing, the "p" in "1.0p1" can be "pre" or "patched" version or even other meaning. Replace Looseversion with custom class, it uses regex to capture common version format like "1.1.1" or tag format using date like "2020-12-12" as release section, check for following known string/tags ( beta, rc, pre, dev, alpha, preview) as pre-release section, any other trailing characters are difficult to understand/define so ignore them. Compare release section and pre-release section saperately. included selftest for the version class. [YOCTO#14127] (From OE-Core rev: 6ced85e9ddd3569240f1e8b82130d1ac0fffbc40) Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: use URI instead of decodeurl when detecting unpack dependenciesRoss Burton2021-01-231-15/+15
| | | | | | | | | | | | | | | | decodeurl() has limitations, primarily that it doesn't handle query parameters at all. If a SRC_URI looks like this: http://example.com/download.tar.gz?something Then the returned path attribute is download.tar.gz?something. This means the filename extension detection fails and required tools are not added to the dependencies. (From OE-Core rev: 5cd396c099730b765fc6cd82e2d7748f99de7157) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc: Fix parsing error with devtool non-git sourcesTomasz Dziendzielski2021-01-231-0/+4
| | | | | | | | | | | | | | | | | | If srcdir is under poky directory (e.g. devtool poky/build/workspace/sources) and is not a git repository then ${@srctree_hash_files(d)} will run "git rev-parse --git-dir" and detect poky directory as git-dir and run "'git', 'add', '-A', '.'], cwd=s_dir" trying to add srcdir but build dir is in .gitignore and latest git will fail with "The following paths are ignored by one of your .gitignore files: build" which will end with "ExpansionError during parsing". In this commit I added a check if git_dir is the same as git-dir from TOPDIR (which will detect poky directory) and if yes, then treat srcdir as non-git sources. (From OE-Core rev: 95fbac8dcad6c93f4c9737e9fe13e92ab6befa09) Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types_wic: Move wic working directoryPaul Barker2021-01-201-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | By default the wic working directory is placed under the output directory. When invoking wic under bitbake, the wic output directory is added to PSEUDO_PATHS_IGNORE to avoid issues with files being removed from outside a pseudo environment (see oe-core commit ad8f5532ff). However, wic will copy the rootfs directory into its working directory if it needs to add or remove content before creating a filesystem image. This copy of the rootfs directory must be tracked by pseudo in order to keep the permissions correct in the resulting image. So we can't have the wic working directory under a path in PSEUDO_PATHS_IGNORE unless we like broken permissions. To fix this the new '-w' argument to wic is used to move the working directory away from the output directory. Note that wic deletes the temporary working directory automatically when it finishes creating an image so users won't normally see the 'tmp-wic' directory under WORKDIR. Fixes [Yocto #14129] (From OE-Core rev: 4d07169499c47fa9dc759e6f81843416a6dc25c5) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: skip installing fitImage when using Initramfs bundlesAbdellatif El Khlifi2021-01-201-1/+15
| | | | | | | | | | | | | | | | | | | | When including an initramfs bundle inside a FIT image, the fitImage is created after the install task by do_assemble_fitimage_initramfs. This happens after the generation of the initramfs bundle (done by do_bundle_initramfs). So, at the level of the install task we should not try to install the fitImage. The fitImage is still not generated yet. After the generation of the fitImage, the deploy task copies the fitImage from the build directory to the deploy folder. Change-Id: I3eaa6bba1412f388f710fa0f389f66631c1c4826 (From OE-Core rev: 1b67fd9ac74935fa41e960478c54e45422339138) Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: adding support for Initramfs bundle and u-boot scriptAbdellatif El Khlifi2021-01-201-23/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds Initramfs bundle support to the FIT image in addition to u-boot boot script capability. These new features are selectable. In case of Initramfs, the kernel is configured to be bundled with the rootfs in the same binary (ie: zImage-initramfs-<machine>.bin). When the kernel is copied to RAM and executed, it unpacks the Initramfs rootfs. For more information about Initramfs please read: https://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt For more details about the Initramfs bundle and boot script implementation please check the kernel-fitimage.bbclass paragraph in Yocto reference or mega manual. Current limitations: - Initramfs bundle FIT support has been tested on ARM 32-bit - The kernel image type in case of ARM 32-bit is zImage Change-Id: I901bfd899e8d733c5b9a2b6645b1d4748f4b1fda (From OE-Core rev: 19fa415c8769a67b52babd80f71d68bf36a21db2) Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ccache.bbclass: Use ccache-native and disable ccache for native recipesRobert Yang2021-01-201-1/+1
| | | | | | | | | | | | Since host's ccache is not reliable, so disable ccache for native recipes and use ccache-native for other types of recipes. We need disable ccache for native recipes is because ccache-native now depends on cmake-native which causes circular dependencies, and it's not easy to break the circular. (From OE-Core rev: 631bbd4896882ba2acbe5bc85bc90ab7abc794ef) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "ccache.bbclass: use ccache from host distribution"Robert Yang2021-01-201-2/+1
| | | | | | | | | | | This reverts commit f5b29367af4d8e5daea5771264774aa49519f9a8. Will use ccache-native which is more reliable. (From OE-Core rev: 1b659623430e1a6e6dd266e65bab7ca8155a7138) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/classes: Add supprot for WIC<>VHD/VHDX conversionSinan Kaya2021-01-202-3/+7
| | | | | | | | | (From OE-Core rev: b57b1615d965575deb0bf164b9873fe31a4d39b4) Signed-off-by: Sinan Kaya <okaya@kernel.org> Co-Developed-by: Anatol Belski <anbelski@linux.microsoft.com> Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildstats.bbclass: add functionality to collect build system statsSakib Sajal2021-01-171-3/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a number of timeout and hang defects where it would be useful to collect statistics about what is running on a build host when that condition occurs. This adds functionality to collect build system stats on a regular interval and/or on task failure. Both features are disabled by default. To enable logging on a regular interval, set: BB_HEARTBEAT_EVENT = "<interval>" BB_LOG_HOST_STAT_ON_INTERVAL = <boolean> Logs are stored in ${BUILDSTATS_BASE}/<build_name>/host_stats To enable logging on a task failure, set: BB_LOG_HOST_STAT_ON_FAILURE = "<boolean>" Logs are stored in ${BUILDSTATS_BASE}/<build_name>/build_stats The list of commands, along with the desired options, need to be specified in the BB_LOG_HOST_STAT_CMDS variable delimited by ; as such: BB_LOG_HOST_STAT_CMDS = "command1 ; command2 ;... ;" (From OE-Core rev: edb7098e9e0a8978568a45057c1c3ad2c6cacd67) Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm.bbclass: make shrinkwrap file optionalKamel Bouhara2021-01-161-10/+21
| | | | | | | | | | Some packages don't have shrinkwrap file which means no npmsw uri is provided in the recipe. (From OE-Core rev: 47760b0d7d66b2b68ee197d359f0b7b17374d742) Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Introduce /sysroot-only to SYSROOT_DIRSDiego Sueiro2021-01-162-0/+7
| | | | | | | | | | | | | | | | | The '/sysroot-only' in SYSROOT_DIRS is to be used by recipes which generate artifacts that are not included in the target filesystem. Also, remove the ${D}/sysroot-only dir before copying D do PKGD to generate the packages since it is not supposed to be included in any package. This will allow recipes to share non-target filesystem artifacts without needing to use the DEPLOY_DIR and keep it tidy. (From OE-Core rev: ed1c156cf46c2cdd8038d6bcf7ed58ebe275e3a1) Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs: add option to allow delayed postinsts on read-only rootfsAnton Kachalov2021-01-161-1/+1
| | | | | | | | | | | | | | Example use case in OpenBMC: rootfs is squashfs and the system has either overlayfs for whole rootfs or for some parts (e.g. /etc). This option will allow to create migration one-shot postinsts using "pkg_postinst_ontarget_${PN}" routines defined in recipes to fix files under upper workdir in overlayfs. (From OE-Core rev: 0977204e16279b117811b5d5cdac5918287e95ac) Signed-off-by: Anton D. Kachalov <rnouse@google.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license_image.bbclass: fix missing recipeinfo on selfMichael Ho2021-01-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | Resolve a build bug where image recipes with a do_deploy task will fail. If the image recipe inheriting license_image.bbclass has a deploy task, then the function get_deployed_dependencies will add itself to the list of recipes to get license information for. However, image recipes don't generally deploy license info so this results in an error. File: '/nvme/poky/meta/classes/license_image.bbclass', lineno: 192, function: license_deployed_manifest ... Exception: FileNotFoundError: [Errno 2] No such file or directory: '/nvme/poky/build/tmp/deploy/licenses/core-image-minimal/recipeinfo' Add a corner case to exclude the originating image recipe from the list of dependencies to check. (From OE-Core rev: 13fb39e49e55a0bc7c78b0bfdc372163b3f9e70a) Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Allow exec_native_cmd to run HOSTTOOLSPaul Barker2021-01-131-1/+1
| | | | | | | | | | | This allows programs from HOSTTOOLS (e.g. 'install', 'rm', 'mv', etc) to be more easily executed by wic. Without this change only programs from an actual *-native recipe built by bitbake can be executed by wic. (From OE-Core rev: 8eb186acdecfbb3151c9a0ab148358e3fe5cce39) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_ipk: allow do_populate_sdk in parallel to do_rootfsMichael Ho2021-01-132-2/+3
| | | | | | | | | | | | | | | Switch do_populate_sdk for the ipk package manager to use a separate target opkg config file and separate the lockfiles restricting do_rootfs and do_populate_sdk from running in parallel. This way if an image recipe includes a dependency to do_populate_sdk by default then it will run in parallel to do_rootfs saving time compared to the sequential execution. (From OE-Core rev: 8c210407d07483075a70c8b97ad52b5eae062c9c) Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd.bbclass: improve error message when a service unit specified in ↵Chris Laplante2021-01-131-1/+2
| | | | | | | | | | | SYSTEMD_SERVICE is not found The previous message was fairly useless without diving into the bbclass. (From OE-Core rev: ef6117b148be65536e89409a83cbfd22049c652e) Signed-off-by: Chris Laplante <mostthingsweb@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devicetree: Introduce KERNEL_DTC_FLAGS to pass dtc flagsOvidiu Panait2021-01-121-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently DTC_FLAGS kernel makefile parameter can be specified directly on the command line by adding it to KERNEL_EXTRA_ARGS. However, this prevents scripts/Makefile.lib logic from appending flags that silence dtc warnings (all assignments done from within a makefile, to a variable specified on the command line, are ignored). Because of this, the do_compile log is cluttered with dtc warnings that should only be printed when compiling with W="123": ... /soc: node has a reg or ranges property, but no unit name /soc/gpu: missing or empty reg/ranges property /soc/firmware/gpio: missing or empty reg/ranges property ... To fix this, introduce the dedicated KERNEL_DTC_FLAGS variable to hold dtc flags and export DTC_FLAGS in the environment before generating the dtbs (make allows "+=" operations on variables that come from the environment, so the warnings are silenced properly). (From OE-Core rev: 063b5de86624a42b0aa784db6dddc7552a6dee7f) Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go.bbclass: don't stage test data with sources of dependenciesThomas Perrot2021-01-101-1/+2
| | | | | | | | | | | As for the sources the dependencies contain test data, ELF files and other binaries which aren't necessary for building and which lead to unnecessary QA warnings. (From OE-Core rev: 7faea9766127fe4e1023c89b140cc98020655155) Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Bump min python version to 3.6Richard Purdie2021-01-081-3/+3
| | | | | | | | | | | | | | | There are a number of reasons 3.6 is a good minimum version. Of our supported/tested distros, only debian 9 still had python 3.5, the others have 3.6+ or already required buildtools-tarball. New versions of qemu need python 3.6 as a minimum. We could work around that but it seems simper to require 3.6 which will allow other improvements. As such, bump the minimum python version requirement to 3.6. (From OE-Core rev: 09385dd8d6be3aac31a4d8b1ca935d4fadfef7ba) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ccache.bbclass: Set CCACHE_TEMPDIRRobert Yang2021-01-081-0/+4
| | | | | | | | | | | | | Fixed when build with buildtools-tarball: $ bitbake linux-libc-headers HOSTCC arch/x86/tools/relocs_common.o ccache: error: Failed to create directory /run/user/0/ccache-tmp: Permission denied (From OE-Core rev: 98f52dba421cc2e14794e0b811ccac38f0683713) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ccache.bbclass: use ccache from host distributionAlexander Kanavin2020-12-311-1/+2
| | | | | | | | | | | | | | | ccache 4.x has hard dependencies on cmake-native (used as build system) and zstd, which means inserting ccache-native as DEPENDS into everything creates circular dependencies which are impossible to break. ccache 3.x did not have this problem as it used plain makefiles and an in-tree copy of zlib. (From OE-Core rev: f5b29367af4d8e5daea5771264774aa49519f9a8) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: allow fifosTrevor Woerner2020-12-301-1/+2
| | | | | | | | | | | Allow recipes to create fifos. If insane.bbclass tries to read() a fifo, the process will hang waiting for something to read(). Therefore, skip any check that would try to read() the object, if the object is a fifo. (From OE-Core rev: a7b1d22e93c8846d84a9855876038c2b38958dec) Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base: Fix condition syntax if SDK_RELOCATE_AFTER_INSTALL is ↵Tomasz Dziendzielski2020-12-241-1/+1
| | | | | | | | | | | | disabled If variable is set to empty string the comparison is "if [ -eq 1 ]" which fails with "[: -eq: unary operator expected". (From OE-Core rev: 36a2dc83fd0e1d6e2b8441e24a4cbc48a6c4fc19) Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license.bbclass: Add COMMON_LICENSE_DIR and LICENSE_PATH dirs to ↵Martin Jansa2020-12-241-0/+1
| | | | | | | | | | | | | | | | PSEUDO_IGNORE_PATHS * now without ${COREBASE}/meta in PSEUDO_IGNORE_PATHS after: 73d538f207 bitbake.conf: Prevent pyc file generation in pseudo context the do_package tasks are failing when LICENSE_CREATE_PACKAGE is enabled pseudo.log shows that it's because of license texts copied from ${COREBASE}/meta: path mismatch [46 links]: ino 96733640 db '/OE/build/tmp-glibc/work/all-oe-linux/foo/1.0/image/usr/share/licenses/foo/generic_Apache-2.0' req '/OE/build/openembedded-core/meta/files/common-licenses/Apache-2.0'. (From OE-Core rev: 39423a33595e7ade82fc88f55823660f8532cb84) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: set COMPATIBLE_HOST to *-linuxRoss Burton2020-12-241-0/+2
| | | | | | | | | | | The target system triple contains whether the target is Linux or not, so use it to avoid situations where you can attempt to build a kernel for systems which don't support Linux. (From OE-Core rev: b1eeeab21a81990321468ddbdd1745ea24d1828d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/kernel-fitimage: add ability to sign individual imagesLuca Boccassi2020-12-201-0/+42
| | | | | | | | | | | | Add the ability to have the kernel, dtb and ramdisk individually signed by setting FIT_SIGN_INDIVIDUAL = "1". This could be useful if you are intending to verify signatures before using kexec for example. (From OE-Core rev: 51b6e87df6babf74e73a6d704f044bd88c277ac9) Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/kernel-fitimage: add ability to add additional signing optionsPaul Eggleton2020-12-201-1/+5
| | | | | | | | | | | Add a UBOOT_MKIMAGE_SIGN_ARGS variable to enable passing additional options to uboot-mkimage when it is run the second time to perform signing. (From OE-Core rev: 8fd7ee7414b45a1feeef7982af3583475902a677) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/kernel-fitimage: allow substituting mkimage commandPaul Eggleton2020-12-201-2/+6
| | | | | | | | | | Add a UBOOT_MKIMAGE and UBOOT_MKIMAGE_SIGN variables to allow specifying an alternative uboot-mkimage executable (or wrapper script/function). (From OE-Core rev: aee5bac02eff28a75fa1eee646bc511984013aa4) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/kernel-fitimage: make fitimage_emit_section_config more readableEaswar Hariharan2020-12-201-23/+30
| | | | | | | | | | | fitimage_emit_section_config() has a number of arguments, add named variables to make the function a bit more readable. (From OE-Core rev: a82340eed3165825c129c1f2b1ebf250e0e699c2) Signed-off-by: Easwar Hariharan <eahariha@microsoft.com> Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/kernel-fitimage: add variable for descriptionPaul Eggleton2020-12-201-1/+4
| | | | | | | | | | Add a FIT_DESC variable to make it possible to change how the description is set in the FIT image. (From OE-Core rev: 47c5ea69e1a6c4fd3aa766d5223aff1201a4a1d8) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* linuxloader: Avoid confusing string concat errorsRichard Purdie2020-12-191-3/+3
| | | | | | | | | | None is a bad choice of return value for functions used in variables (strings) as a failure results in concatination errors. Use a string with a clear meaning that can be searched for instead. (From OE-Core rev: c04f04e714ede5d3904058ec82459139ed5e42fa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go.bbclass: Use external linker for native packagesKhem Raj2020-12-181-0/+1
| | | | | | | | | | | | | | | | | go 1.15 has reworked internal linker, which has resulted in regressions in OE where native binaries generated using internal linker in some cases result in corruption during populate_sysroot e.g. glide-native crashing when used after relocation. This improved reliability of native binaries working especially when they use cgo or pie build modes (From OE-Core rev: daf4856ea3ccafc05c808a34d4c6af2bfafea12f) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Otavio Salvador <otavio.salvador@ossystems.com.br> Cc: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-extlinux-config: exclude OVERRIDES from do_create_extlinux_config vardepsChristopher Larson2020-12-151-0/+1
| | | | | | | | | | | | | This function is primarily *appending* configuration entries to the overrides, it only gets it to ensure it's set at all, so doesn't belong in the vardeps. Having a dependency on OVERRIDES means you cannot use a bbclass like distrooverrides without changing the signatures of recipes using this class. (From OE-Core rev: fef74d3651d432977caef8fea54fc54bf2784a74) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* grub-efi-cfg: exclude OVERRIDES from build_efi_cfg vardepsChristopher Larson2020-12-151-0/+1
| | | | | | | | | | | | | This function is primarily *appending* configuration entries to the overrides, it only gets it to ensure it's set at all, so doesn't belong in the vardeps. Having a dependency on OVERRIDES means you cannot use a bbclass like distrooverrides without changing the signatures of recipes using this class. (From OE-Core rev: 8fad5db8c3275a0dc9fdb37761f2e9381e1413da) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: Fix --runall=deploy_archives for imagesRobert Yang2020-12-151-0/+1
| | | | | | | | | | | | | | | | Fixed: INHERIT += "archiver" COPYLEFT_LICENSE_INCLUDE = "*" $ bitbake core-image-minimal --runall=deploy_archives [snip] KeyError: '/path/to/meta/recipes-core/images/core-image-minimal.bb:do_ar_original' [snip] (From OE-Core rev: 59785a51110c450c7629218f6042f1d9d309618e) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils3: allow setup.py to be run from a different directory to ${S}Jack Mitchell2020-12-151-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes setup.py can be buried deep in a source tree. This has traditionally been solved with setting S to the subdirectory in the source. However with the new pseudo changes, some python modules make changes to files beneath ${S}, for example: S = "${WORKDIR}/git/python/pythonmodule" then in setup.py it works with source code in a relative fashion, such as: ../../src This causes pseudo to abort as it isn't tracking the paths. Therefore implement the variable DISTUTILS_SETUP_PATH so that recipes can use: S = "${WORKDIR}/git" DISTUTILS_SETUP_PATH = "${S}/python/pythonmodule" inherit distutils3 This allows the full source tree to be monitored, while distutils can run setup.py from a location other than ${S}. (From OE-Core rev: ddcc349cede0c4fe1909df1ded7b0a7c509cd758) Signed-off-by: Jack Mitchell <ml@embed.me.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* metadata_scm: Fix signature handling of METADATA_REVISION and METADATA_BRANCHRichard Purdie2020-12-091-0/+2
| | | | | | | | | | | | | We're not interested in the dependencies of these functions and what those functions look like, we're interested in the value the variable has. Force the hashed value to be the actual value from the function. This means using METADATA_REVISION in DISTRO_VERSION for example now correctly rebuilds when it changes value. (From OE-Core rev: 005651dc782859c01f170fb974811b2a13cb2cef) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-module-split.bbclass: fix kernel modules getting marked as CONFFILESGratian Crisan2020-12-091-1/+4
| | | | | | | | | | | | | | | | | | Yi pointed out that commit 1a70a92d1f10 ("kernel-module-split.bbclass: identify kernel modconf files as configuration files") is unintentionally adding the actual kernel /lib/modules .ko files to the CONFFILES variable. The root cause is the re-use of the 'files' variable in that commit. Fix it by using a separate variable to keep track of the generated module .conf files that need to be marked as configuration files. Fixes: 1a70a92d1f10 ("kernel-module-split.bbclass: identify kernel modconf files as configuration files") Reported-by: Yi Zhao <yi.zhao@windriver.com> (From OE-Core rev: db5f2ca532db4f0d2e05b7cb5f9d146e1dd76ab3) Signed-off-by: Gratian Crisan <gratian.crisan@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: use SDK_CUSTOM_TEPLATECONF variable to enable custom ↵Chandana kalluri2020-12-091-1/+5
| | | | | | | | | | | | | | | | | | templateconf.cfg The current implementation will always pick an existing templateconf.cfg if present else it will use the one from OE. A user might not always want to pick an existing tempalteconf.cfg even if its present. Introduce SDK_CUSTOM_TEMPLATECONF variable to provide an option for the user to specify if he wants to use an existing custom templateconf.cfg or not If SDK_CUSTOM_TEMPLATECONF=='1' then enable custom templateconf.cfg. By default SDK_CUSTOM_TEMPLATECONF is set to '0' (From OE-Core rev: d0f863a24d05bddeb21e181fb01fa0051c79d7d8) Signed-off-by: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd.bbclass: update command to check systemctl availableKai Kang2020-12-061-2/+2
| | | | | | | | | | | | | | | | | | When use a core image with systemd as docker image, it fails to install/remove package which calls systemctl in post scripts. It fails to run systemctl in a container: bash-5.0# systemctl System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down So replace the criterion command 'type systemctl' with 'systemctl' in package post scripts to check whether systemctl available. (From OE-Core rev: a52e66762c0c51918b1ba3d4622759637b6e920a) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: sort tarball file listingsRoss Burton2020-12-031-1/+1
| | | | | | | | | Help rootfs tarballs be reproducible by sorting the file listing. (From OE-Core rev: 4fa68626bbcfd9795577e1426c27d00f4d9d1c17) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: remove obsolete tar commentRoss Burton2020-12-031-10/+0
| | | | | | | | | | We now depend on tar 1.28, so talking about older tar versions is just confusing. (From OE-Core rev: f19e43dec63a86c200e04ba14393583588550380) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: record LICENSESaul Wold2020-11-291-0/+4
| | | | | | | | | | | | Buildhistory stores various bits of information at both recipe and package level, while there is an associated license manifest directory tree it would require additional scripting to extract that information. (From OE-Core rev: 909bafef282f00dd4a83fab0569885e9788a4ed9) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: Don't use single sstate for pseudo-nativeRichard Purdie2020-11-242-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pseudo-native is a bit special. It conditionally compiles in support for xattr, statx and statvfs amongst other options. If a pseudo-native binary is used on a system where these functions are present but it wasn't compiled in we see hard to debug permissions problems. An example is the devtool.DevtoolExtractTests.test_devtool_deploy_target oe-selftest which shows a cryptic error: File "/home/pokybuild/yocto-worker/oe-selftest-fedora/build/meta/lib/oeqa/selftest/cases/devtool.py", line 1388, in test_devtool_deploy_target self.assertEqual(filelist1, filelist2) File "/usr/lib64/python3.9/unittest/case.py", line 831, in assertEqual assertion_func(first, second, msg=msg) File "/usr/lib64/python3.9/unittest/case.py", line 1037, in assertListEqual self.assertSequenceEqual(list1, list2, msg, seq_type=list) File "/usr/lib64/python3.9/unittest/case.py", line 1019, in assertSequenceEqual self.fail(msg) File "/usr/lib64/python3.9/unittest/case.py", line 670, in fail raise self.failureException(msg) AssertionError: Lists differ: ['-rwxr-xr-x 6000 6000 /etc/init.d/mdmonitor', '-rw-r-[10124 chars]n.8'] != ['-rwxr-xr-x root root /etc/init.d/mdmonitor', '-rw-r-[10124 chars]n.8'] First differing element 0: '-rwxr-xr-x 6000 6000 /etc/init.d/mdmonitor' '-rwxr-xr-x root root /etc/init.d/mdmonitor' This is due to a version of pseudo without statx being used on a system where ls uses statx, hence the files are displayed as 6000.6000 instead of root.root. Avoid this by always building pseudo-native for the specific distro in question rather than using a universal sstate feed. This hopefully fixes one of the mysterious AB-INT issues. (From OE-Core rev: 6e3785a3f1f3cf68f5fe101cd6bebe91db165973) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fs-perms: Ensure /usr/src/debug/ file modes are correctRichard Purdie2020-11-241-1/+1
| | | | | | | | | | | | | | | | | If files are copied into /usr/src/debug directly from WORKDIR (e.g. makedevs) we'd get the permissions from the checkout which would depend on the host umask. Avoid this and be deterministic by setting the file modes consistently. Core code copies the files in so we're responsible for the permissions. Unfortunately to force this change to apply we need to invalidate both the package tasks and the hash equivalance mappings since file mode 'corruption' already made it into the output hashes (both input options were mapped to the output hashes). (From OE-Core rev: 1f958bcd6c9cd12ec76d80586cba15f4d6ed17a7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-uboot: allow compression option to be configurableSinan Kaya2020-11-241-2/+6
| | | | | | | | | | | | | | | | While some platforms might choose to compress the kernel by default especially when boot medium is slow, others want uncompressed kernel. The choice of decompression speed vs. load speed is very platform dependent. Allow platform to choose the option here. (From OE-Core rev: 5c72105e2973e613b5c0f0e6310ffdea6e56c6c7) Signed-off-by: Sinan Kaya <okaya@kernel.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>