aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2014-09-01image-swab.bbclass: Account for eglibc -> glibc moveKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2014-09-01native.bbclass: deltask package_qaRobert Yang
The native recipe doesn't need package_qa, and it has a race issue with do_unpack which requires the clean dir of ${S}, then causes error: NOTE: recipe opkg-utils-native-0.1.8+gitAUTOINC+eae0d8fa44-r0: task do_package_qa: Failed ERROR: Task 283 (virtual:native:/path/to/opkg-utils_git.bb, do_package_qa) failed with exit code '1' Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01kernel-yocto: replace --is-ancestor with basic git porcelain commandsBruce Ashfield
--is-ancestor is a relatively new git option [commit 5907cda1, Aug 30 2012]. To support build machines with older versions of git installed, we can use the basic porcelain commands to acheive the same check. merge-base: "--is-ancestor A B" can be replaced with: if test "$(git rev-parse --verify A)" = "$(git merge-base A B)" Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01kernel-yocto: convert echo statements to bb* equivalentsBruce Ashfield
Use the bbinfo, bberror, bbfatal equivalents to the existing echo statements within the kernel-yocto processing. This makes us consistent with the other messages from the build system. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-09-01kernel-yocto: allow custom non-meta, SRCREV format buildsBruce Ashfield
When custom respositories are built (like a pure kernel.org repo), the machine_meta SRCREV format is not applicable. As such, we shouldn't check for the meta branch and we shouldn't only check SRCREV_machine based revisions. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-09-01kernel-yocto: clean overly complex branch checkoutBruce Ashfield
Since the git fetcher ensures that branches exist, we no longer need to validate the branch and have a conditional checkout of the source. We can remove some checks and ensure that whenever we exit the do_kernel_checkout routine that a branch is always checked out. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-09-01kernel-yocto: use show-ref instead of branch -aBruce Ashfield
It's better to check a branches existence via show-ref versus the end user branch commands. So we make the switch. Also as part of this change, we move the conversion of remote branches to local branches above the meta branch checking. This is required to ensure that the branch is local for the show-ref check. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-09-01kernel-yocto: simplify branch SRCREV validationBruce Ashfield
The checking of machine and meta branch SRCREVs was inconsistent and didn't allow a mixed AUTOREV machine/meta branch combination. By simplifying the checks and changing the logic, we can now allow this combination. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-09-01kernel-yocto: remove KBRANCH_DEFAULTBruce Ashfield
KBRANCH_DEFAULT was introduced as a way to trigger the enforced build of a particular branch of the tree. With the fetcher now enforcing SRCREVs existing on a branch, we can simply validate that the SRCREV is reachable from the final branch and no longer care about enforcing a given branch. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-09-01kernel-yocto: remove branch existence checking in do_validate_branchesBruce Ashfield
Now that the fetcher will enforce branch existence, we no longer need to confirm that a branch exists, and that it was the branch requested to be built. We know the branch exists and we'll confirm that the specified SRCREV is going to be built after we've patched the tree. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-09-01kernel-yocto: remove SRC_URI kbranch validationBruce Ashfield
We no longer need to check if the KBRANCH matches the branch specified in the SRC_URI. This is taken care of by the fetcher at the beginning and SRCREV ancestor validation after patching. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-09-01kernel-yocto: remove containing branch checkBruce Ashfield
The bitbake fetcher now enforces that a commit is contained by a branch, so this code can be dropped from do_validate_branches. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-09-01kernel-yocto: move SRCREV validation to patching phaseBruce Ashfield
Rather than attempting to condition the entire tree to machine SRCREV (since we don't know what branch will be built), we can instead wait until patching has completed and then confirm that we are indeed building a decendant of the specified SRCREV. The result is a much simpler check, and no mangling of the tree. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-09-01kernel-yocto: use cat-file instead of git-showBruce Ashfield
Parsing the output of git show is error prone, since it changes based on the type of issue with bad comit IDs. Since the output is no longer used in the case of a valid ref, we can switch to git-cat-file and simply check the return code. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-09-01kernel-yocto: remove redundant SRCREV checkBruce Ashfield
do_validate_branches checks to ensure that a valid machine SRCREV was set. A test against an empty SRCREV is done in two separate locations, we only need one, since the first check immediately returns and the second check never hits. At the same time, we can stop referring to the same commit hash by 3 different names. Instead we assign to a local variable at the top of the routine, and refer to it at all times. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-08-29useradd: Add setscene dep on pseudo-nativeJate Sujjavanich
A recipe will sometimes be rebuilt unnecessarily if it adds users via useradd and the pseudo-native task has not been populated. This patch adds the correct dependency. Signed-off-by: Jate Sujjavanich <jatedev@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29package: Correct two typos in a commentPeter Kjellerstedt
This quite coincidentally invalidates the sstate for do_package which is needed due to the correction of oe.utils.multiprocess_exec(). Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29testimage: Add parselogs to the default tests for sato imagesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29classes/cpan_build.bbclass: add EXTRA_CPAN_BUILD_FLAGSTim Orling
Some packages have additional configuration options that are currently not accessible through cpan_build.bbclass. Similar to cpan.bbclass, add EXTRA_CPAN_BUILD_FLAGS to pass the optional parameters to perl Build.PL. Signed-off-by: Tim Orling <TicoTimo@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28populate_sdk_base: Remap TOOLCHAIN_HOST_TASK variableRichard Purdie
Currently this variable isn't passed through the magic rename mangling. This means that if you try adding "nativesdk-eglibc" to an image directly, you can't since the package is renamed by debian.bbclass and nothing sees the renaming. This is annoying since I wanted to exactly that. This code change passes it through the standard renaming function, the tricky part is that we have to set PKGDATA_DIR to point to the correct sysroot during the call. We create a copy of the datastore for the purposes of the call to do this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28cpan.bbclass: matches more linesRobert Yang
Fixed: - There might be a space between "#!" and "/pat/to/usr/bin/perl", e.g.: "#! /usr/bin/perl", now also matches it. - There might be the lines like the following in the body: eval 'exec /path/to/usr/bin/perl-native/perl -S $0 ${1+"$@"}' Now we only check "#! */path/to/usr/bin/perl" to make sure it is a perl script, but match and fix the lines in both header and body. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28sstate: Add extra intercept functionsRichard Purdie
In some cases we do either need to add extra sstate manipulation functions, or change the existing modification functions. This patch parametrises them to SSTATECREATEFUNCS and SSTATEPOSTUNPACKFUNCS and abstracts the "hardcoded path" functions into separate functions using these new variables. We may use this new functionality to improve binary relocating using patchelf for example, this at least lets us have the hooks to be able to experiment. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27classes/testimage.bbclass: add more fields to the sdk TestContextCorneliu Stoicescu
In order to use hasFeature and hasPackage methods in sdk test modules, we need specific fields to be set in the TestContext object. Adding pkgmanifest, imagefeatures and distrofeatures to the TestContext. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27classes/populate_sdk_base.bbclass: add a manifest for target sdkCorneliu Stoicescu
Similar to the way BSP images have rootfs a manifest, the toolchain now also has a manifest file created alongside the sdk image. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27archiver.bbclass: add revision to git tarfile nameJoe Slater
When archiving original source, insert the first 10 characters of srcrev, after stripping off any AUTOINC+, into the filename for tarfiles created from directories. Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27native/nativesdk: Clear MACHINEOVERRIDESKhem Raj
In cases where we override variables e.g PACKAGE_ARCH conditionally and use a MACHINEOVERRIDE to qualify the override like PACKAGE_ARCH_<MACHINE> = "some target PACKAGE_ARCH" This would also be effective if this recipe is BBEXTENDED to native or nativesdk which is undesired This particular issue will cause wrong sysroot to be used for nativesdk case since PACKAGE_ARCH would have been modified and eventually changing value of STAGING_DIR_TARGET which we use as --sysroot option to cross and cross-canadian built SDK gcc Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27sanity: refactor mirrors checks to be more pythonicChristopher Larson
- Use clearer variable names - Use variable unpacking to reference elements by name rather than index - Sacrifice a small amount of time (iterate over protocols twice per entry rather than once) for clarity: use readable generator expressions with any() rather than maintaining state. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27sanity: fix support for regex schemes in mirrors checkChristopher Larson
Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27sanity: handle both \n and \\n in mirror varsChristopher Larson
Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-25buildhistory: Restore parsing time optimalizationMartin Jansa
* it was added in: http://git.openembedded.org/openembedded-core/commit/meta/classes/buildhistory.bbclass?id=540a2a30be21c3eca4323efbe91e7dcfc31a4c97 * then accidentally removed in: http://git.openembedded.org/openembedded-core/commit/meta/classes/buildhistory.bbclass?id=6db6c74f2876df7a183990426bb4262972966441 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23package: Disable runtime mapping of RPROVIDES/RCONFLICTS/RREPLACESRichard Purdie
It doesn't really make sense to run the remapping code on these variables. If specific renaming is needed, it should be applied manually. This means that the debian RPROVIDES of the original package name can be preserved. There was also a bug report about this on the OE-Core mailing list recently where someone else ran into this problem too. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23package: Don't remap names in packagegroup recipesRichard Purdie
For package groups, use the original package names and don't use the remapped (e.g. debian) naming. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23debian: Set RPROVIDES to include the original packagename when renamingRichard Purdie
Currently its hard for a packagegroup recipe to depend on something who's name can change unpredictably. We therefore add in RPROVIDES for the original package name so that these are also available to use as dependencies. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23allarch: Add warning about packagegroupRichard Purdie
Since we want to start including this class conditionally, detect cases where packagegroup files use the old ordering and inform the user they need to update this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23packagegroup: Make allarch inherit conditionalRichard Purdie
Make the allarch inherit conditional on PACKAGE_ARCH being left as all. The one downside to this approach is that recipes need to set PACKAGE_ARCH *before* inheriting the class in order to avoid the inherit. The advantage is that we could start to detect the use of the allarch inherit in the sstatesig code for improved task checksums. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23sanity.bbclass: check the format of MIRRORSRobert Yang
Check the format of MIRRORS, PREMIRRORS and SSTATE_MIRRORS: * Each mirror shoudl contain two memebers. * The local "file://" url must use absolute path (file:///). * The protocol must in protocols list. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23sanity.bbclass/kernel.bbclass: minor fixesRobert Yang
Fixed: - Remove an unused line - Remove unneeded code after d.getVar(), we don't need the "or ''" after d.getVar() unless we need a string. - typo: PREMIRROS -> PREMIRRORS. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23libc-common.bbclass: rename ALL the packagesPeter Seebach
The DEBIAN_NAMES feature renames some of the libc packages to "libc6*" names --but only some. A previous patch added the -dbg package. However, this doesn't cover other packages (such as the -doc package), and it didn't take multilibs into account. Signed-off-by: Peter Seebach <peter.seebach@windriver.com> Signed-off-by: Jeff Polk <jeff.polk@windriver.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23bitbake.conf/debian.bbclass: Move AUTO_LIBNAME_PKGS definition to class fileRichard Purdie
Might as well move this default to the class which uses it allowing for easier reading/understanding of the class. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23package.bbclass: Fixup for using common functionRichard Purdie
We may as well use the common function for this rather than duplicating the code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23archiver: delete the tail slash in directory nameJian Liu
If directory names in SRC_URI ended with "/", function do_ar_original() in layers/oe-core/meta/classes/archiver.bbclass will generate a tar file whose name is ".tar.gz". So delete the "/" at the tail of the directory names before use the names. Signed-off-by: Jian Liu <jian.liu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23kernel: Prevent from installing so files into source dirYang Shi
vdso build could generate so files, avoid installing such so files into kernel source dir, otherwise the below package QA error might be hit: ERROR: QA Issue: File '/usr/src/kernel/arch/x86/vdso/vdso64.so' from linux-yocto was already stripped, this will prevent future debugging! [already-stripped] Signed-off-by: Yang Shi <yang.shi@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23classes/autotools: avoid error if recipe is first in task dependency treePaul Eggleton
If the recipe being built is listed first in BB_TASKDEPDATA (i.e. item 0) this is still valid and should not trigger an error. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-18classes/sstate: ensure do_package_qa_setscene doesn't pull in ↵Paul Eggleton
do_package_setscene If we have done do_package_qa_setscene we do not also need do_package_setscene. This means we can again for example rebuild an image without needing do_package sstate packages to be present. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-18buildhistory: rename build-id to build-id.txt and add more infoMartin Jansa
* use .txt extension like other reports (e.g. image-info.txt) it's also useful when looking at the file from web server which doesn't have text/plain as default content-type * include whole BUILDCFG_HEADER/BUILDCFG_FUNCS instead of just layer info * this makes it easier for distro to include more fields without the need to modify buildhistory.bbclass * currently it adds following fields: Build Configuration: BB_VERSION = "1.23.1" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "Gentoo-2.2" TARGET_SYS = "x86_64-oe-linux" MACHINE = "qemux86-64" DISTRO = "shr" DISTRO_VERSION = "2013.07-next-20140725" TUNE_FEATURES = "m64 core2" TARGET_FPU = "" Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-18meta/classes/testimage.bbclass: add testsdk task and enable functionality ↵Corneliu Stoicescu
for it. - add new testsdk task for meta-toolchain testing. - enable the get_tests_list method to work with sdk tests. - add default TEST_SUITES value for meta-toolchain package NOTE: Original patch made by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-17chrpath: Drop warning from darwn buildsRichard Purdie
This was old debug which can safely be removed for less noisy builds. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-16crosssdk: Clear MACHINEOVERRIDESRichard Purdie
Without this, things like arm* can make it into OVERRIDES when we're building a compiler to build binaries for another architecture like x86. This can can lead to build failures dependning on the exact configuration and overrides. For example: MACHINE=imx53qsb bitbake gcc-crosssdk-initial-x86_64 -e | grep EXTRA_OECONF was showing an armv7 configuration option to gcc. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15image.bbclass: image_types.bbclass is a mustRobert Yang
The image_types.bbclass is a must since we use this in image.bbclass: [snip] python () { deps = " " + imagetypes_getdepends(d) d.appendVarFlag('do_rootfs', 'depends', deps) [snip] The imagetypes_getdepends() is defined in image_types.bbclass. Use "+=" to replace "?=" since it is a must, so that the user can use "IMAGE_CLASSES = foo.bbclass" in local.conf to add their own image class. NOTE: the IMAGE_CLASSES_append = " foo" doesn't work since we use this in image.bbclass: IMAGE_CLASSES += "image_types" inherit ${IMAGE_CLASSES} I think that it is because inherit takes effect before append? Another way to fix the problem is: IMAGE_CLASSES ?= "" inherit image_types ${IMAGE_CLASSES} But it seems that we need another name for IMAGE_CLASSES, for example IMAGE_CLASSES_EXTRA, and also need update the doc, which would make it complicated. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15Support image type "squashfs-lzo"Mike Looijmans
Add "squashfs-lzo" to the image types. LZO compression support has been in both kernel and squashfs tools for many years, but OE never enabled it. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>