summaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2021-07-28archiver.bbclass: fix do_ar_configured failure for kernelChangqing Li
Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-28kernel-uboot: Handle gzip and lzo compression optionsMarek Vasut
Since 5c72105e29 ("kernel-uboot: allow compression option to be configurable") it is possible to select kernel compression method, however the resulting image is always compressed with gzip, so selecting any other method than gzip results in unbootable images. Add support for lzo for starters, since that is fast to decompress and useful in low boot time scenarios. Note that we should likely add some check for unsupported compression methods. We should also add dependency on lzop-native I think. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Sinan Kaya <okaya@kernel.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-28image_types: Restore pre-btrfs-tools 4.14.1 mkfs.btrfs shrink behaviorMarek Vasut
Currently the mkfs.btrfs generates large images with a lot of wasted space. This happens since OE-core updated btrfs-tools from 4.13.3 to 4.15.1 in commit 94b645aa77 ("btrfs-tools: update to 4.15.1") . Note in mkfs.btrfs(8) manpage section -r says the following: " -r|--rootdir <rootdir> ... Note This option may enlarge the image or file to ensure it’s big enough to contain the files from rootdir. Since version 4.14.1 the filesystem size is not minimized. Please see option --shrink if you need that functionality. --shrink Shrink the filesystem to its minimal size, only works with --rootdir option. ... Note prior to version 4.14.1, the shrinking was done automatically. " Add the --shrink option to EXTRA_IMAGECMD_btrfs to reinstate the original behavior and un-waste the space. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Alexander Kanavin <alexander.kanavin@linux.intel.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-24archiver.bbclass: Fix patch error for recipes that inherit dos2unix.leimaohui
do_unpack_and_patch error happens for these recipes inherit dos2unix. Signed-off-by: Lei Maohui <leimaohui@fujitsu.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-19own-mirrors: Add support for s3:// scheme in SOURCE_MIRROR_URLAdam Romanek
Signed-off-by: Adam Romanek <romanek.adam@gmail.com> Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-13licence_image: Add lic-pkgs IMAGE_FEATUREMike Crowe
Installing license packages is similar to installing -dev or -dbg packages, so let's invent a "lic-pkgs" IMAGE_FEATURE that does so and document it in core-image.bbclass. This image feature only works if LICENSE_CREATE_PACKAGE is set, so refuse to generate an image if the lic-pkgs feature is enabled without LICENSE_CREATE_PACKAGE. Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-11sstate: Drop pseudo exclusionRichard Purdie
Now that pseudo-native always includes statx support and we have sanity checks on pseudo-native to ensure it always contains a minimum feature set, we no longer need to mark pseudo-native as distro specific. This fixes eSDK build problems. [YOCTO #14428] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-10report-error: Drop pointless inheritRichard Purdie
The base class is always inherited, drop the unneeded inherit. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-10buildstats.bbclass: log host data on failure to task specific fileSakib Sajal
host data, for both interval and failure, was previously logged into the same file which was difficult to read as the files file were usually large. host data is now logged into separate files, for each type of logging (failure and interval) and also for each failed task making it easier to read/parse. Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-08license: Drop adding RRECOMMENDS for license packagesRichard Purdie
This changes behaviour when LICENSE_CREATE_PACKAGE is in use. Packages no longer have RRECOMMENDS adding to them. It was highlighted that this doesn't apply to PACKAGES_DYNAMIC, nor can it easily be made to do so. There is also a much easier way to handle this which is: IMAGE_INSTALL_COMPLEMENTARY += "*-lic" which works on a per image basis and doesn't change the underlying package dependencies. I propose we switch to this instead. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-02testimage.bbclass: Add dump-guest-memory cmdSaul Wold
This command takes a set of command arguments, one of which requires a filename so use %s which the MonitorDumper will translate to a unique filename in the dated qmp directory. CMD Before: {paging:false,protocol:file:%s.img} CMD After: {paging:false,protocol:file:/yocto/poky/build/tmp/log/runtime-hostdump/qmp_00_dump-guest-memory.img} Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-02populate_sdk_ext: Error if trying to generate an eSDK from a mulitconfigMark Hatle
Running a build such as: bitbake mc:my_config:core-image-minimal -c populate_sdk-ext will result in an error like: ERROR: Task base-files.do_fetch attempted to execute unexpectedly Task .../poky/build-mc/tmp-my_config-glibc/work/qemuarm64-poky-linux/core-image-minimal/1.0-r0/sdk-ext/image/tmp-renamed-sdk/layers/poky/meta/recipes-core/base-files/base-files_3.0.14.bb:do_packagedata, unihash ec5ba0e6b31561daba005fb49c5239c8e46913465b51166b5905f3e5ffcf2741, taskhash ec5ba0e6b31561daba005fb49c5239c8e46913465b51166b5905f3e5ffcf2741 Task .../poky/build-mc/tmp-my_config-glibc/work/qemuarm64-poky-linux/core-image-minimal/1.0-r0/sdk-ext/image/tmp-renamed-sdk/layers/poky/meta/recipes-core/base-files/base-files_3.0.14.bb:do_package_write_rpm, unihash 1c7d7509c2ff6dcf11009fbec444726826214795d60474ec8d3262d89c40a955, taskhash 1c7d7509c2ff6dcf11009fbec444726826214795d60474ec8d3262d89c40a955 Task .../poky/build-mc/tmp-my_config-glibc/work/qemuarm64-poky-linux/core-image-minimal/1.0-r0/sdk-ext/image/tmp-renamed-sdk/layers/poky/meta/recipes-core/base-files/base-files_3.0.14.bb:do_populate_sysroot, unihash 9cc3672f4fa62491f545b15cf617a64cd77d15a2cfd432b57d4b936bc415f40d, taskhash 9cc3672f4fa62491f545b15cf617a64cd77d15a2cfd432b57d4b936bc415f40d Task .../poky/build-mc/tmp-my_config-glibc/work/qemuarm64-poky-linux/core-image-minimal/1.0-r0/sdk-ext/image/tmp-renamed-sdk/layers/poky/meta/recipes-core/base-files/base-files_3.0.14.bb:do_package_qa, unihash 8ada5f62092c971df8dda1d71c728e42994e1dcf2bbdab419de43867d77b64cc, taskhash 8ada5f62092c971df8dda1d71c728e42994e1dcf2bbdab419de43867d77b64cc Task .../poky/build-mc/tmp-my_config-glibc/work/qemuarm64-poky-linux/core-image-minimal/1.0-r0/sdk-ext/image/tmp-renamed-sdk/layers/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_qa, unihash 16656a339389e407a5fdca5d64983af845288f3b3cc5582398e5247efb393257, taskhash 16656a339389e407a5fdca5d64983af845288f3b3cc5582398e5247efb393257 Task .../poky/build-mc/tmp-my_config-glibc/work/qemuarm64-poky-linux/core-image-minimal/1.0-r0/sdk-ext/image/tmp-renamed-sdk/layers/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_complete, unihash ef88c74a9f4ae4d252c421eb4e399773aa50cea7c51ffbeed9011e5198a16abb, taskhash ef88c74a9f4ae4d252c421eb4e399773aa50cea7c51ffbeed9011e5198a16abb This is usually due to missing setscene tasks. Those missing in this build were: {'.../poky/build-mc/tmp-my_config-glibc/work/qemuarm64-poky-linux/core-image-minimal/1.0-r0/sdk-ext/image/tmp-renamed-sdk/layers/poky/meta/recipes-core/base-files/base-files_3.0.14.bb:do_package_qa', Instead of letting the system error, we simply tell the user this is not supported. As long as the eSDK is constructed based on the primary library, it works fine. Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-02sstate/staging: Handle directory creation race issueRichard Purdie
The sstate code tries to be careful about racing around directory creation. In particular, the copyhardlinktree code creates the directory tree first allowing for "already exists" errors and ignoring them, then hardlinks the files in. Unfortunately the sstate removal code can race against this since it will try and remove empty directories. If there is some bad timing, a newly created directory can be removed before it was populated, leading to build failures. We could try and add locking but this would damage performance, we've been there before. It is also unclear where to actually place locks just based on the contents of a manifest file which may cover multiple sstate install locations for a given task. Instead, lets disable directory removal in the problematic "shared" core path. This could result in a few more empty directories being left on disk but those should be harmless and better than locking hurting performance or rare build races. [YOCTO #13999] [YOCTO #14379] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-29sstate.bbclass: fix errors about read-only sstate mirrorsMichael Ho
If a read-only sstate mirror is used in conjunction with hash equiv, then OSError will be raised when an sstate-cache hit is achieved. This is because sstate_task_postfunc will try to "touch" the symlinks that point to the read-only sstate mirror when sstate_report_unihash has changed SSTATE_PKG. This commit adds an additional exception handler to silently mask read only rootfs errors thrown during the touch. The fix is also duplicated to sstate_eventhandler as the code is very similar but it may not be needed there. Example of the error: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:sstate_task_postfunc(d) 0003: File: '/poky/meta/classes/sstate.bbclass', lineno: 774, function: sstate_task_postfunc 0770: 0771: omask = os.umask(0o002) 0772: if omask != 0o002: 0773: bb.note("Using umask 0o002 (not %0o) for sstate packaging" % omask) *** 0774: sstate_package(shared_state, d) 0775: os.umask(omask) 0776: 0777: sstateinst = d.getVar("SSTATE_INSTDIR") 0778: d.setVar('SSTATE_FIXMEDIR', shared_state['fixmedir']) File: '/poky/meta/classes/sstate.bbclass', lineno: 703, function: sstate_package 0699: if not os.path.exists(siginfo): 0700: bb.siggen.dump_this_task(siginfo, d) 0701: else: 0702: try: *** 0703: os.utime(siginfo, None) 0704: except PermissionError: 0705: pass 0706: 0707: return Exception: OSError: [Errno 30] Read-only file system Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-27kernel-devicetree: Fix interaction when packaging disabledRichard Purdie
When packaging is disabled using the nopackages class, ensure we don't add to PACKAGES. This fixes builds where we have an unpackaged kernel alongside a packaged kernel. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-27kernel: Fix interaction when packaging disabledRichard Purdie
When packaging is disabled using the nopackages class, ensure we don't add to PACKAGES. This fixes builds where we have an unpackaged kernel alongside a packaged kernel. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-26package_pkgdata: Avoid task hash mismatches for generic task changesRichard Purdie
Add SSTATETASKS to package_prepare_pkgdata[vardepsexclude] since otherwise the task hashes vary depending upon which packaging backends are enabled and likely other changes which add/remove unrelated sstate tasks. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-26pypi: set SRC_URI with _prepend, not with +=Alexander Kanavin
This did not cause problems in builds, but broke some devtool workflows such as version upgrades or checking the latest version from upstream. Tarballs should come first, not the patches. (From OE-Core rev: 5cee50c25197102658e0689f635b2d567a375471) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2021-06-22populate_sdk_ext: copy BBMULTICONFIG filesJustin Bronder
As the generated local.conf includes BBMULTICONFIG, the referenced files in conf/multiconfig also need to be copied. Otherwise with BBMULTICONFIG="abc" for instance, building the esdk fails with: ERROR: ParseError at tmp/build-glibc/work/qemux86_64-oe-linux/core-image-ssh/1.0-r0/sdk-ext/image/tmp-renamed-sdk/layers/openembedded-core/meta/conf/bitbake.conf:767: Could not include required file conf/multiconfig/abc.conf Signed-off-by: Justin Bronder <jsbronder@cold-front.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-22uboot-sign.bbclass: fix some install commandsMing Liu
A "install -d" command is missing when dealing with ${UBOOT_NODTB_BINARY} in install_spl_helper function, this can lead to invalid install error saying: | install: cannot create .../usr/share/u-boot-nodtb-2021.04-r0.bin': No such file or directory Let's drop all "install -d" and replace them with "install -Dm" in install_helper/install_spl_helper functions. 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>
2021-06-22sdk: Enable do_populate_sdk with multilibsKhem Raj
This patch enables building image based SDKs for multi-libbed images e.g. lib32-core-image-minimal and so on. Change the path to nativesdk tools to use recipe-sysroot since thats where the nativesdk components are installed and it will need access to qemu wrappers during build for processing intercepts [YOCTO #14444] 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>
2021-06-17linuxloader.bbclass: Add entry for ppc64 LE glibc loaderKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-17linux-yocto-dev: base AUTOREV on specified versionBruce Ashfield
linux-yocto-dev tracks the latest mainline kernel, and uses standard/* for that support. Archived -dev versions are under v<kernel version>/standard/base. This policy works, except that a released branch will still follow the new kernel versions, causing potential breakage with newer kernels than are supported in that release. Rather than lock the SRCREVs and update branches in old releases, we can preserve the AUTOREV nature of -dev, and allow them to switch automatically to the archived branch based on the LINUX_VERSION in the -dev recipe (which is unchanged in the release branch). This is consistent with the other branch switching done for the kernels and with the -dev workflow. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-17linuxloader: Be aware of riscv32 ldsoKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-17cross-canadian: correct the location of pkg-config filesAlexander Kanavin
layout_libdir has not been defined for many years. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-14kernel.bbclass: fix do_sizecheck() comparisonAndrea Adami
The routine do_sizecheck() was historically needed by legacy devices with limited flash memory. The lowest extreme is probably with Zaurus collie having exactly 1024*1024 = 1048576 bytes for the kernel partition. In the years the KERNEL_IMAGE_MAXSIZE has been converted to kilobytes thus rounded so we have now KERNEL_IMAGE_MAXSIZE_collie = "1024". The effect is that now the check fails because we hit curiously this | WARNING: This kernel zImage (size=1024(K) > 1024(K)) is too big for... even though zImage is 1047288 bytes (kernel + kexecboot-klibc-initramfs). Fix this case using test -gt (greater) instead of -ge (greater or equal). Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-11image_types: add zsync conversionsRoss Burton
Add image conversion types to create zsync[1] metadata. Use .zsync if the image is already compressed and .gzsync if zsync should compress the image itself. The required tool, zsync-curl, has been submitted to meta-oe. [1] http://zsync.moria.org.uk Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-07recipes-bsp/u-boot: Allow deploying the u-boot DTBAlistair Francis
Use ??= assignment for UBOOT_DTB_BINARY because it is set using ?= in fitImage bbclass as well, using ?= will preempt that Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-03classes/reproducible_build: Use atomic rename for SDE fileJoshua Watt
If an existing source date epoch file was found during do_unpack, it was deleted and a new one would be written in its place. This causes a race with check-before-use code in get_source_date_epoch_value. Resolve the problem by making do_unpack write the new source date epoch to a temporary file, then do an atomic rename to ensure it's always present, and change the check-before-use code to use a EAFP exception instead of checking for file existence. [YOCTO #14384] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-03Remove Clutter and CoglRoss Burton
Clutter and Cogl are not used by anything in oe-core, and in Gnome are legacy components so are only used by a few applications. The recipes have already been moved to meta-gnome so they can now be removed from oe-core. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-03classes/buildhistory: Add option to strip path prefixJoshua Watt
Adds an option to strip a prefix from the paths reported in buildhistory. This makes it easier to compare task signatures in the build history when the builds were done from different directories. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-01native.bbclass: Do not remove "-native" in the middle of recipe namesPeter Kjellerstedt
For dependencies such as "${PN}-foo", when modifying them for native recipes, it is expected that they become "${BPN}-foo-native" rather than "${BPN}-native-foo-native". This was previously done by removing all occurences of "-native" from the dependency before adding "-native" at the end. However, this fails for a recipe such as "crate-native-tls" that happens to contain the string "-native" in the middle of the name. Solve this by simply replacing ${PN} with ${BPN} in the name instead before adding "-native" at the end Also simplify adding "-native" to the end of names the recipe provides. In this case it is not necessary to replace ${PN} with ${BPN} as the recipes are expected to use ${BPN}-foo in the first place. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-31Add support for erofs filesystemsRichard Weinberger
Since Linux 5.4 a new read-only filesystem is available, erofs. Compared to squashfs it offers much better read performance with and without compression enabled. It suppports two optional compressors, lz4 and lz4hc. >From the mkfs.erofs man page: EROFS is a new enhanced lightweight linux read-only filesystem with modern designs (eg. no buffer head, reduced metadata, inline xattrs/data, etc.) for scenarios which need high-performance read-only requirements, e.g. Android OS for smartphones and LIVECDs. It also provides fixed-sized output compression support, which improves storage density, keeps relatively higher compression ratios, which is more useful to achieve high performance for embedded devices with limited memory since it has unnoticable memory overhead and page cache thrashing. This commit adds support for three new filesystem targets: erofs: erofs without compression erofs-lz4: erofs with lz4 compresssion enabled erofs-lz4hc: erofs with lz4hc compression enabled Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-28icecc: Demote "could not get ICECC_CC" warning to noteDouglas Royds
For many components, it is perfectly correct not to have gcc or g++ in the PATH, notably when INHIBIT_DEFAULT_DEPS is set. We were getting a flood of warnings when icecc was enabled, eg: WARNING: base-files-3.0.14-r89.tait.8.6 do_configure: Cannot use icecc: could not get ICECC_CC or ICECC_CXX WARNING: base-files-3.0.14-r89.tait.8.6 do_compile: Cannot use icecc: could not get ICECC_CC or ICECC_CXX WARNING: base-files-3.0.14-r89.tait.8.6 do_install: Cannot use icecc: could not get ICECC_CC or ICECC_CXX WARNING: busybox-inittab-1.33.0-r0 do_configure: Cannot use icecc: could not get ICECC_CC or ICECC_CXX WARNING: busybox-inittab-1.33.0-r0 do_compile: Cannot use icecc: could not get ICECC_CC or ICECC_CXX WARNING: busybox-inittab-1.33.0-r0 do_install: Cannot use icecc: could not get ICECC_CC or ICECC_CXX WARNING: linux-libc-headers-3.14-r0 do_configure: Cannot use icecc: could not get ICECC_CC or ICECC_CXX WARNING: linux-libc-headers-3.14-r0 do_compile: Cannot use icecc: could not get ICECC_CC or ICECC_CXX WARNING: linux-libc-headers-3.14-r0 do_install: Cannot use icecc: could not get ICECC_CC or ICECC_CXX Demote this message to a "NOTE". It still appears in log.do_configure and friends: NOTE: Cannot use icecc: could not get ICECC_CC or ICECC_CXX Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-28Revert "icecc: Don't use icecc when INHIBIT_DEFAULT_DEPS is set"Douglas Royds
Although this silenced the warnings, it also turned off icecc for gcc-cross and friends, binutils-cross, and importantly, the linux kernel. This reverts commit 0315aabeff8e6483b737d0e23d6841f1394ad3c8. [YOCTO #13863] Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-27image-live.bbclass: order do_bootimg after do_rootfsGuillaume Champagne
do_bootimg expects IMGDEPLOYDIR to exist, since it stores its artifacts there. Therefore, do_bootimg should run after do_rootfs because IMGDEPLOYDIR is created before do_rootfs runs since IMGDEPLOYDIR is contained in do_rootfs' [cleandirs] varflag. When do_bootimg depends on ${PN}:do_image_${LIVE_ROOTFS_TYPE}, do_bootimg is correctly ordered after do_rootfs because do_image_${FSTYPE} tasks are added after do_image and do_image itself is added after do_rootfs. However, when do_bootimg doesn't depend on ${PN}:do_image_${LIVE_ROOTFS_TYPE} (introduced by: 96f47c39f1d17f073243913d524bde84add41d8f), do_bootimg can run before do_rootfs, thus before IMGDEPLOYDIR is created. To avoid this situation, do_bootimg is now explicitly ordered after do_rootfs. Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-27package_rpm: pass XZ_THREADS to rpmRoss Burton
By default RPM uses the number of cores as the number of threads to use, which can result in quite antisocial memory usage. As we control the macros for compression anyway, we can pass XZ_THREADS to limit the number of threads if needed. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-25gnomebase: trim the SRC_URI directory from the backAlexander Kanavin
Rather than take the first two components, drop the last one at the end. This makes it compatible with both old and new gnome version schemes. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-25uboot-sign/kernel-fitimage: split generate_rsa_keys taskMing Liu
Currently generate_rsa_keys tasks are being executed parallelly in kernel and uboot's task list, and both of them are calling openssl to generate rsa keys in same path, this can lead to race condition. Let's split it to kernel_generate_rsa_keys and uboot_generate_rsa_keys. Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-25kernel-fitimage.bbclass: drop unit addresses from bootscr sectionsMing Liu
In commit 6047be9f: [ kernel-fitimage: Don't use unit addresses on FIT ] It had dropped unit addresses from FIT image but missed on bootscr part. Drop unit addresses from bootscr sections in this patch. Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-22kernel-fitimage.bbclass: fix a wrong conditional checkMing Liu
It should check if "${UBOOT_SIGN_ENABLE}" equals to "1" instead of checking if "${UBOOT_SIGN_ENABLE}" is not empty since it could be "0". Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-21baremetal-image: Fix post process command rootfs_update_timestampAlejandro Hernandez Samaniego
When running: execute_pre_post_process(d, d.getVar(ROOTFS_POSTPROCESS_COMMAND)) rootfs_update_timestamp is run, which assumes that rootfs/${sysconfdir} is already created (usually done through the do_rootfs task on linux). This causes the build to fail if ${sysconfdir} does not exist. This may be overlooked if debug-tweaks is enabled since some other commands are added, one of which creates the required path (see postinst_enable_logging). See [1] for more info: [1] https://github.com/aehs29/meta-freertos/issues/4 Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-21sstate: Ignore sstate signing keyDaniel McGregor
What key is used to sign sstate artefacts should not affect the hash of the object, otherwise everyone would need to use the same signing key. Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-18Revert "cml1.bbclass: Return sorted list of cfg files"Richard Purdie
This reverts commit dee41e92f0efac7e453597bed4b4c02f867e3aa9. This patch breaks cases where some config files make changes to earlier ones, ordering is important. The reproducibility issue in busybox was elsewhere. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-18kernel-yocto: provide debug / summary information for metadataBruce Ashfield
It was mentioned that when developing a BSP, the information about what definition was used, or what fragments have been applied is not obvious and requires looking at the code. With this change, we can trigger a full summary of the meta data gathering phase when KCONF_AUDIT_LEVEL > 0. Sample output follows: NOTE: do_kernel_metadata: for summary/debug, set KCONF_AUDIT_LEVEL > 0 NOTE: kernel meta data summary for qemux86-64 (standard): NOTE: ====================================================================== NOTE: BSP entry point / definition: /build/tmp/work/qemux86_64-poky-linux/linux-yocto/5.10.34+gitAUTOINC+bca3bfbc74_85c17ad073-r0/kernel-meta/bsp/common-pc-64/common-pc-64-standard.scc NOTE: Fragments from SRC_URI: /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/xt-checksum.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/ebtables.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/vswitch.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/lxc.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/docker.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/cgroup-hugetlb.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/xen.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/kubernetes.scc NOTE: KERNEL_FEATURES: features/nfsd/nfsd-enable.scc features/debug/printk.scc features/kernel-sample/kernel-sample.scc features/netfilter/netfilter.scc cfg/virtio.scc features/drm-bochs/drm-bochs.scc cfg/sound.scc cfg/paravirt_kvm.scc features/scsi/scsi-debug.scc features/gpio/mockup.scc features/aufs/aufs-enable.scc cfg/fs/flash_fs.scc cfg/virtio.scc NOTE: Final scc/cfg list: /build/tmp/work/qemux86_64-poky-linux/linux-yocto/5.10.34+gitAUTOINC+bca3bfbc74_85c17ad073-r0/kernel-meta/bsp/common-pc-64/common-pc-64-standard.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/xt-checksum.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/ebtables.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/vswitch.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/lxc.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/docker.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/cgroup-hugetlb.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/xen.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/kubernetes.scc features/nfsd/nfsd-enable.scc features/debug/printk.scc features/kernel-sample/kernel-sample.scc features/netfilter/netfilter.scc cfg/virtio.scc features/drm-bochs/drm-bochs.scc cfg/sound.scc cfg/paravirt_kvm.scc features/scsi/scsi-debug.scc features/gpio/mockup.scc features/aufs/aufs-enable.scc cfg/fs/flash_fs.scc cfg/virtio.scc Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-18mklibs: remove recipes and classAlexander Kanavin
This is not enabled or tested by default, and has never been ported to python 3 upstream[1], which means it doesn't work at all with plain poky. If you need it, please put it in a separate layer and/or modernize to work with py3. https://salsa.debian.org/installer-team/mklibs/-/blob/master/src/mklibs Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-16sstate: Handle manifest 'corruption' issueRichard Purdie
Under certain build patterns, warnings about missing manifests can appear. These are real issues where the manifest was removed and shouldn't have been. Martin Jansa was able to find a reproducer of: MACHINE=qemux86 bitbake zlib-native echo 'PR = "r1"' >> meta/recipes-core/zlib/zlib_1.2.11.bb MACHINE=qemux86-64 bitbake zlib-native MACHINE=qemux86 bitbake zlib-native <the zlib-native manifest is now removed along with the sysroot-components contents> The code maintains a per machine list of stamps but a per PACAGE_ARCH list of stamp/manifest/workdir mappings. The latter is only appended to for speed with the assumption that once stamps are gone, the code wouldn't trigger. The code only ever appends to the mapping list (for speed/efficency under lock) meaning that multiple entries can result where the stamp/workdir differs due to version changes but the manifest remains the same. By switching MACHINE part way through the build, the older stamp is referenced and the manifest is incorrectly removed as it matches an now obsolete entry in the mapping file. There are two possible fixes, one is to rewrite the mapping file every time which means adding regexs, iterating and generally complicating that code. The second option is to only use the last mapping entry in the file for a given manifest and ignore any earlier ones. This patch implments the latter. Also drop the stale entries if we are rewriting it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-14npm.bbclass: Allow nodedir to be overridden by NPM_NODEDIRMike Crowe
Node modules may need to be built against multiple Node versions. Setting nodedir in the NPM configuration stops older ways of doing this, such as setting npm_config_target and npm_config_disturl, from working. Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-14meson.bbclass: split python routines into a separate classAlexander Kanavin
This allows reusing them in nativesdk-meson without copy-pasting code. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-13image.bbclass: fix comment "pacackages" -> "packages"Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>