summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* image_types: Add debugging code to ext4 fs creationSaul Wold2017-12-041-0/+4
| | | | | | | | | | | | | | | | We have seen a small number of issues with ROOTFS_SIZE not getting computed correctly, resulting in a failure in the mke2fs processing and populating the resulting new filesystem. This information should help us to reproduce [YOCTO #12304] (From OE-Core rev: 0abd3c25cb2a9a9be9dc650a1600d3902d5779a9) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3a72f6783e142d53d19b37811a854d08d32485ab) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot: Improve relative path handlingRichard Purdie2017-12-041-3/+5
| | | | | | | | | | | | | | | | | qemuconf files are currently written relative to TOPDIR. What makes more sense is to write paths relative to the location of the file. This makes moving them around and decoding the end paths in runqemu much easier. The effect of this should allow less use of bitbake to determine variables and allow us to simplify runqemu. (From OE-Core rev: e790aecfde4199cf9b658338900ad9a87cc1094f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 55a0028a961c0ad3c2e5729a9e3919cbbf256fe1) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: add automatic dependency on xz-native for .txz SRC_URIAndré Draszik2017-12-041-1/+1
| | | | | | | | | | | | | .txz is .tar.xz, so add it, as this can actually be found in the wild. (From OE-Core rev: 866ead1d900433e39772973b4b31b7408ed8a215) Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 58af8c2e4bd17692274fc5a6ac8f8af84319fec6) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_ipk.bbclass: handle only whitespace in PACKAGE_EXCLUDEAndre McCurdy2017-12-041-1/+1
| | | | | | | | | | | | | If PACKAGE_EXCLUDE is constructed using _append then it's possible that the final value will contain only a space. Currently that results in build failures due to an invalid opkg command line. (From OE-Core rev: 809fda77324c5d4949b6490412f43d4bb95e4a94) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: increase indent in get_layers_branch_rev() and buildcfg_vars()Andre McCurdy2017-12-041-2/+2
| | | | | | | | | | | | | | | | | Although it may not appeal so much to users to prefer 80x24 consoles, the general trend is for screens to get bigger and the current output has started to look a little cramped on a modern HD display. Increasing from 17 to 20 is obviously arbitrary, but does give enough space to cleanly display layers such as "meta-nodejs-contrib" and "meta-virtualization" while still keeping the output fairly compact. (From OE-Core rev: 65f6fba05b7a28a6af048e79f8355ffc37acd039) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Ensure full logs are shown for failuresRichard Purdie2017-12-041-2/+2
| | | | | | | | | | | | Currently, the fact an error message is shown means the rest of the task logs are suppressed. In this case we don't want that as it hides the real errors and useful information. Therefore override this behaviour. (From OE-Core rev: c0af4e9a0666de64c6a8823cdd3fbea579a3fb67) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gtk-doc.bbclass: correctly make the list of directories with shared librariesAlexander Kanavin2017-12-041-1/+1
| | | | | | | | | | | Previously it was working only if only one shared library was found, and broke when there were several. (From OE-Core rev: 9bdfc39d431c729740025ce5b711d7b5684df800) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Pass the logger into OERuntimeTestContextExecutor.getTarget()Richard Purdie2017-12-041-1/+1
| | | | | | | | | | | | I have no idea why we didn't do this but it means the code has nowhere to log to unless we do this. This means we can then use the logger to log data to the task logs. (From OE-Core rev: 1054965a2d44df2617127c0c47e34adc62c1bf4d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: let do_image depend on do_populate_lic of EXTRA_IMAGEDEPENDSMing Liu2017-12-041-5/+9
| | | | | | | | | | | | | | | | | | The licenses of EXTRA_IMAGEDEPENDS recipes are being referenced in image postcommand write_deploy_manifest, but a dependency is missing between do_image and do_populate_lic of EXTRA_IMAGEDEPENDS recipes, this leads some license files not present when write_deploy_manifest runs, hence will cause build errors. Fixed by letting do_image depend on do_populate_lic of EXTRA_IMAGEDEPENDS recipes. (From OE-Core rev: 2aa357501f74163f49c62db8660b7a132b5d0d46) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc: fix ExpansionError if the source dir does not exist yetLuca Ceresoli2017-12-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The externalsrc class code assumes that the source directory (EXTERNALSRC) exists before bitbake is called. Otherwise do_configure will fail obviously since externalsrc does not fetch anything. Commit 3ca6085729d9 ("externalsrc: Handle .git not being a directory") changed this behaviour. Now on a missing EXTERNALSRC directory we get a bb.data_smart.ExpansionError during _parsing_, way before do_configure can be run. This new behaviour creates two problems: * First, there error message is very cryptic (and it's hard to provide a better message since no task is ever run): ERROR: ExpansionError during parsing /<...>/<...>.bb Traceback (most recent call last): bb.data_smart.ExpansionError: Failure expanding variable do_compile[file-checksums], expression was ${@srctree_hash_files(d)} which triggered exception FileNotFoundError: [Errno 2] No such file or directory: '<...>' * Second, this prevents creating a class based on externalsrc that automatically fetches the code in EXTERNALSRC before do_compile runs. Fix both problems by simply calling git with '-C ${EXTERNALSRC}' instead of calling git inside the non-existing directory. This changes from a bb.data_smart.ExpansionError to a subprocess.CalledProcessError, which is in line with what's actually going on: git is telling us it can't find the git dir. Also remove a comment that does not apply anymore. (From OE-Core rev: 390e4cc74ef9b578e1cced21444247d975610154) Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Joshua Watt <jpewhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Fix 'vardepsexclude' mechanism for image_cmd_${FSTYPE}Igor Romanov2017-12-041-1/+4
| | | | | | | | | | | | | Current mechanism doesn't allow to use any non-determenistic variable, except 'DATE' and 'DATETIME', inside IMAGE_CMD_${FSTYPE} prototype. Passing 'vardepsexclude' values from IMAGE_CMD_${FSTYPE}, so users will be able to avoid taskhash mismatch problems. (From OE-Core rev: 92bd01eba742e2bcb146ca24a1443af833f5a2ba) Signed-off-by: Igor Romanov <i.romanov@inango-systems.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd-staticids: explain how to fix the the problemPatrick Ohly2017-12-041-33/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a distro uses useradd-staticids.bbclass and some developer unfamiliar with the static ID mechanism tries to add a recipe which needs new IDs, the resulting error or warning is typically not something that the developer will understand. Even experienced developers do not get enough information. They first must find out whether the missing ID is for a system user or group, then locate the file(s) in which the ID could be added. Both of this is now part of the message: ERROR: .../meta/recipes-extended/cronie/cronie_1.5.1.bb: cronie - cronie: system groupname crontab does not have a static ID defined. Add crontab to one of these files: /.../conf/distro/include/my-distro-group The case that no file was found is also handled: ERROR: .../meta/recipes-extended/cronie/cronie_1.5.1.bb: cronie - cronie: system groupname crontab does not have a static ID defined. USERADD_GID_TABLES file(s) not found in BBPATH: files/group It would be nice if the error message could also list the range in which a new ID needs to be allocated, but /etc/login.defs isn't available at the time of creating the message, so that part is still something that a developer needs to know. (From OE-Core rev: 29c12b147ef85db4ebb0f86a911db5f90ae11c0a) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd-staticids: skip recipes without static IDsPatrick Ohly2017-12-041-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | When enabling useradd-staticids.bbclass, one has to define static IDs for all recipes in a world build, otherwise those without static IDs generate parse errors or warnings, depending on USERADD_ERROR_DYNAMIC. Defining unused IDs is a lot of work and clutters the passwd/group file of a distro. Distros which want to avoid this can now set USERADD_ERROR_DYNAMIC = "skip" and recipes which would have triggered a message then silently get disabled. Only trying to build them shows the error message: $ bitbake apt ... ERROR: Nothing PROVIDES 'apt' ERROR: apt was skipped: apt - apt: username _apt does not have a static ID defined. (From OE-Core rev: a2766b99a763874d469d34b84109553f68f5aaac) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* goarch: There is no GOARCH defined for mips64-n32Joe Slater2017-12-041-0/+1
| | | | | | | | | | | | | Defeat building for mipsarchn32 because there is no corresponding GOARCH. Neither "mips" nor "mips64" allows go-runtime to compile. Existing mips32 code assumes the o32 ABI. (From OE-Core rev: 6380e5e381ceaf39a02e6f76c74910b2af71980b) Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd.bbclass: print a warn when useradd not foundRobert Yang2017-12-041-0/+1
| | | | | | | | | | | | | | Exit quietly makes it very hard for debugging when user is not added as expected, print a warning helps a lot. (From OE-Core rev: 2428444f4d5deeaad90753bde51455c0b55d7d3e) 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> (cherry picked from commit 057885ed6f22781960bce4e082e3aa96e126764c) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* goarch.bbclass: Define HOST_GO386 and TARGET_GO386Paul Barker2017-10-161-0/+11
| | | | | | | | | | | | | | | | | | | | | | | These variables are used to control the floating-point instructions emitted by the go compiler for x86 architectures. The default is '387' which disables the use of sse/sse2 instructions and is safe to use on all x86 processors from the i486 onwards. If TUNE_FEATURES contains a feature set which is known to support sse/sse2 instructions then they are set to 'sse2' to enable the use of these instructions. This is suitable for most processors from Pentium 4 onwards. Only the 'core2' and 'corei7' TUNE_FEATURES are defined in the oe-core layer and are known to support ss2 instructions. Other layers may introduce additional tunings which support sse2 instructions and for these layers, TARGET_GO386 or go_map_386 should be overridden as needed. (From OE-Core rev: 7e96cf3c9850dc34d53af73a9ac22b1624994484) Signed-off-by: Paul Barker <pbarker@toganlabs.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* own-mirrors.bbclass: allow other settings of PREMIRRORS have effectChen Qi2017-10-161-13/+13
| | | | | | | | | | | | | | If we inherit own-mirrors.bbclass, other settings of PREMIRRORS in our project would have no effect. This patch modifies the setting in own-mirrors.bbclass to allow other settings of PREMIRRORS to still have effect. (From OE-Core rev: a3e9e7a38b3d9caed49380ebc05651a97f613c7c) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: preserve sysroot paths in configured mode for multilibHongxu Jia2017-10-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In the following commit, the archiver expanded RECIPE_SYSROOT to preserve sysroot paths in configured mode: ... commit aa2240657b015d46e9ba4bcb6264709a82313d83 Author: Ross Burton <ross.burton@intel.com> Date: Tue Jun 6 15:23:18 2017 +0100 archiver: preserve sysroot paths in configured mode ... In meta/conf/multilib.conf, it overrides the variables of STAGING_DIR_HOST, STAGING_DIR_TARGET and RECIPE_SYSROOT with "${WORKDIR}/${MLPREFIX}recipe-sysroot". So the archiver should also expand STAGING_DIR_HOST and STAGING_DIR_TARGET to preserve sysroot paths in configured mode for multilib. [YOCTO #11584] (From OE-Core rev: b129af957a9fd8f603d1aebb9fca3adcb4e6b341) 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>
* sstate.bbclass: provide an exception for useradd scenarioMaxin B. John2017-10-161-1/+2
| | | | | | | | | | | | | | | Packages, which depend on users/groups created from other packages, needs "shadow-native" as a build time dependency. So, add an exception to the "shadow-native" from otherwise discarded native/cross tools dependency. Fixes [YOCTO #11960] (From OE-Core rev: 979699b55214933e0f11727a2fb9bfda8a3a3870) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cross.bbclass: Remove usage of host flags for cross-compilationNikolay Merinov2017-10-161-4/+4
| | | | | | | | | | | | | | | | | | BUILD_* flags can't be used as TARGET_* flags even for "cross" packages. gcc-cross buils leaks config.log's through "gcc-stashed-builddir" and TARGET_* flags to libgcc cross-build through "gcc/libgcc.mvars" file on "gcc-stashed-builddir". This means that if BUILD_CFLAGS contains host-specific flags like "-isystem/usr/include" libgcc build will fail "do_qa_configure" and "do_package_qa" checks. Remove host-related flags from TARGET_* flags for gcc-cross build. (From OE-Core rev: 4b936cde58ca0a6f34092ce82640a02859110411) Signed-off-by: Nikolay Merinov <n.merinov@inango-systems.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* utils.bbclass: Support applications with arguments in check_app_exist()Nikolay Merinov2017-10-071-1/+1
| | | | | | | | | | | | check_app_exist function must support cases when "app" variable defined as "progname --args". For example BUILD_CC="gcc -march=x86-64" must pass sanity check. (From OE-Core rev: 5193ebca0ca8864404fc750def0e738417d104c7) Signed-off-by: Nikolay Merinov <n.merinov@inango-systems.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging.bbclass: handle postinst-useradd-* fixmesMikko Ylinen2017-10-072-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | After 02457ef7f600ce954874e2d11e74b1c6daaa3bfc, PSEUDO for postinst-useradd-* scripts get to use only one PSEUDO_LOCALSTATEDIR which is set under recipes ${WORKDIR}. When the those scripts are run in a clean build environment that is built from the sstate (populate_sysroot_setscene run for postinst-useradd-* providers), pseudo fails to run because it cannot access the PSEUDO_LOCALSTATEDIR (recipe ${WORKDIR}s do not exist). This triggers a sysroot staging error. Previously, the PSEUDO_LOCALSTATEDIR setting in useradd.bbclass worked because the RSS sstate/staging logic automagically processed ${STAGING_DIR_TARGET} in postinst-useradd-* scripts to point under the sysroot being built. The fix uses the same fixme processing by adding PSEUDO_LOCALSTATEDIR variable to it. Furthermore, LOGFIFO is added to be able to use the logging fifo of the recipe that actually runs postinst-useradd-*. (From OE-Core rev: b28374cfad37db161b5ac5953b4a4638912f3f27) Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: Fix bmaptool support for RSSTom Rini2017-10-071-0/+3
| | | | | | | | | | | | | With RSS we need to ensure that when making a bmap image that the python3 that we created is found via /usr/bin/env rather than the host python3. Otherwise we're relying on the build host to have bmaptool support installed. (From OE-Core rev: a93c5869cb716cba5e05bbe4fc2e1c11adb9e30f) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* goarch.bbclass: rework mips architecture checksMatt Madison2017-10-071-10/+7
| | | | | | | | | | | | | | | Remove the TUNE_FEATURES references from go_map_arch, to avoid an unwanted variable dependency. Direct comparisons of the architecture name are sufficient for covering what Go currently supports, and using TUNE_CCARGS_remove adequately handles the conflict with the cgo-supplied flags for mips. (From OE-Core rev: 1bc4c1d880096083d1891a74024fb225a6340b9b) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cml1: remove diffconfig return code checkingBruce Ashfield2017-10-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following commit: [ commit 578c8205fd14c48c6d30ef2889d86f1b4aee060a Author: Mikko Rapeli <mikko.rapeli@bmw.de> Date: Thu Jun 22 16:23:14 2017 +0300 meta: Fix return value checks from subprocess.call()'s Python function subprocess.call() returns the return value of the executed process. If return values are not checked, errors may go unnoticed and bad things can happen. Change all callers of subprocess.call() which do not check for the return value to use subprocess.check_call() which raises CalledProcessError if the subprocess returns with non-zero value. https://docs.python.org/2/library/subprocess.html#using-the-subprocess-module All users of the function were found with: $ git grep "subprocess\.call" | \ egrep -v 'if.*subprocess\.call|=\ +subprocess\.call|return.*subprocess\.call' Tested similar patch on top of yocto jethro. Only compile tested core-image-minimal on poky master branch. Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> ] Added return code checking to do_diffconfig. Although the change is well intentioned, it isn't correct in this instance since 'diff' returns '1' to indicate that there are differences in the files .. and not as an error code. subprocess.check_call() flags this as an error and the routine aborts. We are already checking the inputs, and in fact already know there's a diff in the files before we even make the call, so there's no need to look for an error in this case. Putting back subprocess.call() restores the routine to working order. [YOCTO #12132] (From OE-Core rev: ec48b8fd79181978f90b4b0ab00fbe78ddbd416e) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: remove systemd-boot for x32Saul Wold2017-09-261-0/+1
| | | | | | | | | | | | | | Currently systemd-boot actually incorporates libgcc, since the systemd-boot needs to be built with 64bit instructions it can not use the x32 based libgcc. Use the new override to ensure it gets overriden, linux-gnux32 could not be used because x86-64 has higher priority. (From OE-Core rev: 6046b9a3d76738c459ad76f5296e7b0a54c0b2e0) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sign_rpm.bbclass: force rpm serial signingLeonardo Sandoval2017-09-261-0/+6
| | | | | | | | | | | | | | Newer versions of gpg (at least 2.1.5 and 2.2.1) have issues when signing occurs in parallel so (unfortunately) the signing must be done serially. Once the upstream problem is fixed, this patch must be reverted, otherwise we loose all the intrinsic parallelism from bitbake. [YOCTO #12022] (From OE-Core rev: 5301712f9735fcf8d3dec756772668de930e53fe) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: drop True option to getVar callsMing Liu2017-09-263-9/+9
| | | | | | | | | Search made with the following regex: getVar ?\((.*), True\). (From OE-Core rev: dbc0eaf478feb3f752ae22fd184984494fc85d0a) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go: disable PIE flags for cgoMatt Madison2017-09-261-0/+3
| | | | | | | | | | | | If the security_flags.inc file is included, gcc will do PIE builds by default. These flags need to be disabled for go packages that use cgo. (From OE-Core rev: 5d84042852380fc88b9be8df0e4eeac612c2a6da) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* goarch.bbclass: fixups for Go mips32 supportMatt Madison2017-09-261-4/+8
| | | | | | | | | | | | | | | | | | | | | * Fix the regular expression in the mips test * Flag as incompatible any mips32 tunes for n32 ABI or soft-float, as go does not support them. * Replace mips32r2 tune with mips32r1. Go only supports mips32r1, which is a strict subset of r2. Adjusting this tune is not ideal, but is hopefully a temporary measure until more complete mips32 ISA coverage arrives upstream. [YOCTO #12108] (From OE-Core rev: bdd20c296048937737da0f10bd1a3b63843c5bf4) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: drop image dependencies on TOPDIR variablePaul Eggleton2017-09-253-1/+3
| | | | | | | | | | | | | | We don't need a dependency on this variable changing, and having one causes locked signature warnings during eSDK installation if you have INITRAMFS_IMAGE_* set (since TOPDIR will always be different between the eSDK and the environment in which it was built). Relates to [YOCTO #12102]. (From OE-Core rev: 073610af04be326f9245ca91714526b390fb72cd) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd-staticids: don't create username-group if gid is specifiedAndré Draszik2017-09-251-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding distcc to an image, and having staticids enabled, doesn't work as it causes a a superfluous 'distcc' group being added using a conflicting GID, thus failing the build: | ERROR: distcc-3.2-r0 do_prepare_recipe_sysroot: distcc: groupadd command did not succeed. Compared to other recipes, the distcc recipe only specifies --gid for the primary group, and doesn't specify --no-user-group, but when --gid is given, it doesn't make sense to create a matching username-group in addition, even if --no-user-group was not specified, and 'useradd' actually complains if --gid and --user-group are given both. If only --gid is given, the current code in here effectively behaves as if --user-group was specified, taking the group-id of the username-group from the --gid parameter. This causes the error above, as we try to add a new group (distcc) with an existing group-id (nogroup). This is contrary to the comment in this file just above, contrary to what useradd can do, contrary to behaviour without the useradd-staticids bbclass, and non-intuitive. Change the code such that a username-group is only created - if a primary group using --gid was not specified, or - if --no-user-group was not specified To be in line with useradd, if gid is not given, and --no-user-group is given, we add the user to the group 'users', which mimics useradd's behaviour. (From OE-Core rev: fc3a86ae68919cec72c1a8ae0f9ba1f98ae13f0d) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Reduce verbosity of log messagesRichard Purdie2017-09-251-2/+10
| | | | | | | | | | | | | The staging changes were very verbose in their logging and whilst this is useful when staging issues occur, those thankfully seem rare now and we can tune down the logging to a sane level. This improves the readability of error messages from functions that fail. The code is still verbose when its replacing things in the sysroot. (From OE-Core rev: a22d44c6bef7ea1be90aeb32ccd7502d3135a266) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-extlinux: fix extlinux creation race (take 2)André Draszik2017-09-251-2/+2
| | | | | | | | | | | | | | Alternative solution to original commit 60c90398580998b2379bb438f0f75b29285135a5 ("u-boot: fix extlinux creation race") (Untested) (From OE-Core rev: e44b72ab45c757cc83c7856c118588f1af299790) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devicetree.bbclass: Add support to generate append to kernelOtavio Salvador2017-09-251-1/+51
| | | | | | | | | | | | | | The are use cases where the Device Tree appended to the kernel is convinient, so we generate the bundle concatenating the kernel (and potentionally the initramfs) and the Device Tree binaries. To enable it, set KERNEL_DEVICETREE_BUNDLE variable to '1' (From OE-Core rev: f044567326988e84e5d72040e9387c3240836ddb) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: support MIPS (compressed)André Draszik2017-09-251-1/+3
| | | | | | | | | | On MIPS, the compressed kernel image target is vmlinuz.bin (From OE-Core rev: 74d97569aa4e0f82e094a539dec302076103affa) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-uboot: support compressed kernel on MIPSAndré Draszik2017-09-251-1/+7
| | | | | | | | | | | | | | MIPS generates vmlinuz.bin when compression in the kernel build is enabled, including any necessary objcopy so we can leverage that and skip our manual invocation of objcopy here. We just have to put the file into the right place for the rest of the build to find it. (From OE-Core rev: 00bc7682473c2558d72ba42c182f8e3bd445f8af) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-uimage: optimise UBOOT_ENTRYSYMBOL supportAndré Draszik2017-09-251-1/+1
| | | | | | | | | | | | | | | This is the remaining local change to a fix similar to commit e0b4f018d1c2 ("kernel-uimage.bbclass: Fix up generation of uImage from vmlinux"): Make awk exit on match to save a few CPU cycles so as to make this similar to kernel-fitimage.bbclass (From OE-Core rev: 614e8be7a89a2f2113fa40b11e7a05b9e8155f6a) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: unbreak UBOOT_ENTRYSYMBOL supportAndré Draszik2017-09-251-2/+2
| | | | | | | | | | | | | | | | - vmlinux is located in ${B}, not ${S}. - parsing of nm output got broken completely in commit b406a89935f148779569fa3770776e009dd51f13 ("kernel-fitimage: add initramfs support"), commit ec755d2524fcbd9dfded23a576f25c990d405a6c in yocto While at it, make awk exit on match to save a few CPU cycles. (From OE-Core rev: 9d2ec9c046c4a9c6a842d28133d40639f5a65297) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: sanitize dtb section name (unbreak MIPS)André Draszik2017-09-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | We can't build fitImages for MIPS any more: | Error: fit-image.its:21.27-28 syntax error | FATAL ERROR: Unable to parse input tree | uboot-mkimage: Can't read arch/mips/boot/fitImage.tmp: Invalid argument Since commit cd2ed7f80b555add07795cc0cbaee866e6c193a3 ("kernel-fitimage: dtb sections named by their filenames and one config section for each dtb"), commit 1ec405ef5df82884c8997878bbe6c66d924b5127 in yocto, dtb sections are named by the DTB filename, but the filename can legally be in a subdirectory below arch/$arch/boot/dts/, and on MIPS all DTBs are actually in a subdirectory. If so, mkimage fails with the above error message. Unbreak this by replacing the offending character (directory separator /) (From OE-Core rev: 335fc50cf54e47db4e3d5c35a9846484faf0270f) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: check that path variables don't use ~Ross Burton2017-09-221-0/+5
| | | | | | | | | | The core path variables (TMPDIR, DL_DIR, SSTATE_DIR) don't use tilde expansion but if the user does then the errors are very mysterious, so check on startup. (From OE-Core rev: 2fb74abbe07b6b82a715ac0fe16449bd8420110e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: correct Python version sanity checkRoss Burton2017-09-221-3/+3
| | | | | | | | | We now require Python 3.4, not 2.7. (From OE-Core rev: b12d99dbfbee8c4b3680f453f833410950238bb9) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: build host programs with native sysrootsWenzong Fan2017-09-211-1/+1
| | | | | | | | | | | | | | | | | | Allow to search header files and libs from native sysroots. For example, an expanded BUILD_CFLAGS includes: '-isystem/builddir/to/linux-yocto/recipe-sysroot-native/usr/include' And an expanded BUILD_LDFLAGS includes: '-L/builddir/to/linux-yocto/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/builddir/to/linux-yocto/recipe-sysroot-native/usr/lib -Wl,-rpath,/builddir/to/linux-yocto/recipe-sysroot-native/usr/lib' (From OE-Core rev: 37f20f2f7bdc8b964736c09371cd8f2342e4d5cb) Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Sorted ctypes to avoid basehash errorGerson Fernando Budke2017-09-211-1/+1
| | | | | | | | | | | | | | | | When selected multiple subimages a similar error could happend: Variable do_image_cpio[subimages] value changed \ from 'cpio.gz.u-boot cpio.gz' to 'cpio.gz cpio.gz.u-boot' To avoid this, 'ctypes' should be sorted at 'gen_conversion_cmds'. This garantee that 'CONVERSION_CMD_xxx' are always written in tha same order and consequently 'do_image_cpio' have the same hash. (From OE-Core rev: 271f1a5f65b8685a1e3645026876251122ef3974) Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image: move image_qa to between rootfs and imageRoss Burton2017-09-211-2/+5
| | | | | | | | | | | | | | | It was noticed that do_image_qa is useless when rm_work is enabled as the rootfs directory is deleted before image_qa is called. This indicates that image_qa is incorrectly scheduled as it failing should mean images don't get generated, so move it between do_rootfs and do_image. Also, add a little bit more documentation to the comments. (From OE-Core rev: 62ce334e583ecdf1f93619f4131c0fa5d88d5b02) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image_live: fix using squashfs as image filesystemTomasz Meresiński2017-09-211-1/+1
| | | | | | | | | | | Different squashfs versions have IMAGE_TYPE with hyphen (eg squashfs-lz4). Tasks on the other hand have names with underscore (eg do_image_squashfs_lz4). (From OE-Core rev: ab3cdfbd24844506647b75002f531b0b82b87be4) Signed-off-by: Tomasz Meresiński <tomasz.meresinski@comarch.pl> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cross-canadian.bbclass: drop TARGET_* flags overridesMing Liu2017-09-211-5/+0
| | | | | | | | | | | | | | | A regression was introduced by me in commit 767335c9: [ cross-canadian.bbclass: override TARGET_* flags ] it causes BUILDSDK_C/CXXFLAGS being exported in environment-setup script built from meta-environment recipe, which is wrong, restore to TARGET_C/CXXFLAGS. (From OE-Core rev: 44160df561a1b10b4c7a74558bdfe6b58ee0a9ec) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/externalsrc: delete symlinks at start of do_buildcleanPaul Eggleton2017-09-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | To help users find the work and log directories (especially within the eSDK) we create symlinks to these from the source tree. However during do_buildclean we call "make clean", and some project Makefiles which delete something like "*/*/lib" which will match files underneath the oe-workdir symlink and fail. do_buildclean is called from do_clean which is in turn called by devtool reset by default, and thus devtool reset is blocked. An example of a recipe where this is visible is the openssl-qat recipe in meta-intel. In order to fix this, delete the symlinks at the start of do_buildclean since we shouldn't need them at that point anyway, and thus make clean won't be able to trip over them. Fixes [YOCTO #11036]. (From OE-Core rev: 927b3b05a7f6b85967f7375b1942605fe8d37d0c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go.bbclass: set TMPDIR during compilationMatt Madison2017-09-211-0/+6
| | | | | | | | | | | | | | | | The go build tool creates working directories under $TMPDIR for all of its processing. Create a directory under ${WORKDIR} for this and point TMPDIR at it during compilation, so that systems that have a relatively small /tmp filesystems can still compile larger Go packages. (From OE-Core rev: 5de3de12c70f01753491c46b5622b0d273c3257b) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go: fix linking issues for nativesdk buildsMatt Madison2017-09-211-1/+3
| | | | | | | | | | | | | Switch to using an external linker for nativesdk go, go-runtime, and go package builds, which works more reliably when building 32-bit SDKs. (From OE-Core rev: f76779f7ef6636355a5aa5741a736f5234a67fdb) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>