summaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2021-01-20kernel: skip installing fitImage when using Initramfs bundlesAbdellatif El Khlifi
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 Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-20kernel-fitimage: adding support for Initramfs bundle and u-boot scriptAbdellatif El Khlifi
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 Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-20ccache.bbclass: Use ccache-native and disable ccache for native recipesRobert Yang
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. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-20Revert "ccache.bbclass: use ccache from host distribution"Robert Yang
This reverts commit f5b29367af4d8e5daea5771264774aa49519f9a8. Will use ccache-native which is more reliable. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-20meta/classes: Add supprot for WIC<>VHD/VHDX conversionSinan Kaya
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>
2021-01-16buildstats.bbclass: add functionality to collect build system statsSakib Sajal
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 ;... ;" Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-16npm.bbclass: make shrinkwrap file optionalKamel Bouhara
Some packages don't have shrinkwrap file which means no npmsw uri is provided in the recipe. Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-16staging: Introduce /sysroot-only to SYSROOT_DIRSDiego Sueiro
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. Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-16rootfs: add option to allow delayed postinsts on read-only rootfsAnton Kachalov
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. Signed-off-by: Anton D. Kachalov <rnouse@google.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-13license_image.bbclass: fix missing recipeinfo on selfMichael Ho
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. Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-13wic: Allow exec_native_cmd to run HOSTTOOLSPaul Barker
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. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-13rootfs_ipk: allow do_populate_sdk in parallel to do_rootfsMichael Ho
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. Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-13systemd.bbclass: improve error message when a service unit specified in ↵Chris Laplante
SYSTEMD_SERVICE is not found The previous message was fairly useless without diving into the bbclass. Signed-off-by: Chris Laplante <mostthingsweb@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-12kernel-devicetree: Introduce KERNEL_DTC_FLAGS to pass dtc flagsOvidiu Panait
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). Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-10go.bbclass: don't stage test data with sources of dependenciesThomas Perrot
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. Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-08sanity: Bump min python version to 3.6Richard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-08ccache.bbclass: Set CCACHE_TEMPDIRRobert Yang
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 Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-31ccache.bbclass: use ccache from host distributionAlexander Kanavin
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. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-30insane.bbclass: allow fifosTrevor Woerner
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. Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-24populate_sdk_base: Fix condition syntax if SDK_RELOCATE_AFTER_INSTALL is ↵Tomasz Dziendzielski
disabled If variable is set to empty string the comparison is "if [ -eq 1 ]" which fails with "[: -eq: unary operator expected". Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-24license.bbclass: Add COMMON_LICENSE_DIR and LICENSE_PATH dirs to ↵Martin Jansa
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'. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-24kernel: set COMPATIBLE_HOST to *-linuxRoss Burton
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. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20classes/kernel-fitimage: add ability to sign individual imagesLuca Boccassi
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. 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>
2020-12-20classes/kernel-fitimage: add ability to add additional signing optionsPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20classes/kernel-fitimage: allow substituting mkimage commandPaul Eggleton
Add a UBOOT_MKIMAGE and UBOOT_MKIMAGE_SIGN variables to allow specifying an alternative uboot-mkimage executable (or wrapper script/function). Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20classes/kernel-fitimage: make fitimage_emit_section_config more readableEaswar Hariharan
fitimage_emit_section_config() has a number of arguments, add named variables to make the function a bit more readable. 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>
2020-12-20classes/kernel-fitimage: add variable for descriptionPaul Eggleton
Add a FIT_DESC variable to make it possible to change how the description is set in the FIT image. Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-19linuxloader: Avoid confusing string concat errorsRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-18go.bbclass: Use external linker for native packagesKhem Raj
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 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>
2020-12-15uboot-extlinux-config: exclude OVERRIDES from do_create_extlinux_config vardepsChristopher Larson
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. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-15grub-efi-cfg: exclude OVERRIDES from build_efi_cfg vardepsChristopher Larson
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. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-15archiver.bbclass: Fix --runall=deploy_archives for imagesRobert Yang
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] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-15distutils3: allow setup.py to be run from a different directory to ${S}Jack Mitchell
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}. Signed-off-by: Jack Mitchell <ml@embed.me.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-09metadata_scm: Fix signature handling of METADATA_REVISION and METADATA_BRANCHRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-09kernel-module-split.bbclass: fix kernel modules getting marked as CONFFILESGratian Crisan
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> Signed-off-by: Gratian Crisan <gratian.crisan@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-09populate_sdk_ext: use SDK_CUSTOM_TEPLATECONF variable to enable custom ↵Chandana kalluri
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' Signed-off-by: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-06systemd.bbclass: update command to check systemctl availableKai Kang
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. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-03image_types: sort tarball file listingsRoss Burton
Help rootfs tarballs be reproducible by sorting the file listing. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-03image_types: remove obsolete tar commentRoss Burton
We now depend on tar 1.28, so talking about older tar versions is just confusing. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-29classes/buildhistory: record LICENSESaul Wold
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. Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-24uninative: Don't use single sstate for pseudo-nativeRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-24fs-perms: Ensure /usr/src/debug/ file modes are correctRichard Purdie
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). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-24kernel-uboot: allow compression option to be configurableSinan Kaya
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. Signed-off-by: Sinan Kaya <okaya@kernel.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-24distutils-common-base: fix LINKSHARED expansionAnuj Mittal
Add the missing $ so SECURITY_CFLAGS actually gets expanded. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-24cve-check: show real PN/PVRoss Burton
The output currently shows the remapped product and version fields, which may not be the actual recipe name/version. As this report is about recipes, use the real values. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-24license_image.bbclass: use canonical name for license filesVyacheslav Yurkov
When copying license files to the image rootfs, i.e to /usr/share/common-licenses, a canonical name of a license should be used, otherwise duplicated files end up in common-licenses directory. For example, GPL-2.0 license according to conf/license.conf can be referenced in recipes as GPL-2, GPLv2, and GPLv2.0. If a license name is used directly, we end up with three files in the rootfs with the same content. If a canonical name used instead, then each license gets copied only once. Signed-off-by: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-24python3targetconfig.bbclass: Make py3 dep and tasks only for target recipesKhem Raj
python3targetconfig append target python3 to dependencies unconditionally, and here its inherited unconditionally too but distutils3-base is inherited in BBCLASSEXTEND'ed recipes and other not-target recipes as well. Hence the change added via 9c8f666097802cb594a759989edcf01603a22df3 is now bridging the native dependencies with target python3 and thats resulting all sorts of rebuilds for multimachine builds e.g. MACHINE=qemuarm bitbake python3-scons-native MACHINE=qemumips bitbake python3-scons-native results in rebuilds for python3-scons-native bitbake-diffsigs shows Hash for dependent task python/python3-scons-native_3.1.2.bb:do_populate_sysroot changed from 1cdb93193b416477df6faa137e83a967b433c7aa29033146b405153f73f36933 to 3cea1e7cbedd121ecb768fbc291cc4e4d7d3b5c0442897 0e3b97bd058d162065 Hash for dependent task python/python3-scons-native_3.1.2.bb:do_install changed from 8d6018fd03ffc6060a04532dc39a5b7ccca1be026a69d069cb4fb11aef86dd89 to c5f1d173596a8e910f45a2b6e0b4dab96cd0102be4d62bd3156 229cb0f5ebb11 Hash for dependent task python/python3-scons-native_3.1.2.bb:do_compile changed from e3ee4b52a15267e6ae7853ec19a666b2fb62608a597608793336382d1c45f8a0 to 1e582043dfe6b3e00aaa532f363ce6afb37652abe837dac 7cc9769194c43eae1 Hash for dependent task python/python3-scons-native_3.1.2.bb:do_configure changed from 770a4d5a77a96ebd9e1e7368f710bca3f88e3b1266dffa3b2d0360b1e3a81e27 to a366982778b03eee5165c3117ee778f848acdfaa2 b346650fbdf114ac70ab57b Hash for dependent task python/python3-scons-native_3.1.2.bb:do_prepare_recipe_sysroot changed from 958910037856ff5d5eb2b5162b3cdd02a3a710fc543b933cfeba771ee095cb72 to 474333fb565f908992fd3716 4935aaecf31a79e867826fe634cde4f44171d8e7 Hash for dependent task python/python3_3.9.0.bb:do_populate_sysroot changed from 7ac1c4fcbb2eacf98d2c32d991751bd2f3c7d55e2e32f2c9e485e7f5975fecf8 to 25dcfe74a95af19cce8df7c29311cc5edbbf6ad 08777e46a6fa6e417c0445018 ... Therefore limit effects of this class only for target recipes. Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Alexander Kanavin <alex.kanavin@gmail.com> Cc: Martin Jansa <Martin.Jansa@gmail.com> Cc: Jose Quaresma <quaresma.jose@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-18kernel: relocate copy of module.lds to module compilation taskBruce Ashfield
There were two copies of this patch floating around, and the merged variant has the copy in the wrong place. module.lds is only created during modules_prepare, and that target is not invoked during our main build of the kernel. We aren't about to change the kernel build (there's no need), so we move the copy into the compile_kernelmodules task. After that runs, we have module.lds availble to copy. This has been tested against clean kernel + out of tree module builds, and the dependencies are correct that the file is copied before the out of tree module build starts. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-17roofs_*.bbclass: fix missing vardeps for do_rootfsLoic Domaigne
As per lib/oe/rootfs.py and lib/oe/package_manager/???/__init__.py the PACKAGE_FEED baseurl is defined as the joined paths of: URIS/BASE_PATHS/ARCHS Therefore, the do_rootfs task should depend furthermore on PACKAGE_FEED_{BASE_PATHS,ARCHS} to properly retrigger a build if the value changes. Signed-off-by: Loic Domaigne (ljd) <tech@domaigne.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-17kernel: Set proper LD in KERNEL_KCONFIG_COMMANDWonmin Jung
With 'ld-is-gold' and linux kernel 5.4 or later, menuconfig task for kernel recipes will fail with: $ bitbake -c menuconfig virtual/kernel ... scripts/kconfig/mconf Kconfig scripts/Kconfig.include:43: gold linker 'x86_64-poky-linux-ld' not supported /OE/build/tmp/work-shared/qemux86-64/kernel-source/scripts/kconfig/Makefile:29: recipe for target 'menuconfig' failed make[2]: *** [menuconfig] Error 1 /OE/build/tmp/work-shared/qemux86-64/kernel-source/Makefile:606: recipe for target 'menuconfig' failed make[1]: *** [menuconfig] Error 2 /OE/build/tmp/work-shared/qemux86-64/kernel-source/Makefile:185: recipe for target '__sub-make' failed make: *** [__sub-make] Error 2 Command failed. This is because that the KERNEL_LD variable already set in kernel-arch.bbclass isn't used by do_menuconfig function of cml1.bbclass. To fix this issue specify LD variable while calling the kernel menuconfig command through KERNEL_KCONFIG_COMMAND. Signed-off-by: Wonmin Jung <wonmin82@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>