summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* binconfig.bbclass: fix typo in get_binconfig_mangle()Robert Yang2017-04-141-1/+1
| | | | | | | | | It should be -IOEINCDIR, not -I-IOEINCDIR. (From OE-Core rev: 3c432e130b47461f845e1618b565f174417e1aa5) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base-passwd/useradd: Various improvements to useradd with RSSRichard Purdie2017-04-142-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently there are multiple issues with useradd: * If base-passwd rebuilds, it wipes out recipe specific user/group additions to sysroots and causes errors * If recipe A adds a user and recipe B depends on A, it can't see any of the users/groups A adds. This patch changes base-passwd so it always works as a postinst script within the sysroot and copies in the master files, then runs any postinst-useradd-* scripts afterwards to add additional user/groups. The postinst-useradd-* scripts are tweaked so that if /etc/passwd doesn't exist they just exit, knowning they'll be executed later. We also add a dummy entry to the dummy passwd file from pseudo so we can avoid this too. There is a problem where if recipe A adds a user and recipe B depends on A but doesn't care about users, it may not have a dependency on the useradd/groupadd tools which would therefore not be available in B's sysroot. We therefore also tweak postinst-useradd-* scripts so that if the tools aren't present we simply don't add users. If you need the users, you add a dependency on the tools in the recipe and they'll be added. We add postinst-* to SSTATE_SCAN_FILES since almost any postinst script of this kind is going to need relocation help. We also ensure that the postinst-useradd script is written into the sstate object as the current script was only being added in a recipe local way. Thanks to Peter Kjellerstedt <pkj@axis.com> and Patrick Ohly for some pieces of this patch. [Yocto #11124] (From OE-Core rev: 1b5afaf437f7a1107d4edca8eeb668b9618a5488) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: check if mirror directory is writableEd Bartosh2017-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | Commit 51edde653707e7a3cd2186082458f01f32cd1996 makes a wrong assumption that SSTATE_MIRRORS have write permissions. A mirror is by definition outside of it's user control. In my use case it happens I does not have permissions to update the access time of the dereferenced symbolic-link file. Checked if file is writable before changing its atime. Thanks to Paulo Neves for the patch. [YOCTO #11307] (From OE-Core rev: b8f26c011d5ed888d85fef040bd821400d54c8fe) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot: write native sysroot of qemu-helper into qemuboot.confEd Bartosh2017-04-131-1/+8
| | | | | | | | | | | | | | | | | | | Native sysroot of qemu-helper contains all required tools (qemu-system and tunctl atm) for runqemu to work. It's not removed by rm_dir and should always exist. It makes sense to write it into qemuboot.conf to make runqemu to use it as a default directory for native tools. This should also speed up runqemu as it doesn't need to run to run 'bitbake qemu-helper -e' to get its native sysroot. [YOCTO #11266] [YOCTO #11193] (From OE-Core rev: 0f207bfc1f7a4fd509b78d32bbe1a8d4ebea8053) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: classes: Add building dir to uImage creationMylène Josserand2017-04-131-1/+1
| | | | | | | | | | | | | | On the do_uboot_mkimage task from kernel-uimage.bbclass, in case KEEPUIMAGE is different than the default "yes" value, the uboot-mkimage command fails because the path of the created uImage does not exist. On this task, we are under the BUILDDIR so there is no folder arch/<ARCH>/boot. Add the ${B} (for kernel build directory) as prefix to this folder fixes the problem. (From OE-Core rev: e5a6ee0d0655827d06a6030380277ee61a6db0ef) Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* blacklist.bbclass: fix for multilibRobert Yang2017-04-132-25/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fixed: The netmap has been blacklisted in meta-networking/recipes-kernel/netmap/netmap_git.bb, but lib32-netmap still can be built (suppose it doesn't depend on another broken recipe netmap-modules, it is a little complicated, will talk below): $ bitbake lib32-netmap This is because of the old code masks on bb.event.ConfigParsed which can only handle global blacklist, netmap sets blacklist in the recipe, so it can't be handled, and lib32-netmap can be built. which was incorrect: blacklist_multilib_eventhandler[eventmask] = "bb.event.ConfigParsed" Move multilib code into multilib.bbclass can fix the problem easily: $ bitbake lib32-netmap ERROR: Nothing PROVIDES 'lib32-netmap' ERROR: lib32-netmap was skipped: Recipe is blacklisted: BROKEN: <foo> * Not fixed Another problem is netmap-modules has also been blacklisted in the recipe, and the recipe inherits module.bbclass, so multilib.bbclass doesn't handle it as the code shows: # There should only be one kernel in multilib configs # We also skip multilib setup for module packages. provides = (e.data.getVar("PROVIDES") or "").split() if "virtual/kernel" in provides or bb.data.inherits_class('module-base', e.data): raise bb.parse.SkipPackage("We shouldn't have multilib variants for the kernel") And netmap-modules provides lib32-netmap-modules which is handled in multilib_global.bbclass, so bitbake lib32-netmap-modules can't show the blacklist message: $ bitbake netmap-modules ERROR: Nothing PROVIDES 'netmap-modules' ERROR: netmap-modules was skipped: Recipe is blacklisted: BROKEN: <foo> ERROR: netmap-modules was skipped: We shouldn't have multilib variants for the kernel $ bitbake lib32-netmap-modules ERROR: Nothing PROVIDES 'lib32-netmap-modules'. Close matches: netmap-modules netmap-modules lib32-fbset-modes Note the different messages between netmap-modules and lib32-netmap-modules. This is because multilib.bbclass doesn't handle the "module" recipe so there is no PN called lib32-netmap-modules, therefore blacklist.bbclass can't handle it. Note, there are two "netmap-modules" which needs to be fixed later. (From OE-Core rev: c8749ed1edcbb544f6656ee5da80f2cf647c405a) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native/nativesdk: Use fixed DISTRO_FEATURESJussi Kukkonen2017-04-123-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There seems to be little advantage to letting distro features affect native builds. There is a significant disadvantage: a change to DISTRO_FEATURES will trigger a lot of unnecessary native tasks. In a test like this: $ bitbake core-image-minimal # append " systemd" to DISTRO_FEATURES $ bitbake core-image-minimal The latter build takes 44 minutes (28%) of cpu-time less with this patch (skipping 135 native tasks). Sadly wall clock time was not affected as glibc remains the bottleneck. Set native distro features to DISTRO_FEATURES_NATIVE appended with an intersection of DISTRO_FEATURES and DISTRO_FEATURES_FILTER_NATIVE. Current default values (baitbake.conf) are * DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation" (as gtk-doc-native has much less dependencies when built without it) * DISTRO_FEATURES_NATIVE ?= "x11" (to enable native UIs even if target does not containe them) Do the variable setting in native_virtclass_handler() because otherwise it could still be overridden by appends and the feature backfilling. Shuffle the early returns so DISTRO_FEATURES gets set as long as the packagename ends with "-native". Add similar variables for nativesdk. To make nativesdk work we need to enable the locale options so nativesdk-glibc-locales can build and to avoid the init manager check in the nativesdk case so add those fixes. (From OE-Core rev: 731744d5538e315702be828e6f2bd556309dee07) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: do not rely on grepping imagesRobert Yang2017-04-121-0/+3
| | | | | | | | | | | | | Fixed when the image is large and not enough memory: grep: memory exhausted Aborted [YOCTO #11073] (From OE-Core rev: a99deb30a0138594147ae28aab016fe4b74b8959) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Fix sysroot problem with populate_sysroot dependencies on do_fetchRichard Purdie2017-04-111-1/+6
| | | | | | | | | | | | | | | | | Dependencies on svn:// urls were failing as the cleandirs on do_fetch was destroying any sysroot setup by the extend_recipe_sysroot function. Add code so that if the task do_fetch, we move the cleandirs to a separate function before the extend_recipe_sysroot prefunc else we'd wipe out the sysroot we just created. This allows fetcher do_populate_sysroot dependencies to work correctly again. I did try various other approaches and a seperate function with cleandirs was the cleanest way to add this without code duplication or too much complexity. (From OE-Core rev: b32fbfc85b14059f0bfdeeffe2c52f8d3c20f276) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toaster: fix SDK artifact captureDavid Reyna2017-04-111-5/+16
| | | | | | | | | | | | | | | | | Use the TaskArtifacts event to scan the SDK and ESDK manifests to cleanly collect the respective artifact files. The previous method was broken when the SDK file deployment moved from the do_populate_sdk[_ext] tasks to their sstate tasks. That method is disabled (but not yet removed) in preparation for the rest of refactor work for the parent #10283 work. [YOCTO #10850] (From OE-Core rev: a6ec56d372f833be50f57bcb79b6ebe78bb93be0) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: save output file signatures for sstate tasksPaul Eggleton2017-04-111-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | Save a file per task listing sha256sums for each file staged, i.e. the output of the task. Some caveats: 1) This only covers sstate tasks since it uses SSTATEPOSTUNPACKFUNCS, however those are generally the most interesting in terms of output anyway. 2) The signature is taken before applying any relocations, so any relocated files will actually have different signatures, but that's churn that you probably won't want to see here. 3) At the moment if you run the same build twice without sstate you will very likely see changes in the output for certain tasks due to things like timestamps being present in the binary output. Fixing that is a general Linux ecosystem problem - see this page for our efforts to resolve it on our side: https://wiki.yoctoproject.org/wiki/Reproducible_Builds NOTE: you need to set your BUILDHISTORY_FEATURES value to include "task" to enable collection of these signatures as it is is disabled by default. (From OE-Core rev: ca5d1273432e20059ab66d721a9eb314a54e81e7) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/uninative: set SSTATEPOSTUNPACKFUNCS[vardepvalueexclude] properlyPaul Eggleton2017-04-111-1/+1
| | | | | | | | | | | | | Append to the value with appendVarFlag() instead of setting it outright, so that we can also append to it in other places. Accordingly, this varflag is pipe-separated (since we want to be able to exclude any string fragment, in this case including the leading space), thus put a leading pipe character to play nicely with any existing value. (From OE-Core rev: a147838c3dfd4c53084a19b052b8d4e183293412) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: write out task signatures on every buildPaul Eggleton2017-04-111-0/+12
| | | | | | | | | | | | | | | | | If we want to determine what changed since the last build, one angle from which to look at it is to check the signatures. However, if we don't actually have the signatures from the last build we don't have anywhere to start. Save the signatures on each build in order to give us the starting point. NOTE: you need to set your BUILDHISTORY_FEATURES value to include "task" to enable collection of these signatures as it is is disabled by default. (From OE-Core rev: 11f68f65c46c5bc26ddeeade3021e83b3a7f895a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory.bbclass: do not influence sstate of do_rootfsPatrick Ohly2017-04-111-4/+8
| | | | | | | | | | | | | | | | Enabling or disabling buildhistory caused a rebuild of images, which is undesirable. For example, it prevented image reuse from a main build with buildhistory in a following oe-selftest where buildhistory must be disabled. The reason are the additional ROOTFS_POSTUNINSTALL_COMMAND and ROOTFS_POSTUNINSTALL_COMMAND entries. Those need to be excluded both via vardepvalueexclude and vardepsexclude. (From OE-Core rev: e4c28ea05ef4514deb3d19e8e33f81d352712455) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "staging: Fix sysroot problem with populate_sysroot dependencies on ↵Richard Purdie2017-04-111-5/+0
| | | | | | | | | | do_fetch" There seems to be an issue with the patch, revert for now. This reverts commit cd5e0a32184d98beb8d81e6b5527166d3ca4fb3c. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Fix sysroot problem with populate_sysroot dependencies on do_fetchRichard Purdie2017-04-101-0/+5
| | | | | | | | | | | | | | Dependencies on svn:// urls were failing as the cleandirs on do_fetch was destroying any sysroot setup by the extend_recipe_sysroot function. Add code so that if the task do_fetch, we move the cleandirs to the extend_recipe_sysroot task else we'd wipe out the sysroot we just created. This allows fetcher do_populate_sysroot dependencies to work correctly again. (From OE-Core rev: cd5e0a32184d98beb8d81e6b5527166d3ca4fb3c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cross-canadian.bbclass: override TARGET_* flagsMing Liu2017-04-101-0/+5
| | | | | | | | | | | | | | | | Some TARGET_* flags are being exported in bitbake.conf currently, so they are impacting all the tasks of a cross-canadian recipe even they are not in use at all. This can lead a lot of churn when the cross-canadian sysroot are shared by machines while they have defined different TARGET_* flags. Fix it by overriding with BUILDSDK_* flags. (From OE-Core rev: 767335c92b7cc657a008722a908380a3c89c3c66) Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* nativesdk.bbclass: override TARGET_* flagsMing Liu2017-04-101-0/+4
| | | | | | | | | | | | | | | | Some TARGET_* flags are being exported in bitbake.conf currently, so they are impacting all the tasks of a nativesdk recipe even they are not in use at all. This can lead a lot of churn when the nativesdk sysroot are shared by machines while they have defined different TARGET_* flags. Fix it by overriding with BUILDSDK_* flags. (From OE-Core rev: 85b69a5ec9ba9ea9ebdcd8ac18e1e147ddb1ff33) Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* crosssdk.bbclass: override TARGET_* flagsMing Liu2017-04-101-0/+5
| | | | | | | | | | | | | | | | Some TARGET_* flags are being exported in bitbake.conf currently, so they are impacting all the tasks of a crosssdk recipe even they are not in use at all. This can lead a lot of churn when the crosssdk sysroot are shared by machines while they have defined different TARGET_* flags. Fix it by overriding with BUILD_* flags. (From OE-Core rev: 3facbe700a2f28a11620c4954686ed5d5e47a3d9) Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cross.bbclass: override TARGET_* flagsMing Liu2017-04-101-0/+5
| | | | | | | | | | | | | | | | | | Some TARGET_* flags are being exported in bitbake.conf currently, so they are impacting all the tasks of a cross recipe even they are not in use at all. This can lead a lot of churn when the cross sysroot are shared by machines while they have defined different TARGET_* flags. And sometimes it even causes "Taskhash mismatch" errors. Fix it by overriding with BUILD_* flags. (From OE-Core rev: 55c83cb239df5faf5e2143fffca47f2f16931cb3) Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Skip glibc do_stash_locale and gcc do_gcc_stash_builddir tasksRichard Purdie2017-04-101-0/+4
| | | | | | | | | | We never need these tasks as dependencies of other sstate tasks since they're only ever needed to build artefacts so we can always skip them and save some time/space. (From OE-Core rev: 246df3df4b7da4b75de0745938438124c2b1d4a5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license.bbclass: improve reproducibilityJuro Bystricky2017-04-101-1/+1
| | | | | | | | | | | | | | | | | | Two identical builds can end up having deploy/licenses folders that differ. This is observed in cases where there are several different license files of the same name in different folders, i.e. "COPYING". In those case we have to differentiate the files somehow and we do it via file expensions such as COPYING.0, COPYING.1. However, which file will get which extension is presently random. This means, for example, that COPYING.0 in one build is the same as COPYING.1 in the other (and vice versa). Although there is mothing wrong with this, for the sake of binary reproducibility it is preferable to have a deterministic outcome. (From OE-Core rev: 007ebc84979b1bc8b7520097793c7ab6d646c243) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: add CONFFILES to pkgdataDavid Vincent2017-04-101-0/+1
| | | | | | | | | | | Emit CONFFILES variable in pkgdata, or else the get_conffiles function will return 'None' for some packages instead of the expected value. This is especially true for optional module packages. (From OE-Core rev: ee44dabc065912ac17f1ee5f06f12695c90b5482) Signed-off-by: David Vincent <freesilicon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_ipk.bbclass: Replace empty lines in DESCRIPTION with '.'Mariano Lopez2017-04-101-1/+5
| | | | | | | | | | | | | | | | opkg uses empty lines as separator for next package and if an ipk file was packaged with empty lines in DESCRIPTION opkg won't be able to handle such ipk file, this happens at execution time. This commit will replace empty lines in DESCRIPTION with a '.' when generating an ipk package to avoid this issue. [YOCTO #10677] (From OE-Core rev: 3e678d9b6a9eaeed76ce538d7f6ecf9f423864bc) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: move in addtask kernel_link_images statement from ↵Ming Liu2017-04-051-0/+1
| | | | | | | | | | | | | linux-yocto.inc Add kernel_link_images task in kernel.bbclass instead of adding it in linux-yocto.inc, or else the recipes inheriting kernel.bbclass might run into implicit dependency issues. (From OE-Core rev: 3211d43d80f69d9c200a0e4f90fd37736046aafe) Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: explain where TMPDIR is if we're telling the user to delete itRoss Burton2017-04-051-1/+1
| | | | | | | (From OE-Core rev: c03de901213846d7c8cc2a12a97034273aa904c3) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipe_sanity: Drop now unused FILESDIRRichard Purdie2017-04-051-17/+0
| | | | | | | | | FILESDIR is long dead and unreferenced pretty much anywhere now, drop these sanity references too. (From OE-Core rev: 760ab75be6b794fdcd0b1717439fcea605db9e0b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: introduce INITRAMFS_IMAGE_NAMEMing Liu2017-04-012-15/+16
| | | | | | | | | | | | | | It defaults to ${INITRAMFS_IMAGE}-${MACHINE} if INITRAMFS_IMAGE is not empty. This allows the end users to be able to override the initramfs image name with a customized value. (From OE-Core rev: e788fb2b894852f71b1c545abde71b45b9f230dc) Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: fix a typoMing Liu2017-04-011-1/+1
| | | | | | | | | | In a addtask statement, do_strip should be strip. (From OE-Core rev: 8413e26164644230615f4503ca9488b5b4021aeb) Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils3.bbclass: Fix path to python for scriptsSerhii Popovych2017-03-311-2/+2
| | | | | | | | | | | | | | This change is similar to the recently introduced change to the distutils.bbclass fixing shebang line in python scripts for nativesdk class builds. v2: Rebased on top of new head. Cc: XE-Linux <xe-linux-external@cisco.com> (From OE-Core rev: 49772e1a1f291d1cacce27b381009dbb441c483e) Signed-off-by: Serhii Popovych <spopovyc@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils.bbclass: Fix path to python for scriptsSerhii Popovych2017-03-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Commit 11229de (distutils: Replacing path to native python by path to python in the image to support python packages with console-script setup) replaces path to python-native with path to the python interpreter in the target image. However on nativesdk builds ${bindir} expanded to the ${SDKPATHNATIVE}${prefix_nativesdk} making shebang line pointing to the absolute path to env(1) in SDKPATHNATIVE which may not be present if coreutils isn't part of nativesdk. On the other hand commit cf63d90 (bitbake.conf: Define USRBINPATH globally instead of individually) introduces USRBINPATH variable which has correct value regarding build class and intended for this use case. v2: Rebased on top of new head. Cc: XE-Linux <xe-linux-external@cisco.com> (From OE-Core rev: 2a83c22a510e10b169015ce936eb51a6fc959ec1) Signed-off-by: Serhii Popovych <spopovyc@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: ensure HOSTTOOLS links point to executablesRoss Burton2017-03-311-2/+2
| | | | | | | | | | | | | Use the new executable argument to bb.utils.which() to ensure that the symlinks point to executable files and not for example directories with the right name which happened to be on $PATH. [ YOCTO #11256 ] (From OE-Core rev: 7f40c934c3aeb1d34f95f30b281e25a17c428fce) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib_header: Update wrapper to handle arm 32/64 bitRichard Purdie2017-03-311-7/+0
| | | | | | | | | | | | | Having arm 32/64 bit headers coexisting turns out to be tricky. Unfortunately our wrapper works using wordsize.h and this differs on arm so we can't use it. Therefore replicate the logic here for arm. I did look into writing our own wordsize.h but we also need to remap kernel headers on arm and since wordsize.h comes from libc, that doesn't work for kernel headers. (From OE-Core rev: 141dc7136c9c62da1d30132df4b3244fe6d8898d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ccache: Use MULTIMACH_TARGET_SYS not HOST_SYSRichard Purdie2017-03-311-1/+1
| | | | | | | | | I suspect this was a typo and that TARGET_SYS makes more sense here. Its also the only remaining user of MULTIMACH_HOST_SYS in OE-Core. Change it. (From OE-Core rev: fd51900f203ae997b0f606f94ab87c12e37696c0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Drop obsolete TMPDIR ABI conversionsRichard Purdie2017-03-311-42/+1
| | | | | | | | | | | When we get to version 12 we have a hard break as we can't convert to newer versions. There is no point in running the old conversions on an old tmpdir only to hit that block. Remove all the old conversions to avoid that and make things clearer. (From OE-Core rev: 163b27bdfe323b648929240375aaf251e8d5edf4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext.bbclass: enhance compatibility with rm_work.bbclassPatrick Ohly2017-03-311-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | "bitbake -c populate_dsk_ext" must not trigger do_rm_work, because it is impossible to declare that the additional tasks activated by "-c populate_dsk_ext" must run before do_rm_work. When do_populate_dsk_ext and do_rm_work are both active, the resulting race condition breaks do_populate_dsk_ext. The existing bitbake dependencies can't be used for that, because "addtask populate_dsk_ext before do_rm_work" would then always execute populate_dsk_ext also in normal builds. do_populate_dsk_ext triggers do_rm_work indirectly through the dependency on do_build of the SDK_TARGETs. Using the new do_build_without_rm_work instead (when available, with do_build as before if not) avoids the problem. However, one has to be careful to not trigger do_rm_work in the same build in some other way. "bitbake core-image-sato:do_populate_sdk_ext core-image-sato:do_build" still fails, for example. Doing one after the other works. Fixes: [YOCTO 11042] (From OE-Core rev: 00b1911c65fa1b21c3dedec40170998573b62178) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work.bbclass: introduce do_build_without_rm_workPatrick Ohly2017-03-311-3/+24
| | | | | | | | | | | | | | | | | | | | Some classes, for example populate_sdk_ext.bbclass, must be able to trigger a full build of a recipe without also triggering do_rm_work. They cannot depend on do_build anymore, because that would trigger do_rm_work. Instead, do_build_without_rm_work can be used. It has the exact same dependencies as do_build, minus do_rm_work and do_rm_work_all. This may also be useful in a test build of a recipe where one wants to preserve the work directory without having to modify configuration settings: bitbake foobar:do_build_without_rm_work (From OE-Core rev: 04a7b8d6d2e86cc4dd1362c775f5e3ac1eb1d19d) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd-boot: write startup.nshChristopher Larson2017-03-291-0/+2
| | | | | | | | | | This aligns with the behavior of grub-efi and gummiboot, and is needed to fix auto-boot of intel-corei7-64 for non-GPLv3 builds. (From OE-Core rev: c187326afcf1e9d781c1bd0923e1362a6f50f613) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: QEMU_USE_KVM can list machinesPatrick Ohly2017-03-281-1/+3
| | | | | | | | | | | | | | | | Previously, QEMU_USE_KVM=True enabled the use of kvm only when "x86" was in the MACHINE name. That is too limiting, because for example intel-corei7-64 can also use kvm but it wasn't possible to enable that without changing OE-core. That traditional usage is still supported. In addition, QEMU_USE_KVM can be set to a list of space-separated MACHINE names for which kvm is to be enabled. (From OE-Core rev: d5421dd00b9cf785fa77e77c6c739e8bd8822fa3) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* dnf: move the entire dnf/rpm4 stack to Python 3Alexander Kanavin2017-03-281-2/+2
| | | | | | | | | [YOCTO #11180] (From OE-Core rev: bedcdc4cf921b70a8cfb16c6684668d0ac9e1942) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: error if file-rdeps not metStephano Cetola2017-03-281-2/+2
| | | | | | | | | | | | | | | Missing runtime dependencies should result in an error rather than a warning. Indeed, if RPM is listed in PACKAGE_CLASSES, it will throw an error rather than install packages with missing dependencies. This functionality should be consistent across package types. This patch ensures that an error will be thrown. [YOCTO #10949] (From OE-Core rev: 90bc7bfa1b27cd5ea2480463f7631f179a296b10) Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Replace "if test" file tests with POSIX file testsuninative-1.6Robert P. J. Day2017-03-279-17/+16
| | | | | | | | | | In entire meta/classes/ directory, replace shell tests of the form "if test -? ..." with POSIX tests of the form "if [ -? ... (From OE-Core rev: 78928016f4cf38cf6751cb089200bf950d07ae93) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: Replace "grep ... >/dev/null" with "grep -q"Robert P. J. Day2017-03-271-4/+4
| | | | | | | | | For aesthetic style reasons, use "grep -q" instead of ">/dev/null". (From OE-Core rev: 39a7bfde92211b3546ff0a8e6a3e549714996b28) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: perform fsck on created ext imageEnrico Jorns2017-03-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | When performing a file system check, the image created with mkfs will trigger Pass 3A ('Optimizing directories') which turns the file system into state "changed" (EXT2_FLAG_CHANGED). This will let fsck request a reboot by setting the return code flag "2". The result of this is that each ext-image built with oe-core will trigger a reboot during the first time an fsck is triggered. A common case where this might occur is when fsck detects having a future superblock write time. This always happens when booting a newly created ext4 rootfs with a target that does not have a recent time set. This patch moves the initial fsck run that performs the optimization from the target to the host system and thus prevents the target from performing an avoidable reboot. (From OE-Core rev: a93d005934192402d7cceb36016b25b7d0c65547) Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Ulrich Ölmann <uol@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Remove uninstalled dependencies from sysrootsRichard Purdie2017-03-241-0/+28
| | | | | | | | | | | | | | | | | Currently, if something is added to a sysroot, its hash remains unchanged, and it continues to be buildable, it doesn't get removed from the sysroot. This patch handles the case where something is removed from DEPENDS or [depends]. It does introduce its own issue where something could get removed even though some other task in parallel may have the same requirement. This case should be extrememly rare and fixing the more common DEPENDS removal is likely the bigger win though. (From OE-Core rev: 06227bc5e533841ab12cde84a6ed6f8b8ddeb5cb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Update extend_recipe_sysroot vardepsexclude after code changesRichard Purdie2017-03-241-1/+1
| | | | | | | | Changed were made to the code but not reflected in vardepsexclude, fix this. (From OE-Core rev: e59dc6985e22e7ac30b6afa81d448fbc372f5dab) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Drop BB_SETSCENE_VERIFY_FUNCTION2Richard Purdie2017-03-241-13/+0
| | | | | | | | | | | | | | | | | The original description for this was: """ Since we clean out do_populate_sysroot if do_configure runs, don't allow do_populate_sysroot_setscene functions if we're going to run do_configure. """ With RSS, we don't need to clean do_populate_sysroot any more. Since we no longer do that, this function also has no purpose any longer and can also be removed. (From OE-Core rev: 637c6d17b4a812379cbab64d340660092e046965) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Drop do_configure clean prefuncRichard Purdie2017-03-241-8/+0
| | | | | | | | | With recipe specific sysroots its now pointless to do this, may as well save the cpu cycles. (From OE-Core rev: b70c8e91e6c4240e95e8b22bcc36525a5a0703f9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Drop BB_SETSCENE_VERIFY_FUNCTION since it was replacedRichard Purdie2017-03-241-15/+0
| | | | | | | | | | BB_SETSCENE_VERIFY_FUNCTION2 replaced BB_SETSCENE_VERIFY_FUNCTION and due to our minimum bitbake requirements there is no point in retaining the older version any more. (From OE-Core rev: f08d6ccda5db9fdc81d53370aea1f599718897da) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native.bbclass: clear MACHINE_FEATURESAndre McCurdy2017-03-241-0/+1
| | | | | | | | | | | | | Try to avoid native recipes accidentally being dependent on MACHINE_FEATURES. This simple change doesn't prevent MACHINE_FEATURES set via MACHINE_FEATURES_BACKFILL sneaking through, but it's better than nothing. (From OE-Core rev: 96c20c9df714cdf3f0e9461ec566c4f5d3bdb5f1) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>