summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
...
* kernel-artifact-names.bbclass, kernel.bbclass: remove prefix and extension ↵Martin Jansa2018-08-212-6/+4
| | | | | | | | | | | | | from MODULE_TARBALL_* variables * for consistency with other artifacts variables, include only the version string, not the actual name or extension * changing .tgz to something else in the MODULE_TARBALL_NAME variable only wouldn't make much sense because then kernel.bbclass still calls "tar -cvzf" to create it (From OE-Core rev: 43bd7f39157da49f7fb0c2d6d9751059471c8d53) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel*.bbclass: rename *_SYMLINK_NAME variables to *_LINK_NAME and ↵Martin Jansa2018-08-214-37/+37
| | | | | | | | | | | | | | *_BASE_NAME to *_NAME * for consistency with IMAGE_NAME and IMAGE_LINK_NAME and to avoid confusion with IMAGE_BASENAME (which is the actual name of the artifact, e.g. PN while KERNEL_IMAGE_BASE_NAME was only the version suffix) (From OE-Core rev: f952c8e08b4798aa0f8bf764cfd70bda0eae9b8b) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-artifact-names, kernel-fitimage: add KERNEL_FIT_BASE_NAME, ↵Martin Jansa2018-08-212-22/+15
| | | | | | | | | | | | | KERNEL_FIT_SYMLINK_NAME variables * use the same naming scheme for fitImage files like all other deployed artifacts * remove unnecessary cd to DEPLOYDIR * remove unnecessary cd to B (From OE-Core rev: fd69f8b2d7dd950cee9e820ef91ea90521c95ace) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf, kernel-artifact-names.bbclass: introduce IMAGE_VERSION_SUFFIX ↵Martin Jansa2018-08-211-9/+4
| | | | | | | | | | | | instead of using DATETIME directly * this makes it easier to use different version string than DATETIME, e.g. set from jenkins job while keeping the suffix consistent across all artifacts stored in DEPLOYDIR (From OE-Core rev: 1245935b9bf32e0321d8ff12492983ba8506190a) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands: put image testdata under sstate controlAndré Draszik2018-08-211-7/+8
| | | | | | | | | | | | | | The testdata.json is being written to DEPLOY_DIR_IMAGE directly, thus bypassing sstate, which results in an ever growing list of files. Write them to IMGDEPLOYDIR instead, so as to benefit from the automatic management via sstate. (From OE-Core rev: 1f7399a5e5d12b7ca3faf399a70c1613d522c28d) Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* dos2unix.bbclass: Move to oe-coreKhem Raj2018-08-201-0/+14
| | | | | | | | | | | | | - Import from meta-oe layer - This is useful for many packages where CR-LF needs to be adjusted, many recipes depend on it e.g. meta-multimedia libebml and so on. (From OE-Core rev: bd4a02d8d3cfb476a2da0f4616605c92604266c0) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base.bbclass: inherit and use image-postinst-interceptsChristopher Larson2018-08-161-1/+2
| | | | | | | (From OE-Core rev: fb83997ded3789c7447402a9fda03b1669cecae0) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: inherit and use image-postinst-interceptsChristopher Larson2018-08-161-0/+2
| | | | | | | (From OE-Core rev: 73cccdb6942404961415e5939263686719b24061) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-postinst-intercepts.bbclass: add classChristopher Larson2018-08-161-0/+23
| | | | | | | | | | | | This class sets POSTINST_INTERCEPTS and POSTINST_INTERCEPTS_CHECKSUMS, to allow us to pull intercepts from BBPATH. This is kept as a separate class, as it's needed by both image construction and sdk construction, the latter to support meta-toolchain & similar recipes. (From OE-Core rev: 7a2044df4ae8d80cf25a6bfd9b71978ffefbfa33) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Optimise SSTATE_EXCLUDEDEPS_SYSROOT handlingRichard Purdie2018-08-161-3/+10
| | | | | | | | | Using re.compile() is around six times faster than recompiling the regexp each time so maintain a cache. (From OE-Core rev: 41eb382737706e245f2b7104e313c8dfaa370945) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: use SSTATE_EXCLUDEDEPS_SYSROOT for skipping ↵André Draszik2018-08-161-3/+0
| | | | | | | | | | | | base-passwd|shadow-sysroot recipes Use the newly introduced SSTATE_EXCLUDEDEPS_SYSROOT for specifying the base-passwd|shadow-sysroot recipes to be excluded from a recipe sysroot. (From OE-Core rev: 68e502e9063a88532fe0154f152ba408f0091900) Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: use SSTATE_EXCLUDEDEPS_SYSROOT for skipping *-initial recipesAndré Draszik2018-08-161-3/+0
| | | | | | | | | | Use the newly introduced SSTATE_EXCLUDEDEPS_SYSROOT for specifying the *-initial recipes to be excluded from a recipe sysroot. (From OE-Core rev: 6706bad52f9311ea79c534ee90014c3216992999) Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: allow specifying indirect dependencies to exclude from sysrootAndré Draszik2018-08-161-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, a dependency on any -native recipe will pull in all dependencies of that -native recipe in the recipe sysroot. This behaviour might not always be wanted, e.g. when that -native recipe depends on build-tools that are not relevant for the current recipe. This change adds a SSTATE_EXCLUDEDEPS_SYSROOT variable, which will be evaluated for such recursive dependencies to be excluded. The idea is similar to http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146324.html except that the list is not hard-coded anymore. SSTATE_EXCLUDEDEPS_SYSROOT is evaluated as two regular expressions of recipe and dependency to ignore, e.g. in the above flex-native / bison-native use-case, one would specify SSTATE_EXCLUDEDEPS_SYSROOT = ".*->(flex|bison)-native" in layer.conf. The existing special handling of "-initial" as well as "base-passwd" and "shadow-sysroot" could also be streamlined: SSTATE_EXCLUDEDEPS_SYSROOT += "\ .*->.*-initial.* \ .*(base-passwd|shadow-sysroot)->.* \ " Another anticipated user is meta-java, where certain newer JDKs can only be bootstrapped (built) using older JDKs, but it doesn't make much sense to copy all those older JDKs and their own build tools (ant, etc.) into the sysroot of recipes wanting to be built using the newer JDK (only), e.g.: SSTATE_EXCLUDEDEPS_SYSROOT += "\ openjdk-8-native->(ant-native|attr-native|coreutils-native|icedtea7-native|libxslt-native|make-native|openssl-native|zip-native|unzip-native) \ " (From OE-Core rev: 92c5131a2feae2036c71a36c18bb9175bb2856dc) Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check.bbclass: do not download the CVE DB in package-specific tasksKonstantin Shemyak2018-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | Disable downloading of the vulnerability DB in do_check_cves() task. When invoked in this task, cve-check-tool attempts re-download of the CVE DB if the latter is older than certain threshold. While reasonable for a stand-alone CVE checker, this behavior can cause errors in parallel builds if the build time is longer than this threshold: * Other tasks might be using the DB. * Several packages can start the download of the same file at the same time. This check is not really needed, as the DB has been downloaded by cve_check_tool:do_populate_cve_db() which is a prerequisite of any do_build(). The DB will be at most (threshold + build_time) old. (From OE-Core rev: 125789b6ee6d47ab84192230f63971c4e22418ba) Signed-off-by: Konstantin Shemyak <konstantin.shemyak@ge.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Use ${COREBASE}/meta for timestamp, fallback to bitbake.confAlex Kiernan2018-08-151-1/+4
| | | | | | | | | | | To handle the case where ${COREBASE} isn't the git directory, avoid erroring out when the git command fails. If we don't have a timestamp after this, fall back to the timestamp from conf/bitbake.conf. (From OE-Core rev: 97b439469a45a089431ca9c31893288c855045f4) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: improve -dbg and -src package orderingRasmus Villemoes2018-08-151-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nativesdk-gpgme fails package_qa when setting PACKAGE_DEBUG_SPLIT_STYLE = "debug-with-srcpkg". ERROR: nativesdk-gpgme-1.10.0-r0 do_package_qa: QA Issue: non debug package contains .debug directory: nativesdk-python3-gpg path /work/x86_64-nativesdk-oesdk-linux/nativesdk-gpgme/1.10.0-r0/packages-split/nativesdk-python3-gpg/usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/lib/python3.5/site-packages/gpg/.debug/_gpgme.cpython-35m-x86_64-linux-gnu.so [debug-files] This turns out to be because the automatic moving of the -dbg package to the beginning of the package list is disabled in that case, so the python3-gpg packages that the recipe prepends to PACKAGES ends up before the -dbg package. It's not clear why the "and not split_source_package" was added when debug-with-srcpkg was introduced. Presumably the intention was to prevent the -dbg package to end up before the -src package, which we of course need to. But at the same time, we still need -dbg packages to end up before all other packages. Using list.insert(0, ...) also means that if there happens to more than one -dbg package, their relative ordering gets inverted in the new list. This tries to fix these issues by sorting the packages by (priority, original position), where priority is 10 for -src, 30 for -dbg and 50 for everything else. That guarantees that packages of the same "type" preserve their relative ordering, while also ensuring that -dbg always preceed other packages. This scheme is also quite extensible, and, should the need arise, one could even expose the priorities as a knob the recipe author could use to ensure specific orderings of packages instead of the somewhat fragile and coarse-grained method of "prepend or append, and ensure you do that in a proper order". Probably the autodebug condition needs to stay, but I think the split_source_package condition in the preceding elif should be removed, so that that logic applies to all packages called -src, not just the one we might have created a few lines above. (From OE-Core rev: 805edbc7dc9ceae00d991f9b4e185bbbe1d3ba45) Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate/lib.oe.path: Ensure file sparseness is preservedRichard Purdie2018-08-151-2/+2
| | | | | | | | | Files when restored from sstate were missing their sparseness. Fix up various functions to preserve this and make things more deterministic. (From OE-Core rev: 055402e5504f041c346571e243c7cf0894955cad) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Ensure a given machine only removes things which it createdRichard Purdie2018-08-151-1/+16
| | | | | | | | | | | | | | | | | | | | | | Currently if you build qemux86 and then generic86, the latter will remove all of the former from deploy and workdir. This is because qemux86 is i586, genericx86 is i686 and the architctures are compatible therefore the sstate 'cleaup' code kicks in. There was a valid reason for this to ensure i586 packages didn't get into an i686 rootfs for example. With the rootfs creation being filtered now, this is no longer necessary. Instead, save out a list of stamps which a give machine has ever seen in a given build and only clean up these things if they're no longer "reachable". In particular this means the autobuilder should no longer spend a load of time deleting files when switching MACHINE, improving build times. (From OE-Core rev: 5634f2fb1740732056d2c1a22717184ef94405bf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Add locale archive optimisationRichard Purdie2018-08-151-1/+1
| | | | | | | | | | | | | Refactor the locale archive function from the SDK to also make it work during general image creation. This reduces the size of the locales from 900MB to 220MB in core-image-lsb-sdk. The exception handling around subprocess was dropped as the standard subprocess exception printing is better handled than the catchall exception. (From OE-Core rev: 8ffd93bdb09b0a4a84b27dafcd684c6abba392ed) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: sanity-check LIC_FILES_CHKSUMRoss Burton2018-08-142-3/+5
| | | | | | | | | | | | | We assume that LIC_FILES_CHKSUM is a file: URI but don't actually verify this, which can lead to problems if you have a URI that resolves to a path of / as Bitbake will then dutifully checksum / recursively. [ YOCTO #12883 ] (From OE-Core rev: e2b8a3d5a10868f9c0dec8d7b9f5f89fdd100fc8) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Fix file copying to preserve sparse filesRichard Purdie2018-08-141-1/+1
| | | | | | | | | We want to preserve sparse files when building the system, add the option to tar to ensure we do this when copying files. (From OE-Core rev: d86da5ae386a8129a966a53901de160823f4d250) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib-script: Fix ALTERNATIVE_${PN} overwrite issueZhixiong Chi2018-08-141-1/+1
| | | | | | | | | | | If multilib scripts handle more than one file per package, the variable ALTERNATIVE_${PN} will be overwritten and there will be only one symbol link file. Append to the variable to avoid this. (From OE-Core rev: f474a7ed02acaffe5d0fcc67e06dde17fc8e4d0e) Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto.bbclass: Adds oe-local-files path (devtool) to include directivesJaewon Lee2018-08-141-0/+2
| | | | | | | | | | | | | | | | | | | The devtool-source class moves all local files specified in SRC_URI to an oe-local-files directory. When using devtool and a recipe space kernel-meta, devtool modify throws an error because the paths the kernel-yocto class is looking for feature directories in, don't include the oe-local-files directory which devtool is using. This patch checks for feature directories in oe-local-files, and if present, adds that path to include directives. [YOCTO #12855] (From OE-Core rev: 4eceae7e3e6dab935e2cf49b75148139192fc6e7) Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool-source.bbclass: Support kernel-fragments/patch not in SRC_URIJaewon Lee2018-08-141-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a recipe space kernel-meta, scc files are added through SRC_URI, but they may include corresponding kernel fragments or patches that are not necessarily in SRC_URI. For bitbake, this is not a problem because the kernel-yocto class adds the path where the .scc file was found to includes which consequentially makes the .cfg, .patch file available to the kernel build. However, when using devtool, only files specified in SRC_URI are copied to oe-local-files in devtool's workspace. So if the cfg/patch file is not in SRC_URI, it won't be copied, causing a kernel build failure when trying to find it. This fix parses local .scc files in SRC_URI, copies the corresponding .cfg/.patch file to devtool's workdir, and also adds it to local_files so it is available when doing a devtool build for the kernel. [YOCTO #12858] v2: also supporting patch not in SRC_URI v3: fix spacing issues (From OE-Core rev: 5dffd5403664dfcc9e8e42fd3581d5cb70823d7e) Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Remove DEPLOY_DIR_IMAGE from SSTATE_DUPWHITELISTRichard Purdie2018-08-141-1/+5
| | | | | | | | | | | | Replace the generic whitelist entry with entries for the three specific 'problem' cases in OE-Core. This means the general DEPLOY_DIR_IMAGE entry doesn't mask problems for others as was recently encoutered by users reported on irc. In the whitelisted cases they occur only in multilib builds and the files are identical. (From OE-Core rev: 05f6042a40bb772f7ce8d6819c5b2937d8c9808d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Add sstate usage summary to the buildRichard Purdie2018-08-081-0/+12
| | | | | | | | | | | | | | | | | Currently the user has no indication of how much sstate was already present or that would be used by the build. This change adds some summary information so that the user can see how much reuse is occurring. To fully work it needs some extra information from a recent bitbake commit but this is optional. When combined with bitbake --dry-run this feature can be used to check if sstate would be reused in a build. [YOCTO #12749] (From OE-Core rev: 596f76029ccb6f87c3b049552bd08f5034c41d9c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/sanity: Clean up getstatusoutput usageJoshua Watt2018-08-081-29/+38
| | | | | | | | | | | Replace usage of oe.utils.getstatusoutput() with direct subprocess calls. (From OE-Core rev: 2f44b9b5babf8c95340b141917c1142081f1e594) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/reproducible_build: Avoid dereferencing symlinksJoshua Watt2018-08-081-2/+2
| | | | | | | | | | | | Using os.path.getmtime() will dereference symbolic links in an attempt to get the last modified time. This can cause errors if the target doesn't exist, or worse map to some absolute build host path which would make a build not reproducible. (From OE-Core rev: fae23c72288068f90e2f357a8abf1384850c02ed) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devicetree.bbclass: User/BSP device tree source compilation classNathan Rossi2018-08-081-0/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bbclass implements the device tree compilation for user provided device trees. In order to use this class, it should be inherited in a BSP recipe which provides the sources. The default setup enables inclusion of kernel device tree sources (though can be disabled by the recipe by overriding DT_INCLUDE or KERNEL_INCLUDE). This provides an additional mechanism for BSPs to provide device trees and device tree overlays for their target machines. Whilst still enabling access to the kernel device trees for base SoC includes and headers. This approach to providing device trees has benefits for certain use cases over patching the device trees into the kernel source. * device trees are separated from kernel source, allows for selection of kernel and or kernel versions without needing to explicitly patch the kernel (or appending to the kernel recipes). * providing device trees from separate sources, from the layer, generated by the recipe or other recipes. This class also implements some additional features that are not available in the kernel-devicetree flow. This includes population of device tree blobs into the sysroot which allows for other recipes to consume built dtbs (e.g. U-Boot with EXT_DTB compilation), device tree overlay compilation and customizing DTC compilation args (boot cpu/padding/etc.). (From OE-Core rev: 3874c3859c3515fc8440fa9e776a02ad6ff3135c) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Acked-by: Martin Hundebøll <mnhu@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts: put TARGET_ARCH and TARGET_OS into environmentRoss Burton2018-08-071-0/+3
| | | | | | | | | | It's useful for the SDK to know exactly what TARGET_ARCH and TARGET_OS are, specifically for SDK QA. (From OE-Core rev: 0b5f1b0430efac8129bca330370d8818ea93bb39) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: fix linking in multilib SDKsRoss Burton2018-08-071-0/+1
| | | | | | | | | | | | | | | | | | | CMake, in it's infinite wisdom, when searching for libraries (using find_library) will look inside the libraries PREFIX/lib, PREFIX/lib32, and PREFIX/lib64. In a multilib SDK more than one of these will exist (potentially all three) and obviously for a given build configuration only one of those is valid. This search path is hard-coded deep inside CMake but by setting CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX we can bypass it and set an explicit lib<SUFFIX> to use. Do this by writing ${baselib} into the environment file, and then stripping "lib" from this to obtain the suffix in the cmake-specific environment script, which is then read in the CMake toolchain. (From OE-Core rev: 47160a8c51310f2b40cabf4c1910b5df6e0a15d6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python[3]native: allow use of both native Python 2 and 3Ross Burton2018-08-022-6/+6
| | | | | | | | | | | | | | Instead of both classes using ${PYTHON_PN} (which is set by python-dir and python3-dir), hardcode the right values so that it is possible to inherit both pythonnative and python3native at the same time. If both are inherited then both native Pythons are available, but the last to be inherited will be the one to set PYTHON. (From OE-Core rev: 96ccdadb8473daa3c9c2e1cb42fbdff1edd270d6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson: don't dump full error log on failureRoss Burton2018-08-021-1/+0
| | | | | | | | | | | If the configure fails then we don't really want to see hundreds of lines of test output (this would be similar to dumping out autoconf's config.log). The error includes the path of the full log if further debugging is required. (From OE-Core rev: 09917f582aa1a7b752fa96303e06f9f4712a1d86) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multiconfig: Enable multiconfig dependencies on oe-coreAlejandro Enedino Hernandez Samaniego2018-08-011-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables multiconfig dependencies (mcdepends) to be used on recipes using the following format: task[mcdepends] = "multiconfig:FROM-MC:TO-MC:PN:task-to-depend-on" For the sake of simplicity consider the following example: Assuming we have set up multiconfig builds, one for qemux86 and one for qemuarm, named x86 and arm respectively. Adding the following line to an image recipe (core-image-sato): do_image[mcdepends] = "multiconfig:x86:arm:core-image-minimal:do_rootfs" Would state that core-image-sato:do_image from x86 will depend on core-image-minimal:do_rootfs from arm so it can be executed. This patch makes modifications to bitbake.conf to enable mcdepends, and to sstatesig and staging.bbclass to avoid conflicts between packages from different multiconfigs. [YOCTO #10681] (From OE-Core rev: f71bfe833c657244d2fd07b3b71e86081d7d1c04) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Fix hardlink preservation issueRichard Purdie2018-07-311-1/+1
| | | | | | | | | Recent changes broke the preservation of hardlinks during processing due to a missing index. Fix this, reducing the size of the git recipe packages in particular (it contains many hardlinks). (From OE-Core rev: 28eeada955762f38ccbd1d26c53768364dbd1a5e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib_script: Add support for multilib scriptsRichard Purdie2018-07-311-0/+32
| | | | | | | | | | | | | | | | | | | | | | Whilst the package managers handle multilib ELF binaries well, they don't handle scripts in the *bindir directories well. This adds support for marking these up so that they can be handled using update-alternatives. Its done this way so that non-multilib systems don't see any changes and there is standardisation amongst the multilibs on how the alternatives are named and prioritiesd. The priotitisation code needs to be added but this change means there is somewhere to add it. Recipe needs to set MULTILIB_SCRIPTS in the form <pkgname>:<scriptname>, e.g. MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/file1 ${PN}:${base_bindir}/file2" to indicate which script files to process from which packages. libtool is used a as a reference to stop the libtool scripts conflicting in a multilib case and allows the kernel-devsrc change to be merged. (From OE-Core rev: 18e837433d07cfdce4019c13f682c6676425a2ad) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils/distutils3: do not try to fetch code during do_configureHongxu Jia2018-07-302-1/+9
| | | | | | | | | | | | | | | | | | | | | | For distutils3, any setup.py invoking will cause setup_requires argument to trigger a code fetching. Since the following commit applied in oe-core, code fetching occurs during do_confugire before the do_compile. ... b805cef distutils: clean the build tree in do_configure ... Refer what do_compile did, add var-NO_FETCH_BUILD to do_configure. Sync with distutils3, add do_configure to distutils also. [YOCTO #12084] (From OE-Core rev: 9d556092fcc6f04c487afd126d52935bac133165) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testsdk.bbclass: check python module testtools and subunitRobert Yang2018-07-301-0/+6
| | | | | | | | | | | | | | | | | | The testtools or subunit is not part of python's standard library, so check them before use. Fixed when they are not installed on host: $ bitbake core-image-minimal -ctestsdk Exception: ImportError: No module named 'testtools' Now it can run with a warning: WARNING: core-image-minimal-1.0-r0 do_testsdk: Failed to import testtools or subunit, the testcases will run serially (From OE-Core rev: ae53461608c4e71533378369b3f623b4c9002e39) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: append to FILERPROVIDES_*/FILERDEPENDS_* variables instead ↵Martin Jansa2018-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | of setting them * this allows to work around some of the issues with file-rdeps * e.g. in my case I have /usr/lib/libmali.so.0.1 which according to rpmdeps provides only following libmali* libmali.so(LIBMALI_1.0) libmali.so.0.1 but many users of this link with libmali.so directly and according to rpmdeps require libmali.so which causes file-rdeps for a lot of recipes * I was using simple work around to just set: RPROVIDES_${PN} = "libmali.so libGLESv2.so libEGL.so" but that doesn't work well with multilib, because the value gets expanded with MLPREFIX and RPROVIDES_${PN} = "lib32-libmali.so lib32-libGLESv2.so lib32-libEGL.so" doesn't help at all. [YOCTO #9217] Many unsolveable QA warnings from build-deps and file-rdeps (From OE-Core rev: 01b9810ff1cea53ae321f6fbe760b83573ed78c0) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package: fix variable name in commentPaul Eggleton2018-07-261-1/+1
| | | | | | | | | | The variable is PACKAGE_WRITE_DEPS as seen in the default below the comment. (From OE-Core rev: 364449251ffe4ff2c11acaa258edcec244c38818) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: fix autoreconf bbnote commandline argumentsAndre McCurdy2018-07-261-1/+1
| | | | | | | | | | | | Leaving -Wcross out of the bbnote version of the autoreconf command seems to be a long standing inconsistency (dating back to the very first commit in oe-core) but there's no obvious reason to do so. (From OE-Core rev: 40644b2b33db6332293543bb39e8d4da07cf8c54) 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>
* lib/oe: split out machine to ELF data dictionaryRoss Burton2018-07-261-136/+2
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils/setuptools, distutils3/setuptools3: improve reproducibilityHongxu Jia2018-07-264-15/+10
| | | | | | | | | | | | | | | | | - Unify var-DISTUTILS_INSTALL_ARGS in distutils and setuptools - Supply "--root" directory to the "install" command, and use it as a prefix to strip off the purported filename encoded in bytecode files. (It strips build path prefix from .pyc files) [YOCTO #8446] [YOCTO #12084] (From OE-Core rev: 21f0c5a50e00ac34975d79fd48f08730d8f19b15) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils/setuptools-native, distutils3/setuptools3-native: do not try to ↵Hongxu Jia2018-07-262-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fetch code during do_compile If a python recipe is using setuptools and the setup_requires argument, where setuptools will use easy_install to fetch the module if it isn't present. The build failed on a machine where a proxy was required, but succeeded on a machine which had direct access to the internet Add var-NO_FETCH_BUILD, and set it in distutils_do_compile which does not allow to fetch code from internet during do_compile. Example result: ... ERROR: Do not try to fetch `pytest-runner1' for building. Please add its native recipe to DEPENDS. Traceback (most recent call last): File "setup.py", line 56, in <module> ... The improvement is flexible for test_requirements argument (used at `setup.py test'), where use easy_install also. [YOCTO #12084] (From OE-Core rev: 57414f4a1c549e6faaa110e6e95ff601b05b7361) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license_image: Fix raceRichard Purdie2018-07-252-53/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code pokes into do_deploy manifests from do_image_complete when the do_image_complete task may or may not depend upon the do_deploy tasks in question. Often it gets lucky, sometimes it results in build failures. To fix this, split the functionality to its own task which can have the correct task dependencies. This means the data in BB_TASKDEPDATA is definitive, the other code can be dropped, as can the IMAGE_EXTRATYPES do_populate_lic dependencies from image.bbclass. This fixes bugs which show up as: NOTE: recipe linux-yocto-4.14.48+gitAUTOINC+d64aec9793_97c8063d2d-r0: task do_deploy: Started ERROR: core-image-minimal-1.0-r0 do_image_complete: 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:write_deploy_manifest(d) 0003: File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass', lineno: 33, function: write_deploy_manifest 0029: 'w+').write(output) 0030:} 0031: 0032:python write_deploy_manifest() { *** 0033: license_deployed_manifest(d) 0034:} 0035: 0036:python license_create_manifest() { 0037: import oe.packagedata File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass', lineno: 191, function: license_deployed_manifest 0187: # It is necessary to mark this will be used for image manifest 0188: man_dic[dep]["IMAGE_MANIFEST"] = True 0189: man_dic[dep]["PN"] = dep 0190: man_dic[dep]["FILES"] = \ *** 0191: " ".join(get_deployed_files(dep_dic[dep])) 0192: with open(os.path.join(lic_dir, dep, "recipeinfo"), "r") as f: 0193: for line in f.readlines(): 0194: key,val = line.split(": ", 1) 0195: man_dic[dep][key] = val[:-1] File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass', lineno: 289, function: get_deployed_files 0285: """ 0286: 0287: dep_files = [] 0288: excluded_files = [] *** 0289: with open(man_file, "r") as manifest: 0290: all_files = manifest.read() 0291: for f in all_files.splitlines(): 0292: if ((not (os.path.islink(f) or os.path.isdir(f))) and 0293: not os.path.basename(f) in excluded_files): Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build-st-730/tmp/sstate-control/manifest-qemux86_64-linux-yocto.deploy' ERROR: core-image-minimal-1.0-r0 do_image_complete: Function failed: write_deploy_manifest ERROR: Logfile of failure stored in: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build-st-730/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/log.do_image_complete.50537 NOTE: recipe core-image-minimal-1.0-r0: task do_image_complete: Failed ERROR: Task (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/recipes-core/images/core-image-minimal.bb:do_image_complete) failed with exit code '1' NOTE: recipe linux-yocto-4.14.48+gitAUTOINC+d64aec9793_97c8063d2d-r0: task do_deploy: Succeeded (From OE-Core rev: b54cdaea7844ee3bf0c39eb97cc7c4c17ed5818c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license: Split image license functions to a separate classRichard Purdie2018-07-252-283/+285
| | | | | | | | | | | This means the image code is only included in image recipes through the IMAGE_CLASSES variable. This sets things up to allow us to fix image deploy dependency problems. (From OE-Core rev: fd44b8b4b2484f2d35c7a0e749e7dc316d601989) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Use subprocess to be consistent with the rest of the classRichard Purdie2018-07-251-4/+4
| | | | | | | | | Using 'sub' in one function just confuses things, standardise and fix formatting of the parameters too. (From OE-Core rev: a740c638148ed7236c49eed55ae9a15b94e55b9f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "relocate_sdk.py: remove hardcoded SDK path"Richard Purdie2018-07-251-0/+5
| | | | | | | | | | | | | This reverts commit 6671a4d980c8bef8f402780a308f6c43a25044aa. This breaks uninative tarball since the call of relocate_sdk.py from uninative.bbclass wasn't updated to account for this change. It isn't clear what value that code could pass in and this isn't simple to fix so revert until a better fix can be found that doesn't break uninative. (From OE-Core rev: b247392b4ced57cfe694656032f6a6723740a9e8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package/package_manager: multiprocess_exec -> multiprocess_launchRichard Purdie2018-07-241-2/+2
| | | | | | | | | | | | After this replacement, the parent exception handling works so we don't need subprocess wrapping with bb.error in the underlying functions. The underlying contexts also have better module handling so the imports can be cleaned up. (From OE-Core rev: aa8260adf53139d776a2affe6118d28b295c1fab) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Clean up getstatusoutput usageRichard Purdie2018-07-241-13/+11
| | | | | | | | | | | | | | | | Replace usage of oe.utils.getstatusoutput() with direct subprocess calls. The call is just a wraper to the subprocess call of the same name and requires the caller to handle exceptions themselves. We usually do this badly, failing to show the output or the command or the return code. Its much safer to rely on a call like subprocess.check_output() instead. This also makes it easier to spot and remove cases where shell=True isn't needed in a later cleanup. (From OE-Core rev: 9f058857fb692f1251deb43bcaa7ed0120140093) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>