summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* Remove Clutter and CoglRoss Burton2021-06-031-18/+0
| | | | | | | | | | | | 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. (From OE-Core rev: c4f167d05f58f35a6b94e8dbc4721ab67e7e71eb) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: Add option to strip path prefixJoshua Watt2021-06-031-1/+2
| | | | | | | | | | | 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. (From OE-Core rev: 194e7a29212c4a29222730f47d3133dfe92447c1) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native.bbclass: Do not remove "-native" in the middle of recipe namesPeter Kjellerstedt2021-06-011-2/+6
| | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: edaf8ff278fc96b122c4fc3266b63856e3350f4c) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Add support for erofs filesystemsRichard Weinberger2021-05-311-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 (From OE-Core rev: 41dead1ff8ccc49e6cd6e6f5d41a59d164693e0d) Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc: Demote "could not get ICECC_CC" warning to noteDouglas Royds2021-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 (From OE-Core rev: 720254152ca57c19acf1f156d47fd47af0afa20d) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "icecc: Don't use icecc when INHIBIT_DEFAULT_DEPS is set"Douglas Royds2021-05-281-4/+0
| | | | | | | | | | | | | | | 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] (From OE-Core rev: a0e86951498db15221d8bcf6ac3ba5016b3ca144) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-live.bbclass: order do_bootimg after do_rootfsGuillaume Champagne2021-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 73c21db8e54002b300ba4972cb49c0577acc5406) Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: pass XZ_THREADS to rpmRoss Burton2021-05-271-2/+2
| | | | | | | | | | | | | 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. (From OE-Core rev: b9c983eb22a9b0771a0454216d1d7cbb5f3f8a16) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gnomebase: trim the SRC_URI directory from the backAlexander Kanavin2021-05-251-1/+2
| | | | | | | | | | 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. (From OE-Core rev: fa8950d0cf6174ce517275fe44df9e4c0788d5f0) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign/kernel-fitimage: split generate_rsa_keys taskMing Liu2021-05-252-32/+34
| | | | | | | | | | | | | 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. (From OE-Core rev: 36814f5467c9abd84aeb05916b4fd49f766f4f9f) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage.bbclass: drop unit addresses from bootscr sectionsMing Liu2021-05-251-4/+4
| | | | | | | | | | | | | | | 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. (From OE-Core rev: 0ef3a5e2a6d4507c8d9bc6143f9aa65e6cdb1ed7) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage.bbclass: fix a wrong conditional checkMing Liu2021-05-221-1/+1
| | | | | | | | | | 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". (From OE-Core rev: 900949af7fe357ee66065ba150b0b1914e8ca581) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* baremetal-image: Fix post process command rootfs_update_timestampAlejandro Hernandez Samaniego2021-05-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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 (From OE-Core rev: 04791272e0cc104450cae6ab89b9d8e866457a0b) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Ignore sstate signing keyDaniel McGregor2021-05-211-0/+2
| | | | | | | | | | 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. (From OE-Core rev: 57cc9429dba4f9bd23127633dbc1f57dc2d5dd16) Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "cml1.bbclass: Return sorted list of cfg files"Richard Purdie2021-05-181-1/+1
| | | | | | | | | | | 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. (From OE-Core rev: ab0a296607b58775e91948ba40956c666dbb1244) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: provide debug / summary information for metadataBruce Ashfield2021-05-181-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 (From OE-Core rev: b95b11e130e91cb7c5e65f0f9a1c655bcbcbc919) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* mklibs: remove recipes and classAlexander Kanavin2021-05-181-56/+0
| | | | | | | | | | | | | | | 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 (From OE-Core rev: 908df863b419d1cad7317153101fc827e7e3a354) 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>
* sstate: Handle manifest 'corruption' issueRichard Purdie2021-05-161-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 63da9a4f889c5b0e41bc8ec08abe0acea1546479) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm.bbclass: Allow nodedir to be overridden by NPM_NODEDIRMike Crowe2021-05-141-2/+4
| | | | | | | | | | | | 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. (From OE-Core rev: 14795ee305f3c11fcc31cc7ca815b8ff1020e29a) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson.bbclass: split python routines into a separate classAlexander Kanavin2021-05-142-51/+52
| | | | | | | | | This allows reusing them in nativesdk-meson without copy-pasting code. (From OE-Core rev: f2715f5f2a56f9b660f9f0fe2933ec231a2dd8c0) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: fix comment "pacackages" -> "packages"Robert P. J. Day2021-05-131-1/+1
| | | | | | | (From OE-Core rev: 5c5f0d21799c2bff6875ef9fdc22d11035ea3320) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemu: Set SMP to 4 cpus for arm/x86 onlyRichard Purdie2021-05-131-1/+1
| | | | | | | | | | Only qemux86* and qemuarm* support SMP with our current configurations so rework qemu SMP enabling to account for that and only use it on the architectures where it works. (From OE-Core rev: ee371325ce651cc113e43bdeb5d8986d5b84a3f4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemu: use 4 cores in qemu guestsAlexander Kanavin2021-05-131-0/+4
| | | | | | | | | | Each of the cores is mapped to a thread on the host, this should speed up things inside qemu which can take advantage of that. (From OE-Core rev: 56f98d12a79585a4d4c459160f39403e05b620a5) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* baremetal-helloworld: Enable RISC-V 64 portAlejandro Hernandez Samaniego2021-05-121-1/+13
| | | | | | | | | | | | | | | | | | | Add support for MACHINE=qemuriscv64. $ runqemu nographic KERNEL: [tmp/deploy/images/qemuriscv64/baremetal-helloworld-image-qemuriscv64.bin] MACHINE: [qemuriscv64] FSTYPE: [bin] runqemu - INFO - Running tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/qemu-system-riscv64 Hello OpenEmbedded on RISC-V 64! (From OE-Core rev: 31fde82640bf0d185eab55d2cbaf663c9faae801) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest: add a test for orphaned ptests, and restore ones found by itAlexander Kanavin2021-05-111-0/+11
| | | | | | | | | | | | Particularly, numactl, numpy and libseccomp are disabled for now due to failures or lack of qemu support. The rest have been verified to pass quickly. [RP: Fix multilib recipe handling] (From OE-Core rev: 8bb5da87000ade519529e44181448244bd94d4f5) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gi-docgen: add a recipe and classAlexander Kanavin2021-05-091-0/+24
| | | | | | | | | | | This seems to be the gtk-doc successor, and gnome projects such as pango and gdk-pixbuf have started transitioning to it. (From OE-Core rev: f87bb7d848015c371095ef3ff423eee81e6d8ecd) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib/scripts: Use bb.utils.rename() instead of os.rename()Devendra Tewari2021-05-066-12/+12
| | | | | | | | | | | | | | | | | | Incremental build in Docker fails with: OSError: [Errno 18] Invalid cross-device link when source and destination are on different overlay filesystems. Rather than adding fallback code to every call site, use a new wrapper in bitbake which detects this case and falls back to shutil.move which is slower but will handtle the overlay docker filesystems correctly. [YOCTO #14301] (From OE-Core rev: 656a65b2b84e7d529b89cf5de7eb838f902d84a2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: mention CONNECTIVITY_CHECK_URIS in network failure messageMichael Opdenacker2021-05-061-3/+6
| | | | | | | | | | | | This expands the error message when a network failure is detected. It happens that some ISPs or networks block the default example.com domain. Therefore, instead of disabling network access, it lets the user know how to modify the test URL. (From OE-Core rev: 62c94bb925543c1e1c5af3c751913d9f06d9597d) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image: Use xargs to set file timestampsJoshua Watt2021-05-061-1/+1
| | | | | | | | | | | | | | | | | | Instead of having find directly invoke touch for each file in the root file system, pass a list to xargs for batching. This significantly reduces the number of times the touch program is invoked and speeds up the do_image task time: PKG TASK ABSDIFF RELDIFF CPUTIME1 -> CPUTIME2 my-image do_image -45.3s -94.2% 48.1s -> 2.8s Cumulative cputime: -44.3s -92.3% 00:48.1 (48.1s) -> 00:03.7 (3.7s) (From OE-Core rev: 15c65f90a3aa1e98c2beab2539403157df1fca08) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cml1.bbclass: Return sorted list of cfg filesKhem Raj2021-05-031-1/+1
| | | | | | | | | | | Since these files are passed to merge_config.sh its better to use a sorted list, so we can be sure that this list is always fed in same order irrespective of python versions on host (From OE-Core rev: 3d949f286c29bcaaf4dfc0aaffd15f129d1bab2d) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* reproducible_build.bbclass: Enable -Wdate-timeKhem Raj2021-05-011-0/+3
| | | | | | | | | | | | This will help identifying packages using __TIME__, __DATE__ and __TIMESTAMP__ macros in code, its a warning from the compiler and the packages which use -Werror will break the build with this and where they don't we will atleast have a warning in the build logs (From OE-Core rev: 20335cd89001f5fb159f5f1b0c3bd5e40b8b2fb5) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildstats.bbclass: collect data in the same file.Sakib Sajal2021-04-271-12/+20
| | | | | | | | | | | | | | | | Previously "at interval" and "on failure" logs were collected in separate files. Collect both types of logging in the same file for better analysis. Introduced new variable which allows different set of commands to be run by the different logging, interval or failure. The variables are BB_LOG_HOST_STAT_CMDS_INTERVAL and BB_LOG_HOST_STAT_CMDS_FAILURE respecteviely. (From OE-Core rev: 4fbf422351668f755a14811ac39161c889087e81) Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license_image.bbclass: Fix symlink to generic license filesReto Schneider2021-04-271-2/+3
| | | | | | | | | | | | Link to the canonical filename of a license as only this one exists. Fixes commit 670fe71dd18ea675f35581db4a61fda137f8bf00 [license_image.bbclass: use canonical name for license files]. (From OE-Core rev: 64b1ba978e079c345e1f7fbd1bf44052fc3dd857) Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license_image.bbclass: Detect broken symlinksReto Schneider2021-04-271-2/+13
| | | | | | | | | Find and report symlinks which point to a non-existing file. (From OE-Core rev: 81809a1ffe67aade1b2ed66fe95044ffbf7d3df8) Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner: Add support for qmp commandsSaul Wold2021-04-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the Qemu Machine Protocol [0] extending the current dump process for Host and Target. The commands are added in the testimage.bbclass. Currently, we setup qemu to stall until qmp gets connected and sends the initialization and continue commands, this works correctly. If the UNIX Socket does not exist, we wait an timeout to ensure to socket file is created. With this version, the monitor_dumper is created in OEQemuTarget but then set in OESSHTarget as that's where we get the SSH failure happens. Python's @property is used to create a setter/getter type of setup in OESSHTarget to get overridden by OEQemuTarget. By default the data is currently dumped to files for each command in TMPDIR/log/runtime-hostdump/<date>_qmp/unknown_<seq>_qemu_monitor as this is the naming convenstion in the dump.py code. We use the qmp.py from qemu, which needs to get installed in the recipe-sysroot-native of the target image. [0] https://github.com/qemu/qemu/blob/master/docs/interop/qmp-spec.txt (From OE-Core rev: 42af4cd2df72fc8ed9deb3fde4312909842fcf91) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto.bbclass: chdir to ${WORKDIR} for do_kernel_checkoutKai Kang2021-04-241-1/+1
| | | | | | | | | | | | | It chdirs to ${S} at the beginning of task do_kernel_checkout. Then it removes ${S} when it still resides in ${S}. It may fail to run the task do_kernel_checkout when bitbake is called by third-part wrapper script. So chdir to ${WORKDIR} by default for do_kernel_checkout. And it will chdir to ${S} afterwards in task do_kernel_checkout. (From OE-Core rev: cf0e3397d3f86c7ea1f3c66c50a44d6205f5921b) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: remove ${B} before cmake_do_configureKai Kang2021-04-241-5/+3
| | | | | | | | | | | | It is fallible to remove ${B} in directory ${B} itself. And it does fail when call bitbake by third-party wrapper script. Use flag 'cleandirs' to remove ${B} first if build out of source tree. (From OE-Core rev: 0fb6280432a36985590d9a714a5f11164aaebb51) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Further improve directory sanity testsRichard Purdie2021-04-201-9/+12
| | | | | | | | | | | | | | | Add tests to ensure COREBASE/TMPDIR doon't contain ".." as this causes hard to understand build failures. Also rework the code to test TMPDIR and COREBASE for all the patterns since they may be set differently and one may contain problematic characters. [YOCTO #14111] (From OE-Core rev: f22a6e46d003aba516a9a0cc7f94eae678d846b7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Add error check for '%' in build pathRichard Purdie2021-04-181-0/+2
| | | | | | | | | | | | | It has been reported that '%' characters in build paths break with python exceptions, probably due to confusion with python string escaping. Whilst it is probably fixable, showing the user a human readable error is better given it doesn't work. [YOCTO #14282] (From OE-Core rev: 31a3cf78452270131a657be45e76569515cff7ef) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: clean up some more warning messagesRoss Burton2021-04-181-6/+6
| | | | | | | (From OE-Core rev: 2abe18682192e7b38b9af5a5043906f2f069648f) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cpan-base: set default UPSTREAM_CHECK_REGEXKonrad Weihmann2021-04-181-0/+9
| | | | | | | | | | | | | | as cpan release versions are almost always follow an a.b version scheme, it's better to filter out beta releases such as a.b.c. Use the first resource fetched from https://cpan.metacpan.org as base for calculating the needed regex. In case nothing can be calculated fall back to nothing. Add this to cpan-base to enable it for new & old style cpan integration. (From OE-Core rev: 3df2cf383b58a3100bd78ebb0369047221121512) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cross-canadian: Whitelist "mingw32" as TARGET_OSAnatol Belski2021-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | If a recipe inherits cross-canadian and contains "nativesdk" in BBCLASSEXTEND and meta-mingw is included and multiconfig is enabled, bitbake will generate the correspending recipe. As meta-mingw sets SDK_OS to "mingw32", that's what TARGET_OS will be set to as well. Thus, currently such a recipe won't pass the check and fail with a message: Building cross-candian for an unknown TARGET_SYS (x86_64-mysdk-mingw32), please update cross-canadian.bbclass Even when building an SDK targeting Linux, but the mentioned conditions are met, bitbake will try to generate the corresponding recipe and fail. As the described combination seems valid, including "mingw32" into the whitelist unconditionally as a fix is suggested. (From OE-Core rev: d9306e8f9dbdbd30382f0bc0f0a1af75e702a2aa) Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc: Detect code changes in submodulesDouglas Royds2021-04-181-5/+6
| | | | | | | | | | | | | | | | Further to 50ff9afb39, only detect code changes in submodules that are subdirectories of the EXTERNALSRC directory. The (undocumented) git submodule--helper returns a path for each submodule relative to the top of the repo. Don't add submodules that are not within our source subtree. [YOCTO #14333] (From OE-Core rev: 1c18225d3ef94a41fc073ae87c163b68e6d46571) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "externalsrc: Detect code changes in submodules"Douglas Royds2021-04-181-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4525310d49d115a37705f04ac5c03d639e5e8f8c. Further to 50ff9afb39, only detect code changes in submodules that are subdirectories of the EXTERNALSRC directory. The (undocumented) git submodule--helper returns a path for each submodule relative to the top of the repo. Don't add submodules that are not within our EXTERNALSRC subtree. If we unpack one git repo inside another, like this: SRC_URI = "git://${GIT_SERVER}/repo1;name=repo1;destsuffix=repo1 \ git://${GIT_SERVER}/repo2;name=repo2;destsuffix=repo1/repo2 \ " Git status reports, for repo1: Untracked files: (use "git add <file>..." to include in what will be committed) repo2/ If we run `devtool modify` on this recipe, do_patch runs with: PATCHTOOL = "git" PATCH_COMMIT_FUNCTIONS = "1" The `patch_task_postfunc` (patch.bbclass, line 82) runs a `git add .` on the top-level repo1, leaving the checkout in an invalid state. The following git warning does not appear in the log: $ git add . warning: adding embedded git repository: repo2 hint: You've added another git repository inside your current repository. hint: Clones of the outer repository will not contain the contents of hint: the embedded repository and will not know how to obtain it. hint: If you meant to add a submodule, use: hint: hint: git submodule add <url> repo2 hint: hint: If you added this path by mistake, you can remove it from the hint: index with: hint: hint: git rm --cached repo2 hint: hint: See "git help submodule" for more information. $ git submodule status fatal: no submodule mapping found in .gitmodules for path 'repo2' No further git submodule commands can be run on the checkout. We could enhance the `patch_task_postfunc` to look for any embedded git checkouts and add them as submodules, but this seems unnecessary complexity for an obscure edge-case. Although the git repo is left in an invalid state with respect to the submodules, it still serves the purpose required by devtool: To take further commits, and generate patch files from them. We are still able to run these commands to examine any submodules, where git submodule--helper reports paths relative to the top of the checkout: $ git ls-files --stage | grep ^160000 160000 5feee12d6e974dd8c0614cf5b593380b046439a5 0 repo2 $ git submodule--helper list 160000 5feee12d6e974dd8c0614cf5b593380b046439a5 0 repo2 When a recipe sets EXTERNALSRC to a subdirectory of the git checkout, we test for the existence of the reported submodule paths within the EXTERNALSRC directory. The latest versions of git submodule--helper accept a path to a subdirectory and correctly report no submodules within that subdirectory. Regrettably, we still support git versions that don't accept a path to a subdirectory. [YOCTO #14333] (From OE-Core rev: 2055718fdd19f925e236d67823017323bbd92a4b) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: Fix typosDaniel Ammann2021-04-181-4/+4
| | | | | | | (From OE-Core rev: 36de56496bc07c321162555d603fac756297911a) Signed-off-by: Daniel Ammann <daniel.ammann@bytesatwork.ch> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot: Fixes SPL verified boot on corner casesKlaus Heinrich Kiwi2021-04-061-19/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | * The kernel-fitimage class adds a do_assemble_fitimage_initramfs task regardless of INITRAMFS_IMAGE_BUNDLE setting, which in some cases can result in that task running after do_uboot_assemble_fitimage and overwriting the u-boot-spl.dtb file with the pristine version (without public key). Fix this by making do_uboot_assemble_fitimage dependant on both do_assemble_fitimage_* tasks, regardless of the aforementioned setting. * Adjust 'type' and 'os' on the U-boot fitimage its script so that mkimage/dumpimage can recognize them. * Move the deployment of the u-boot-spl-nodtb files outside of concat_spl_dtb_helper(), so that we can better isolate the scenarios of creating an (unsigned) U-Boot fitimage versus also signing it. This prevents some stale files from being deployed in the images directory. * Remove any u-boot-fitImage and u-boot-its files from build tree, in case the build tree is being reused across bitbake calls. (From OE-Core rev: dc26d35e0935f30af55a3d2cb5c501d1b5c35437) Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: fix do_kernel_configme indentationYann Dirson2021-04-061-5/+5
| | | | | | | (From OE-Core rev: 6a2a1a0d38499b2537e1b39ac34677cd52b81fc0) Signed-off-by: Yann Dirson <yann@blade-group.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* u-boot: Use a different Key for SPL signingKlaus Heinrich Kiwi2021-04-062-10/+45
| | | | | | | | | | Duplicate the variables governing u-boot signing so that we can have a different set of keys/parameters signing the SPL. (From OE-Core rev: 0e6b0fefa02356afeb11a32dfee7f0c7c250ab7f) Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* u-boot: Add infrastructure to SPL verified bootKlaus Heinrich Kiwi2021-04-062-35/+340
| | | | | | | | | | | Add the necessary infrastructure to create a U-boot proper fitimage, sign it (using the same keys as the kernel-fitimage), and put the public key in the SPL binary so that verified SPL boot can be accomplished. (From OE-Core rev: 5af4dfe83c2f6509015916262be32fc09bc9714d) Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* u-boot: Move definitions to common locationsKlaus Heinrich Kiwi2021-04-063-58/+91
| | | | | | | | | | | | Move some definitions from u-boot.inc into uboot-config.bbclass and similarly from kernel-fitimage.bbclass into uboot-sign.bbclass, so that they can be useful when signing the U-boot proper fitimage, for a verified-boot SPL. (From OE-Core rev: cc6c3e31526d3b6ef3a87ba5e548fcad7483bd51) Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>