summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* image: Avoid race over directory creationRichard Purdie2015-01-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a race over the do_package_qa task and the do_rootfs task since rootfs recreates a directory. This patch disables the task (which isn't used for images) to avoid the race: NOTE: recipe core-image-minimal-1.0-r0: task do_package_qa: Started NOTE: recipe core-image-minimal-1.0-r0: task do_rootfs: Started ERROR: Build of do_package_qa failed ERROR: Traceback (most recent call last): File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/bitbake/lib/bb/build.py", line 497, in exec_task return _exec_task(fn, task, d, quieterr) File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/bitbake/lib/bb/build.py", line 440, in _exec_task exec_func(func, localdata) File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/bitbake/lib/bb/build.py", line 212, in exec_func exec_func_python(func, d, runfile, cwd=adir) File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/bitbake/lib/bb/build.py", line 237, in exec_func_python os.chdir(cwd) OSError: [Errno 2] No such file or directory: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/build/tmp/work/qemumips-poky-linux/core-image-minimal/1.0-r0/core-image-minimal-1.0' (From OE-Core rev: 0550d112ad9c2ca9f8167dcae35200210923f2c5) (From OE-Core rev: 6becebfea6695d9feb968d5cfd14c54e4da200b3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* report-error: Handle the case no logfile existsRichard Purdie2015-01-061-3/+6
| | | | | | | | | | | | | If the task fails early, no error log may exist. Currently we crash in that case, this handles the situation more gracefully. (From OE-Core rev: 1e6bfcab47f532677f87683ba2f5e5fb905e9ba5) (From OE-Core rev: 8e52fea95441f88ab366c3c32b869cb30cc386b7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: do variable fixups even when FILES was setPeter Seebach2014-12-311-8/+10
| | | | | | | | | | | | | | | | | | | | | | | A number of settings (DESCRIPTION, SUMMARY, postinst, postrm, and appends to RDEPENDS) were made only if FILES_foo was not set for a given package. If you had a modified glibc packaging setup that was defining FILES_glibc-gconv-somelocale, this would prevent the automatic append of glibc-gconv as a dependency, because extra_depends was ignored. I think the assumption may have been that if FILES_foo was set, DESCRIPTION_foo and SUMMARY_foo would also be set, but it seems to me that the right answer is probably to set them if they aren't already set, and leave them alone if they are. (From OE-Core rev: 7e59b0c7e03fc08a6eaf9c8ccb6bfa72b4604cc5) (From OE-Core rev: 860e91dd7cfca6afd08d7c3c62e4653fca2b790c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Remove bashismKhem Raj2014-12-311-1/+1
| | | | | | | | | | | | | | | | | | | | | Fixes build on systems using dash for default shell e.g. errors like run.do_strip.25842: [[: not found | readelf: Error: Unable to read in 0x37 bytes of section headers | readelf: Error: Not an ELF file - it has the wrong magic bytes at the start Change-Id: I29cac15be44a02d75a3d6889b6ae9b2e19bf46af (From OE-Core rev: 6956ffdc6e9879e32360b6ee3a3d286618807485) (From OE-Core rev: 162996ed5a12786a2a5255ebafa15291bcc328cf) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: Populate cpio /init as symlinkNathan Rossi2014-12-311-1/+5
| | | | | | | | | | | | | | | | | | | | For cpio/ramfs the kernel will first attempt to execute /init and will emit the following error as the file is empty: Failed to execute /init (error -13) If /sbin/init exists symlink to it so the kernel can immediately start the correct init executable instead of an empty file. (From OE-Core rev: 3505558e067fdde4ab7aaaf3c50886f292d7c166) (From OE-Core rev: 40bf6d0d71bd534fadcbc07b6fbba856e50bc534) Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto.bbclass: fix shell syntax errorPaul Eggleton2014-12-311-1/+1
| | | | | | | | | | | | | | | Spaces aren't valid around = in an assignment statement (not even with bash). (From OE-Core rev: fb419b1a3f5dbc5e5019be9d09c4acdbeb460c19) (From OE-Core rev: 47f6432dbc4e5315bed15e073c4b1359c181d227) 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> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* compress_doc.bbclass: support update-alternativesHongxu Jia2014-12-311-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | While doc file make use of update-alternatives to fix confliction, we should reconfigure update-alternatives for doc compression. Such as util-linux-doc: ... update-alternatives --install /usr/share/man/man1/last.1 last.1 /usr/share/man/man1/last.1.util-linux 100 ... was updated by doc_compress to ... update-alternatives --install /usr/share/man/man1/last.1.bz2 last.1.bz2 /usr/share/man/man1/last.1.util-linux.bz2 100 ... (From OE-Core rev: ba4dd1afc2476259eff52f8a68fba1344e0f0474) (From OE-Core rev: 972b8a14e65c544082806d8bcc38195b27345a89) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* metadata_scm: Fix crash due to uncaught python exceptionMerten Sach2014-12-311-1/+1
| | | | | | | | | | | | | | | | | | | | Function base_get_metadata_svn_revision was crashing due to an uncaught IndexError exception. The except notation without parentheses is legacy syntax. It is the equivalent to 'except IOError as IndexError' which is not what we want here. The change catches both exceptions. (From OE-Core rev: 33bea949bae54ddc89aa83cf07d7b1ee62e2b393) (From OE-Core rev: 4a3f37f7d004b196b9caeb558d3461452dd85edc) Signed-off-by: Merten Sach <msach@mailbox.tu-berlin.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Create empty key/value if not there for shlib_providerKhem Raj2014-12-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we use ASSUME_SHLIBS,e.g. ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation" then we end up with errors like below when using shlibs2 (dizzy+) File: 'package_do_shlibs', lineno: 216, function: package_do_shlibs 0212: dep_pkg = dep_pkg.rsplit("_", 1) 0213: if len(dep_pkg) == 2: 0214: lib_ver = dep_pkg[1] 0215: dep_pkg = dep_pkg[0] *** 0216: shlib_provider[l][libdir] = (dep_pkg, lib_ver) 0217: 0218: libsearchpath = [d.getVar('libdir', True), d.getVar('base_libdir', True)] 0219: 0220: for pkg in packages.split(): Exception: KeyError: 'libEGL.so.1' This is because the entry which is being populated does not exist so lets create it if its not already there. Change-Id: I9e292c5439e5d1e01ea48341334507aacc3784ae (From OE-Core rev: a64f81fcef42172f788cec7a63bb4672eac99f94) (From OE-Core rev: b143340700961f916e4a21da42b859ec014dd366) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd.bbclass: set PSEUDO_PASSWD consistent with root directoryPeter A. Bigot2014-12-311-0/+2
| | | | | | | | | | | | | | | | | | | | | When installing into a sysroot this class examines $D/etc/passwd for content, then invokes useradd to make changes. Under pseudo useradd attempts to look up user information in directories specified by $PSEUDO_PASSWD. For opkg multilib installs $D is not always the same as $IMAGE_ROOT, and the user might already be in the IMAGE_ROOT files, causing a failure during rootfs population. Fix this by ensuring the files pseudo looks at when doing useradd stuff are the same ones that useradd.bbclass will be manipulating. (From OE-Core rev: ec3417ad825c52f5137d38b91d8fcb4637a50f4c) (From OE-Core rev: 0b7e70aafdee68825f3c65bae89bde3e03a20de8) Signed-off-by: Peter A. Bigot <pab@pabigot.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: search both rootfs and native staging for passwd filesPeter A. Bigot2014-12-311-1/+3
| | | | | | | | | | | | | | | | | | | | | | When pseudo is configured to disallow fallback to the build host /etc/hosts and /etc/group, the selection of ${IMAGE_ROOT} for PSEUDO_PASSWD is insufficient as the necessary files will not be available until base-passwd has been installed and its pkg_postinst script run. Fall back to the ${STAGING_DIR_NATIVE} version of those files until the rootfs versions are available. (The native copies are never modified by the build; the ones in ${STAGING_DIR_TARGET} are updated and may contain settings not consistent with what would be created by post-install useradd/groupadd commands invoked in the image rootfs. (From OE-Core rev: 8c653bafaa32126c54400bb56b9a94f07cd33197) (From OE-Core rev: 185b38b5e9ae22e5ba66bd2edc54f3971a9c97cf) Signed-off-by: Peter A. Bigot <pab@pabigot.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts.bbclass: Export KCFLAGS to ensure sysroot is providedOtavio Salvador2014-12-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building the U-Boot the lack of a proper sysroot can trigger following error: ,---- | arm-poky-linux-gnueabi-ld.bfd: cannot find -lgcc | make[2]: *** [examples/standalone/hello_world] Error 1 | make[1]: *** [examples/standalone] Error 2 | make: *** [examples] Error 2 `---- Guillaume Fournier has posted a very complete analysis of the problem[1]. 1. https://lists.yoctoproject.org/pipermail/meta-freescale/2014-November/011270.html The use of KCFLAGS makes the build of U-Boot work out of box, now that it uses the Linux kernel build system. Reported-by: Guillaume Fournier <gfournier@brioconcept.com> (From OE-Core rev: 50437f9c187f1a884825a8d1ec12da47a5e58670) (From OE-Core rev: 68954e7e62b8b494168bf83fec517e751c679b21) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ncurses, busybox, cml1.bbclass: Fix menuconfig display corruptionJason Wessel2014-12-311-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously there was a change to the ncurses compile to make it more like the typical way it was compiled on a host system. This fixed a whole class of host machines, but masked the real underlying problem with the display corruption issues and menuconfig. The corner case that led to the discovery that the wrong curses.h file was getting used was when there was no curses libraries at all on one of the development hosts. What had happened before was that /usr/include/curses.h on the host system had to match closely enough to the curses.h in the sysroot and then linking against the sysroot version of curses.so was ok (meaning no display corruption). But on some systems with ncurses.h vs curses.h such as SuSE hosts, there were still issues. If we fix the root of the problem and force the mconf and lxdialog to use the correct headers and libraries from the sysroot there is no further issues and the menuconfig target works properly. It also means we can back out the custom compilation flags to the ncurses recipe because they are no longer needed. For the kernel part of the menuconfig / nconfig changes it will be merged separately and this is all based on: https://lkml.org/lkml/2013/3/3/103 (From OE-Core rev: 889e02659dd396feba24f0b0ee6b4043c3f3735a) (From OE-Core rev: b8bba551f96f7ff7c2eb772bbdc0b38ed2449683) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toaster.bbclass: read elapsed time from the stats fileAlexandru DAMIAN2014-12-311-13/+23
| | | | | | | | | | | | | | | | | We read the elapsed time fromt the build stats file, instead of computing it independently. [YOCTO #6833] [YOCTO #6685] (From OE-Core rev: 4f5a4ec0cdaf078463f04be4a6683816e9b78d5f) (From OE-Core rev: 9c1bc0c2e49e1e98edb17bf0f00077497dd26272) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: Make ubi depend on ubifsPascal Bach2014-12-311-0/+2
| | | | | | | | | | | | | | | The ubi command assumes the ubifs file is present. This makes sure this is really the case. (From OE-Core rev: 0a947408f32d7ab10d2004e7d9332296b82191a3) (From OE-Core rev: 0fff562384670b64ed207423b7f596c99baa71c4) Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd: don't add files and dependencies from units ConflictsRoss Burton2014-12-311-4/+1
| | | | | | | | | | | | | | | Adding dependencies and moving files based on Conflicts tags in unit files isn't right, mainly as it means that systemd depends on systemd-binfmt, because the latter ends up containing the shutdown.target unit. (From OE-Core rev: 02767aac492cedf6ccd02648b8e65751cc23c11c) (From OE-Core rev: 9884e4f872b9ff354832053c86842dd0d3b0c8b3) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib.bbclass/package_manager.py: fix <multilib>-meta-toolchain build failureHongxu Jia2014-12-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a failure to build lib32-meta-toolchain: ... |ERROR: lib32-packagegroup-core-standalone-sdk-target not found in the base feeds (qemux86_64 x86 noarch any all). ... In package_manager.py, the variable 'DEFAULTTUNE_virtclass-multilib-lib32' is used to process multilib image/toolchain. But for the build of lib32- meta-toolchain, the value of 'DEFAULTTUNE_virtclass-multilib-lib32' is deleted. In 'bitbake lib32-meta-toolchain -e', we got: ... |# $DEFAULTTUNE_virtclass-multilib-lib32 [2 operations] |# set? /home/jiahongxu/yocto/build-20141010-yocto/conf/local.conf:237 |# "x86" |# del data_smart.py:406 [finalize] |# "" |# pre-expansion value: |# "None" ... The commit 899d45b90061eb3cf3e71029072eee42cd80930c in oe-core deleted it at DataSmart.finalize ... Author: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Tue May 31 23:52:50 2011 +0100 bitbake/data_smart: Change overrides behaviour to remove expanded variables from the datastore ... We add an internal variable 'DEFAULTTUNE_ML_<multilib>', assign it with the value of 'DEFAULTTUNE_virtclass-multilib-lib32' before deleting. For rpm backend in package_manager.py, we use DEFAULTTUNE_virtclass-multilib -lib32 first, if it is not available, and try to use DEFAULTTUNE_ML_<multilib> [YOCTO #6842] (From OE-Core rev: 9c59d3d8b538d3a98ff4b5e5b189a4a23a85da2d) (From OE-Core rev: e5fcc237807d064578028ecf8af51d82c5a66c18) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib.bbclass: fix incorrect TARGET_VENDOR in multilib imageHongxu Jia2014-12-311-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While building multilib extended images such as libXX-core-image-minimal, the WORKDIR has the same dir with the building of core-image-minimal. $ ls tmp/work/qemux86_64-poky-linux/ -al ... drwxrwxr-x 3 jiahongxu jiahongxu 4096 Oct 13 16:01 core-image-minimal drwxrwxr-x 3 jiahongxu jiahongxu 4096 Oct 16 11:11 lib32-core-image-minimal ... While image class is inherited, it did not assign OVERRIDES with 'virtclass-multilib-libXXX', so the reason is variable TARGET_VENDOR was not override for multilib in that situation. It refers what did for PN and MLPREFIX, and manually do the multilib override for TARGET_VENDOR in RecipePreFinalise handler. [YOCTO #6844] (From OE-Core rev: 7ca012fb3addb11ba3f899efa0619ddd8d3c6946) (From OE-Core rev: 733ae9a73704fdb1211a4e35a20f2d6337a16709) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image: remove obsolete MULTILIB_VENDORSHongxu Jia2014-12-311-11/+0
| | | | | | | | | | | | | | | | | | In oe-core commit 03c5f39b4d7dd8c81e0a130b7d5884e5af039a24, it removed obsolete codes about variable MULTILIB_VENDORS. We clean up the rest obsolete codes related with MULTILIB_VENDORS (From OE-Core rev: 43a1c2dc08b4291e042b6c9ef981bd094ea2c477) (From OE-Core rev: 18be5e2400fb2ca1a46ea504967f3c3522af4fdc) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* mklibs: Fix loader for mipselKhem Raj2014-12-311-1/+1
| | | | | | | | | | | | | | Additionally treat ld.so to be searched in sysroot Change-Id: I8b4acb821d9855a1163c7149bc8e369c7c438856 (From OE-Core rev: 4cf539e67333ba2c3fe924b092e104da53e68ca0) (From OE-Core rev: 2c327f75c293a68c39b46d72a27248d72ac80996) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: Speed up rootfs/populate_sdk removalRichard Purdie2014-12-311-0/+12
| | | | | | | | | | | | | | | | | | Commands like bitbake X -c rootfs or bitbake X -c populate_sdk do not trigger rm_work to clean up the directories afterwards since it traditionally hooks onto do_build. This change means those two tasks now clean up after themselves. We use the cleandirs function attribute to handle this. [YOCTO #6413] (From OE-Core rev: 6bf06d80c2ce03dfdedac5ad8cf42ef8e36b0ecb) (From OE-Core rev: 38b1f9d8e4fa9afb8644e4be55191fbe5cfd99a1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Create modules directory even if there is no modules installedHe Zhe2014-12-311-0/+1
| | | | | | | | | | | | | | | | | | | During kernel_do_install it needs to make symbol link at ${D}/lib/modules/${KERNEL_VERSION}/build, but there will not be ${D}/lib/modules/${KERNEL_VERSION} if there is no modules installed for current image, which will result in a build failure. Add "mkdir -p ${D}/lib/modules/${KERNEL_VERSION}" here to avoid this failure and the need of similar changes in other scripts that also expect it to exist. (From OE-Core rev: f2f72f8ff623d24fffbb1b0ad40bc08f05ff31dd) (From OE-Core rev: a3dae5c091017827a293affbb8ade179a23efd6d) Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta-environment: Fix config-site with a multilib configMark Hatle2014-11-132-5/+7
| | | | | | | | | | | | | | | | | | | | [YOCTO #6951] The TOOLCHAIN_CONFIGSITE_SYSROOTCACHE value was defaulting to the nativesdk path and not the associated target path. Set the value in toolchain-scripts to the target path. Be sure to set the MLPREFIX within the meta-environment script as multilibs are processed. Update the config_site file name to use -BPN- not PN. Otherwise the environment processing can't find the correct filename. (From OE-Core rev: 26a2f98155a867a71217e52d33f761dcc60800ca) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license.bbclass: canonicalise the licenses named with 'X+'Jackie Huang2014-11-051-2/+9
| | | | | | | | | | | | | | | | | | If INCOMPATIBLE_LICENSE=GPLv3, GPLv3+ should be excluded as well but not now since there is no SPDXLICENSEMAP for licenses named with 'X+', we can add all the SPDXLICENSEMAP settings for licenses named with 'X+' in licenses.conf, but it's more like a duplication, so improve the canonical_license function to auto map for 'X+' if SPDXLICENSEMAP for 'X' is available, so GPLv3+ becomes GPL-3.0+. (From OE-Core rev: 1d6dab1dbbbfbcb32e58dba3111130157ef2b24f) (From OE-Core rev: 652008fd9dc909836819e5c6808c63643eff6db6) Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Fix up white space lost in last commit.Peter Urbanec2014-10-181-20/+20
| | | | | | | | | | | Commit e9672387 split one long line into a multi-line string, but in the process white space between words was lost. This results in badly formatted output when this message is printed. (From OE-Core rev: b145374c0a498de0160a9b81f50ce0066ab14862) Signed-off-by: Peter Urbanec <openembedded-devel@urbanec.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: specify func dirs for sstate_hardcode_pathWenzong Fan2014-10-181-0/+5
| | | | | | | | | | | | | | | | | | | | | For some recipes that inhrient cmake, the ${B} may be removed by cmake_do_configure() while sstate_hardcode_path() running, this causes build errors: Exception: OSError: [Errno 2] No such file or directory: \ '/path/to/build' The function sstate_hardcode_path() called command: $SSTATE_SCAN_CMD which extended as "find ${SSTATE_BUILDDIR} ..." So the proper function dirs could be ${SSTATE_BUILDDIR}. (From OE-Core rev: a949943e622b08485fc7632a0a743bc009079c67) Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb: skip pre/postrm scripts on upgrade, write only one shebangAndreas Oberritter2014-10-111-2/+15
| | | | | | | | | | | | | | | | Trying to upgrade busybox removing symlinks but update-alternatives need these links (sed, cut, tail, etc) in order to work. Adding test to avoid this scripts on upgrade fix the problem, same solution are found in package_rpm class. [YOCTO #6768] (From OE-Core rev: 7b9161dd0c475cca6ea7eb507f7c3c51869eb493) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_do_shlibs: Look for provider in the path thats in shlib_provider ↵Khem Raj2014-10-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dictionary shlib2 code puts the information about path where a provider will be found. e.g. {'/usr/lib/llvm3.3': ('libllvm3.3-llvm-3.3', '3.3')} This is obtained from new shlib2 pkgdata from llvm3.3/3.3-r0/pkgdata/shlibs2/libllvm3.3-llvm-3.3.list However when we search for NEEDED libraries we ignore the key above which is the path where the provider library is installed and instead just seach in libdir and base_libdir and hence libraries which are not in above standard search paths gets ignored even if they appear in DT_NEEDED sections and a note is emitted NOTE: Couldn't find shared library provider for libLLVM-3.3.so, used by files: .... IMO this note should actually become an error since if we do not have all DT_NEEDED libraries in image the system is dysfunctional. This patch extracts this libpath from key and add it to seach paths when looing for a provider of a shared library [YOCTO #6798] Change-Id: Ie5f08632e37ba8d3439c8aaae33bc68b8996792f (From OE-Core rev: bf8472274ac1e9a35f8cbc82357da6c95b396759) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchains-scripts: Add support for target environment scriptsRichard Purdie2014-10-101-0/+5
| | | | | | | | | | In a similar way to the previous script which adds support for native environment scripts, this adds support for target environment scripts too. (From OE-Core rev: 2d9466734f0c0c90724820bc36992b2800ffa4d0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: split the too long lineRobert Yang2014-10-101-1/+22
| | | | | | | | | | | | The too long line would cause "git send-email" report errors: patch contains a line longer than 998 characters Though we can use "--no-validate" to force the send. (From OE-Core rev: e96723879eb3352a5bdea7b3e1a576edf9550e5a) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: the second bb.fatal not workRobert Yang2014-10-101-1/+1
| | | | | | | | | | | | | | The code: bb.fatal("foo1") bb.fatal("foo2") Would make the second one not work, use bb.error for first one to fix the problem. (From OE-Core rev: 33a87187a8520e190bcade76cc965aa58faaa85a) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts.bbclass: Allow sourcing of subscript for environmentOtavio Salvador2014-10-101-0/+10
| | | | | | | | | | | | | | | | | | | Sometimes we require extra environment settings to be available on the environment for proper SDK work. This were done, in past, using '_append' tasks however with the split of the environment in a canadian package this has been broken. The easier and more flexible solution is to use environment subscripts which are sources by the main script. These are now looked at: $OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh and sourced. (From OE-Core rev: 457291f2ca084d1f43c0cca2175b448a22761887) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_ipk.bbclass: Fix SRC_URI whitespace handlingMark Hatle2014-10-061-1/+1
| | | | | | | | | | | | | | | | | | | The SRC_URI may contain whitespace, but be otherwise empty. This can happen in the case: MYSRC = "" MYSRC_arm = "file://myarm.patch" SRC_URI += "${MYSRC}" Unless we strip blank spaces, to determine if it is empty, we can end up generating a "Source: " line which in invalid. This leads to the error: invalid Source: field is speified in the generated CONTROL file (From OE-Core rev: 16cedc3bce6fc37543e9ef053cd7c589e523ca1c) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Reverse runtime symlinks should be tied to package generationOtavio Salvador2014-10-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | In case a package is not generated (is empty and does not has allow empty flag set) the package data regarding reverse runtime dependency shouldn't be done. This were causing a false-positive in the meta-fsl-arm layer, when building mesa, as: ,----[ Error during build of MX53 in meta-fsl-arm ] | ERROR: The recipe mesa is trying to install files into a shared area | when those files already exist. Those files and their manifest | location are: | /.../build/build/tmp/sysroots/imx53qsb/pkgdata/runtime-reverse/libopenvg-dev | Matched in manifest-imx53qsb-amd-gpu-x11-bin-mx51.packagedata | Please verify which recipe should provide the above files. `---- Fixes [YOCTO: #6795] (From OE-Core rev: 9ef8728514b02dd2e18e87645298d9ec2e8a785a) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cross-canadian: Disable the packagedata stamp-extra-infoRichard Purdie2014-10-061-0/+1
| | | | | | | | | | | Similarly to native/cross disable this since otherwise the packagedata can be marked as machine specific and if you switch machines which share an architecture, you'll get toolchain overlapping files errors. (From OE-Core rev: 96d557be3dedd6aea6199b3d28fbb7f5549fad69) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: enable a link for external module buildingNitin A Kamble2014-10-061-1/+2
| | | | | | | | | | | | | | | | | | Even though the kernel-dev package provides the required support for building external kernel modules on the target, some commonly used scripts and utilities fail as they are not finding the kernel module build support files at the desired location. Create the /lib/modules/<kernel-version>/build link on target pointing to the sources provided by the kernel-dev package, to fix the issue. Fixes Bug: [YOCTO #2968] (From OE-Core rev: aafa4bc896eb944aa4fc406807dd7e02f4b9b7ba) Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Added bc-native as DEPENDSAlejandro Hernandez2014-10-061-1/+1
| | | | | | | | | | | The makefile checks for bc during for compilation [YOCTO #6781] (From OE-Core rev: c067e52cffe002de3b39aa1bced308dd532859c1) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Add rpm allarch to overwrite whitelistRichard Purdie2014-09-301-1/+2
| | | | | | | | | | | The packagegroup allarch rpm files for multilib can overwrite each other since they are in theory indentical (in contrast to the other backends). We therefore need to whitelist this to avoid build failures now this overwrite failure is fatal. (From OE-Core rev: d59ade0ca2cf629937434fa423dfbf35ce1209fc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* spdx.bbclass: Add SPDX-specific source tree variable.leimaohui2014-09-301-1/+5
| | | | | | | | | | | | | Add SPDX-specific source tree variable for recipes where $S is a subdirectory of the source tree. [ RB - add a comment for SPDX_S ] (From OE-Core rev: 41784ad0588b4aba6897d6e9e0efd0314ab19747) Signed-off-by: leimaohui <leimaohui@cn.fujitsu.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto.bbclass: Fixup shell condition test syntax errorDarren Hart2014-09-301-1/+1
| | | | | | | | | | | | A warning is issued when run about an unexpected operator due to a syntax error with an extra if empedded in the shell conditional. Remove the extra if. (From OE-Core rev: f0566e127abc7bb90588b2a8bee12ad3e7d35b3e) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: add SRCREV to do_fetch() hashRoss Burton2014-09-301-0/+1
| | | | | | | | | | | | Without this changing just the SRCREV won't re-fetch unless you embed the SRCREV into PV. The downside here is that every hash changes, so this causes a full rebuild. (From OE-Core rev: a414b17e1d783ad68a2d0f7d5922967449c05797) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Exclude MULTI_PROVIDER_WHISTLIST from do_populate_sysrootRichard Purdie2014-09-301-0/+1
| | | | | | | | | | | If you switch between multilib and non-multilib builds, pretty much everything rebuilds due to the use of MULTI_PROVIDER_WHITELIST in do_populate_sysroot. It doesn't need to do this so exclude that variable for checksum purposes. (From OE-Core rev: 7f3a44ff30d07083ee8c4e2b7ac91dc6a9c8857b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: update the timestamps after installRobert Yang2014-09-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Update the sstate file's timestamps after it is installed, it will be very useful for removing the old sstate file, especially, it's not easy to remove when use the shared SSTATE_DIR, we can easily remove them with this change, for example: $ find state-cache -type f -ctime +10 -exec rm -f {} \; Will remove the sstate file which isn't used by recent 10 days. We can use the -atime, but it is not always available, for example, when mounted with "-o noatime". The touch is a very light weight action, and the scripts/sstate-cache-management.sh also requires this. (From OE-Core rev: bbee747466a6947319cff2ffd676abf9432c16ae) 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>
* gnomebase: fix indentationRoss Burton2014-09-291-7/+7
| | | | | | | (From OE-Core rev: 103ded50380916d210e293913eebb173f014063e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Change overlapping files warning to a fatal errorRichard Purdie2014-09-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | When files overlap in the sysroot, something bad usually happened. We've had two independent cases recently where a couple of months after one of these warnings was shown, builds failed due to corruption. This change moves the warning to become a fatal error. The complaint I've had about this is that we need to tell the user what happened and more importantly how to recover from it. If we could recover from it, great but the trouble is we simply don't know what happened. As a compromise, we can document several of the possible scenarios in the error message. We don't normally go to this level of detail however in this case, I'm lacking other viable alternatives. I do believe it is important to stop as corruption occurs rather than letting the build contunue into territory that is not deterministic amongst other things. The complex message is followed by a simpler one in case the long message is too much for the user. (From OE-Core rev: 179ac7de03977b6e440409eddb2166819e07286a) (From OE-Core rev: 4b503f25f1ef8f554d3c76d88399db379dc818cc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d/systemd: Remove OVERRIDES dependencyRichard Purdie2014-09-232-0/+3
| | | | | | | | | | | | | Taking run-postinsts and building for two machines which have different OVERRIDES leads to two different sets of stamps for an allarch package. We don't need to depend on OVERRIDES in these classes, the end resulting variables are good enough. We can therefore exclude the dependency and allow a single package to be generated for run-postinsts. (From OE-Core rev: fdc949154e64afb41dd4db3a97be74a15963128d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: Add uninative - a way of reusing native/cross over multiple distrosRichard Purdie2014-09-231-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These patches are the start of a new idea, a way of allowing a single set of cross/native sstate to work over mutliple distros, even old ones. The assumption is that our own C library is basically up to date. We build and share a small tarball (~2MB) of a prebuilt copy of this along with a patchelf binary (which sadly is C++ based so libstdc++ is in there). This tarball can be generated from our usual SDK generation process through the supplied recipe, uninative-tarball. At the start of the build, if its not been extracted into the sysroot, this tarball is extracted there and configured for the specified path. When we install binaries from a "uninative" sstate feed, we change the dynamic loader to point at this dynamic loader and C librbary. This works exactly the same way as our relocatable SDK does. The only real difference is a switch to use patchelf, so even if the interpreter section is too small, it can still adjust the binary. Right now this implements a working proof of concept. If you build the tarball and place it at the head of the tree (in COREBASE), you can run a build from sstate and successfully build packages and construct images. There is some improvement needed, its hardcoded for x86_64 right now, its trivial to add 32 bit support too. The tarball isn't fetched right now, there is just a harcoded path assumption and there is no error handling. I haven't figured out the best delivery mechanism for that yet. BuildStarted is probably not the right event to hook on either. I've merged this to illustrate how with a small change, we might make the native/cross sstate much more reusable and hence improve the accessibility of lower overhead builds. With this change, its possible the Yocto Project may be able to support a configured sstate mirror out the box. This also has positive implications for our developer workflow/SDK improvements. (From OE-Core rev: e66c96ae9c7ba21ebd04a4807390f0031238a85a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: use one package split for all firmware filename extensionsCarlos Rafael Giani2014-09-221-4/+1
| | | | | | | (From OE-Core rev: dd5313228879487ca2b11fc5d38fb821a2a810a5) Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base/meta-environment: Remove overlap from the twoRichard Purdie2014-09-221-26/+1
| | | | | | | | | | | | | | | | | | | | Currently we have the horrible situation where meta-environment packages the toolchain environment files and they get included in the SDK but are broken, then, the SDK code overwrites them with good versions. This is suboptimal. This change fixes the code in meta-environment to create working files and adds in the multilib support from populate_sdk_base, then we remove the code in that base bbclass and rely on the packages being installed if/as/when needed. This removes the duplication and the broken versions of the files, hopefully making all well. [YOCTO #6608] [YOCTO #6613] (From OE-Core rev: 063355e5965439c7b3253d692d7ab0ed1189d123) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass : Add support for cmake projects that use .S files.Philip Balister2014-09-221-0/+3
| | | | | | | | | | | | UHD and GNU radio use the cmake build system. The toolchain file made from cmake.bbclass does not set the variable needs by cmake projects that use .S files. UHD added some .S files and these changes are required to build recent UHD. (From OE-Core rev: 43ce4b804d433662fe77c6f5298060ba74a0e639) Signed-off-by: Philip Balister <philip@balister.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>