aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2016-02-17image/populate_sdk: seprate variables to fix dependencyChenQi/YP8670Chen Qi
Previously, do_rootfs depends on variables like SDK_OS, SDK_OUTPUT, etc. And changing variables like POPULATE_SDK_POST_HOST_COMMAND doesn't cause do_populate_sdk to rerun. This patch separates variables so that do_rootfs and do_populate_sdk could correctly depend on their related variables. [YOCTO #8670] Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
2016-02-16lib/qa.py: raise ValueError if file isn't an ELFRoss Burton
Instead of raising a generic Exception that can't be handled specifically, raise a ValueError. Also update the callers so any unexpected exceptions are not ignored. Also, rename isBigEngian() to isBigEndian(). Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-16sstate: Add ca-certificates-native to postinst recipes listMing Liu
Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15buildhistory.bbclass: remove out-dated information on requestPatrick Ohly
buildhistory.bbclass by design is incremental: each build adds or updates information. Information is never removed. Sometimes it can be useful to reduce the information only to those recipes that were build during a specific bitbake invocation, for example when the invocation does a full world build. This is now possible by setting BUILDHISTORY_RESET as explained in the modified class. The comment on the variable also mentions the caveats associated with using this mode. In this mode, buildhistory.bbclass first moves all existing information into a temporary directory called "old" inside the build history directory. There the information is used for the "version going backwards" QA check. Then when the build is complete and before (potentially) committing to git, the temporary directory gets deleted. Because information that has not changed during the build will be reconstructed during full world rebuilds, a git log will then only show real updates, additions and removals. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15classes/buildhistory: fix for python function parsing changePaul Eggleton
Variable expressions are no longer expanded in python functions as of BitBake commit 8bf33a8e92c0e188fa392030025756196c96fcbb, so we've now got to do this explicitly here. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15insane: Add --disable-static to UNKNOWN_CONFIGURE_WHITELISTRichard Purdie
With the addition of a common class passing in this option, add it to the list of standard "unknown" configure options which are known about. Its not interesting/productive to go and update every recipe to handle this flag. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-13buildhistory: Fix regex to handle versions without spacesRichard Purdie
Its valid to have dependencies like XXX (=2.1) without spaces, as injected by debian.bbclass. The code was breaking these into separate components and destroying them so improve the regex to handle them. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-13debian: Fix superfluous setting for RPROVIDESRichard Purdie
PKG_ can be set to something like ${MLPREFIX}<name> and the lack of expansion here means the case where MLPREFIX is empty leads to a bogus RPROVIDES. Use expansion of the variable to avoid this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-13autotools: Fix interaction with bitbake -bRichard Purdie
If you run bitbake -b on something using autotools with dependencies on m4 files, it currently fails as the TASKDEPDATA is incomplete for bitbake -b and this means the relevant macros aren't found. Work around this by adding *all* m4 files for the -b case (and show a warning). [YOCTO #8890] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-13autotools: Correct dependency search logic errorRichard Purdie
We go to the effort of finding the value of start, we should then use it rather than relying on the value of dep being preserved from the previous loop. Took me far too long to notice this issue when changing the code. Also drop an unused variable. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-12base.bbclass: fix support for gitsm://Patrick Ohly
Before the "Improve handling of SRCPV" change, gitsm SRC_URI entries were merely missing a dependency on git for do_fetch. But after that change, the special handling for "needsrcrev" was not applied, leading to a fetcher error (older bitbake) or even a parse error (recent bitbake). Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11classes/testsdk: do_testsdkext avoid STAGING_DIR/BASE_WORKDIR in PATHAníbal Limón
The inclusion of STAGING_DIR/BASE_WORKDIR in PATH is contaminating the environment, i.e. when try to sanity check perl (check_perl_modules) it takes perl from STAGING_DIR causing eSDK install to fail. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11classes/sanity: check_perl_modules provide output when failAníbal Limón
When check_perl_modules fail is a good idea to print perl interpeter output for debug purposes. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11classes/externalsrc: create symlinks for workdir and logsPaul Eggleton
Auto-create symlinks in the source directory to the work directory (${WORKDIR}) and logs directory (${T}) so that they are easier for the user to find. This is particularly useful within the extensible SDK where the user is less likely to be familiar enough with the structure of the build system to know where to find these things, but otherwise they are a useful shortcut for anyone. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11classes/externalsrc: disable rm_work when activePaul Eggleton
If you're using externalsrc, it's very likely that you're going to want to examine the intermediate build results even if the recipe builds successfully; therefore you won't want rm_work to delete those. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11uninative.bbclass: capture stdout/err from patchelf-uninativePatrick Ohly
When patchelf-uninative fails, reporting only the exit code as done by subprocess.check_call() is not enough to understand the problem. We also need to capture and report the output of the command. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11image_types_uboot: add cpio.gz.uboot to supported IMAGE_TYPESArnold Csorvasi
U-Boot needs the U-Boot header in a ramdisk image to boot it. Add this header to the cpio.gz image, so that it can be booted with U-Boot. Signed-off-by: Arnold Csorvasi <arnold.csorvasi@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-11insane.bbclass: Support MicroBlaze with muslNathan Rossi
MicroBlaze is supported by musl, add entries for the 3 variants. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-11buildstats.bbclass: remove dead URL from commentRandy MacLeod
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-11sign_package_feed.bbclass: fix task dependenciesMarkus Lehtonen
This dependency was already added to sign_rpm.bbclass. However, the same dep needs to be added to sign_package_feed.bbclass, too, to cover the case where rpm signing is disabled but package feed signing is enabled. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-11classes/useradd: handle whitespace only USERADD/GROUPADD/GROUPMEMSMaciej Borzecki
Useradd attempts to add users/groups even when {USERADD,GROUPADD,GROUPMEMS}_PARAM is whitespace only. This scenario is possible when variables and modified using one of +=, =+ operator, yet the content being added is conditional (i.e. may depend on PACKAGECONFIG flags). Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10sstate: Ensure populate_lic sstate objects are cleanedRichard Purdie
do_cleansstate wasn't cleaning do_populate_lic sstate objects in the native/cross case since the wildcard path entry wasn't being cleared at the same time as the path extra prefix. Fix by clearing it at the same time. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10package_deb: Ensure allarch deb packages aren't target specificRichard Purdie
The use of TUNE_FEATURES was making do_package_write_deb of allarch packages target specific. To avoid this, only use the end value of DPKG_ARCH for its checksum, not intermediate values or variables. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10base: Make do_cleansstate nostampRichard Purdie
We always want the cleansstate task to run so it should be 'nostamp' like the other clean tasks. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10classes/testimage: Fix exportTests function.Aníbal Limón
With new structure of TestContext now holds suite and variable that contains unittest instances, it can't be exported using JSON causing and exception. Adds the suite variable for avoid export it. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-10classes/testsdk: Add help information on how to run tests.Aníbal Limón
Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-10oeqa/oetest: Fix compatibility SDK tests using eSDK.Aníbal Limón
When run SDK tests over eSDK we need to use SDKExtTestContext instead of SDKTestContext because if we use SDKTestContext search for SDK manifest and depends on the SDK manifest generation so populate_sdk needs to be executed. Adds a compatibility mode flag to SDKExtTestContext for search tests over sdk module instead of sdkext module and change testsdk calls to comply with this new param. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-10classes/populate_sdk_ext: Add SDK_EXT_TARGET_MANIFEST and SDK_EXT_HOST_MANIFESTAníbal Limón
Extensible SDK needs to point to the correct manifest so add SDK_EXT_TARGET_MANIFEST and SDK_EXT_HOST_MANIFEST variables. oeqa/oetest.py: Fix SDKExtTestContext for load the correct manifests. Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-10testsdkext: Add skeleton for support Extensible SDK tests.Aníbal Limón
oeqa/sdkext: Add module and __init__.py will contain eSDK tests. classes/testsdk: Add support for run eSDK tests. oeqa/oetest: Create oeSDKExtTest for now only inherit oeSDKTest, modified SDKExtTestContext now inherit SDKTestContext and set sdkext filesdir for store data fixtures. Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-10classes/testsdk: Add compatibility SDK testsuite to eSDKAníbal Limón
Extensible SDK is compatible with SDK test suite so it need to execute the same tests over it. Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-10classes/testsdk: Add function run_test_contextAníbal Limón
This helper functions will be serve as well to run extensible sdk tests so generalize it to get function context as arg. Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-10oetest.py/TestContext: Move loadTests and runTests inside it.Aníbal Limón
Method's for loadTests and runTests make sense to define inside TestContext because it can be different around Image, SDK, SDKExt. Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-10testimage/testsdk: Move get test suites routine inside TestContext.Aníbal Limón
In order to provide better abstraction move functions to get the test suite inside the TestContext. Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-10testimage/testsdk: Modularize TestContext.Aníbal Limón
Move anonymous duplicated class TestContext from testimage/testsdk to oeqa/oetest now we have two new classes ImageTestContext and SDKTestContext with common code in TestContext class. Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-10classes/testsdk: Add call to export_proxies on testsdkext.Aníbal Limón
Extensible SDK needs to use network and some networks requires proxies then export it. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-10classes/testsdk: Add testsdkext task only install.Aníbal Limón
Add task for test extensible sdk for now only install the SDK. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-10populate_sdk_ext: Set TOOLCHAINEXT_OUTPUTNAME.Aníbal Limón
This variable is needed by testextsdk to known the name of extensible sdk file generated. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-10classes/testimage: Add defeault inherit for testsdk.Aníbal Limón
For compatibility adds default inherit of the new class testsdk for now, we need to review the code base. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-10classes/testsdk: Add new class testsdk.Aníbal Limón
Moves all the testsdk code from testimage in order to have it's own class because new tests will be added for extensible SDK. The old paths for store logs "${WORKDIR}/testimage" and sdk "${WORKDIR}/testimage-sdk" was maintained for compatibility may be change to point testsdk after review the codebase. The dependency of QEMU was removed because isn't needed. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-10testimage: Modularize helper functions for get test lists.Aníbal Limón
Test lists functions can be used in other parts so modularize it and move to oeqa/oetest.py library. Testimage class was updated to meet the new sign of the functions. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-10bitbake.conf/base: Improve handling of SRCPVRichard Purdie
If SRCPV is set, it can be expanded when SRC_URI doesn't support it leading to errors. Avoid doing this by setting it only when it makes sense. This patch depends on the bitbake python expansion patch series. [YCOTO #7772] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-07image_types.bbclass: Embed IMAGE_NAME in ubinize config fileDrew Moseley
When using the FSTYPE multiubi, make sure that each image build has a unique config file. Without this there is a race condition when building multiple images in a single bitbake command which results in errors similar to: ERROR: Error: The image creation script 'blah/tmp/work/blah/core-image-base/1.0-r0/temp/create_image.multiubi' returned 1: iniparser: cannot open ubinize_normal.cfg ubinize: error!: cannot load the input ini file "ubinize_normal.cfg" mv: cannot stat 'ubinize_normal.cfg': No such file or directory WARNING: blah/tmp/work/blah/core-image-base/1.0-r0/temp/create_image.multiubi:1 exit 1 from mv ubinize${vname}.cfg blahtmp/deploy/images/blah/ Signed-off-by: Drew Moseley <drew_moseley@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-07toolchain-scripts: drop PYTHONHOMEChristopher Larson
If this is set when nativesdk-python is not installed, it will break the host python, so it's better to handle this in python. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-06uninative: Improve error handlingRichard Purdie
We need to improve the error handling here, things were breaking and yet the user wasn't seeing the issues. We need to skip libraries as we process the files. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-06populate_sdk_ext: Make populate_sdk_ext depend on sdk_extra_confRandy Witt
If a user changes sdk_extra_conf, it should cause populate_sdk_ext to run. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-06populate_sdk_ext: Add support for a "minimal" typeRandy Witt
If the user sets the SDK_EXT_TYPE variable to "minimal" then the sdk won't contain any sstate. The sstate can come from an sstate mirror and be installed on demand as usual. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-06populate_sdk_ext: Don't set sdk_update_targets in the configRandy Witt
sdk_update_targets isn't used by any code, so there is no reason to set it. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-06toolchain-scripts.bbclass: Use PYTHONPATH instead of PYTHONHOMERandy Witt
In the extensible sdk it was originally intended that the native sstate would always be setscened as part of the sdk installation. However, the soon to come "minimal" sdk won't do that. A side effect of that is that pointing PYTHONHOME at the native sysroot within the "bitbake workspace" won't work. For now only set PYTHONPATH instead and continue using the python that comes from buildtools. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-06bitbake.conf/native/nativesdk: Set PKG_CONFIG_SYSTEM_ at top levelRichard Purdie
Setting PKG_CONFIG_SYSTEM_{HEADERS/INCLUDE}_PATH for nativesdk isn't enough, we also need to deal with multlib cases where libdir from pkg-config-native isn't correct. Native builds are about the only case where this variable shouldn't be set. Therefore move the code from nativesdk to bitbake.conf and unexport it in the native case. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-05nativesdk: Set PKG_CONFIG_SYSTEM_ variablesRichard Purdie
When building nativesdk recipes, we noticed paths going into .pc files which should have been suppressed since these were standard library search paths. pkgconfig-native sets these variables to sane values for native recipes, we need it set to values for our specific library paths in the nativesdk case. Setting these values cleans up the .pc files and suppresses the paths. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>