summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* Allow for simultaneous do_rootfs tasks with rpmuninative-1.3Stephano Cetola2016-08-121-5/+0
| | | | | | | | | | | | | | | | | | | | | | Give each rootfs its own RPM channel to use. This puts the RPM metadata in a private subdirectory of $WORKDIR, rather than living in DEPLOY_DIR where other tasks may race with it. This allows us to reduce the time that the rpm.lock is held to only the time needed to hardlink the RPMs, allowing the majority of the rootfs operation to run in parallel. Also, this fixes the smart tests by generating an index for all packages at the time of the test, rather than using the one provided by the rootfs process. Original credit for the enhancement should go to Steven Walter stevenrwalter@gmail.com. (From OE-Core rev: a92c196449c516fe51786d429078bbb1213bb029) Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign: do_concat_dtb(): cd to $BGeorge McCollister2016-08-101-0/+1
| | | | | | | | | | | | | | | | Prior to running oe_runmake make sure $B is the cwd. This is required due to bitbake commit 67a7b8b021badc17d8fdf447c250e79d291e75f7 "build: don't use $B as the default cwd for functions". Without this change, do_concat_dtb fails with: | ERROR: oe_runmake failed | make: *** No targets specified and no makefile found. Stop. (From OE-Core rev: 6dca3dee34b587157d0d49c590a177ff1dabb374) Signed-off-by: George McCollister <george.mccollister@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign: Handle .rom signing the same as .imgGeorge McCollister2016-08-101-1/+2
| | | | | | | | | | | Handle u-boot.rom signing (U-Boot as x86 BIOS replacement) the same way that u-boot.img signing is handled. (From OE-Core rev: 94e3f427bbeb005d8443e9d822c3182f280df470) Signed-off-by: George McCollister <george.mccollister@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: Add x86 supportGeorge McCollister2016-08-101-30/+82
| | | | | | | | | | | | | | | | For x86, bzImage must be built instead of zImage. Include setup.bin (which is required to boot the kernel) in the fitimage and always use a load/boot address of 0x00090000. For details see: http://git.denx.de/?p=u-boot.git;a=blob;f=doc/uImage.FIT/x86-fit-boot.txt (From OE-Core rev: 1a65d11d4b8f056fdf22c31a92d1e58dec6d89f6) Signed-off-by: George McCollister <george.mccollister@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: add initramfs supportGeorge McCollister2016-08-101-96/+189
| | | | | | | | | | | | | | | | | | If INITRAMFS_IMAGE is set, build an additional fitImage containing the initramfs. Copy the additional fitImage and the source (*.its) file, used to create it to DEPLOYDIR. The fitImage containing the initramfs must be built before do_deploy and after do_install to avoid circular dependencies. UBOOT_RD_LOADADDRESS - Specifies the load address used by u-boot for the initramfs. UBOOT_RD_ENTRYPOINT - Specifies the entry point used by u-boot for the initramfs. (From OE-Core rev: b406a89935f148779569fa3770776e009dd51f13) Signed-off-by: George McCollister <george.mccollister@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage.bbclass: do_assemble_fitimage(): cd to $BAndrew Bradford2016-08-101-0/+1
| | | | | | | | | | | | | | | | | | | | Prior to assembling the fitimage, ensure that $B is the cwd due to bitbake commit 67a7b8b021badc17d8fdf447c250e79d291e75f7 "build: don't use $B as the default cwd for functions". Without this change, do_assemble_fitimage() fails like: Log data follows: | DEBUG: Executing shell function do_assemble_fitimage | arm-ka-linux-gnueabi-objcopy: 'vmlinux': No such file | WARNING: exit code 1 from a shell command. | ERROR: Function failed: do_assemble_fitimage (From OE-Core rev: 42d50e8f5f3a98e50a0f50473ebc83dc6347b634) Signed-off-by: Andrew Bradford <andrew.bradford@kodakalaris.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* packagefeed-stability.bbclass: fix multilib + rpmRobert Yang2016-08-101-2/+14
| | | | | | | | | | | | | | * Fix multilib + rpm since its multilib package name is special. * Update SSTATE_DUPWHITELIST to avoid shared location conflicted error. * Fix message when "not copying", now the messages are: Copying packages for recipe <foo> Not copying packages for recipe <foo> (From OE-Core rev: 647fc7913c3d1f98efe36f01fd4e0edf2366e1a6) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: correct subprocess.Popen.communicate() return valuesVladimir Zapolskiy2016-08-101-6/+6
| | | | | | | | | | | | | | | | | | This is a non-functional change, which intends to correct element names of a tuple returned by Popen.communicate(). Both in python2 and python3 subprocess.Popen.communicate() method returns a tuple (stdoutdata, stderrdata), thus old assignments and collateral comments are incorrect from human's point of view, however formally there is no error in the code. The change is desired to have to avoid copy-paste errors in future. (From OE-Core rev: cdd9bae381deb15ac84e11a39f9d72f2757c1583) Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* chrpath: correct subprocess.Popen.communicate() return valuesVladimir Zapolskiy2016-08-101-9/+9
| | | | | | | | | | | | | | | | | | This is a non-functional change, which intends to correct element names of a tuple returned by Popen.communicate(). Both in python2 and python3 subprocess.Popen.communicate() method returns a tuple (stdoutdata, stderrdata), thus old assignments and collateral comments are incorrect from human's point of view, however formally there is no error in the code. The change is desired to have to avoid copy-paste errors in future. (From OE-Core rev: f8c21df86bae5a85e221b69b91b347aeba6be4c3) Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license: improve handling of license files with identical basenamesMarkus Lehtonen2016-08-101-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, find_license_files() in license.bbclass just blindly assumed that all different licenses specified in LIC_FILES_CHKSUM have unique filenames. As a consequence, only the last one of these similarly named license files was copied and the rest were "lost". This patch changes the behavior so that all license files get copied. However, if multiple identically named files are found, they are renamed to <file>.0, <file>.1 etc. The patch also changes the handling of NO_GENERIC_LICENSE slightly. Previously, only basenames of NO_GENERIC_LICENSE and LIC_FILES_CHKSUM were compared when searching for the correct license file. After this patch NO_GENERIC_LICENSE must have the full path, matching what is specified in LIC_FILES_CHKSUM. This is required in order to be able to handle identical filenames (basenames) consistently. For example, if you have: LICENSE = "my-custom-license" LIC_FILES_CHKSUM = "file://src/LICENCE;md5=d41d8cd98f00b204e9800998ecf8427e" you must specify: NO_GENERIC_LICENSE[my-custom-license] = "src/LICENCE" [YOCTO #9663] (From OE-Core rev: d5e1375884e509ec745bac43f1f7f7950f62f280) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: output package variables in a repeatable orderRoss Burton2016-08-101-10/+8
| | | | | | | | | | | | This code was outputting variables by iterating a dictionary. In Py2 this always results in the same iteration order but with Py3 the order changes every execution, which resulted in buildhistory having to store diffs where fields were simply re-ordered. (From OE-Core rev: f9faa8df85317d12743134a44576b4882a9fb22a) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: warn about files under symlinked directoriesMarkus Lehtonen2016-08-101-0/+3
| | | | | | | | | | [YOCTO #9827] (From OE-Core rev: 27b285bd641d62f65154e6deec5146c0c8bb1458) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: better handling of middle-path dir symlinksMarkus Lehtonen2016-08-101-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | For example in a directory structure like this . ├── symlink -> foo/bar └── foo └── bar └── file 'file' could be referenced by specifying e.g. 'foo/bar/file' or 'symlink/file'. In cases like this populate_packages() might crash if the file was referenced (in FILES) via the symlinked directory. The outcome depends on how the user defined FILES_pn. This patch should make the function behave more consistently. It looks for files which are referenced via symlinked directories and handles them separately, failing if their parent directory is a non-existent path. For example, defining FILES_{PN} = "symlink/file" causes a build failure because symlinks target 'foo/bar' is not included at all. [YOCTO #9827] (From OE-Core rev: 29d1738329ddf4e63844a9ad1158a1d41e2ee343) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: remove unneeded chmod() and chown()Robert Yang2016-08-101-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The mode and owner info are saved in inode, hardlink won't change them, so remove unneeded chmod() and chown(). * This can avoid the problem that when do_package re-run, the file's mode maybe different if it is 0444 (changed to 0644 when re-run), this is caused by pseudo adds 'w' on real file, and doesn't track linked source when hard link, Peter and Mark may fix pseudo, but the removed code is not needed, which can avoid the problem. * To reproduce the problem, for example, version.c from gzip's ${B}: 1) bitbake gzip 2) Edit rpm-native or package.bbclass to make do_package re-run. 3) bitbake gzip After the first build, build/version.c in gzip-dbg is 0444, but after the second build, it will be 0644, this because do_package does: $ ln ${B}/version.c gzip-dbg/version.c, $ chmod 0444 gzip-dbg/version.c (it runs chmod 0644 on the real filesystem) And in the second build, the gzip-dbg/version.c will be removed and created again, so that stat() can't get 0444 but 0644 since ${B}/version.c is not tracked by pseudo. (From OE-Core rev: 26ab4b431da0c00010e8d399f890c5fbf0b03c94) 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>
* kernel.bbclass: add lzop dependencyTrevor Woerner2016-08-101-1/+1
| | | | | | | | | | If the initramfs image is type lzo, then a native lzop is needed. (From OE-Core rev: ee0640cb0c32b959ffaaac6752d582ed1d76e313) Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: remove intltool.m4 from ${S}Ross Burton2016-08-101-3/+10
| | | | | | | | | | | | | We need to ensure that builds use our intltool.m4 as there is a bug in upstream's macros when the host doesn't have XML::Parser installed. So generalise the m4 pruning logic that we already have from gettext and add intltool.m4. (From OE-Core rev: 342fa2b8407552a962e7c78d0e4de7b2d0b30041) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: move aclocal-copy to WORKDIRRoss Burton2016-08-101-5/+3
| | | | | | | | | | | To save time move the temporary copy of the autoconf macros, aclocal-copy, from ${B} to ${WORKDIR}. This ensures that it can't conflict with anything in ${S} and means the pruning code doesn't need to know about it. (From OE-Core rev: d7249c5cce6fbc7875c46f2452ca8cd045773898) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/classes: fix bb.build.FuncFailed typosJonathan Liu2016-08-104-6/+6
| | | | | | | (From OE-Core rev: 6a8b9599945f3f57bd86a205bc107b8490518d29) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass wipe ${S} before unpacking sourceMarkus Lehtonen2016-08-041-10/+8
| | | | | | | | | | | Make sure that we have a pristine source tree after do_unpack. [YOCTO #9064] (From OE-Core rev: eccae514b71394ffaed8fc45dea7942152a334a1) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/oetest.py: Allow to export packages using symlinksMariano Lopez2016-08-041-19/+5
| | | | | | | | | | | | | | | Currently packages that contains symlinks can't be extracted and exported. This allows to export extracted such packages. A nice side effect is improved readability. [YOCTO #9932] (From OE-Core rev: 0338f66c0d246c3b8d94ac68d60fbc4c314e500b) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Fix random python backtrace in mutlilib handling code.Jeremy Puhlman2016-08-041-1/+2
| | | | | | | | | | | | | | | | | | | newval is not defined in all cases. Set to None and check if it is set. File "/local/foo/builds/x86/layers/openembedded-core/meta/classes/multilib_global.bbclass", line 90, in preferred_ml_updates(d=<bb.data_smart.DataSmart object at 0xf6fd528c>): if not d.getVar(newname, False): > d.setVar(newname, localdata.expand(newval)) # Avoid future variable key expansion UnboundLocalError: local variable 'newval' referenced before assignment (From OE-Core rev: 25ebd3bbc1f9f4b1b6147d98dd43690c3bf03ee7) Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cml1: fix tasks after default [dirs] changedRoss Burton2016-08-041-0/+2
| | | | | | | | | | | | These tasks relied upon [dirs] being ${B} by default. As the functions are not simple, add back [dirs] so they work again. [ YOCTO #10027 ] (From OE-Core rev: 614d976ee97d6386c37afb54add5b83741ca401e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf/toolchain-scripts.bbclass: Remove debug prefix mappings in SDKJacob Kroon2016-08-041-0/+3
| | | | | | | | | | | | CFLAGS/CXXFLAGS in the SDK environment script adds debug-prefix mappings that include staging area/work directories. Remove them since the SDK shouldn't be aware of them. (From OE-Core rev: 7918e73e9c5fe8c8c1c1d341eaa42f2f7d3ddb69) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd-staticids.bbclass: trigger reparsing when table files changePatrick Ohly2016-08-011-0/+13
| | | | | | | | | | | | | | | | This addresses (among others) the following problem: - USERADD_ERROR_DYNAMIC=error causes a recipe to get skipped because a static ID entry is missing - the entry gets added to the file - using the recipe still fails with the same error as before because the recipe gets loaded from the cache instead of re-parsing it with the new table content (From OE-Core rev: 799c93592a9aac571d6dc05529437c0eec7b08b8) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/testimage: When image is systemd, enable debug log levelAníbal Limón2016-08-011-1/+4
| | | | | | | | | | | | | In order to get more information about systemd boot process to be able to debug random failures due to high I/O. [YOCTO #9299] (From OE-Core rev: a0bb64973e767c3b8e0bae18ee84ed92693922f0) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd.bbclass: Fix delete user/group when more than one itemMariano Lopez2016-08-011-8/+14
| | | | | | | | | | | | | | Currently when a recipe adds more than one user/group, the cleansstate task will delete only the first user/group. This will solve this behavior and delete all users/groups. [YOCTO #9943] (From OE-Core rev: da191d5c139a6b400d1b8fe246912b081dd18176) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: ensure eSDK sstate lists sorted secondarily by namePaul Eggleton2016-07-261-2/+2
| | | | | | | | | | | | I got fed up with seeing items dance around in sstate-package-sizes.txt in the buildhistory git repo simply because they have the same size. Let's sort the list first by size and then also by name to ensure items with the same size are deterministically sorted. (From OE-Core rev: 7340c1ea677731d21351d47d935d9de7d7e2eda5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: add additional variables for eSDKPaul Eggleton2016-07-261-1/+1
| | | | | | | | | | Add SDK_INCLUDE_PKGDATA and SDK_INCLUDE_TOOLCHAIN to the variables that we put into sdk-info.txt (From OE-Core rev: 4bf5be6a1fc39f367bbb59e1787cb55e7b5835ae) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/populate_sdk_ext: add gdb to full extensible SDKPaul Eggleton2016-07-261-1/+1
| | | | | | | | | | | | | | | | | If SDK_EXT_TYPE is set to "full" then we really ought to be shipping everything that is expected to be in the SDK, and that includes gdb (it's already referred to by the environment setup script if nothing else). This is implemented by using the SDK_INCLUDE_TOOLCHAIN functionality I just added, since the only material thing that adds on top of a full SDK is gdb and we should always have the rest of it in a full SDK anyway. Fixes [YOCTO #9850]. (From OE-Core rev: 9872dcc25c5cdfb99bda197db08476085f8c7ecc) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/populate_sdk_ext: filter sstate within the extensible SDKPaul Eggleton2016-07-261-6/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new oe-check-sstate to filter the sstate artifacts shipped with the extensible SDK by effectively running bitbake within the produced eSDK and and getting it to tell us which tasks it will restore from sstate. This has several benefits: 1) We drop the *-initial artifacts from the minimal + toolchain eSDK. This still leaves us with a reasonably large SDK for this configuration, however it does pave the way for future reductions since we are actually filtering by what will be expected to be there on install rather than hoping that whatever cuts we make will match. 2) We verify bitbake's basic operation within the eSDK, i.e. that we haven't messed up the configuration 3) We verify that the sstate artifacts we expect to be present are present (at least in the sstate cache for the build producing the eSDK). Outside deletion of sstate artifacts has been a problem up to now, and this should at least catch that earlier i.e. during the build rather than when someone tries to install the eSDK. This does add a couple of minutes to the do_populate_sdk_ext time, but it seems like the most appropriate way to handle this. Should mostly address [YOCTO #9083] and [YOCTO #9626]. (From OE-Core rev: 4b7b48fcb9b39fccf8222650c2608325df2a4507) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/populate_sdk_ext: allow including toolchain in eSDK on installPaul Eggleton2016-07-261-1/+18
| | | | | | | | | | | | | | | | | | | | | If we're to completely replace the standard SDK with the extensible SDK, we need to be able to provide the standard toolchain on install without doing anything other than installing it, so that you can install the SDK and then point your IDE at it. This is particularly applicable to the minimal SDK which normally installs nothing by default. NOTE: enabling this option currently adds ~280MB to the size of the minimal eSDK installer. If we need to reduce this further we would have to look at adjusting the dependencies and/or the sstate_depvalid() function in sstate.bbclass which eliminates dependencies, or look at reducing the size of the artifacts themselves. Implements [YOCTO #9751]. (From OE-Core rev: ed0d8ed72370df694f720cc13897493478dc1de9) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta-extsdk-toolchain: add meta-recipe to install toolchain into eSDKPaul Eggleton2016-07-261-0/+3
| | | | | | | | | | | | | | | | | | Add a meta-recipe to bring the toolchain into the extensible SDK. This was modelled on meta-ide-support but some adjustments were needed to the dependency validation function in sstate.bbclass to ensure that all of the toolchain gets installed into the sysroot. With this, after installing a minimal eSDK you only need to run the following after sourcing the environment setup script to get the toolchain: devtool sdk-install meta-extsdk-toolchain Addresses [YOCTO #9257]. (From OE-Core rev: 8110806b1b5534ae830a4fdd1a5293c86a712d0b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/populate_sdk_ext: set default for SDK_INCLUDE_PKGDATAPaul Eggleton2016-07-261-0/+1
| | | | | | | | | | | We don't absolutely need this - it doesn't change the default behaviour, but it seems to me we have a convention to set default values so we should add one here. (From OE-Core rev: 4c734df1df3c19b0dabb9da5b4dc86b966a0d71c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: explicitly set workdir in do_bundle_initramfsAndré Draszik2016-07-261-0/+1
| | | | | | | | | | | | | | | | | | | | bitbake rev 67a7b8b02 "build: don't use $B as the default cwd for functions" (included in current bitbake master) breaks the assumption that do_bundle_initramfs runs inside the build directory. This causes kernel_do_compile() as called from within do_bundle_initramfs() to fail, as the former is not being executed from the correct directory anymore. (Note that kernel_do_compile() as called from bitbake directly doesn't suffer from that problem, as it inherits the workdir from base_do_compile() in that case.) Set workdir explicitly. (From OE-Core rev: 4455da22a151c2ac006af63cbd39779b21b12580) Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-uimage.bbclass: indeed update var KERNEL_IMAGETYPE_FOR_MAKEKai Kang2016-07-261-2/+1
| | | | | | | | | | | | The replace() method of the python string class doesn't replace in-place, then the var KERNEL_IMAGETYPE_FOR_MAKE doesn't be updated as design. (From OE-Core rev: 392fc3cd276d5029314c7158245bc65dd82279cd) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: only check ${S} exists if we had sources to fetchRoss Burton2016-07-261-3/+2
| | | | | | | | | | | | | | Only check that ${S} actually exists if there was something in ${SRC_URI} to fetch, the argument being that if SRC_URI is empty the the recipe won't be using ${S} at all. In general recipes that have no sources can remove the unpack task, but expecting all recipes to do this relatively advanced operation isn't realistic. (From OE-Core rev: 8cba511ab6ea557fab9f7838dfe1fc8284bbdd68) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* packagefeed-stability.bbclass: copy all packages of a recipeRobert Yang2016-07-261-68/+35
| | | | | | | | | | | | | A recipes can generate several rpms such as a.rpm, a-dev.rpm, a-dbg.rpm, when update one of them in the repo, we'd better update all of them, otherwise, there might be a-dev.r0.1.rpm and a-dbg.r0.3.rpm in the repo, which looks strange. (From OE-Core rev: 2a7f203dbe4fda5dba9137503e93669392719aba) 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>
* packagefeed-stability.bbclass: minor fixesRobert Yang2016-07-261-3/+5
| | | | | | | | | | | | | | * fix for python3 iteritems() -> items() * Return immediately for native and cross. * Remove the usage of __BBDELTASKS, there is no such var in bitbake. (From OE-Core rev: ccfc13adedd97f57024420639053080e047529dc) 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>
* packagefeed-stability: add class to help reduce package feed churnPaul Eggleton2016-07-261-0/+270
| | | | | | | | | | | | | | | | | | | | | | | When a dependency causes a recipe to effectively be rebuilt, its output may in fact not change; but new packages (with an increased PR value, if using the PR server) will be generated nonetheless. There's no practical way for us to predict whether or not this is going to be the case based solely on the inputs, but we can compare the package output and see if that is materially different and based upon that decide to replace the old package with the new one. This class effectively intercepts packages as they are written out by do_package_write_*, causing them to be written into a different directory where we can compare them to whatever older packages might be in the "real" package feed directory, and avoid copying the new package to the feed if it has not materially changed. We use build-compare to do the package comparison. (From OE-Core rev: cc8b1a93912f830e605e6249c446b3764e550863) 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>
* package_deb.bbclass/package_ipk.bbclass: sort RPROVIDESRobert Yang2016-07-262-0/+4
| | | | | | | | | | | | | | | | | | | The dict.fromkeys() creates a dict without order, there might be a problem when build the same recipe again, for example: - First build of make: Provides: es-translation, make-locale - Second build of acl: Provides: make-locale, es-translation They are exactly the same Provides, but tools like "diff" doesn't think so. Sort RPROVIDES will fix the problem. (From OE-Core rev: 3506172d7d9f8d92362b6ebb75582b7c3e662dae) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb.bbclass: fix Python 3 errorMatt Madison2016-07-261-2/+2
| | | | | | | | | | Don't modify an OrderedDict while walking its keys. (From OE-Core rev: eb7f08c4c01313afc8350200eeb63daefde8a6f6) 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>
* classes/populate_sdk_ext: show progress when preparing build systemPaul Eggleton2016-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the extensible SDK installation process the final step is to prepare the internal copy of the build system. This can take some time, especially if you have SDK_EXT_TYPE set to "minimal" (downloading sstate artifacts) and SDK_INCLUDE_PKGDATA set to "1" (restoring pkgdata for world). To make this a bit less painful, use BitBake's new quiet mode to display status during this operation so you have some idea of how it's progressing; instead of redirecting the output to preparing_build_system.log we grab the last console log and append it instead. One result of this change is that you get the errors printed on the console during normal output rather than this going to the preparing_build_system.log file first. In OE-Core revision 227d2cbf9e0b8c35fa6644e3d72e0699db9607fa, we changed to always print the contents of preparing_build_system.log on failure, but now at least the error contents of that log is duplicated. Besides, I intentionally didn't print out the contents of that log during normal usage because it's quite verbose - the bug that we were attempting to fix was about not getting this information when seeing failures in the automated tests, thus I've moved printing the log to the test handling code instead. Part of the implementation for [YOCTO #9613]. (From OE-Core rev: 0f7cb880c934b7871f3b8432f4f02603300f6129) 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>
* siteinfo: Add mechanism to extend siteinfo information from BSP layerRichard Purdie2016-07-261-0/+8
| | | | | | | | | | | | | | | | | | | | | | In order to add a new architecture or sub-architecture to OE, you currently need to tweak the table in siteinfo.bbclass. This adds a mechanism so this can be done from a BSP layer. It needs a function definition which needs a class file but can then be done with something like: def rp_testfunc2(archinfo, osinfo, targetinfo, d): archinfo['testarch'] = "little-endian bit-32" osinfo['testos'] = "common-linux" targetinfo['mymach-linux'] = "mymach-linux-common" return archinfo, osinfo, targetinfo SITEINFO_EXTRA_DATAFUNCS = "rp_testfunc2" [YOCTO #8554] (From OE-Core rev: 2718bb9f2eabc15e3ef7cb5d67f4331de4f751d6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Add mechanism to extend QA machine information from BSP layerRichard Purdie2016-07-261-3/+13
| | | | | | | | | | | | | | | | | | | | | | In order to add a new architecture or sub-architecture to OE, you currently need to tweak the table in insane.bbclass. This adds a mechanism so this can be done from a BSP layer. It needs a function definition which needs a class file but can then be done with something like: def my_testfunc(machdata, d): machdata["testmachine"] = { "test64": ( 8, 0, 0, False, 32), "testel": ( 8, 0, 0, True, 32), } return machdata PACKAGEQA_EXTRA_MACHDEFFUNCS = "my_testfunc" [YOCTO #8554] (From OE-Core rev: c57550c9cca598315ba4408e44b138cecc22b8a0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd: allow add users to groups in rootfs postprocessStephano Cetola2016-07-211-0/+9
| | | | | | | | | | | | | Currently the functionality checks for the "u" and "g" flags to create users and groups, but not the "m" flag to add users to groups. This change first checks to be sure that the users and groups are created, creates them if necessary, then adds the user to the group. (From OE-Core rev: f0a77bee3d092cf79b7e584b943a623eddd6e13d) Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: add do_image_qa task to run QA checks on the constructed imageJoshua Lock2016-07-201-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This task runs all functions in IMAGE_QA_COMMANDS after the image construction has completed in order to validate the resulting image. Image sanity checks should either be Python functions which raise bb.build.FuncFailed on failure or shell functions with return a non-zero exit code. Python functions may instead raise an oe.utils.ImageQAFailed Exception which takes an extra argument, a description of the failure. python image_check_python_ok () { if True: raise bb.build.FuncFailed('This check always fails') else: bb.note("Nothing to see here") } image_check_shell_ok () { if true exit 1 else exit 0 fi } [YOCTO #9448] (From OE-Core rev: c9bef2ecf1a30159d11781184829f41844a58c13) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/license.bbclass: don't set [dirs] and [cleandirs]Ross Burton2016-07-201-2/+0
| | | | | | | | | | There's no need to set these as the restore from sstate will create the directories as required. (From OE-Core rev: 3ab3ebc06d22f0776091e39237235ea50c4503b2) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: INHERIT -> IMAGE_CLASSESRobert Yang2016-07-201-1/+1
| | | | | | | | | | Use IMAGE_CLASSES which is only seen by image recipe. (From OE-Core rev: 7be8f1a9dad4512c3a979ad744e223edb38fccc6) 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>
* report-error: replace build paths with markers not whitespaceRoss Burton2016-07-201-3/+5
| | | | | | | | | | | | | | | | | | | | To remove potentially personal information and reduce irrelevant noise when searching for similar reports the error reporting class removes ${TOPDIR} from the logs. Whilst this is valid intention, the replacement of ' ' results in potentially confusing logs as it appears that builds are happening in /tmp, or whitespace can appear in places where it isn't allowed which can look like a bug. Solve both of these by replacing the value of TOPDIR with the literal string TOPDIR. Also replace TMPDIR after TOPDIR, as it's not uncommon to have TMPDIR somewhere other than directly under TOPDIR. (From OE-Core rev: 95794e261628f83ddab0aa7b8bafb6409cc9deb5) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: make PV to depend on PV variable valueEd Bartosh2016-07-201-0/+3
| | | | | | | | | | | | | | | | | | | | | Currently PV is defined in meta/conf/bitbake.conf as a python expression: "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}". As FILE is whitelisted it causes PV to not depend on it. This causes sstate code to not detect that PV changes when recipe filename changes. Making PV to explicitly depend on PV variable value overrides default behaviour. Instead of depending on python expression bitbake depends on evaluated value of PV variable, which should fix the above mentioned issue. [YOCTO #9806] (From OE-Core rev: 918646ca803d56004fb0ab7c21e86cc9cb14513d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>