summaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2017-07-17image_types: fix squashfs-lzo and squashfs-xz buildsEd Bartosh
Dependencies required for squashfs-lzo and squashfs-xz image builds were assigned to do_image_squashfs-lzo and do_image_squashfs-xz. As these tasks don't exist the dependencies were not installed and builds were failing. Correct task names for these image types are: do_image_squashfs_lzo and do_image_squashfs_xz because '-' and '.' are replaced by '_' in all do_image* task names. [YOCTO #11760] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17image_types_wic: set default WKS_FILE_DEPENDSEd Bartosh
The default set of dependencies used via wic-tools is not used anymore as wic images don't depend on wic-tools. Set of packages required to produce wic image depends on the content of the .wks file, so WKS_FILE_DEPENDS variable should be used to provide correct list of dependencies when WKS_FILE variable is set. As WKS_FILE_DEPENDS is not used in many existing recipes yet we need to provide default value for it to ensure that removal of wic-tool dependency doesn't cause image build failures. Initialized WKS_FILE_DEPENDS with the set of dependencies previously brought by wic-tool. This is done to provide compatibility and to avoid breakages of existing image recipes that rely on current set of dependencies. Note: This is a temporary solution for transition period. After some time the list will be either reduced or removed. Recommended solution is to use WKS_FILE_DEPENDS in image recipes together with WKS_FILE to specify dependencies. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17wic: get rid of using wic-toolsEd Bartosh
At the moment, when building images with IMAGE_FSTYPES=wic one ends up depending on wic-tools and thus syslinux and grub-efi even when not using those at all. Ideally, building an image with wic should only build the tools and components really needed. The problem is that "wic-tools" is needed also for the manual invocations of wic, in which case everything that might be needed has to be built in advance. Replaced dependency on wic-tools with dependency to a much shorter set of tools that wic uses almost for any image: 'parted', 'gptfdisk', 'dosfstools' and 'mtools'. [YOCTO #11552] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17live-vm-common: add MKDOSFS_EXTRAOPTS variableEd Bartosh
Sometimes it's needed to create FAT filesystem with specific sector or cluster size, FAT size or to use one of other useful mkdosfs options. Introduced MKDOSFS_EXTRAOPTS variable to set options for mkdosfs. [YOCTO #11709] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17image_types: remove Hob convenience variableJoshua Lock
IMAGE_EXTENSION_live is no longer used. It was used by Hob to map the live image type, but Hob is no longer part of the Bitbake codebase. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17classes/sanity: check for case-sensitive file systemsRoss Burton
Case-insensitive file systems fail during builds in very mysterious ways, such as mpfr: ERROR: patch_do_patch: Not a directory The problem here being that mpfr has a PATCHES file, so when we try to copy the patches into ${S}/patches/ it fails. We can't and won't support case-insensitive file systems so add a sanity check to abort the build if one is found. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17ccache: let ccache create CCACHE_DIR, reducing hash changesRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17ccache: don't export CCACHE_DISABLE globallyRoss Burton
CCACHE_DISABLE was added to bitbake.conf in oe-core dd2bab (June 2012) because autogen-native exports HOME=/dev/null during the build, which is then used by a host ccache to construct the path to it's cache (/dev/null/.ccache) and this fails. However we now always export CCACHE_DIR to solve the same problem in a more efficient way so CCACHE_DISABLE can be deleted. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17distrooverrides.bbclass: fix default configurationPatrick Ohly
When using distrooverrides.bbclass without setting DISTRO_FEATURES_OVERRIDES, the code failed because of a spelling error in the default. [YOCTO #11759] Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-08staging: Ensure a clean recipe sysroot removes addto_recipe_sysroot stampsRichard Purdie
The commands: bitbake nodejs-native; bitbake nodejs-native -c clean; bitbake nodejs-native; bitbake -c addto_recipe_sysroot nodejs-native; bitbake -c devshell nodejs-native; bitbake -c addto_recipe_sysroot nodejs-native; bitbake -c devshell nodejs-native; never result in npm in the sysroot within devshell. The reason is the addto_recipe_sysroot stamp isn't removed when do_fetch is run but the sysroot is cleaned. With this patch, the second devshell will contain npm, which I think is probably the best outcome we can hope for here. [YOCTO #11461] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08testimage: Use the renamed buildlzipKhem Raj
buildiptables has been replaced with buildlzip Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-08mirrors.bbclass: remove stale lsof ftp mirrorsAndre McCurdy
Replace with an mapping for http://www.mirrorservice.org to align with recent changes to SRC_URI in the lsof recipe and allow non-current lsof tar files to be found in the /OLD subdirectory. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-08image_types: fix kernel target on elf's image dependenciesLeonardo Sandoval
Kernel recipes provides 'virtual/kernel' so remove the native part. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-08linuxloader.bbclass: add musl libc supportMing Liu
Current linuxloader.bbclass does not support musl libc ldso, so add it in. After changing, now the linuxloader function will call a subfunction according to which virtual/libc is being used, glibc or musl, the linuxloader_musl function is made on top of the LDSO macro defined in musl source, by mapping related OE variables to it. Change tested on following machines: "genericx86" "genericx86-64" "beaglebone" "qemumips64" "qemuarm64" "mpc8315e-rdb" "edgerouter" "qemumips" "kc705-microblazeel" - meta-xilinx "qemuppc" Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-08siteinfo.bbclass: Support musl-x32sweeaun
Modified targetinfo and osinfo to support musl-x32. Signed-off-by: sweeaun <swee.aun.khor@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-08insane.bbclass: Support musl-x32sweeaun
Added musl-x32 elf header into dictionary. Signed-off-by: sweeaun <swee.aun.khor@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-08distutils,setuptools: Delete use of SECURITY_NO_PIE_CFLAGSKhem Raj
gcc can handle PIE in gcc driver Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-07-06base: Add MultiConfigParsed handler to deal with unstable build signaturesRichard Purdie
This uses the newly added MultiConfigParsed event to handle problems where checksums in multiconfig build were not fuctioning as expected. The issue arises around SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS which contains entries like: * gcc-cross-${TARGET_ARCH}->virtual/${TARGET_PREFIX}libc-for-gcc * gcc-cross-${TARGET_ARCH}->linux-libc-headers These need to be expanded in the multiconfig data store but then placed into the shared main datastore used by the siggen code. The only other alternative would be a siggen instance for each multiconfig however that seemed even more complex and invasive. In real world usage, this issue would mean a qemux86 base config with other armv5 and armv7 configs (e.g. beaglebone and qemuarm) would try and build gcc-cross twice since dependencies normaly excluded (e.g. linux-libc-headers) would now be included. This breaks sstate reuse as well as breaking builds unless separate tmpdirs are used. This patch adds all the entries for each multiconfig. Whilst there may be duplicates, this shouldn't be an issue. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06image.bbclass: create root symlinks in nativesdk target sysrootAmarnath Valluri
To match with the target image, the generated nativesdk's target sysroot also should have the root symlinks(/lib*, /bin/, /sbin). So, extended the 'create_merged_usr_symlinks' to reuse symlink creation part even for nativesdk using POPULATE_SDK_PRE_TARGET_COMMAND. Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06insane.bbclass: Add package QA check for merged /usr.Amarnath Valluri
This check makes sure that, when usrmerge distro feature enabled, no package installs files to root (/bin, /sbin, /lib, /lib64) folders. Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06image: create symlinks needed for merged /usrAmarnath Valluri
Prepare the symlinks required for merged /usr at the time of rootfs creation. The links created in rootfs are: /bin --> /usr/sbin /sbin --> /usr/sbin /lib --> /usr/lib /lib64 --> /usr/lib64 We cannot make these symlinks as part of 'base-files' or some other package. Because at rootfs creation, installation of the package(say kernel) that depends on these root folders/links fails, if package manager installs this package prior to base-files. These symbolic links in top level folder should be present as long as - kernel tools use /lib/{module,firmware} - shell scripts uses "#!/bin/sh" Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06cross.bbclass: merged /usr supportAmarnath Valluri
Use ${root_prefix} instead of ${base_prefix} while setting ${target_base_prefix}, otherwise we might loose the root prefix configuration change in case of 'usrmerge' distro feature is enabled. Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06mirrors: Add HTTP mirrors for ftp://sourceware.orgSoren Brinkmann
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-06sanity.bbclass: fix AttributeError in mirror format checksMikko Ylinen
mirrors is a list after split() and results in: AttributeError: 'list' object has no attribute 'strip' when the 'mirror values are pairs' check fails. Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-06classes/populate_sdk_base: Fix SDK manifest generationAníbal Limón
The write_{host,target}_sdk_manifest don't need to be set as SDK_POSTPROCESS_COMMAND because are already append to POPULATE_SDK_POST_{HOST,TARGET}_COMMAND and the if doesn't make sense because are only added for populate sdk task. [YOCTO #11741] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-06insane: remove obsolete gcc 4.5 checkRoss Burton
As gcc 4.5 is very old now (released in 2010, gcc 4.6 released in 2011) this check can be removed now. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-06sanity.bbclass: remove ASSUME_PROVIDED checks that can't succeedRoss Burton
qemu-arm and libsdl-native are not in HOSTTOOLS, so there's no point in checking that they're on PATH. Also qemu uses pkg-config to find SDL, so libsdl-native isn't required. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-06meta/lib/oe/sdk.py: support added for executing pre-target commandsAmarnath Valluri
Added a new POPULATE_SDK_PRE_TARGET_COMMAND variable, which can contain functions need to be executed at pre traget sysroot creation phase. classes/populate_sdk_base.bbclass: Added POPULATE_SDK_PRE_TARGET_COMMAND to sdk command variables list. Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28copyleft_filter.bbclass: restore possiblity to filter on typeAndré Draszik
Since the changes introduced in ae9102bda398 ("copyleft_filter.bbclass: Allow to filter on name"), it is impossible to filter on the recipe type, all recipes are treated as though they should be included if the license matches, irrespective of the COPYLEFT_RECIPE_TYPES variable. Fix this. Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-28base.bbclass: extend PACKAGECONFIG to also allow RRECOMMENDSAndré Draszik
It can be useful to add RRECOMMENDS to packages created, based on certain PACKAGECONFIGs. In particular where a package depends on certain linux kernel infrastructure (kernel modules) which might or might not be built as a module, being able to RRECOMMENDS instead of RDEPENDS on the relevant packages avoids build failures in case those modules are built statically into the kernel, i.e. in case no package is being created for them. Add another field to the PACKAGECONFIG syntax to achieve just that. Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-28image.bbclass: use prependVarFlag for postfuncsEd Bartosh
It would be possible to achieve any order of calling functions if prefuncs are added with appendVarFlag and postfuncs with prependVarFlag. Then image_X.bbclass can add code with either pre/post-funcs or do_image_x_append or _prepend. The execution order would be: image_X prefuncs image prefuncs do_image_X_prepend from image_X.bbclass do_image_X from image.bbclass do_image_X_append from image_X.bbclass image postfuncs image_X postfuncs [YOCTO #11372] Thanks to Ola Nillsson for the idea. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-28image_types.bbclass: get rid of IMAGE_DEPENDSEd Bartosh
The IMAGE_DEPENDS_<type> variables can be set to add dependencies for individual image types. Those dependencies are added to the do_rootfs task, while they really should be added to the specific image type tasks. These variables are not documented anywhere. Replaced usage of IMAGE_DEPENDS_<type> with explicitly added dependencies to do_image_<type> tasks. [YOCTO #11302] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-28image_types.bbclass: Prompt error message on missing setting in UBI and UBIFSChoong YinThong
Prompt error message to guide user add argument MKUBIFS_ARGS and UBINIZE_ARGS on every UBI and UBIFS image creation. [YOCTO #11589] Signed-off-by: Choong YinThong <yin.thong.choong@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-28meta: Fix return value checks from subprocess.call()'sMikko Rapeli
Python function subprocess.call() returns the return value of the executed process. If return values are not checked, errors may go unnoticed and bad things can happen. Change all callers of subprocess.call() which do not check for the return value to use subprocess.check_call() which raises CalledProcessError if the subprocess returns with non-zero value. https://docs.python.org/2/library/subprocess.html#using-the-subprocess-module All users of the function were found with: $ git grep "subprocess\.call" | \ egrep -v 'if.*subprocess\.call|=\ +subprocess\.call|return.*subprocess\.call' Tested similar patch on top of yocto jethro. Only compile tested core-image-minimal on poky master branch. Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-28staging.bbclass: Make use of oe.package.strip_execsTobias Hagelborn
Make use of the library function oe.package.strip_execs for stripping sysroot executables. oe.packge.strip_execs is based on code previously residing in sysroot_strip. Signed-off-by: Tobias Hagelborn <tobiasha@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-28insane: add extensible framework for recipe-wide QA testsRoss Burton
Following QAPATHTEST (QA hook for each file in each package) and QAPKGTEST (QA hook for each package), add QARECIPETEST: a hook which is executed once per recipe in do_package_qa. This makes it trivial to add recipe-wide QA tests that integrate with the existing tests. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-28insane: rename pkg to pn because that is what it isRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-28gnomebase.bbclass: add datadir/icons and datadir/appdata to standard FILES listAlexander Kanavin
Gnome apps seem to increasingly package those, so let's make it common. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2017-06-28toolchain-scripts: add check for LD_LIBRARY_PATH in the SDK env setup scriptDenys Dmytriyenko
Provide a descriptive error message and exit the environment-setup script, when LD_LIBRARY_PATH is set on the host system. Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-23kernel-uimage.bbclass: Fix up generation of uImage from vmlinuxNathan Rossi
Fix up the generation of uImage from vmlinux when KEEPUIMAGE != 'yes'. This fixes up the working directory that do_uboot_mkimage is run from, such that it is run from the ${B} directory to access built artefacts. Simplify the logic in the task so that the parse step either adds the task or not if the conditions are met. This reduces the need for the task to run in cases when it is not used. The task is also changed to depend on the kernel_link_images task as arch/<arch>/boot/* is not available until after kernel_link_images in certain cases (e.g. vmlinux/uImage only KERNEL_IMAGETYPES). Fix up the use of ${S}/vmlinux when pulling the entry symbols address so that it accesses the vmlinux in ${B}. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-23insane.bbclass: Ignore perl as dependency for nativesdk packagesPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-23multilib.bbclass: fix faulty redefinition of STAGING_KERNEL_DIRPetter Mabäcker
Due to the problem fixed in '56c677a multilib: Move redefinition of STAGING_DIR_KERNEL' STAGING_KERNEL_DIR must be redefined for lib32 in multilib.bbclass. However this redefinition expanded STAGING_KERNEL_DIR to an absolute path. This unconsciously added the TMPDIR path in the sstate object, causing packages depended on STAGING_KERNEL_DIR being rebuild if the TMPDIR was changed. Solve this by forcing the unexpanded TMPDIR variable to remain in the beginning of STAGING_DIR_KERNEL (as default). Since TMPDIR is included in BB_HASHBASE_WHITELIST, the sstate object will not be depended on the expanded path anymore. Signed-off-by: Petter Mabäcker <petter@technux.se> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-22classes/buildhistory: fix failures collecting output signaturesPaul Eggleton
It's possible for tasks to stage symlinks that point to non-existent files; an example is ncurses-native.do_populate_sysroot. There wasn't any error checking here so this broke the build when "task" was included in BUILDHISTORY_FEATURES. In any case we shouldn't be following symlinks and getting the sha256sum of the link target - we need concern ourselves only with the target path, so check if the file is a link and sha256 the target path instead if it is. If it's neither a regular file nor a symlink (perhaps a pipe or a device), just skip it. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-16meta: Remove further uclibc remnants (inc. patches and site files)Richard Purdie
Some of these are clearly dead, e.g. one binutils patch reverts the effects of the earlier one. This also removes the uclibc site files. We now have mechanisms to allow these to be extended from another layer should someone ever wish to do that. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-16meta: Drop further remnants of uclibc supportRichard Purdie
uclibc support was removed a while ago and musl works much better. Start to remove the various overrides and patches related to uclibc which are no longer needed. uclibc support in a layer would still be possible. I have strong reasons to believe nobody is still using uclibc since patches are missing and I doubt the metadata even parses anymore. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-16package_deb: Drop obsolete comments/variablesRichard Purdie
These comments/variables appear to be long dead, remove them. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-16package_ipk: Parallelise ipk creationRichard Purdie
Allow the creation of ipks to happen in parallel, making best use of resources on multiprocessor systems. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-16package_deb: Enable multithreaded package creationRichard Purdie
Allow the creation of debs to happen in parallel, making best use of resources on multiprocessor systems. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-16package_ipk: Clean up Source entry in ipk packagesRichard Purdie
There is the potential for sensitive information to leak through the urls there and removing it brings this into the behavior of the other package backends since filtering it is likely error prone. Since ipks don't appear to be generated at all if we don't set this, set the field to the recipe name used (basename only, no paths). This avoids information leaking. We may want to drop the field if opkg can allow that at a future point but the recipe name is a suitable identifier for now. Reported-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-14distrooverrides.bbclass: DISTRO_FEATURES as overridesPatrick Ohly
This achieves the same goal as the same change to bitbake.conf itself, but because the class gets added later as part expanding INHERIT, this new approach is less likely to run into problems when DISTRO_FEATURES contains complex code. Another difference is that the class currently does not get inherited by default and thus is completely absent from a build unless some layer or include file adds it to INHERIT. Compared to the earlier code in bitbake.conf and a similar class in intel-iot-refkit, additional overrides now get sorted. This makes the final OVERRIDES more deterministic. The lessons learned about unintentionally depending on OVERRIDES are documented in the class because such problems are more likely to show up as unexpected signature differences when using this class. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>