summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* gtk-icon-cache: clean up DEPENDSRoss Burton2019-05-071-2/+2
| | | | | | | | | | Use gtk+3-native instead gtk-icon-utils-native as that recipe no longer exists and is provided by gtk+3-native for compatibility. (From OE-Core rev: 078950f6ff88d406894229337b2b367ba049ff44) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license_image: Use new oe.path.copyhardlink() helperPaul Barker2019-05-071-3/+3
| | | | | | | | | | | This change allows us to support the placement of WORKDIR and DEPLOY_DIR on different devices. (From OE-Core rev: f064a581ba31764839459bd667130bccbbedefab) Signed-off-by: Paul Barker <paul@betafive.co.uk> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd-staticids: print exception after parse_args() errorMax Kellermann2019-05-071-4/+4
| | | | | | | | | | Without this, the user has no idea what went wrong. (From OE-Core rev: c1d887d63f098a10c7d6286399801d89fd3ebdb0) Signed-off-by: Max Kellermann <max.kellermann@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign: Fix build when UBOOT_DTB_BINARY is emptyAlex Kiernan2019-05-031-7/+7
| | | | | | | | | | | | | | | | When UBOOT_DTB_BINARY is empty and because the code now changes directory into ${B}, the test for the existence becomes `[ -f ]` which succeeds and subsequently the install fails. Reorder the code so it's clear that UBOOT_DTB_BINARY empty is an expected configuration and then quote UBOOT_DTB_BINARY everywhere so no one trips over this again. Fixes: bacb59079eb6 ("uboot-sign: add support for different u-boot configurations") (From OE-Core rev: e79f0db0745625b35dd83483747e486d08eebfde) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: call systemctl preset-all for imagesAlex Kiernan2019-05-031-1/+8
| | | | | | | | | | | | | | | Rather than rely on systemd's default invocation of preset-all at runtime, we pre-populate the symlink tree as part of of the image. This is done late so any overrides of presets during rootfs construction should already have happened. Whilst we don't strictly need this for the read-write root case, it avoids boot time churn; for read-only root we have to do it here. (From OE-Core rev: a57678a076109c42fbdf7531e90ff4491b387d53) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd: create preset files instead of installing in imageJonas Bonn2019-05-031-22/+19
| | | | | | | | | | | | | | | | | | | At first boot, systemd will create the /etc/systemd/system directory from service preset files. As such, for a normal, writable /etc (writable rootfs), there is no need to set up this directory at image creation time. This patch changes the systemd machinery to create preset files and to rely on systemd to do the service enablement. This breaks the read-only-rootfs case; there's a fix for this in a follow-up patch. (From OE-Core rev: 154abbc3296eded11d2bbe3e102470b6986d42cd) Signed-off-by: Jonas Bonn <jonas@norrbonn.se> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd: do not create machine-idJonas Bonn2019-05-031-0/+6
| | | | | | | | | | | | | | | | There is no reason to have an emtpy machine-id as part of the systemd package. Either: i) the filesystem is writable and the file will be created automatically; or ii) the filesystem is read-only, in which case the empty machine-id file should be created as part of the read-only-rootfs tweaks. (From OE-Core rev: 76444b63e614baea33c044851a5859f6d1e69729) Signed-off-by: Jonas Bonn <jonas@norrbonn.se> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base: provide options to set sdk typeChangqing Li2019-05-031-7/+22
| | | | | | | | | | | | | | | | | Current sdk type is tar.xz, but for mingw sdk, since we have symlink under the sdk folder, 7zip which used to extract tar.xz cannot handle it, refer 7zip upstream bug: https://sourceforge.net/p/sevenzip/discussion/45797/thread/c71d6b96/ so add option for usr can select the sdk type. Add override SDK_ARCHIVE_TYPE, default type is tar.xz, and also support type zip. user want to use zip type can set SDK_ARCHIVE_TYPE to zip. (From OE-Core rev: 57a33048a89a422cfdc986d3489c67b2d297e1e7) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: add ${datadir}/gtk-doc/html to the sysroot blacklistRoss Burton2019-04-301-1/+2
| | | | | | | | | | | | | | | When api-documentation is enabled the GNOME stack builds API documentation. As ${datadir} is in SYSROOT_DIRS this documentation is in the sysroot but is never used, wasting time and space. Add ${datadir}/gtk-doc/html to the blacklist so that the generated documentation isn't in the sysroot. Note that we don't blacklist all of ${datadir}/gtk-doc because gtk-doc itself installs files there which are needed to use gtk-doc. (From OE-Core rev: 11c87952c9a71036119d509ce09f17e352e4c6d8) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-module-split.bbclass: support CONFIG_MODULE_COMPRESS=yJens Rehsack2019-04-261-2/+18
| | | | | | | | | | | | | In case, kernel config enables compressed modules, support of splitting via split_kernel_module_packages won't find any module. So, first expand module pattern regex to recognize compressed modules and then objcopy on temporary extacted to extract module information. (From OE-Core rev: fae400b225827400bf32380a7d599d3b2969db55) Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/runner: dump stdout and stderr of each test caseMardegan, Alberto2019-04-261-1/+2
| | | | | | | | | | | | | | | | | | Some CI pipelines might perform further processing of the test output (for instance, to plot some metrics into a chart). However, Since `thud` we switched away from the XML-based jUnit reporting, and at the same time we lost the ability of collecting the stdout and stderr of the various tests. We now restore this functionality by adding `stdout` and `stderr` keys to the JSON reports. This behavior is off by default; in order to enable it, one must set the `TESTREPORT_FULLLOGS` variable in the bitbake configuration. (From OE-Core rev: fd0048630ece5b21efb3a79e97046be0ab2a1514) Signed-off-by: Alberto Mardegan <amardegan@luxoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Use the best xz compression for the SDKAdrian Bunk2019-04-261-1/+1
| | | | | | | | | | | | It saves 23% space for me, and decompression time is also shorter. Compression time and xz memory usage should be less of a worry for the SDK. (From OE-Core rev: 353d93ead899a479fc6bc3625edc87269a891d39) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gtk-doc.bbclass: unify option setting for meson-based recipesAlexander Kanavin2019-04-251-0/+11
| | | | | | | | | | This is done similarly to gobject-introspection work by Andreas Müller, and allows dropping duplicate clutter from the recipes. (From OE-Core rev: ff578f4451a0a199202e576b647840910b4d3f59) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc.bbclass: stop causing everything to be effectivelly MACHINE_ARCHMartin Jansa2019-04-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * since this change: commit d2fcaeb153fdc3f8d7143ea823139f1537055ff1 Author: Douglas Royds <douglas.royds@taitradio.com> Date: Thu Dec 20 11:59:47 2018 +1300 icecc: Don't generate recipe-sysroot symlinks at recipe-parsing time the set_icecc_env function depends on KERNEL_CC variable even for recipes like linux-libc-headers * KERNEL_CC variable depends on STAGING_KERNEL_DIR: Variable KERNEL_CC value is ${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_KERNEL_ARCH} -fuse-ld=bfd ${DEBUG_PREFIX_MAP} -fdebug-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH} List of dependencies for variable KERNEL_CC is {'STAGING_KERNEL_DIR', 'HOST_PREFIX', 'DEBUG_PREFIX_MAP', 'HOST_CC_KERNEL_ARCH', 'KERNEL_SRC_PATH'} which depends on MACHINE: Variable STAGING_KERNEL_DIR value is ${TMPDIR}/work-shared/${MACHINE}/kernel-source List of dependencies for variable STAGING_KERNEL_DIR is {'MACHINE'} * as detected with: openembedded-core/scripts/sstate-diff-machines.sh --tmpdir=tmp-glibc --machines="qemux86 qemux86copy qemuarm" --targets=glibc --analyze ERROR: linux-libc-headers different signature for task do_configure.sigdata between qemux86 and qemux86copy NOTE: Starting bitbake server... basehash changed from 3146f4ffeb002bd69fed7656a4b896365b2e2a00071c69e1afbb672889e754ee to f1a5160e39912e61389b6f9fe68d61146a2be91716ac37e4a32ecf4c09b2b5fa Variable MACHINE value changed from 'qemux86' to 'qemux86copy' $ bitbake-diffsigs /OE/build/oe-core/tmp-glibc/sstate-diff/1556122458/qemux86*/*/linux-libc-headers/*do_configure.sigdata* NOTE: Starting bitbake server... basehash changed from f1a5160e39912e61389b6f9fe68d61146a2be91716ac37e4a32ecf4c09b2b5fa to 3146f4ffeb002bd69fed7656a4b896365b2e2a00071c69e1afbb672889e754ee Variable MACHINE value changed from 'qemux86copy' to 'qemux86' (From OE-Core rev: 8becde63763027037d40ef82dd6678721e6d90d4) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/waf: Set WAFLOCKJoshua Watt2019-04-231-0/+26
| | | | | | | | | | | | | | Sets the WAFLOCK environment variable. This controls the name of the lock file that waf uses to pass the build configuration from 'configure' to 'build' and 'install'. Using a uniquely generated name based on the parameters passed to 'configure' ensures that the source directory can be configured for multiple different builds without conflicting (since the lock file is stored in ${S}) (From OE-Core rev: 29419141a42e6b6664f72d085288ba03c74f90a6) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: convert base_do_unpack_append() to a taskSteven Hung (洪于玉)2019-04-231-1/+2
| | | | | | | | | | | <pre> when&#32;externalsrc&#32;is&#32;enabled&#32;and&#32;the&#32;&#39;do_unpack&#39;&#32;task&#32;is&#32;deleted, building&#32;kernel&#32;module&#32;fail (From OE-Core rev: 1ba4728f058b90957741fa016230ffa72e206ff3) Signed-off-by:&#32;Steven&#32;Hung&#32;(&#27946;&#20110;&#29577;)&#32;&lt;Steven.Hung@mediatek.com&gt; Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Set XZ_COMPRESSION_LEVEL to -9Adrian Bunk2019-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | It is consistent with other compressors also using their best compression. xz is currently the option that offers best compression, using settings even lower than the default is surprising and makes it harder to choose the best available compression. For anyone who cares about compression time using a different option like gzip or bzip2 is the logical choice. For decompression, better compressed is actually faster to decompress. (From OE-Core rev: 9718c2d3fbb3281274af4556b34b7bac21fc7774) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest.bbclass: Use d.getVar instead of os.environMariano Lopez2019-04-161-2/+2
| | | | | | | | | | [YOCTO #12597] [YOCTO #13238] (From OE-Core rev: ae116b0eea3b09055742877790b7e4620f5b8f37) Signed-off-by: Mariano Lopez <just.another.mariano@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign: add support for different u-boot configurationsAndreas Obergschwandtner2019-04-161-31/+54
| | | | | | | | | | | This is done by concatenating the DTB with the kernels public key to all built u-boot binaries. Furthermore the installation of all the binaries is required. (From OE-Core rev: bacb59079eb6ba7e43507a6d3a357341fb367f83) Signed-off-by: Andreas Obergschwandtner <andreas.obergschwandtner@skidata.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: support RISC-VMichael Scott2019-04-121-0/+2
| | | | | | | | | | | | | | | Support RISC-V kernel image, using the "Image" target. This change allows RISC-V support for fitImage via the following flow: OpenSBI -> u-boot (as payload) -> Linux kernel (as fitImage with ramdisk and dtb). This was tested using QEMU RISC-V 64-bit. (From OE-Core rev: 35d0842c637b7d7ce0ab01f43b594c19a964872f) Signed-off-by: Michael Scott <mike@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: fix a race between the ubi and ubifs FSTYPESHongxu Jia2019-04-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ubi, ubifs and multiubi FSTYPES calls `mkfs.ubifs' to create UBIFS images. In do_image_ubi, $vname is empty, the name of UBIFS image conflicts with the one in do_image_ubifs, and it's a race risk. [do_image_ubi] mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs ${mkubifs_args} [do_image_ubi] [do_image_ubifs] mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ubifs ${MKUBIFS_ARGS} [do_image_ubifs] In do_image_multiubi, $vname is not empty, the UBIFS image name does not conflict with others. So do not call mkfs.ubifs in do_image_ubi and depend on do_image_ubifs to create UBIFS images. The fix does not affect do_image_multiubi which still call mkfs.ubifs to create multiple UBIFS images and symlinks. [YOCTO #13272] (From OE-Core rev: 3e5f075184d91dd99cf25cfe84bba1c946ed0c7c) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* goarch.bbclass: Simplify logicRichard Purdie2019-04-121-6/+5
| | | | | | | | | Further simplification of the go_map_arm() function. (From OE-Core rev: 9c333505897b2bf0d80737c855af31785d23435a) Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go.bbclass: Remove unused overrideRichard Purdie2019-04-121-2/+0
| | | | | | | | | The x86 override means the i586 one isn't necessary. (From OE-Core rev: 1658bf2dbdfe1a5b38efcc03359c9937506c120c) Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ccmake.bbclass: Fix up un-escaped quotes in output formattingNathan Rossi2019-04-121-1/+1
| | | | | | | | | | The quotes should be generated in the output to match the expected cmake syntax for setting cache variables. (From OE-Core rev: a19a6201c8cc255583bd014534b4a6ec2524070f) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: check_perl_modules bug fixZheng Ruoqin2019-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Python3 TypeError error in check_perl_modules: Executing bitbake, the following error message will be throwed: File ".../poky/meta/classes/sanity.bbclass", line 979, in check_sanity_eventhandler check_sanity(sanity_data) File ".../poky/meta/classes/sanity.bbclass", line 943, in check_sanity check_sanity_version_change(status, sanity_data) File ".../poky/meta/classes/sanity.bbclass", line 637, in check_sanity_version_change status.addresult(check_perl_modules(d)) File ".../poky/meta/classes/sanity.bbclass", line 563, in check_perl_modules errresult += e.output TypeError: must be str, not bytes So here, transfer e.output from bytes to str. (From OE-Core rev: 2c6fff3fe315357d65d082679856615afc367d90) Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Trigger unrecognzed configure option for mesonAndreas Müller2019-04-111-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Tested with 'unknown-configure-option' in ERROR_QA: For meson (glib-2.0-native): 1. add 'EXTRA_OEMESON_append = "-Dschnitzel=true -Dwurst=true"' | ERROR: glib-2.0-native-1_2.58.3-r0 do_configure: QA Issue: glib-2.0-native: configure was passed unrecognised options: schnitzel wurst [unknown-configure-option] 2. add 'UNKNOWN_CONFIGURE_WHITELIST_append=" schnitzel"' | ERROR: glib-2.0-native-1_2.58.3-r0 do_configure: QA Issue: glib-2.0-native: configure was passed unrecognised options: wurst [unknown-configure-option] 3. change to 'UNKNOWN_CONFIGURE_WHITELIST_append=" schnitzel wurst"' => builds without issues For autotools (readline-native): 1. add 'EXTRA_OECONF = "--with-schnitzel --with-wurst"' | ERROR: readline-native-8.0-r0 do_configure: QA Issue: readline-native: configure was passed unrecognised options: --with-wurst --with-schnitzel [unknown-configure-option] 2. add 'UNKNOWN_CONFIGURE_WHITELIST_append=" --with-schnitzel"' | ERROR: readline-native-8.0-r0 do_configure: QA Issue: readline-native: configure was passed unrecognised options: --with-wurst [unknown-configure-option] 3. add 'UNKNOWN_CONFIGURE_WHITELIST_append=" --with-schnitzel --with-wurst"' => builds without issues (From OE-Core rev: 30c001cdbc6207001b18e093ad9691e606428f0f) Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gobject-introspection: auto-enable/-disable gobject-introspection for mesonAndreas Müller2019-04-111-2/+12
| | | | | | | | | | | | | * the class sets defaults used most common which can be overriden by recipes * UNKNOWN_CONFIGURE_WHITELIST was removed for autotools (and not added for meson) as suggested by Alexander Kanavin [1] [1] http://lists.openembedded.org/pipermail/openembedded-core/2019-April/280716.html (From OE-Core rev: 59589383131df6bc0c8787cd00a16ee59e21d441) Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest.bbclass: Add feature to populate a binary directoryMariano Lopez2019-04-111-0/+32
| | | | | | | | | | | | | | | | | | | This adds the functionality to create a binary directory within PTEST_PATH directory. This directory will be populated with symlinks pointing to the binaries installed by the package and then renamed by update-alternatives. This way the ptest only needs to source this binary directory in order to use the expected binaries. To enable this feature just add PTEST_BINDIR = "1" to the recipe. [YOCTO #12597] [YOCTO #13238] (From OE-Core rev: bca35319b89ce668927728c4e2094f6e10cef298) Signed-off-by: Mariano Lopez <just.another.mariano@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-alternatives.bbclass: Add function to get metadataMariano Lopez2019-04-111-25/+45
| | | | | | | | | | | | | | | This adds update_alternatives_alt_targets function to get the metadata for a package. This is for code reuse because the metadata would help other classes that needs to be aware of how update-alternatives modify the final package. [YOCTO #12597] [YOCTO #13238] (From OE-Core rev: 04d966c0a91c5e16555bba827969a0a2fd96bb96) Signed-off-by: Mariano Lopez <just.another.mariano@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* goarch.bbclass: use MACHINEOVERRIDES and simplify go_map_arm()Mark Asselstine2019-04-101-8/+11
| | | | | | | | | | | | | | | | | | Per https://github.com/golang/go/wiki/GoArm we need to set GOARM when cross building for ARMv5, ARMv6 and ARMv7. The current approach of using TUNE_FEATURES can be error prone, as we can see today when attempting to build for Cortex-A7 which results in GOARM=''. Since the value of MACHINEOVERRIDES already consolidates the values of TUNE_FEATURES into something more consistent we can use the overrides mechanism to set GOARM, leaving just a little bit of logic in go_map_arm() to trigger off the arch (basically target vs host) for the setting of GOARM. (From OE-Core rev: 5f48939e26402b77fc3343f326765137f9570f40) Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go.bbclass: Export more GO* environment variablesMark Asselstine2019-04-101-0/+19
| | | | | | | | | | | | | | | | | | | | | | Currently we are not doing a good job of consolidating GO environment variables used by the go build system in the go.bbclass, instead we are relying on the individual GO recipe authors to perform the exports. This can result in inconsistent build results and often binaries that are not properly cross compiled, resulting in segfaults when the applications are run on the target. For example the GO documentation recommends that the environment include a value assigned to GOARM when cross building for ARMv5, ARMv6 and ARMv7 (https://github.com/golang/go/wiki/GoArm). In order to avoid polluting the build scripts with unnecessary exports, such as run.do_compile, we attempt to only export variables when they apply to a specific arch. (From OE-Core rev: 6300c4a83f7c8fc88702798ffe25bd6d57091673) Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: fix gettext dependency warningRoss Burton2019-04-101-1/+1
| | | | | | | | | This message was using %s markers but nothing was being passed in. (From OE-Core rev: d204398d40cbbea5a6b58a36fc289d569f2eb304) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Use bb.utils.to_boolean() for BB_NO_NETWORKRobert Yang2019-04-101-2/+4
| | | | | | | | | Make it consistent with bitbake (From OE-Core rev: 7fb540c3199bc2b82d60fff678b5e588ab4d1ad6) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: Support Eclipse and other cmake generatorsNikhil Pal Singh2019-04-101-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support project-file generators such as CodeBlocks, CodeLite, Eclipse, Sublime, and Kate for both make and Ninja build systems. The following generators are listed in cmake --help: Unix Makefiles = Generates standard UNIX makefiles. Ninja = Generates build.ninja files. Watcom WMake = Generates Watcom WMake makefiles. CodeBlocks - Ninja = Generates CodeBlocks project files. CodeBlocks - Unix Makefiles = Generates CodeBlocks project files. CodeLite - Ninja = Generates CodeLite project files. CodeLite - Unix Makefiles = Generates CodeLite project files. Sublime Text 2 - Ninja = Generates Sublime Text 2 project files. Sublime Text 2 - Unix Makefiles = Generates Sublime Text 2 project files. Kate - Ninja = Generates Kate project files. Kate - Unix Makefiles = Generates Kate project files. Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files. Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files. All but one of these contain one of the strings, "Unix Makefiles" or "Ninja". In each of these cases, cmake generates the Makefiles (or ninja files respectively), and also the appropriate project files, eg. .project and .cproject for Eclipse. A user can set OECMAKE_GENERATOR in their local.conf to any one of these strings, except "Watcom WMake" (not supported). (From OE-Core rev: 256e8b5deae66b1463c359db12af396702912139) Signed-off-by: Nikhil Pal Singh <nikhilpal.singh@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patch/insane: Rework patch fuzz handlingAndreas Müller2019-04-091-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently there are three issues which can be enhanced: 1. Fuzz warnings cannot be configured as errors for hardening. It happened often to me that these warnings were overseen and detected after commits were already out. 2. The output is too verbose - particularly when more than one file is affected. Meanwhile all users should know why patch fuzz check is performed. So move links with background information to insane.bbclass. 3. Reduce copy & paste effort slightly by printing PN (nit: <recipe> was not a correct suggestion e.g for native extended recipe - see example below) To achieve patch.py drops patch-fuzz info encapsulated by a header- and footer- string into log.do_patch. With this insane.bbclass can drop warnings/errors depending on 'patch-fuzz' in ERROR_QA or WARN_QA. Default remains unchanged: Spit out warnings only. A message for two fuzzed patches and 'pact-fuzz' in ERROR_QA now looks like: | ERROR: autoconf-native-2.69-r11 do_patch: Fuzz detected: | | Applying patch autoreconf-exclude.patch | patching file bin/autoreconf.in | Hunk #1 succeeded at 73 with fuzz 1 (offset -3 lines). | Hunk #2 succeeded at 143 (offset 6 lines). | Hunk #3 succeeded at 167 (offset 6 lines). | Hunk #4 succeeded at 177 (offset 6 lines). | Hunk #5 succeeded at 281 (offset 15 lines). | Hunk #6 succeeded at 399 (offset 15 lines). | Hunk #7 succeeded at 571 (offset 20 lines). | Hunk #8 succeeded at 612 (offset 20 lines). | Hunk #9 succeeded at 636 (offset 20 lines). | Hunk #10 succeeded at 656 (offset 20 lines). | Hunk #11 succeeded at 683 (offset 20 lines). | | Applying patch autoreconf-gnuconfigize.patch | patching file bin/autoreconf.in | Hunk #1 succeeded at 55 with fuzz 1 (offset -3 lines). | Hunk #3 succeeded at 663 (offset 18 lines). | | The context lines in the patches can be updated with devtool: | | devtool modify autoconf-native | devtool finish --force-patch-refresh autoconf-native <layer_path> | | Don't forget to review changes done by devtool! | | ERROR: autoconf-native-2.69-r11 do_patch: QA Issue: Patch log indicates that patches do not apply cleanly. [patch-fuzz] (From OE-Core rev: c762c0be43a3854a43cb4b9db559b03126d50706) Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: clarify error message if TMPDIR movesRoss Burton2019-04-091-1/+1
| | | | | | | | | | | | | If TMPDIR is moved the error message says "move it back or rebuild" but the obvious rebuild method of running 'bitbake [recipe]] -cclean' fails with the same error. Make it clear what we mean by adding "delete and". (From OE-Core rev: 36805a628f8208ff6d7fba9955c5fb1ed6396395) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ccmake.bbclass: Create a cml1 style class for the CMake curses UINathan Rossi2019-04-091-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | The ccmake bbclass implements two tasks. The first task 'ccmake' preserves the configured state of CMakeCache.txt (generated from the configure task) and invokes the 'ccmake' program within a oe_terminal execution. The user can then review, select and modify configuration options and once satisfied with the configuration exit ccmake. Once ccmake has exited the build can be run and the updated configuration should be reflected in the output build. The ccmake bbclass has a second task 'ccmake_diffconfig' to compute the differences in configuration which was modified by ccmake. Since there are many ways to persist the configuration changes within recipes and layer configuration, the differences are emitted as a bitbake recipe fragment (configuration.inc) using EXTRA_OECMAKE as well as a CMake script file which can be used as a input to cmake via the '-C' argument. Both files are generated in the WORKDIR of the build and the paths to the files are written as output from the build. It is then up to the user to take this configuration and apply it to the desired location. (From OE-Core rev: 091c46a8ecba6b6b7c44078ae2b567a2ef6e72e9) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* xmlcatalog: new class to update the XML catalogueRoss Burton2019-04-051-0/+24
| | | | | | | | | | | | | | | | | This is a new class to handle recipes that need to add/remove entries in the XML Catalog(ue)[1]. In the future it will handle updating the catalogue on the target, but the immediate requirement is during the build so currently this only works with native recipes. Note that as this is a new class and target use hasn't been implemented yet, it is possible that the behaviour of this class will change. [1] https://en.wikipedia.org/wiki/XML_catalog (From OE-Core rev: 28c58cff76b24cea2745352c6557a81c04d85138) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base/pixbufcache: Remove obsolete sstatecompletions codeRichard Purdie2019-04-052-14/+1
| | | | | | | | | | | | This has been unused in OE-Core since the introduction of recipe specific sysroots. Its not so useful since it only runs once upon sstate installation, not per installation per sysroot. Remove the weird looking comment left behind in pixbufcache too. (From OE-Core rev: 2af49716504f65be0cb01f609ea9bfa334926589) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cml1.bbclass: Use POSIX sh instead of var-SHELLNathan Rossi2019-04-031-1/+1
| | | | | | | | | | | | Use the default POSIX sh instead of relying of var-SHELL being set to a compatible shell. Such that in cases where SHELL is set to a incompatible shell (e.g. csh, zsh, fish, etc.) the terminal command does not just silently fail. (From OE-Core rev: 50d3ec1ac994fb5968d8edf82823a7e3d1d67d21) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* terminal.bbclass: Generate do_terminal as bitbake wouldNathan Rossi2019-04-031-2/+2
| | | | | | | | | | | | | | | | | | This changes the runfile that is generated to have the same behaviour as bitbake with regards to emitting the shebang and trap code. The existing implementation used 'env' with the current var-SHELL. This means that if the user has configured there system/environment with a alternate shell (e.g. csh, zsh, fish, etc.) the do_terminal function would attempt to execute with the wrong/incompatible shell and fail silently. With this change devshell and other classes that rely on terminal can now run when the var-SHELL is not set to a sh compatible shell. For devshell, it will launch the devshell with the users configured shell. (From OE-Core rev: 53724281eb486847bc3be824aa4513a8688ec296) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass, staging.bbclass: Move prepare_recipe_sysroot task dependencyPeter Kjellerstedt2019-04-032-1/+1
| | | | | | | | | | | | | | | Move prepare_recipe_sysroot's task dependency on populate_sysroot from base.bbclass (where it was specified in the middle of do_configure's definition) to staging.bbclass (where the rest of do_prepare_recipe_sysroot is defined). This was a left-over from when recipe specific sysroots were introduced in commit 809746f5 and the task dependency on populate_sysroot was moved from do_configure to do_prepare_recipe_sysroot. (From OE-Core rev: fe6d020dd609fbde7e4413cef9bbdd4e3962c82c) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* llvm: fix more places where '8.0' version of llvm was hardcodedAlexander Kanavin2019-04-011-1/+1
| | | | | | | | | So that it says '8.0.0' to reflect the recent PV change. (From OE-Core rev: 3b4049157a72bcd984f93405a75946a39c045f2d) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: improve license checksumming logicRoss Burton2019-03-241-49/+32
| | | | | | | | | | | | | | | Instead of opening files as bytes and battling decoding to UTF-8 which can throw exceptions, open directly as strings and replace invalid codepoints. This handles licenses in encodings which are not UTF-8 but are based on ASCII much better. Also instead of extracting the license lines, writing them to a file, and then hashing the file, hash the lines directly. (From OE-Core rev: 63ef9d342277c4ba541b78cbb45ef181f071f495) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* goarch: Add riscv64Alistair Francis2019-03-211-0/+2
| | | | | | | | | | | | | | | Although RISC-V 64-bit doesn't have official golang support there are forks that now exist with at least some support and work is ongoing in the upstream tree. In order to be able to use the goarch class add support for RISC-V. For more details see here: https://github.com/golang/go/issues/27532 (From OE-Core rev: 91e3b2a762124bf5cf923654ef3a7c871b84c82f) Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* class/sanity: strip the output of get_filesystem_id()Steven Hung (洪于玉)2019-03-181-1/+1
| | | | | | | | | | A previous commit 2f44b9b replace oe.utils.getstatusoutput() to subprocess.check_output(). check_output() don't remove a trailling newline. Add strip() (From OE-Core rev: 172c3e85c601a61f3c668f83b75f4c1eb31dbd4d) Signed-off-by: Steven Hung (洪于玉) <Steven.Hung@mediatek.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: Reduce verbosity for make invocationDouglas Royds2019-03-121-1/+0
| | | | | | | | | | | | | | | | | Since the dawn of time, we have set CMAKE_VERBOSE_MAKEFILE=1 in cmake.bbclass. Back in 2016, we also explicitly set VERBOSE=1 in cmake_do_compile(), to ensure that make (and ninja) output were verbose in log.do_compile. Turning off CMAKE_VERBOSE_MAKEFILE=1 means that make (or ninja) invocations from the command-line are non-verbose, giving CMake's default human-readable output on the terminal instead. The user can still invoke VERBOSE=1 make if they do want verbose output. This has no effect on the verbose output that goes into the logs. (From OE-Core rev: 75c4b61513d8b089e835fb8d5923d8749fed7880) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* linux-yocto: fix SRC_URI patching with unified reposBruce Ashfield2019-03-121-1/+1
| | | | | | | | | | | | | | | As reported by Paul Barker, my attempt to allow the patching of kernel meta data broke other repository configurations, since the meta data patch routing was matching too broadly and the same repo would end up being patched twice. Using his suggested fix, we are up and running with both types of repos again. (From OE-Core rev: 0fd09633e3c2fb4668c7700516d288f8c5356ff6) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go: Add recipes for 1.12 release and make it defaultKhem Raj2019-03-091-1/+0
| | | | | | | | | | - Refresh patches - Enable GOCACHE required as of Go 1.12 (From OE-Core rev: f559fd6df2978f9093672794420eada2b7452987) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc: Slightly more verbose log messages in the success caseDouglas Royds2019-03-091-1/+2
| | | | | | | | | | The path containing the symlinks to icecc itself. The path to the build env tarball. (From OE-Core rev: 4b1f421ab5c7e5a3ee7bad5744149d331c6e0511) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>