summaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2019-05-09uboot-sign: Fix u-boot-nodtb symlinksYing-Chun Liu (PaulLiu)
When using u-boot-nodtb, the symlink didn't install correctly to the ${DEPLOYDIR}. This commit fixes this bug. Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09systemd: Restore mask and preset targets, fix instance creationAlex Kiernan
Ensure that anyone who sets SYSTEMD_AUTO_ENABLE_${PN} = "mask" (or "preset") retains the previous behaviour. In addition fix "enable" so it can (again) create instance units out of templates. Remove over-zealous quoting of SYSTEMD_SERVICE_ESCAPED as it's already safely escaped (and can be multiple arguments). Reported-by: Paul Barker <paul@betafive.co.uk> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09systemd: Default to non-stateless imagesAlex Kiernan
When creating images, for anything other than the explicitly stateless case, touch /etc/machine-id so that the images can be booted without an initramfs and with `ro` set on the kernel command line, otherwise system refuses to start: [ 7.222134] systemd[1]: No hostname configured. [ 7.227266] systemd[1]: Set hostname to <localhost>. [ 7.232622] systemd[1]: System cannot boot: Missing /etc/machine-id and /etc is mounted read-only. [ 7.241750] systemd[1]: Booting up is supported only when: [ 7.247362] systemd[1]: 1) /etc/machine-id exists and is populated. [ 7.253752] systemd[1]: 2) /etc/machine-id exists and is empty. [ 7.259757] systemd[1]: 3) /etc/machine-id is missing and /etc is writable. If IMAGE_FEATURES includes `stateless-rootfs` then systemctl-native is not run on the image leaving the image for population at runtime by systemd. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08cml1.bbclass: fix undefined behaviorStefan Müller-Klieser
Whenever cml1 do_configure is used with a defconfig, oldconfig waits for input. This silently fails on recent kconfig projects with: "Error in reading or end of file." We cannot use a more up to date kconfig target such as olddefconfig, because busybox does not support it. Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08distutils: Run python from the PATH in the -native case as wellDouglas Royds
The python distutils generate a python wrapper script for each package, containing shebang lines pointing to the python executable. In our case, this is a fully-qualified path to python-native in the recipe-sysroot-native. Ubuntu 18.04 restricts the useful length of the shebang line to 125 characters, and Ubuntu 16.04 restricts it to 77. In both cases, the staged python script fails to run due to the length of the path to the python-native executable. Replace the shebang line with nativepython or nativepython3 as appropriate. The nativepython symlink is installed by the python-native recipe: #!/usr/bin/env nativepython We were already doing this for on-target distutils components. This change applies the sed-line to -native distutils components as well. In this way, -native clients of these components can invoke the wrapper scripts directly, without themselves needing to inherit pythonnative. This works around a known setuptools issue: https://github.com/pypa/setuptools/issues/494 Even once this issue has been resolved upstream, we will still need to replace `python` with `nativepython` Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08go: Exclude vcs files when installing depsAlex Kiernan
Because our clones use the host git, on (say) Ubuntu 18.04, the local git directories acquire perl scripts such as fsmonitor-watchman.sample. During packaging, this leads to failures: ERROR: go-hsperfdata-1.0.3+gitAUTOINC+b58598ac84-r0 do_package_qa: QA Issue: /usr/lib/go/pkg/dep/sources/https---github.com-nsf-termbox--go/.git/hooks/fsmonitor-watchman.sample contained in package go-hsperfdata-staticdev requires /usr/bin/perl, but no providers found in RDEPENDS_go-hsperfdata-staticdev? [file-rdeps] ERROR: go-hsperfdata-1.0.3+gitAUTOINC+b58598ac84-r0 do_package_qa: QA run found fatal errors. Please consider fixing them. ERROR: go-hsperfdata-1.0.3+gitAUTOINC+b58598ac84-r0 do_package_qa: ERROR: go-hsperfdata-1.0.3+gitAUTOINC+b58598ac84-r0 do_package_qa: Function failed: do_package_qa Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08cpio/tar/native.bbclass: move rmt to sbindir and add a prefix to avoid ↵Hongxu Jia
native clashing The rmt in cpio-native and tar-native is clashing, since tar-native has set var-NATIVE_PACKAGE_PATH_SUFFIX, we move rmt to sbindir, and add suffix NATIVE_PACKAGE_PATH_SUFFIX to sbindir could avoid the clashing. And in Ubuntu, rmt is in sbindir $ which rmt /usr/sbin/rmt Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-04gtk-icon-cache: clean up DEPENDSRoss Burton
Use gtk+3-native instead gtk-icon-utils-native as that recipe no longer exists and is provided by gtk+3-native for compatibility. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-04license_image: Use new oe.path.copyhardlink() helperPaul Barker
This change allows us to support the placement of WORKDIR and DEPLOY_DIR on different devices. 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>
2019-05-03useradd-staticids: print exception after parse_args() errorMax Kellermann
Without this, the user has no idea what went wrong. 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>
2019-05-02uboot-sign: Fix build when UBOOT_DTB_BINARY is emptyAlex Kiernan
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") Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-02image: call systemctl preset-all for imagesAlex Kiernan
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. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-02systemd: create preset files instead of installing in imageJonas Bonn
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. 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>
2019-05-02systemd: do not create machine-idJonas Bonn
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. 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>
2019-05-02populate_sdk_base: provide options to set sdk typeChangqing Li
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. Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-29staging: add ${datadir}/gtk-doc/html to the sysroot blacklistRoss Burton
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. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-26kernel-module-split.bbclass: support CONFIG_MODULE_COMPRESS=yJens Rehsack
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. Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-26oeqa/core/runner: dump stdout and stderr of each test caseMardegan, Alberto
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. Signed-off-by: Alberto Mardegan <amardegan@luxoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-26Use the best xz compression for the SDKAdrian Bunk
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. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-25gtk-doc.bbclass: unify option setting for meson-based recipesAlexander Kanavin
This is done similarly to gobject-introspection work by Andreas Müller, and allows dropping duplicate clutter from the recipes. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-25icecc.bbclass: stop causing everything to be effectivelly MACHINE_ARCHMartin Jansa
* 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' Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-23classes/waf: Set WAFLOCKJoshua Watt
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}) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-23kernel.bbclass: convert base_do_unpack_append() to a taskSteven Hung (洪于玉)
<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 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>
2019-04-16Set XZ_COMPRESSION_LEVEL to -9Adrian Bunk
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. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-15ptest.bbclass: Use d.getVar instead of os.environMariano Lopez
[YOCTO #12597] [YOCTO #13238] Signed-off-by: Mariano Lopez <just.another.mariano@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-15uboot-sign: add support for different u-boot configurationsAndreas Obergschwandtner
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. Signed-off-by: Andreas Obergschwandtner <andreas.obergschwandtner@skidata.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-12kernel-fitimage: support RISC-VMichael Scott
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. Signed-off-by: Michael Scott <mike@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-12image_types.bbclass: fix a race between the ubi and ubifs FSTYPESHongxu Jia
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] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-12goarch.bbclass: Simplify logicRichard Purdie
Further simplification of the go_map_arm() function. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-12go.bbclass: Remove unused overrideRichard Purdie
The x86 override means the i586 one isn't necessary. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-11ccmake.bbclass: Fix up un-escaped quotes in output formattingNathan Rossi
The quotes should be generated in the output to match the expected cmake syntax for setting cache variables. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-11sanity: check_perl_modules bug fixZheng Ruoqin
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. Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-11insane.bbclass: Trigger unrecognzed configure option for mesonAndreas Müller
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 Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-11gobject-introspection: auto-enable/-disable gobject-introspection for mesonAndreas Müller
* 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 Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-11ptest.bbclass: Add feature to populate a binary directoryMariano Lopez
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] Signed-off-by: Mariano Lopez <just.another.mariano@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-11update-alternatives.bbclass: Add function to get metadataMariano Lopez
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] Signed-off-by: Mariano Lopez <just.another.mariano@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-10goarch.bbclass: use MACHINEOVERRIDES and simplify go_map_arm()Mark Asselstine
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. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-10go.bbclass: Export more GO* environment variablesMark Asselstine
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. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-10insane: fix gettext dependency warningRoss Burton
This message was using %s markers but nothing was being passed in. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-10sstate.bbclass: Use bb.utils.to_boolean() for BB_NO_NETWORKRobert Yang
Make it consistent with bitbake Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-10cmake: Support Eclipse and other cmake generatorsNikhil Pal Singh
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). Signed-off-by: Nikhil Pal Singh <nikhilpal.singh@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-09patch/insane: Rework patch fuzz handlingAndreas Müller
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] Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-09sanity: clarify error message if TMPDIR movesRoss Burton
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". Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-05ccmake.bbclass: Create a cml1 style class for the CMake curses UINathan Rossi
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. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-05xmlcatalog: new class to update the XML catalogueRoss Burton
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 Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-05base/pixbufcache: Remove obsolete sstatecompletions codeRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-03cml1.bbclass: Use POSIX sh instead of var-SHELLNathan Rossi
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. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-03terminal.bbclass: Generate do_terminal as bitbake wouldNathan Rossi
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. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-03base.bbclass, staging.bbclass: Move prepare_recipe_sysroot task dependencyPeter Kjellerstedt
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. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-29llvm: fix more places where '8.0' version of llvm was hardcodedAlexander Kanavin
So that it says '8.0.0' to reflect the recent PV change. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>