aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2015-07-15insane.bbclass: make package_qa_clean_path return a relative pathrbt/buildpathRobert Yang
Make package_qa_clean_path() return something like "work/path/to/file" rather than "/work/path/to/file", the relative path is a little clear. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2015-07-15insane.bbclass: fix package_qa_check_buildpathsRobert Yang
* Ignore elf files because they usually contain build path: - The path of the source file such as .c, these are usually happen when separate B and S since we use absolute path to run configure script, and then VPATH in Makefile will be an absolute path and contains build path, we can use relative path in autotools.bbclass to fix the problem, but we don't have to since they are harmless. - The configure options such as "configure --with-libtool-sysroot" - The compile options such as "gcc --sysroot" These are harmless usually, so ignore elf files. * Ignore "-dbg" and "-staticdev" package since symbols and .a files usually contain buildpath. * Ignore .a files too since they contain buildpath, this mainly for ignoring: glibc-2.21: glibc-dev/usr/lib/libc_nonshared.a libgcc-4.9.3: libgcc-dev/usr/lib/x86_64-poky-linux/4.9.3/libgcc_eh.a gcc-runtime-4.9.3: libssp-dev/usr/lib/libssp_nonshared.a * Use full path rather than package_qa_clean_path() when report issue, this makes it easier to find the file and fix the problem. Then we will verify other warings and fix one be one. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2015-07-12classes/sstate.bbclass: Improve checkstatus using connection cache.Aníbal Limón
Use FetcherConnectionCache to improve times when do checkstatus over sstate resources. [YOCTO #7796] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-12classes/logging: make shell message functions output to the consolePaul Eggleton
Use the FIFO that is now set up when executing tasks within BitBake to make bbdebug/bbnote/bbwarn/bbplain/bberror/bbfatal output to the console through BitBake's UI (as their python counterparts do) instead of only outputting to the task log. Note that this requires the corresponding change in BitBake that creates the FIFO; without it such messages will end up in a file where the FIFO should have been (but won't cause any other ill effects). Remainder of the fix for [YOCTO #5275]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12archiver.bbclass: add do_deploy_all_archivesPatrick Ohly
When working specifically on source archiving, it is useful to trigger that for all recipes required by something like an image recipe, without actually having to build that. "bitbake -c deploy_all_archives <target>" does that now. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12populate_sdk_base.bbclass: don't inherit toolchain-scripts.bbclassRobert Yang
Fixed when enable multilib: require conf/multilib.conf MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "x86" $ bitbake core-image-minimal No lib32 package should be built since we don't build lib32-core-image-minimal, but a lot them are built: lib32-opkg-utils lib32-cryptodev-linux lib32-sqlite3 lib32-libtool-cross lib32-ncurses lib32-db lib32-diffutils lib32-zlib lib32-gcc-cross-i686 lib32-gcc-cross-initial-i686 lib32-flex lib32-libgcc-initial lib32-libffi lib32-linux-libc-headers lib32-expat lib32-openssl lib32-glibc lib32-binutils-cross-i686 lib32-gcc-runtime The are introduced by toolchain-scripts.bbclass' anonymous function (the MULTILIB_VARIANTS), but it doesn't need toolchain-scripts.bbclass, in fact, so remove it to fix the problem. [YOCTO #7961] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12oeqa/sstatetests: Add NATIVELSB sstate signature equivalence testRichard Purdie
The sstate checksums should be independent of whichever NATIVELSBSTRING is detected. Add an automated QA test which tests this using bitbake -S. To make this possible, we need to be able to override the value of NATIVELSBSTRING so make a small change to allow this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-09testimage: Add support for test suites manifest fileszjh
Allow the list of TEST_SUITES to be read from a list of manifest files in the TEST_SUITES_MANIFEST variable. [YOCTO #7848] Signed-off-by: zjh <junhuix.zhang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-09testimage: Support full TC path such oeqa.runtime.pnp.get_memory_size in ↵zjh
TEST_SUITES If a TC name start with "oeqa", it is thought as a full TC path. if not, follow original logic (assume under oeqa.runtime) For example: TEST_SUITES = "oeqa.runtime.pnp.get_memory_size oeqa.runtime.sanity.reboot" will run these two case when bitbake -c testimage [YOCTO #7834] Signed-off-by: zjh <junhuix.zhang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-08report-error: expand all variablesRoss Burton
BUILDNAME is now composed from ${DATE} and ${TIME} so needs to be expanded to useful. Whilst fixing this some other variables were explicitly not expanded for no clear reason, so expand those too. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-07image_types.bbclass: add support for multiple ubi sizesPushpal Sidhu
Add new FSTYPE called 'multiubi'. This new type has the ability to create multple ubi's, something that's extremely useful on boards that can include varying flash sizes (e.g. 256MB vs 2GB). Because we don't want to reuse code, I extracted the mkfs and ubinize commands out to a new function that will handle the creation of both multiple ubi's, as well as the 'ubi' FSTYPE (so as not to break current boards). Due to the single processes nature of the OE when doing it's 'create_image', this new multiubi_mkfs function also creates it's own symlinks as well as cleans up it's own cfg file. Signed-off-by: Pushpal Sidhu <psidhu@gateworks.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-07image_types_uboot: remove the middle fileYue Tao
The .gz, .bz2 or .lzma are middle files for making gz.u-boot, bz2.u-boot, or lzma.u-boot. It should be removed once the final image is generated. Otherwise, even RM_OLD_IMAGE = 1, it can't be removed, moreover more and more middle files are genrated via 'bitbake *-image' Signed-off-by: Yue Tao <Yue.Tao@windriver.com> Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-07multilib_global: expand multilib pref values properlyChristopher Larson
This ensures that in cases where the preference value changes when the multilib override is applied, we correctly expand it in that context. For example, for `PREFERRED_PROVIDER_${TARGET_PREFIX}gcc = "gcc-external-cross-${TARGET_ARCH}"`, when it sets the prefixed version of this, we want TARGET_ARCH expanded with the multilib applied, otherwise the arch suffix will be incorrect for that context. We ran into this trying to use preferences in meta-sourcery along with multilibs. We worked around it there via PNBLACKLIST, but this fix should still go into the core. Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-07grub-efi: Allow to use file name different from grub.cfg in GRUBCFGNicolas Guyomard
To generate a same image both in live image type and boot-directdisk image type and make boot-direct image boot directly on the rootfs partition without using an initramfs we need to have the ability to generate several grub.cfg files. Signed-off-by: Nicolas Guyomard <nicolas.guyomard@open.eurogiciel.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-07report-error.bbclass: Added file syncronization.Mariano Lopez
errorreport_handler would fail if several errors are triggered at the same time because of two proccess writting to the same file. This patch add the required syncronization to handle concurrent process. [YP #7899] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-07distrodata.bbclass: fix typo, Upsteam -> UpstreamAndre McCurdy
Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-02cmake bbclass: fix support for native buildsKoen Kooi
For native builds of recipes (e.g. mariadb-native) cmake *must* look outside of its sysroot to find the compiler, so instruct it to do so. Signed-off-by: Koen Kooi <koen.kooi@linaro.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-02sanity.bbclass: Check if /tmp is writableMariano Lopez
If /tmp can't be written, bitbake gaves an unrelated error. This checks if /tmp can be written in every build. [YOCTO #7922] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-02bootimg bbclass: don't hardcode 'bzImage' nameKoen Kooi
In the EFI case there are 2 more architectures besides x86(_64) that may use this class: aarch32, which tends to use 'zImage' and aarch64, which uses 'Image'. Instead of hardcoding those values like the luvOS fork does, use the proper variable. Signed-off-by: Koen Kooi <koen.kooi@linaro.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-02cross.bbclass: delete package_qa taskRoss Burton
The package_qa task isn't required for cross builds, so delete it along with the other packaging tasks to match native.bbclass. [ YOCTO #7934 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-01bootimg.bbclass:hddimg: check the size of rootfs.img for hddimgRobert Yang
The hddimg uses FAT, so the single file size should be less than 4GB, otherwise errors, check that and error out. Another way might be use ext2/3/4 rather than FAT, but EFI only supports FAT, if we make EFI use FAT, and non-EFI use extX, that would the code very different, which seems not worth. [YOCTO #6449] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-01bootimg.bbclass:iso: use mkisofs -iso-level 3 for large isoRobert Yang
There will be problems when rootfs.img is larger than 4GB: mkisofs: Value too large for defined data type. File /path/to/iso/rootfs.img is too large for current mkisofs settings - ignoring And will get a wrong iso. Check the size of ${ISODIR}/rootfs.img, use mkisofs -iso-level 3 when it exceeds 3.8GB, the specification is 4G - 1 bytes, we need leave a few space for other files. [YOCTO #6449] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-01cpan_build.bbclass: remove libmodule-build-perlRobert Yang
There is no such a package in perl 5.22.0. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2015-06-27testimage: Don't test xorg/vnc on qemuarm64Richard Purdie
The qemuarm64 machine doesn't have graphics so don't test xorg/vnc as they won't work. [YOCTO #7103] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27buildhistory.bbclass: Create a files-in-<pkg>.txt containg recipe's pkg filesLeonardo Sandoval
A file similar (in format) to files-in-image.txt is created for each recipe's build package. This would allow to easily see what the recipe's package may install when including it into an image. These files reside on the specific buildhistory recipe package (i.e. buildhistory/packages/i586-poky-linux/busybox/busybox-dev/files-in-busybox-dev.txt for busybox-dev package) [YOCTO #5870] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27populate_sdk_base.bbclass: use pbzip2 to compress SDK tarfilesAndre McCurdy
Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27image_types.bbclass: use pbzip2 for images requiring bz2 compressionAndre McCurdy
Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26testimage: Handle ipk/deb packaging format tests correctlyRichard Purdie
The default test list only works for rpm packaging. This fixes it for deb and ipk too. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-26sanity.bbclass: check /bin/sh is dash or bashRobert Yang
The build would fail when /bin/sh links to ksh or csh, we only test dash and bash AFAIK. * When /bin/sh -> csh: $ bitbake quilt-native $ bitbake quilt-native -cfetch Illegal variable name. Illegal variable name. [snip] uname: extra operand `2' Try `uname --help' for more information. * When /bin/sh -> ksh: If there are only a few tasks running, for example, "bitbake quilt-native", the build would be OK, but it would fail if we run "bitbake world" for a while, there would be a lot of "Broken pipe" errors: Exception: CalledProcessError: Command 'cd /path/to/xx; find . -type d -print | tar -cf - -C /path/to/sysroot-destdir -p --files-from - --no-recursion | tar -xf - -C /path/to/xxx' returned non-zero exit status 2 with output tar: This does not look like a tar archive tar: Exiting with failure status due to previous errors find: `standard output': Broken pipe find: write error [YOCTO #7917] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26toolchain-scripts: fix for multilibRobert Yang
Use MLPREFIX to fix: | cat: /path/to/sysroots/lib32-qemux86-64/sysroot-providers/virtual_libc: No such file or directory [YOCTO #7924] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26oe/utils.py: Add support for init/end helper functions in ThreadWorker.Aníbal Limón
Add init/end helper functions for ThreadWorker also pass ThreadWorker as first argument to init/end/func functions this enables per-thread storage handling. classes/sstate.bbclass: Add thread_worker argument to checkstatus function. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26oe/utils.py: Fix thread leakage in ThreadPoolAníbal Limón
In order to fix Thread leakage caused by not call join() in Threads, Pass num_tasks in ThreadPool for add all the tasks into a Queue this enable catch of Queue.Empty exception and exit the threads. classes/sstate.bbclass: Change checkstatus function to match new ThreadPool operation. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23toolchain-scrpts: Fix sitecache issues with multilibRichard Purdie
The use of TCLIBC in TOOLCHAIN_NEED_CONFIGSITE_CACHE is problematic since a multilib may have both uclibc and glibc for different multilibs yet switching between them doesn't change TCLIBC. This would result in "lib32-glibc" being attempted when lib32 was actually uclibc. The fix here is to use the virtual providers which bitbake switches to point correctly at the right things. This does mean we need to resolve virtual providers but we can do this using sysroot-providers. [YCOTO #7607] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23staging: Strip files in sysrootRichard Purdie
Add functionality to strip binaries/libraries going into the sysroot. Whilst this does fractionally slow down the build, it also significantly reduces the size of the sstate cache files. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23meta: Add explict getVar param for (non) expansionRichard Purdie
Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23distutils-common-base: add to, don't set, FILES_${PN}Joshua Lock
If we set FILES_${PN} and a recipe inherits other classes that modify FILES_${PN} *before* distutils-common-base is included, any changes to FILES_${PN} made by those classes are lost. Instead, append the additional directories we want to include in FILES_${PN} Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23image-live: Set syslinux timeout to 5sEd Bartosh
Increased syslinux timeout to 5s as default 1s timeout is not enough to notice syslinux prompt on some devices. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-23Revert "distrodata: Remove unnecessary include of package_regex.inc"Ross Burton
Instead of asking the user to include a number of configuration files, the class can do this. Next step is to fix the documentation. This reverts commit 2a4ee94667d4d356cad2ca6d60a100a30c92737b. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23insane.bbclass: fix false negative in build-deps QA checkPatrick Ohly
When a recipe called 'foobar-test' links against 'foobar' without listing that in DEPENDS, the build-deps check misses that error because it looks for 'foobar' in a package string containing (among others) the 'foobar-test' name, leading to the incorrect conclusion that the package is listed as dependency. The 'packages' string needs to be split into individual package names before the check. Doing that once directly after reading the value is more efficient than splitting inside package_qa_check_rdepends() because the caller also needs the individual components. Also use a set to speed up the 'package in packages' check. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23copyleft_filter.bbclass: Allow to filter on nameMariano Lopez
The archiver uses a license based filter to provide the source code. This patch allows to search on name based on two new variables (COPYLEFT_PN_INCLUDE, COPYLEFT_PN_EXCLUDE). Both variables are empty by default. The filter by name has higher priority than the license filter. [YOCTO # 6929] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23base.class: warn for invalid PACKAGECONFIGRobert Yang
There may be typos or out of date values in PACKAGECONFIG, check and warn them. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23logging.bbclass: avoid bashism in bbdebug()Patrick Ohly
Checking the bbdebug() debug level parameter with a regular test expression only works in bash. Using tr to filter out digits and then checking whether anything is left achieves the same result and is more portable. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23distutils: regenerate pyc files after being modified by sedAlejandro Hernandez
py files are edited by sed and therefore *.pyc files are recreated on first boot, but if you have a read-only filesystem this is not possible. This patch creates pyc files directly after the py files are modified. [YOCTO #7722] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Thomas Roos <roosesweb@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-18classes/externalsrc: handle tasks with existing lockfilesPaul Eggleton
We need to ensure we add a leading space to the value we are prepending here in case lockfiles already has a value. Fixes [YOCTO #7813]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-06-16packagedata: Fix to ensure variables expand correctlyRichard Purdie
If we set unsuffixed variables here there is a chance they could clobber override versions of that variable, e.g. DESCRIPTION could clobber DESCRIPTION_<pkgname>. We therefore don't clobber for the unsuffixed variable versions by using the parsing flag to setVar. This becomes a problem with the modifications to bitbake to have continual expansion of the datastore, its about the one place this turns out to be problematic. The parameter to setVar works with current bitbake even though we don't have the new API since it gets swallowed by the logging code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-16multilib_global: Stop empty space influencing RPROVIDESRichard Purdie
If the resulting RPROVIDES is empty, don't set it. This streamlines pkgdata slightly removing empty values and avoids other errors which confuse the datastore when the variable is best left unset. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-11package_ipk/deb/rpm: Improve OVERRIDES handlingRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-11cmake: extend CMAKE_MODULE_PATH instead of settingRoss Burton
Some (e.g. piglit) CMakeList.txt files will extend CMAKE_MODULE_PATH before calling project(), which is when the toolchain.cmake file is parsed. In this situation the CMAKE_MODULE_PATH is overwritten, so handle this by appending in toolchain.cmake instead of assigning. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11multilib.bbclass: use package_qa_handle_errorRobert Yang
Use package_qa_handle_error to handle the QA issue. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2015-06-11update-rc.d.bbclass: add MLPREFIX when set RRECOMMENDSRobert Yang
Fixed when build with multilib: WARNING: Multilib QA Issue: lib32-alsa-state package lib32-alsa-state - suspicious values 'update-rc.d' in RRECOMMENDS WARNING: Multilib QA Issue: lib32-modutils-initscripts package lib32-modutils-initscripts - suspicious values 'update-rc.d' in RRECOMMENDS WARNING: Multilib QA Issue: lib32-init-ifupdown package lib32-init-ifupdown - suspicious values 'update-rc.d' in RRECOMMENDS WARNING: Multilib QA Issue: lib32-xserver-nodm-init package lib32-xserver-nodm-init - suspicious values 'update-rc.d' in RRECOMMENDS WARNING: Multilib QA Issue: lib32-sysklogd package lib32-sysklogd - suspicious values 'update-rc.d' in RRECOMMENDS Signed-off-by: Robert Yang <liezhi.yang@windriver.com>