summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* populate_sdk_ext: Do not assume local.conf will always existKhem Raj2020-09-141-2/+3
| | | | | | | | | | | Some distros may not have local.conf, and use auto.conf or site.conf alone to describe distro config metadata, therefore make code robust to not fail eSDK builds for such setups (From OE-Core rev: 6379f951ba92b2b86a55de5fc267bacf8c6095d2) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-update-db-native: use fetch taskRoss Burton2020-09-121-1/+1
| | | | | | | | | | Instead of inventing a new task to fetch the CVE data, use the existing fetch task. (From OE-Core rev: f5f97d33a1703d75b9fd9760f2c7767081538e00) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license_image.bbclass: Fix symlink to the image license manifest dir creationDiego Sueiro2020-09-121-8/+10
| | | | | | | | | | | If IMAGE_LINK_NAME is empty don't try to create the symlink. [YOCTO #14042] (From OE-Core rev: b54d92235408abdf0ba75a4d46329ec992af6006) Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* linuxloader.bbclass: Define riscv32 ldso for muslKhem Raj2020-09-121-0/+2
| | | | | | | (From OE-Core rev: c178a5609b2f3cca52532a8b6d6a5927cad386db) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: avoid FileNotFoundError if no do_cve_check task has runChris Laplante2020-09-101-6/+7
| | | | | | | | | | For example, if you just run 'bitbake cve-update-db-native' in a clean build system, |cve_tmp_file| won't exist yet. (From OE-Core rev: dd4473f3d8e1c1a587b6de660775e4b46ddc5fad) Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check/cve-update-db-native: use lockfile to fix usage under multiconfigChris Laplante2020-09-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously CVE_CHECK_DB_FILE / CVE_CHECK_DB_DIR was the same across multiconfigs which led to a race condition wherein multiple cve-update-db-native:do_populate_cve_db tasks could attempt to write to the same sqlite database. This led to the following task failure: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:do_populate_cve_db(d) 0003: File: '/mnt/data/agent/work/74f119cccb44f133/yocto/sources/poky/meta/recipes-core/meta/cve-update-db-native.bb', lineno: 103, function: do_populate_cve_db 0099: if year == date.today().year: 0100: cve_f.write('CVE database update : %s\n\n' % date.today()) 0101: 0102: cve_f.close() *** 0103: conn.commit() 0104: conn.close() 0105:} 0106: 0107:def initialize_db(c): Exception: sqlite3.OperationalError: disk I/O error Use a lockfile to ensure multiple tasks don't step over each other. (From OE-Core rev: 24e9380643a2ae3fcae193519cb64aedaf682153) Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: fix REPRODUCIBLE_TIMESTAMP_ROOTFS referenceMatt Madison2020-09-081-1/+1
| | | | | | | | | | | | | | | Commit 97b439469a45a089431ca9c31893288c855045f4 added a fallback mechanism for getting the rootfs timestamp. However, it uses curly braces around the variable name, which causes bitbake resolve the variable reference, rather than the shell, so the git timestamp never gets used. Fix the reference to restore the intent of making it a fallback for when there is no git timestamp to retrieve. (From OE-Core rev: fbcf2c1c255b0c61a795c032cf7b67f5db41baa8) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: only load real files as ELFRoss Burton2020-09-051-6/+7
| | | | | | | | | | | | | | The file path checks are passed an ELF object if the file is an ELF. It doesn't make a lot of sense to load symlinks to ELFs as if they're in the same package then the real file will be checked too. This should speed up do_package_qa slightly as libraries won't be scanned repeatedly. (From OE-Core rev: c63af30d3b6350361daff94a59d4f14d7c5395e1) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: hash equivalency and pr serviceMark Hatle2020-09-031-8/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the PR service is enabled a number of small changes may happen to variables. In the do_package step a call to package_get_auto_pr will end up setting PRAUTO and modifying PKGV (if AUTOINC is there). PRAUTO is then used by EXTENDPRAUTO, which is then used to generate PKGR. Since this behavior typically happens BEFORE the BB_UNIHASH is calculated for do_package, we need a way to defer the expansion until after we have the unihash value. Writing out the pkgdata files w/o AUTOPR and PKGV (AUTOINC) expanded to placeholder values is the easiest way to deal with this. All other variables are expanded as expected. In the next task, typically do_packagedata, we will then use the UNIHASH from the do_package to get the PR (AUTOPR) as well as generate the AUTOINC replacement value (now PRSERV_PV_AUTOINC). The do_packagedata then translates the placeholders to the final values when copying the data from pkgdata to pkgdata-pdata-input. Also update the prservice test case. With unihash, just changing the do_package (via a _append) will not change the PR. So write the date to a specific file that is incorporated into the unihash to ensure it is always different for the test. Various assert messages were also updated to make it easier to figure out where/why a problem occured. (From OE-Core rev: 2e32f37b0e4abc438c8f60e673cd18a5cc110768) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: only replace leading -I in include pathsYanfei Xu2020-09-031-1/+1
| | | | | | | | | | | | | | We just want to remove the first '-I' in $d, hence removing the g' of sed avoid changing the real path which is include '-I' We also add an anchor to the regex to only match -I at the start of the path. (From OE-Core rev: 12af8abebf0a1b8bd5689f613497f45a7778ab2d) Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: improve gnu-hash-style warningRoss Burton2020-09-021-1/+2
| | | | | | | | | | Instead of showing a filename under packages-split, show the package name and filename inside the package. (From OE-Core rev: 4f78fc65bb0c9bff05651d9e543bab3d75998f79) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: fix gnu-hash-style checkSumit Garg2020-09-021-1/+1
| | | | | | | | | | | 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] (From OE-Core rev: 996010f1b9ca98592e2c87e1adcb0c79b86517b7) Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license_image.bbclass: Create symlink to the image license manifest dirDiego Sueiro2020-09-021-0/+9
| | | | | | | | | | | | | 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. (From OE-Core rev: 9c6a114213a80bebc2988ae8d39b296bce7f6982) Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: checksum all modifications to available kernel fragments ↵Bruce Ashfield2020-08-281-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 09f4db415fb6a1398e9e9b359630043c833f6118) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Move away from calling package_get_auto_prMark Hatle2020-08-281-1/+4
| | | | | | | | | | | | | | | | | | | ...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. (From OE-Core rev: 86142dad13935a0d9af4a4177e05ff5c39003db7) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory.bbclass: Rework to use read_subpackage_metadataMark Hatle2020-08-281-27/+22
| | | | | | | | | | | | 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. (From OE-Core rev: 155ae6a3fe84c25904ffe7058e125bb4a28e2b45) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: allow promotion of configuration warnings to errorsBruce Ashfield2020-08-281-2/+11
| | | | | | | | | | | | | | | | 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. (From OE-Core rev: b26a6df7efdaf640c612f6d557a2e74b4dc58af3) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: explode the RPROVIDES so we don't think the versions are ↵Ross Burton2020-08-281-1/+1
| | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 6a5395dec34192db233bfb2a060e5ccc99708f03) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types_wic: Add ASSUME_PROVIDED to WICVARSVijai Kumar K2020-08-271-1/+2
| | | | | | | | | | | | 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. (From OE-Core rev: 04068ff19d2c18c3b915aab6832ad4b48affa07f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Remove do_install[prefunc] no longer neededMark Hatle2020-08-261-1/+0
| | | | | | | | | | Prior work has refactored the do_install task multiple times, and any references to PKGV and PKGR (even indirect ones) have been removed. (From OE-Core rev: 36fe4db8ae827a93abe9fce6740459d215411965) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_tar.bbclass: Sync to the other package_* classesMark Hatle2020-08-262-4/+3
| | | | | | | | | | | | | | | 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. (From OE-Core rev: f87452942f6391a239b50e3f3f9fa100e74a78fa) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: run do_symlink_kernsrc before do_patchRasmus Villemoes2020-08-261-1/+1
| | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: c5dfc2586b4135cc86e91bb04fed837daf505676) Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* nativesdk-sdk-provides-dummy: Add /bin/shRichard Purdie2020-08-221-1/+1
| | | | | | | | | | | | | | 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. (From OE-Core rev: dd2c603befdd65c92c6196d5b103568249766b3e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Sort shlib2 output for hash equivalencyMark Hatle2020-08-201-1/+1
| | | | | | | | | | | 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. (From OE-Core rev: 23cc846c92219c5cbe3fc6a0024579195d3cbd78) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* packagefeed-stability: Remove as obsoleteRichard Purdie2020-08-151-252/+0
| | | | | | | | | | | | | 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. (From OE-Core rev: a7f7fc07fa9a95bb0294fa4398a0e56e80a7e148) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: split meta data gathering into patch and config phasesBruce Ashfield2020-08-131-29/+43
| | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 004da4c6c6029bb2bdcea6da8afa70368ddd1bca) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: set cwd before querying the meta data dirBruce Ashfield2020-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 36f95f5e22cb4858c927f2a5a3bfeae630a41f1d) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Configuration for environment with HOSTCXXZhang Qiang2020-08-131-0/+2
| | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 740d87766cb87f75c477666d97cb0480c10217f4) 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>
* cmake.bbclass: Rework compiler program variables for allarchNathan Rossi2020-08-101-19/+17
| | | | | | | | | | | | | | | | | 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. (From OE-Core rev: e0657ff13453deedbdcf7c2f8a8854f601c659bd) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: Handle PREMIRRORS genericallyRichard Purdie2020-08-081-4/+9
| | | | | | | | | Currently uninative handles SOURCE_MIRROR_URL but not generic PREMIRRORS. It can handle this better, attempt to iterate PREMIRRORS entries. (From OE-Core rev: 6426c952b5ade48ea94fb647efc464e603989b97) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: Ensure buildtools doesn't corrupt OECORE_NATIVE_SYSROOTRichard Purdie2020-08-081-0/+3
| | | | | | | | | | 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. (From OE-Core rev: 513f4006bf563620ee063ba6d0e9b3f27334642e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: enhance configuration queue analysis capabilitiesBruce Ashfield2020-08-081-33/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 (From OE-Core rev: cbc896def4c8bab3150d3405969e5dd018d62d0c) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cml1: Add the option to choose the .config root dirDiego Sueiro2020-08-081-7/+11
| | | | | | | | | | | 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. (From OE-Core rev: f86282ad2c66f843e000a889c403b3f09bce33f0) Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: build configuration for image tree when dtb is not presentUsama Arif2020-08-081-2/+27
| | | | | | | | | | | | 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. (From OE-Core rev: 2d9f3c3d763e2bca704da4019add973b9a2c572f) Signed-off-by: Usama Arif <usama.arif@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devicetree: Fix intermittent build failures caused by DTB buildsTyler Hicks2020-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 74619de0277471f446bf7a719f4c445359c823f6) Signed-off-by: Tyler Hicks <tyhicks@linux.microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel/yocto: allow dangling KERNEL_FEATURESBruce Ashfield2020-08-061-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 8d44ea9fbb1ee7bec1062505a9bb1e2d7b360094) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson.bbclass: add a cups-config entryAlexander Kanavin2020-08-061-0/+1
| | | | | | | | | | This is required by newer meson versions in cross builds, as acknowledgement that the tool in PATH is ok to use. (From OE-Core rev: 267d1dc0794fc348a5f7af3de201c452c8b705a3) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gtk-icon-cache.bbclass: add features_checkChangqing Li2020-07-281-0/+5
| | | | | | | | | | | | | | | '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 (From OE-Core rev: ab9ff563c77cd5105f4ef9426f076b10ea8e2ee8) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-post: remove traling blanks from tasksKonrad Weihmann2020-07-272-4/+4
| | | | | | | | | | | | 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 (From OE-Core rev: 8c835f63c2bca0a66385eb7ea5ec021d86265777) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: use pid for temporary txt file nameLee Chee Yang2020-07-251-5/+6
| | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 214d236d93700abffa2d586cc744a00455818fa4) Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gtk-immodules-cache.bbclass: fix post install scriptlet errorChangqing Li2020-07-221-0/+1
| | | | | | | | | | | | | | | 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 (From OE-Core rev: c689e120961d9d20386c8b822d71d778d4e6df7b) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: improve wording when image size exceeds the specified limitDaniel Ammann2020-07-221-2/+2
| | | | | | | (From OE-Core rev: fcaab9d686a4afe53a4693f3b30634215d682389) Signed-off-by: Daniel Ammann <daniel.ammann@bytesatwork.ch> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package: Use HOST_OS for runtime dependenciesJoshua Watt2020-07-221-5/+5
| | | | | | | | | | | | | | | | | 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. (From OE-Core rev: f284c5b2df220b520b025a59874e04ef4becd829) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/cmake: Fix host detectionJoshua Watt2020-07-221-6/+13
| | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 01245db2893e39ffb5d4a00e4689f048d0698974) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/reproducible: Move to library codeJoshua Watt2020-07-221-87/+3
| | | | | | | | | | Moves most of the python code used for dealing with the source date epoch to library code. (From OE-Core rev: a7ede90955bc0c8bec1cbb3cab498ef2583b2f4e) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: account for extracted defconfig in elements checkBruce Ashfield2020-07-201-1/+1
| | | | | | | | | | | | 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. (From OE-Core rev: 3a95e171d3eaa6ab143d4f422c98a0ac7ad31761) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: improve arch test messagesRoss Burton2020-07-181-6/+6
| | | | | | | | | | The messages from the ELF 'arch' test are not obvious, clarify the messages and prune output paths. (From OE-Core rev: 8211b42f10b0f2a8e415fee680b37b5ce224a2d5) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: don't special-case help2man-native for dependenciesRoss Burton2020-07-181-1/+1
| | | | | | | | | | help2man-native doesn't need to be handled specially, we can build it normally or use INHIBIT_AUTOTOOLS_DEPS like everyone else. (From OE-Core rev: 886e7d08208c8788488f8299786140fd5b61e548) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check.bbclass: always save cve reportakuster2020-07-181-0/+32
| | | | | | | | | | | | | 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] (From OE-Core rev: 859849c7b594d844819ad8c3f7d8325388d94b93) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* nativesdk: Set the CXXFLAGS to the BUILDSDK_CXXFLAGSDouglas2020-07-121-1/+1
| | | | | | | | | ... which default to the BUILDSDK_CFLAGS in any case. (From OE-Core rev: 9b4bf667bac49131cee382f2f346fc054d5f28b9) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>