summaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2020-09-03qemux86: use 32bit multilib config for everything except kerneljansa/multilibMartin Jansa
* this is goog enough (still ugly) to build core-image-base with all components except the kernel (and kernel dependencies) with 32bit multilib config (i586 DEFAULTTUNE) and kernel with new 64bit DEFAULTTUNE core2-64 as shown in WORKDIR distribution: all-oe-linux: autoconf-archive run-postinsts update-rc.d core2-64-oe-linux: defaultpkgname glibc glibc-initial glibc-locale libgcc-initial linux-libc-headers qemuwrapper-cross i586-oemllib32-linux: lib32-alsa-lib lib32-gcc-runtime lib32-libgpg-error lib32-libxml2 lib32-renderproto lib32-alsa-state lib32-gdbm lib32-libical lib32-libxrender lib32-rpcbind lib32-alsa-utils lib32-glib-2.0 lib32-libice lib32-linux-libc-headers lib32-shadow lib32-attr lib32-glibc lib32-libidn lib32-mobile-broadband-provider-info lib32-shadow-sysroot lib32-avahi lib32-glibc-initial lib32-libnl lib32-modutils-initscripts lib32-shared-mime-info lib32-base-passwd lib32-glibc-locale lib32-libnss-mdns lib32-ncurses lib32-sqlite3 lib32-bash lib32-gmp lib32-libogg lib32-neard lib32-sysvinit lib32-bash-completion lib32-gnutls lib32-libpcre lib32-netbase lib32-tcp-wrappers lib32-bluez5 lib32-gobject-introspection lib32-libpng lib32-nettle lib32-util-linux lib32-busybox lib32-icu lib32-libpthread-stubs lib32-ofono lib32-util-macros lib32-bzip2 lib32-initscripts lib32-libsamplerate0 lib32-openssl lib32-wireless-tools lib32-cairo lib32-inputproto lib32-libsm lib32-opkg-utils lib32-wpa-supplicant lib32-cryptodev-linux lib32-iw lib32-libsndfile1 lib32-pciutils lib32-xcb-proto lib32-dbus lib32-kbproto lib32-libtirpc lib32-pixman lib32-xextproto lib32-dbus-glib lib32-kmod lib32-libtool-cross lib32-psplash lib32-xproto lib32-e2fsprogs lib32-libcap lib32-libunistring lib32-python3 lib32-xtrans lib32-eudev lib32-libcheck lib32-libvorbis lib32-python3-dbus lib32-xz lib32-expat lib32-libdaemon lib32-libx11 lib32-python3-pycairo lib32-zlib lib32-flac lib32-libffi lib32-libxau lib32-python3-pygobject lib32-fontconfig lib32-libgcc lib32-libxcb lib32-python3-setuptools lib32-freetype lib32-libgcc-initial lib32-libxdmcp lib32-quota lib32-gawk lib32-libgcrypt lib32-libxext lib32-readline qemux86-oe-linux: core-image-base depmodwrapper-cross linux-yocto qemux86-oemllib32-linux: lib32-base-files lib32-packagegroup-base lib32-shadow-securetty lib32-v86d lib32-init-ifupdown lib32-packagegroup-core-boot lib32-sysvinit-inittab x86_64-linux: alsa-lib-native e2fsprogs-native kmod-native makedevs-native python3-setuptools-native attr-native elfutils-native ldconfig-native mklibs-native qemu-helper-native autoconf-archive-native expat-native lib32-binutils-cross-i686 mpfr-native qemu-native autoconf-native file-native lib32-gcc-cross-i686 ncurses-native quilt-native automake-native flex-native lib32-gcc-cross-initial-i686 ninja-native re2c-native bc-native gcc-cross-initial-x86_64 libarchive-native nspr-native readline-native binutils-cross-x86_64 gcc-cross-x86_64 libffi-native nss-native rpm-native binutils-native gdbm-native libmpc-native openssl-native shadow-native bison-native gettext-minimal-native libpcre-native opkg-native shared-mime-info-native bzip2-native gettext-native libpng-native opkg-utils-native sqlite3-native cmake-native glib-2.0-native libsolv-native pbzip2-native texinfo-dummy-native cross-localedef-native gmp-native libtool-native perl-native unifdef-native cryptodev-linux-native gnu-config-native libxml2-native pigz-native unzip-native curl-native gobject-introspection-native libxml-parser-perl-native pixman-native update-rc.d-native db-native gperf-native libxslt-native pkgconfig-native util-linux-native dbus-glib-native gtk-doc-native lzo-native popt-native util-macros-native dbus-native icu-native lzop-native prelink-native xproto-native dtc-native intltool-native m4-native pseudo-native xz-native dwarfsrcfiles-native kern-tools-native makedepend-native python3-native zlib-native * there are still some issues though: * update-rc.d.bbclass adds dependency on 64bit update-rc.d and initscripts to allarch recipes (where multilib class_extend doesn't apply) * glibc-locale is 64bit, because virtual/ providers aren't correctly expanded to have MLPREFIX, changed bash to do that and still there is RDEPENDS=" lib32-packagegroup-core-boot lib32-packagegroup-base-extended run-postinsts lib32-psplash locale-base-en-us locale-base-en-gb" in bitbake -e core-image-base, bitbake -e lib32-core-image-base was failing, because nothing provides locale-base-* packages, fixed by adding MLPREFIX to PACKAGES_DYNAMIC * kernel and kernel modules are built as 32bit: causing package_qa failure: ERROR: linux-yocto-4.15.3+gitAUTOINC+030f397472_a6a3a6a73d-r0 do_package_qa: QA Issue: Architecture did not match (x86, expected x86-64) on /work/qemux86-oe-linux/linux-yocto/4.15.3+gitAUTOINC+030f397472_a6a3a6a73d-r0/packages-split/kernel-module-ip6-tunnel-4.15.3-yocto-standard/lib/modules/4.15.3-yocto-standard/kernel/net/ipv6/ip6_tunnel.ko [arch] .... ERROR: QA Issue: Architecture did not match (x86, expected x86-64) on /work/qemux86-oe-linux/linux-yocto/4.15.3+gitAUTOINC+030f397472_a6a3a6a73d-r0/packages-split/kernel-vmlinux/boot/vmlinux-4.15.3-yocto-standard [arch] the parameters look OK: KERNEL_CC="x86_64-oe-linux-gcc -fuse-ld=bfd -fdebug-prefix-map=/jenkins/mjansa/build-nodistro-master/BUILD/work/qemux86-oe-linux/linux-yocto/4.15.3+gitAUTOINC+030f397472_a6a3a6a73d-r0=/usr/src/debug/linux-yocto/4.15.3+gitAUTOINC+030f397472_a6a3a6a73d-r0 -fdebug-prefix-map=/jenkins/mjansa/build-nodistro-master/BUILD/work/qemux86-oe-linux/linux-yocto/4.15.3+gitAUTOINC+030f397472_a6a3a6a73d-r0/recipe-sysroot-native= -fdebug-prefix-map=/jenkins/mjansa/build-nodistro-master/BUILD/work/qemux86-oe-linux/linux-yocto/4.15.3+gitAUTOINC+030f397472_a6a3a6a73d-r0/recipe-sysroot= -fdebug-prefix-map=/jenkins/mjansa/build-nodistro-master/BUILD/work-shared/qemux86/kernel-source=/usr/src/kernel" KERNEL_LD="x86_64-oe-linux-ld.bfd " KERNEL_EXTRA_ARGS="" but I need to set KMACHINE in order to actually generate .config from qemux86-64 to select 64bit config options Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2020-09-02insane: improve gnu-hash-style warningRoss Burton
Instead of showing a filename under packages-split, show the package name and filename inside the package. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-02insane: fix gnu-hash-style checkSumit Garg
Fix gnu-hash-style check that always returned True after commit [1] leading to false positive presence of "GNU_HASH" in objdump output. Fixes: 9ff90bf04a4c ("mips: Enable gnu-hash-style on glibc") [1] Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-02license_image.bbclass: Create symlink to the image license manifest dirDiego Sueiro
In the LICENSE_DIRECTORY each time an image recipe is built a new directory is created to hold the image license manifests. By creating a symlink to the most recent created image license manifest directory, we make things easier for users to collect and pack the data. Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-28kernel-yocto: checksum all modifications to available kernel fragments ↵Bruce Ashfield
directories This is based on the patch from Zhaolong Zhang <zhangzl2013@126.com> [kernel-yocto: checksum indirect cfg and scc files] While the recommended manner to share/reuse feature fragments is to maintain them in a kernel-meta repository and track the changes via the standard SRCREV fetcher mechanism, that method is not always practical for small sets of features or for quick testing of changes. These other flows use .scc files on the SRC_URI. It has been noted that config fragments or other features indirectly included by those .scc files will not trigger the kernel meta-data to be re-run and hence a build can continue with stale data (or not be triggered at all). To solve this issue, we can collect the directories that are searchable via FILESEXTRAPATHS and add them to the do_kernel_metadata task checksum. This allows modifications, additions and removals from the potential kernel feature directories to trigger a re-execution of the meta data task. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-28kernel.bbclass: Move away from calling package_get_auto_prMark Hatle
...instead we call read_subpackage_metadata. Calling package_get_auto_pr *should* result in the same PKGV AUTOINC replacement. However, it will also end up changing PKGR differently then do_package as the BB_TASKHASH used will be for the wrong task. Generally this won't cause any real-world issue, but it could cause problems. Moving to read_subpackage_metadata ensures that the values used in do_package will be read in and used for kernel deployment. Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-28buildhistory.bbclass: Rework to use read_subpackage_metadataMark Hatle
Using this mechanism ensures that we have a single point to implement the loading of the package and subpackage meta data. This also then allows the buildhistory class to use the regular datastore vs it's own custom arrays for processing history items. Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-28kernel-yocto: allow promotion of configuration warnings to errorsBruce Ashfield
It was requested to add the ability to upgrade configuration warnings to errors, so that they can't be missed in a build. Add a flag KMETA_AUDIT_WERROR, that when set, triggers a bb.fatal at the end of configuration checking if any warnings are found. This is off by default, but is available for those that want to enable it in their kernel recipe or bbappend. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-28package.bbclass: explode the RPROVIDES so we don't think the versions are ↵Ross Burton
provides emit_pkgdata() creates symlinks for each of the RPROVIDES in pkgdata/MACHINE/runtime-rprovides. However this string can contain versions which results in directories called (=2.32), so pass the RPROVIDES string through bb.utils.explode_deps() to strip the versions out. Helps mitigate - but not solve - #13999. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-27image_types_wic: Add ASSUME_PROVIDED to WICVARSVijai Kumar K
Add ASSUME_PROVIDED to WICVARS so that wic can use that when running on bitbake environment. This fixes the below build failure in do_image_wic when --include-path is used in wks file. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-26kernel.bbclass: Remove do_install[prefunc] no longer neededMark Hatle
Prior work has refactored the do_install task multiple times, and any references to PKGV and PKGR (even indirect ones) have been removed. Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-26package_tar.bbclass: Sync to the other package_* classesMark Hatle
Sync up the anonymous python definition with the other package_*.bbclass files. This should make future maintenance easier, even though it has no difference in behavior from what was there. Additional, there was a missing deltask in the nopackages.bbclass related to the package_tar which has been corrected. This could cause problems on native recipes when package_tar was enabled. Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-26kernel.bbclass: run do_symlink_kernsrc before do_patchRasmus Villemoes
There's a race between do_symlink_kernsrc and do_populate_lic, since the latter is ordered "after do_patch"; so the two may run in parallel. In some cases, that actually causes do_populate_lic to fail if it happens to look for a license file somewhere under ${S} in the short window after shutil.move and before the symlink has been created. Fix that by simply ordering symlink_kernsrc before do_patch. Any task that pokes around in ${S} looking for files should be ordered after do_patch, so this should also fix similar latent races with other ad hoc tasks. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-22nativesdk-sdk-provides-dummy: Add /bin/shRichard Purdie
By doing this we can revert b18c32ab6bc9c4f1953e9f79aa39bc92d1c4e30d which was a pretty ugly hack anyway and now means the different providers are all being handled consistently. Anyone with SDK recipes will need to ensure nativesdk-sdk-provides-dummy is included in those builds (or an equivalent). This is a good thing to do anyway. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-20package.bbclass: Sort shlib2 output for hash equivalencyMark Hatle
The output was unsorted, so different versions of python, different input ordering could have have changed the files, and thus changed the hashes making the system think the output was different, even when unmodified. Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-15packagefeed-stability: Remove as obsoleteRichard Purdie
This class had great ideas and potential but now we have hash equivalence and reproducibility, its effectively obsolete. I'm not aware of any serious use of the class, we certainly don't get bug reports or patches so remove it and focus on those other areas. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-13kernel-yocto: split meta data gathering into patch and config phasesBruce Ashfield
do_kernel_metadata gathers and sanitizes the meta-data that is used in later steps of the kernel-yocto build process. The processing takes the form of configuration and patch gathering. The current single pass of both config and patch gathering means that patches can't modify in-tree configuration elements (although this makes tracing configuration changes harder, it is a valid workflow). We can divide the routine into a patch and configuration phase, and call the config variant after patching is done. This keeps the common parts of the gahering intact, but allows us flexibilty in when the stages happen. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-13kernel-yocto: set cwd before querying the meta data dirBruce Ashfield
To aid classifying options and streamling reports, fragments and classification info are consolidated into a kernel meta directory. The name of the meta directory is (somewhat) flexible, and hence is queried by the tools and created if it doesn't exist. The recent enhancements to the .config auditing introduced a new query for the meta directory, but isn't being run in the kernel's source directory .. and is hence creating an unwanted file in $TOPDIR. We set the kernel source directory as the cwd for the call, and everything goes back to where it belongs. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-13kernel.bbclass: Configuration for environment with HOSTCXXZhang Qiang
When compiling xilinx-zynq board linux-kernel-dev(v5.8) if "GCC_PLUGINS=y", The following error will appear: "HOSTCXX -fPIC scripts/gcc-plugins/arm_ssp_per_task_plugin.o fatal error: gmp.h: No such file or directory" the GCC_PLUGINS depend on return result of gcc-plugin.sh execution however in gcc-plugin.sh use HOSTCC to detect the feature of GNU extension of gcc, this will result that HOSTCC can compile the file successfully, but HOSTCXX is used in the actual compilation process. Signed-off-by: Zhang Qiang <qiang.zhang@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-10cmake.bbclass: Rework compiler program variables for allarchNathan Rossi
CMake projects can specify the NONE project type. Projects that do this do not use any C or C++ compiler, this currently works fine with caveat that when changing the machine/arch the compiler is different causing signature hash differences. To avoid the signature hash differences clear the associated C/CXX compiler variables. In order to achieve this with overrides, simplify the existing construction of the values using a python function and variable setting and remove the anonymous variable setup. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-08uninative: Handle PREMIRRORS genericallyRichard Purdie
Currently uninative handles SOURCE_MIRROR_URL but not generic PREMIRRORS. It can handle this better, attempt to iterate PREMIRRORS entries. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-08populate_sdk_ext: Ensure buildtools doesn't corrupt OECORE_NATIVE_SYSROOTRichard Purdie
buildtools is built as a nativesdk which needs to use OECORE_NATIVE_SYSROOT for its own purposes and can reset it. Save and restore the value within the eSDK so the two don't clash. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-08kernel-yocto: enhance configuration queue analysis capabilitiesBruce Ashfield
Enable the kernel-yocto bbclass to use enhanced capabilities from the kern-tools symbol_why.pl. We bump the kern-tools SRCREV to pickup the reworking of symbol_why, which uses Kconfiglib to provide analysis on configuration values. This is useful for debugging why a symbol specified in a fragment did not end up in the final .config. We introduce two ways to interact with the new symbol_why: 1) a replacement of the existing kconf_check script 2) a dedicated task that is explicitly invoked to dump details on the configuration. The kconf_check replacement is transparent to the user, and is run in exactly the same way as it was previously. But we get better output and more detailed diagnostics if there are symbols that don't make it into the final .config The second way to interact with symbol why is via the new task do_config_analysis. This is invoked like any other task, and by default will provide a full configuration analysis and point the user at files to look at for details. If a more targetted analysis is desired, then specific symbols can be set in the CONFIG_ANALYSIS variable. When this variable is set, the task will only run for the given symbols and provide per-variable links to the user. This variable can be set like any other, including specification in the local.conf: CONFIG_ANALYSIS_pn-linux-yocto-dev = 'NF_CONNTRACK LOCALVERSION' Which produces output as follows: WARNING: linux-yocto-dev-5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0 do_config_analysis: Configuration analysis executed, see: tmp/work/qemuarm64-poky-linux/linux-yocto-dev/5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0/NF_CONNTRACK-config-analysis.txt for details WARNING: linux-yocto-dev-5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0 do_config_analysis: Configuration audit executed, see: tmp/work/qemuarm64-poky-linux/linux-yocto-dev/5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0/NF_CONNTRACK-config-audit.txt for details WARNING: linux-yocto-dev-5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0 do_config_analysis: Configuration analysis executed, see: tmp/work/qemuarm64-poky-linux/linux-yocto-dev/5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0/LOCALVERSION-config-analysis.txt for details WARNING: linux-yocto-dev-5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0 do_config_analysis: Configuration audit executed, see: work/qemuarm64-poky-linux/linux-yocto-dev/5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0/LOCALVERSION-config-audit.txt for details Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-08cml1: Add the option to choose the .config root dirDiego Sueiro
Introduce the KCONFIG_CONFIG_ROOTDIR variable to allow recipes which the .config file is not under the ${B} to select the root directory location for the config file. Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-08kernel-fitimage: build configuration for image tree when dtb is not presentUsama Arif
This patch adds support for adding configuration node even when dtb is not part of the FIT image. The conf and default node number are therefore changed to point to kernel ID rather than dtb ID when dtb does not exist. Signed-off-by: Usama Arif <usama.arif@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-06kernel-devicetree: Fix intermittent build failures caused by DTB buildsTyler Hicks
Fix a build-time race condition that resulted in intermittent build failures in the do_assemble_fitimage task. The race condition involved the do_assemble_fitimage task reading the vmlinux file while the do_compile_kernelmodules task was re-writing the vmlinux file. This can be seen with an aarch64 image build that uses a 5.4 based kernel and sets KERNEL_DEVICETREE. The problem is that the do_compile snippet that the kernel-devicetree class appends did not specify the full kernel build environment when building the DTB(s) from the kernel tree. This resulted in CONFIG_CC_CAN_LINK=y being removed from the kernel config file just before the do_compile task completed. The CONFIG_CC_CAN_LINK=y line was then re-inserted into the kernel config file as part of the do_compile_kernelmodules task. In some cases, this resulted in the do_compile_kernelmodules task to re-link vmlinux which sometimes occured at the same time that the do_assemble_fitimage task was attempting to use vmlinux. The do_assemble_fitimage task would fail with the following error message: aarch64-poky-linux-objcopy:vmlinux: file format not recognized We can use the pine-a64-lts machine, from the meta-pine64 layer, to show that the kernel config file was changed between do_compile and do_compile_kernelmodules: $ C=tmp/work/pine_a64_lts-poky-linux/linux-pine64/5.7+gitAUTOINC+ae03bade3b-r0/linux-pine_a64_lts-standard-build/.config $ bitbake -c do_kernel_configcheck virtual/kernel ... $ md5sum $C; grep CC_CAN_LINK $C 32b133cf8a749a91f698a7ca8616c84f ... CONFIG_CC_CAN_LINK=y $ bitbake -c do_compile virtual/kernel ... $ md5sum $C; grep CC_CAN_LINK $C 2fd2ec2a66eecc329dcb5afaf005eada ... $ bitbake -c do_compile_kernelmodules virtual/kernel ... $ md5sum $C; grep CC_CAN_LINK $C 32b133cf8a749a91f698a7ca8616c84f ... CONFIG_CC_CAN_LINK=y With this change, the do_compile snippet appended by the kernel-devicetree class does not modify the kernel config. The kernel config is unchanged across the do_compile and do_compile_kernelmodules tasks and do_compile_kernelmodules will not attempt to re-link vmlinux. Signed-off-by: Tyler Hicks <tyhicks@linux.microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-06kernel/yocto: allow dangling KERNEL_FEATURESBruce Ashfield
KERNEL_FEATURES are explicitly checked by the kern-tools, and trigger and error when not present. This is since the KERNEL_FEATURES are specified by layers or BSPs as elements that are requied for correct operation. That being said, in order to support more kernel recipes that are using fragments, but not necessarily the yocto kernel-cache for meta-data, this change introduces: KERNEL_DANGLING_FEATURES_WARN_ONLY As you'd expect, when set, missing kernel features only print a message and warn that runtime issues may occur, but otherwise allow the kernel configuration and build process to continue. This was noticed/required when meta-virtualization adopted a more generic kernel bbappend (to serve the needs of more layers in the ecosystem), but also specifies some KERNEL_FEATURES. If layers using a recipe derived from kernel-yocto, but not the main kernel-cache, used meta-virtualization and error would be thrown due to missing features. We now can both allow them to continue, and also provide a more useful message to resolve the issue. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-06meson.bbclass: add a cups-config entryAlexander Kanavin
This is required by newer meson versions in cross builds, as acknowledgement that the tool in PATH is ok to use. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-28gtk-icon-cache.bbclass: add features_checkChangqing Li
'bitbake world -k' when DISTRO_FEATURES don't have x11 and wayland, report errors: Nothing PROVIDES 'gtk+3' Nothing RPROVIDES 'blueman' gtk+3 set ANY_OF_DISTRO_FEATURES, so add it here too since we DEPENDS on it Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-27rootfs-post: remove traling blanks from tasksKonrad Weihmann
remove the traling blanks before the ;-delimiter, so one could use "_remove" to avoid running tasks like 'rootfs_update_timestamp', which are currently hardcoded and not bound to any configurable feature flag Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-25buildhistory: use pid for temporary txt file nameLee Chee Yang
buildhistory create .txt file bh_installed_pkgs.txt and bh_installed_pkgs_deps.txt while listing down installed package. These file is later removed in buildhistory_get_installed(). when multiple process runs in parellal there are chances to race for the file where one process created the file while another task remove the file right after it. using different file name for each process should avoid the race. So add PID to the file name to make it unique. [yocto #13709] Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-22gtk-immodules-cache.bbclass: fix post install scriptlet errorChangqing Li
package libgtk-3.0 don't install dir /usr/lib/gtk-3.0/3.0.0/ by default. when install package gtk-immodule-xim, it is possible met below error: /var/tmp/rpm-tmp.tlfoeo: line 17: /usr/lib/gtk-3.0/3.0.0/immodules.cache: No such file or directory warning: %post(gtk-immodule-xim-2.24.32-r0.0.cortexa72) scriptlet failed, exit status 1 fix by create the dir when try to write to /usr/lib/gtk-3.0/3.0.0/immodules.cache Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-22image.bbclass: improve wording when image size exceeds the specified limitDaniel Ammann
Signed-off-by: Daniel Ammann <daniel.ammann@bytesatwork.ch> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-22classes/package: Use HOST_OS for runtime dependenciesJoshua Watt
The code was using TARGET_OS to try and detect what type of OS the packages would be running on, but this is incorrect. TARGET_OS is the OS for which the package will generate output (e.g. GCC output target or GDB debugging target). The OS where the package will run is the HOST_OS. Note that HOST_OS only differs from TARGET_OS when doing a canadian cross compile, and even then in our case only when doing so for a non-Linux host (e.g. MinGW). Fix the code to use HOST_OS instead. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-22classes/cmake: Fix host detectionJoshua Watt
Fixes the class to use HOST_OS and HOST_ARCH to set the cmake SYSTEM variables. The HOST variables should be used instead of TARGET_OS/TARGET_ARCH because we want to control how cmake compiles for where the package is going to run (the host), not what it will be generating output for (the target). The distinction is only really relevant when building canadian cross recipes. Also fix up the host OS detection to account for MinGW by setting CMAKE_SYSTEM_NAME to "Windows". This eliminates the need for meta-mingw to patch this in all the cmake recipes it builds. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-22classes/reproducible: Move to library codeJoshua Watt
Moves most of the python code used for dealing with the source date epoch to library code. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-20kernel-yocto: account for extracted defconfig in elements checkBruce Ashfield
The test for whether or not scc should to invoked to generate a config.queue was missing the newly created sccs_defconfig variable. We need to test for that variable as well, or we may miss generating the config.queue in some cases. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-18insane: improve arch test messagesRoss Burton
The messages from the ELF 'arch' test are not obvious, clarify the messages and prune output paths. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-18autotools: don't special-case help2man-native for dependenciesRoss Burton
help2man-native doesn't need to be handled specially, we can build it normally or use INHIBIT_AUTOTOOLS_DEPS like everyone else. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-18cve-check.bbclass: always save cve reportakuster
The cve-check file should be saved always, it has good info. Put a copy in the log dir as cve-summary with symlinks to latest run. [Yocto #13974] Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-12nativesdk: Set the CXXFLAGS to the BUILDSDK_CXXFLAGSDouglas
... which default to the BUILDSDK_CFLAGS in any case. Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-12nativesdk: clear MACHINE_FEATURESDouglas
Further to 96c20c9df7: Try to avoid nativesdk recipes accidentally being dependent on MACHINE_FEATURES. Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-12cml1: Move find_cfgs() helper to cml1.bbclassRasmus Villemoes
u-boot.inc and busybox.inc contain identical copies of this little helper. They both inherit the cml1 class and use cml1_do_configure right after having used this helper, and other recipes that want to write similar logic for doing Kconfig via fragments will also need it or something equivalent. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-12ptest: append to FILESKonrad Weihmann
as ptest FILES could be determined before or after the classes was inherited, if is much safer to append to the setting of FILES_${PN}-ptest Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-12insane: consolidate skipping of temporary do_package filesRoss Burton
During the course of do_package_rpm and friends the tools create a top-level CONTROL or DEBIAN directory in the package directory. do_package_qa needs to be aware of these files and ignore them, this was previously done in just one check but instead should be done once when building the file list so all the checks don't see the temporary files. [ YOCTO #13804 ] Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-08spdx: Remove the class as its obsoleteRichard Purdie
The project is a strong supporter of SPDX but this class is old code using a dated approach which now misleads people. Remove it. The meta-sdpxscanner layer is a much more modern and active approach to handling this and we should be pointing people there. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-08kernel.bbclass: make dependency on lzop-native conditionalTimon Ulrich
a native lzop is only needed when an lzo compressed initramfs is actually present Signed-off-by: Timon Ulrich <t.ulrich@anapur.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-08baremetal-image.bbclass: Create a class for baremetal applications or an RTOSAlejandro Hernandez
Baremetal applications or an RTOS built with OpenEmbedded can share the same code to be built as an image, tested and packaged in case they can be updated as a firmware blob from Linux. This class creates the proper wiring to mimic OE Linux image creation and testing infrastructure, inheriting it makes the process of creating a baremetal application transparent to the developer deploying it automatically along with its required bits to be run and tested. Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-08kernel.bbclass: add gzip-native to do_deploy dependenciesMatt Madison
When a modules tarball is created during kernel_do_deploy, the tarball is compressed using gzip, but gzip-native is not a dependency so the build host's gzip is being used for this. Using gzip-native will, by default, use pigz instead of single-threaded gzip, making this task less of a bottleneck for builds with a large modules package. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-08kernel/yocto: fix search for defconfig from src_uriAndrey Zhizhikin
Fetcher provides full paths to defconfig and scc files, which awk comparison operator does not catch during construction of src_uri_defconfig and sccs_from_src_uri lists. This causes the src_uri_defconfig variable to come out empty, and fails further validation if defconfig is only supplied via SRC_URI. Replace comparison operator with awk match function which searches for sub-string during filtering, effectively placing defconfig from SRC_URI into src_uri_defconfig and scc files in sccs_from_src_uri respectively. Fixes: 23dcff0d396c (kernel/yocto: ensure that defconfigs are processed first) Cc: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>