summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* package_rpm: pass XZ_THREADS to rpmRoss Burton2021-06-021-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: 959e1faa911ee67d5d84a57b932135b76cac6a53) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Ignore sstate signing keyDaniel McGregor2021-05-301-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: 01a9358abe821c1da06c3243ccbcc93348042937) Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* baremetal-image: Fix post process command rootfs_update_timestampAlejandro Hernandez Samaniego2021-05-301-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: 179a912bf10ba02448e8d603043c454ca678ac60) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Handle manifest 'corruption' issueRichard Purdie2021-05-221-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: fe468802f697d0be41cf3407df2460e1473e35f8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: fix comment "pacackages" -> "packages"Robert P. J. Day2021-05-221-1/+1
| | | | | | | (From OE-Core rev: 114bdccb2723f1479e68e9a0da39c87ef9c51be1) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: mention CONNECTIVITY_CHECK_URIS in network failure messageMichael Opdenacker2021-05-151-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: f54eaf65ff549a98ff98157d6b3aa48f9adc9ca5) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 62c94bb925543c1e1c5af3c751913d9f06d9597d) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image: Use xargs to set file timestampsJoshua Watt2021-05-111-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: caa63cae723b9025943f3d60dd8ae852fc52addc) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 15c65f90a3aa1e98c2beab2539403157df1fca08) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license_image.bbclass: Fix symlink to generic license filesReto Schneider2021-05-111-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: e24510fbb1439d56a278e2b5fc036d11a24e23df) Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 64b1ba978e079c345e1f7fbd1bf44052fc3dd857) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license_image.bbclass: Detect broken symlinksReto Schneider2021-05-111-2/+13
| | | | | | | | | | | | Find and report symlinks which point to a non-existing file. (From OE-Core rev: afeefde357e468ba79570208bd67d097b9cb9ee1) Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 81809a1ffe67aade1b2ed66fe95044ffbf7d3df8) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: remove ${B} before cmake_do_configureKai Kang2021-05-041-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: db6a315e5f6de02e226e582f878a83c427fd87cc) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0fb6280432a36985590d9a714a5f11164aaebb51) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto.bbclass: chdir to ${WORKDIR} for do_kernel_checkoutKai Kang2021-05-041-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: 51b03665de86c14f5b3887a60154b118c0d37aa3) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit cf0e3397d3f86c7ea1f3c66c50a44d6205f5921b) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc: Detect code changes in submodulesDouglas Royds2021-04-301-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: d233735891872b73e66cb3ce9f73b9af4d32a186) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1c18225d3ef94a41fc073ae87c163b68e6d46571) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "externalsrc: Detect code changes in submodules"Douglas Royds2021-04-301-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: 4d961d6b794b389f8a2d062d5e7c0ae1ddc49e36) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2055718fdd19f925e236d67823017323bbd92a4b) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: clean up some more warning messagesRoss Burton2021-04-301-6/+6
| | | | | | | | | | (From OE-Core rev: db27cb7aabb875d9a48b3b1e82f7cf4e44d15c8b) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2abe18682192e7b38b9af5a5043906f2f069648f) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Add error check for '%' in build pathRichard Purdie2021-04-301-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: 000c12eeca6f6145ba9203c91ec1e67e4b5d8b6f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 31a3cf78452270131a657be45e76569515cff7ef) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: Fix typosDaniel Ammann2021-04-301-4/+4
| | | | | | | | | | (From OE-Core rev: dee125de5f6a4b42ecfae08688641ac783c096f5) Signed-off-by: Daniel Ammann <daniel.ammann@bytesatwork.ch> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 36de56496bc07c321162555d603fac756297911a) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> 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>
* oeqa/runqemu: Support RUNQEMU_TMPFS_DIR as a location to copy snapshot images toRichard Purdie2021-04-061-0/+1
| | | | | | | | | | | | | | | | | | We have a working theory that IO queues on the autobuilder are impacting runtime testing under qemu, particularly async writes which inice does not influence. We already pass the snapshot option to qemu which copies the image and runs out of the copy. Add in the ability to copy the image to a specificed location which can be a tmpfs. This means that writes to the image would no longer be blocked by other writes to disk in the system. Preliminary tests show that this does improve the qemu errors at the expense of sometimes showing qemu startup timeouts as on a loaded system with a large test image, it can take longer than 120s to copy the image to tmpfs. Having a most consistent failure mode for loaded tests is probably desireable though. (From OE-Core rev: fd1c26ab426c3699ffd8082b83d65a84c8eb8bff) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot: Deploy default symlinks with fitImageKlaus Heinrich Kiwi2021-04-051-0/+9
| | | | | | | | | | | Some image recipes uses ${DEPLOY_DIR_IMAGE}/${UBOOT_BINARY} to create their images. Force the re-creation of those symlinks pointing to the u-boot-fitImage in case UBOOT_FITIMAGE_ENABLE is set. (From OE-Core rev: 11a016aaf243a110f7139ea052fd4e568aad40dd) Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-live.bbclass: optional depends when ROOTFS emptyGuillaume Champagne2021-04-051-1/+1
| | | | | | | | | | | `ROOTFS` is optional. It can be empty if the live image doesn't require a rootfs. In such cases, the build doesn't depend on `do_image_{LIVE_ROOTFS_TYPE}`. (From OE-Core rev: 96f47c39f1d17f073243913d524bde84add41d8f) Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image,populate_sdk_base: move 'func' flag setting for sdk command varsChristopher Larson2021-03-312-1/+8
| | | | | | | | | | | | | | | Setting the 'func' flag on the commands variables ensures that they are parsed as shell, and therefore that the referenced commands contents are included in checksums. Doing this only in image.bbclass means that this is missing in recipes that are not images, but which inherit populate_sdk or populate_sdk_base directly, so move it to the latter. [YOCTO #13998] (From OE-Core rev: edc28907ce19a7298059dd388933c58a9c6c28b9) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: add missing vardepsexcludesChristopher Larson2021-03-311-0/+3
| | | | | | | | | For POPULATE_SDK_POST_TARGET_COMMAND, POPULATE_SDK_POST_HOST_COMMAND, and SDK_POSTPROCESS_COMMAND, the appropriate entries were added to vardepvalueexclude, but we want them in vardepsexclude as well. (From OE-Core rev: 554b17e0bbe5190e4b03121f2ed06f4845012a71) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: Add support for PR serviceMark Hatle2021-03-311-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | In the classes/populate_sdk_ext.bbclass the system already copies a number of configurations, such as the hash equivalency data. However, the PR service was being handled. The new code works by checking if PRSERV_HOST is defined, if it is, use the existing export functions to write out a conf/prserv.inc file into the eSDK. On eSDK install, if a conf/prserv.inc file is present we then import this file into the system. This mechanism will work if the PRSERV_HOST is local or remote, as it pulls the necessary data from the server and then imports it to a local database on eSDK installation. Note: the conf/prserv.inc file is not deleted at this time. It was left for possible debugging purposes, but removing it is something we could decide to do in the future. (From OE-Core rev: e207dabdfaa07cd5ebba1cd7dd58610f7185c7e2) Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson: use native-file instead of environment variablesRoss Burton2021-03-311-30/+24
| | | | | | | | | | | | | Meson now supports native-files, which are the same as cross files but describe the native build. By writing and using a native file which describes the tools to use, we can drop the environment variable overriding. (From OE-Core rev: 20a5af2583de60969124b4dc15e045ee47516da4) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: Avoid copying and producing .pyc filesMark Hatle2021-03-281-1/+3
| | | | | | | | | | | | Since pyc cache files are really system specific, no real reason to copy or generate them during the eSDK build process. Also generating them has the possibility of re-using inodes that pseudo may have been tracking, leading a build failure. (From OE-Core rev: ce8eba263647ae63a722122e28f26af46ae083a0) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image: use oe.utils.directory_size() instead of duRoss Burton2021-03-281-4/+2
| | | | | | | | | | Instead of using du (which has issues as disussed in the previous commit), use the new oe.utils.directory_size() function. (From OE-Core rev: d8f1f3a6b024a2ae6631d1ce25421e8d94b69a12) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Add documentation for eventhandlers and tweak namingRichard Purdie2021-03-231-6/+21
| | | | | | | | | | | It isn't immediately obvious what these do, add some better examples to document them. Also improve the naming for one of the handlers. This will help make it clear in any tracebacks which code is being used. (From OE-Core rev: 2b5c553744804f44a17b61c345e482027e45b71e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Remove stale objects before the main buildRichard Purdie2021-03-231-0/+45
| | | | | | | | | | | | | | | | | | | | | The split of util-linux-uuid out from util-linux caused some interesting sstate file overlap errors on existing build directories. This is a challenge to handle since util-linux depends on util-linux-uuid and has overlapping files in package data and deploy/packages directories. The util-linux build happens later and is what would clean up those files but it happens too late for uuid. Fixing this is hard as we don't know the taskhashes until the task graph is calculated. Once that is ready, we can compare the hashes with the existing hashes and know which sstate tasks are "stale". This patch adds a handler which iterates the sstate manifests looking for matching stamp paths and then removes the manifests along with the associated stamp files. (From OE-Core rev: 60e77b1777c6c304aa1d629c4cfdabe0daa22eb1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* linux-dummy: add empty dependent packagesLi Wang2021-03-201-0/+26
| | | | | | | | | | | | | | some kernel includes kernel-image-image and kernel-devicetree packages. these patckages are defined in kernel.bbclass but, when use linux-dummy, these packages are not defined. so, define them as empty packages for avoiding compile error: ERROR: Nothing RPROVIDES 'kernel-devicetree' (From OE-Core rev: 8dbae2dd5ac3de629957ca699f823f5438e80163) Signed-off-by: Li Wang <li.wang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devshell.bbclass: Exceptions displayed within devpyshellDorinda Bassey2021-03-201-0/+1
| | | | | | | | | | | | | If you type something into devpyshell, an exception should be triggered, but that exception isn't printed out because it is not being flushed out of the buffer. This patch fixes that issue. [YOCTO #12156] (From OE-Core rev: 9f95e82a3b27bfd5177a855326dcad8a5bdf5b2d) Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage.bbclass: support both ↵Ming Liu2021-03-201-2/+8
| | | | | | | | | | | | | | | | | | | | KERNEL_DEVICETREE/EXTERNAL_KERNEL_DEVICETREE There are user cases that a developer wants to add both in-tree and out-of-tree devicetrees to fitimage, and this is quite normal, for instance, a developer might need the devicetrees from kernel source meanwhile maintaining his/her own devicetree overlays to be applied on top of them. To support that, we now allow KERNEL_DEVICETREE and EXTERNAL_KERNEL_DEVICETREE to be both set in configuration files, and the devicetrees in EXTERNAL_KERNEL_DEVICETREE have higher priority to override the same names in KERNEL_DEVICETREE. (From OE-Core rev: c461b245076be066512ac7b074020f6032056b8d) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc: Detect code changes in submodulesDouglas Royds2021-03-201-7/+9
| | | | | | | | | | | | | Further to 50ff9afb39, only detect code changes in submodules that are subdirectories of the EXTERNALSRC directory. git submodule status returns a path relative to the cwd for each submodule. We don't add submodules that are not within our source subtree. (From OE-Core rev: 4525310d49d115a37705f04ac5c03d639e5e8f8c) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: Fully-qualified path to arDouglas Royds2021-03-201-1/+2
| | | | | | | | | | | | | | We (correctly enough) pass in our AR to cmake via the toolchain file, but unlike the other cross-compilation tools (CC, CXX, ranlib, etc), cmake does not then do its own search in the PATH for our AR. By using cmake's own find_program() to search the PATH, make works as expected from the commandline, outside of bitbake. (From OE-Core rev: e9180c9575f0723b51915a0da58452511b6b03bf) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: respect downloadfilename when sniffing the SRC_URI for dependenciesRoss Burton2021-03-201-6/+8
| | | | | | (From OE-Core rev: 2881875da12ac8db3db67e4a45e511169e0e2820) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: deltask do_packagedataRobert Yang2021-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can fix a do_package error when compile with meta-secure-core layer: http://layers.openembedded.org/layerindex/branch/master/layer/meta-secure-core/ $ bitbake kernel-initramfs [snip] WARNING:kernel-initramfs-1.0-r0 do_package: Manifest build/tmp-glibc/sstate-control/manifest-x86_64_x86_64-nativesdk-secure-core-image-initramfs.packagedata not found in intel_x86_64 corei7-64 core2-64 x86_64 allarch x86_64_x86_64-nativesdk (variant '')? [snip] This is because kernel-initramfs wants to pack an initramfs image into kernel-initramfs.rpm which adds a dependency in kernel-initramfs.bb to do this: d.appendVarFlag('do_install', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete') This causes kernel-initramfs' do_package depends on ${INITRAMFS_IMAGE}:do_image_complete's do_packagedata, then we will get the error. Delete do_packagedata as other do_package relelated tasks for the image recipe will fix the error. RP: There is a side effect from this change which means that image tasks will no longer run their fetch/unpack/configure/compile/install tasks as these become detached from the dependency chain. The standard tasks are noexec or deleted anyway already so this shouldn't be a significant change. (From OE-Core rev: 0eb95212a7e6b6bdc1243094072dea432cb48f0f) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib_global: handle REQUIRED_VERSIONCharlie Davies2021-03-151-29/+38
| | | | | | | | | | | | Add logic to multilib_global.bbclass to handle new REQUIRED_VERSION variable. Fixes [YOCTO #10096] (From OE-Core rev: 05ba2df8e565589cf7b0b7cedcb96c7fdf97298b) Signed-off-by: Charlie Davies <charles.davies@whitetree.xyz> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go-dep: RemoveKhem Raj2021-03-151-8/+0
| | | | | | | | | | | | | go-dep was an effort for dependency management before go modules, which since 2020 has been deprecated in favor of go modules. Since its not developed any longer and go mdules is officially supported, this should be retired from OE-core as well. (From OE-Core rev: 1e7ed44d87034446f1d07692c9378c3b0a8a9dd3) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Otavio Salvador <otavio.salvador@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: record METADATA_REVISIONChen Qi2021-03-141-0/+3
| | | | | | | | | | | | | | | As we delete the .git/ directory, it's impossible to get METADATA_REVISION inside eSDK. Because of this, we meet the following warning when installing eSDK. WARNING: The base-files:do_install sig is computed to be 16b9d96148d45de183cc94667aae016ec7d102d48255456381e718cd4bbd0aa0, \ but the sig is locked to 6eb0dcaed504282becee94662481d79264db920dee1f7deda18230133fff8f36 in SIGGEN_LOCKEDSIGS_t-qemux86-64 So we record METADATA_REVISION in eSDK generation time to fix this problem. (From OE-Core rev: ff2ad51b801fd62e2abbc573ba2c9ee8fdc7e012) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license.bbclass: Improve parsing time when INCOMPATIBLE_LICENSES is bigPeter Kjellerstedt2021-03-141-5/+4
| | | | | | | | | | | | The commit 08cbf1748 (licenses: Update INCOMPATIBLE_LICENSE for 'or-later' handling) increased the parsing time considerably if there are many licenses in INCOMPATIBLE_LICENSE. Reorganize the code to get almost all the time back. (From OE-Core rev: dd2532279fb239e7f61396898a8aa44ee5104d1d) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: Create cmake arch mapping for ppc64leKhem Raj2021-03-141-0/+2
| | | | | | | (From OE-Core rev: 698ece14e22d0efd9074493ef443b2cce5625d51) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* metadata_scm.bbclass: Use immediate expansion for the METADATA_* variablesPeter Kjellerstedt2021-03-141-5/+5
| | | | | | | | | | | Define METADATA_BRANCH and METADATA_REVISION using immediate expansion. This avoids running `git rev-parse HEAD` multiple times during recipe parsing. (From OE-Core rev: 34e1841ec14c545c73fbe03a9f946d43d65ab326) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts.bbclass: customize prompt string for SDKsKai Kang2021-03-111-0/+3
| | | | | | | | | | | | Introduce a new variable SDK_PS1 to customize prompt string for SDKs when source script environment-setup-script. If variable SDK_PS1 is not set or empty, nothing changed. Otherwise new PS1 with the value of SDK_PS1 is used after source the sdk environment file. (From OE-Core rev: 81ed52f245c18c50e8df51fce1f62906cd4ddd05) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: Add az fetcher to accepted URI protocols for mirrors sanityAlejandro Hernandez Samaniego2021-03-111-1/+1
| | | | | | | (From OE-Core rev: 1d19b16846a70b1180647e85f124e314002a4b83) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: correct forcing of ttyS0Jon Mason2021-03-111-1/+1
| | | | | | | | | | | | | Some platforms do not use ttyS* for their serial consoles (e.g., qemuarm and qemuarm64). The hardcoding of this can cause issues. Modify runqemu to use the serial consoles defined in SERIAL_CONSOLES instead of hardcoding. (From OE-Core rev: 9dea4cd2f9f46ab3a75562639a22d8f56b4d26af) Signed-off-by: Jon Mason <jon.mason@arm.com> Change-Id: I746d56de5669c955c5e29d3ded70c0a4d3171f17 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: add QB_GRAPHICSJon Mason2021-03-111-0/+4
| | | | | | | | | | | | Add a new runqemu field for VGA devices. Currently, these are being set in QB_OPT_APPEND, which can make them difficult to override if importing the config file into another one. (From OE-Core rev: 695c98b6522be4373806c154a2999eaeef205556) Signed-off-by: Jon Mason <jon.mason@arm.com> Change-Id: I8cb9527954c5b06c083c42fe2466cb3338584b7d Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildstats.bbclass: improve timeout handlingSakib Sajal2021-03-111-7/+35
| | | | | | | | | | | | | | | The subprocess that runs the commands periodically times out prematurely even when there is sufficient time available within the given interval for the commands to run. This change improves timeout handling and give all the commands equal time to run. (From OE-Core rev: 74e5c438025ed42cfacb993261dc664c3b7959a8) Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>