aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2017-02-16kernel.bbclass: do_deploy requires depmodwrapperrbt/deployRobert Yang
Fixed: run.do_deploy.27809: line 155: depmodwrapper: command not found Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2017-02-15classes/license: Respect beginline and endlineJoshua Watt
Recipes have the option of specifying a 'beginline' and 'endline' options in LIC_FILES_CHKSUM which will cause the license bbclass to only extract those specific lines from the license file when generating the license database. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-15insane.bbclass: print QA message correctlyStephano Cetola
Replace call to non-existent method "messages" with call to correct QA logging method. Fixes [YOCTO #11014] introduced in OE-core revision 1dcb38ca9d6 Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-15package_deb.bbclass: Ignore file paths in RPROVIDESAmarnath Valluri
Unlike rpm, debian packaging does not allow file paths in 'Provides:' field. When 'usrmerge' distro feature enabled bash/busybox packages adds '/bin/sh' to it's RPROVIDES to satisfy build dependencies, this entry should be filtered out. Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-15testimage.bbclass: Add check for empty test suiteMariano Lopez
If for some reason (most likely incorrect TEST_SUITES var) you end with an empty test suite, testimage will start the target (qemu by default) and will run an empty suite, so better have a check before starting the target. [YOCTO #10979] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-15image.bbclass: Use 'populate_sdk_base' for non-linux targetsNathan Rossi
When 'populate_sdk_ext' was first introduced in commit bf81d6bb7f6 it replaced the inheriting of 'populate_sdk_base'. For non-linux targets building the extensible SDK caused build errors, and the image class was changed to inherit 'populate_sdk' when targeting a non-linux SDK_OS (in commmit e471ce3464d). However inheriting 'populate_sdk' instead of 'populate_sdk_base' causes the SDK to always be built, this is not expected for the image class. This change makes the image class inherit 'populate_sdk_base' in the non-linux SDK_OS case so that it behaves the same as it is expected to behave where 'bitbake <image> -c populate_sdk' must be executed to generate the SDK deployables. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-15sanity.bbclass: Add which to SANITY_REQUIRED_UTILITIES.Philip Balister
Using docker with the Fedora 23 container exposed an issue with the rpm-native configure step. If which is not present the configure script fork bombs. After much pain, I tracked this to which not being present in the default container. Add a check for which so others do not have to have this experience. Signed-off-by: Philip Balister <philip@balister.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-15uboot-extlinux-config.bbclass: add support for timeout & defaultDalon Westergreen
When multible targets are defined it is useful to allow for a default target along with a timeout. After timeout, the default target will be selected. Signed-off-by: Dalon Westergreen <dwesterg@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-15classes/copyleft_filter: include AGPL in default included listPaul Eggleton
If we're including all GPL licenses then we should include AGPL in the default COPYLEFT_LICENSE_INCLUDE since it has similar terms (and currently we do have one AGPL-licensed recipe in OE-Core, namely db). (Note that the default list isn't meant to be a guaranteed complete safe list - seek legal advice based on what you're distributing if unsure.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-15kernel.bbclass: Make symbol to vmlinuz.bin in boot directoryAndrea Adami
The changes committed with 6e58f54be103814b6b8a85b236510633c49e6832 did only consider the vmlinuz ELF kernel but some devices do reqire a raw vmlinuz.bin (as for example gcw0 in meta-handheld booted by ubiboot). Expand the above mentioned patch to consider this case. Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-15cve-check.bbclass: Fix dependenciesJussi Kukkonen
With recipe-specific sysroots the cve_check task must depend on cve-check-tool-native:do_populate_sysroot to get the cve-check-tool binary into the recipe sysroot. A normal DEPENDS isn't used to avoid cyclic dependencies. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-15testimage: Implement custom target loadingJuro Bystricky
This patch implements custom target loading for testimage, currently missing due to major changes to the test framework. Custom targets can be defined in various meta-layers, so we need an extra path information in order to find them. Any other additional info is retrieved as usual via the variables TEST_TARGET and TEST_SUITES Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15classes: Drop now unneeded update_data callsRichard Purdie
Now that the datastore works dynamically we don't need the update_data calls so we can just remove them. They're not actually done anything at all for a while. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-09sstate: Make absolute symlinks an errorRichard Purdie
The current relocation code is broken, at least in the native case. Fixing it would mean trying pass in new data on sstate tasks about the relative positioning of symlinks compared to the sstate relocation paths. Whilst we could do this, right now I'm favouring making this an error and fixing the small number of problematic recipes we have in OE-Core (3). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-09openssl/fontconfig/bzip2: Use relative symlinks instead of absolute ones ↵Richard Purdie
(using a new class) Absolute path symlinks are a bit of a pain for sstate and the native versions of these recipes currently contain broken symlinks as a result. There are only a small number of problematic recipes, at least in OE-Core, namely the three here. Rather than trying to make sstate handle this magically, which turns out to be a harder problem than you'd first realise, simply make the symlinks relative early in the process and avoid all the problems. The alternative is adding new complexity to sstate which we could really do without as without the complexity, you can't always tell where the absolute symlink is relative to (due to prefixes used for native sstate). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-07image_types.bbclass: fix image dependency chain collectionAndre McCurdy
If image type "foo" depends on image type "bar.xz", then dependencies should be collected from the base image type (ie "IMAGE_DEPENDS_bar") not from "IMAGE_DEPENDS_bar.xz". Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-07kernel-module-split: Allow custom suffix for package namesAndreas Oberritter
This makes it possible to restore the behaviour changed by commit 78cde87 "kernel-module-split: Append KERNEL_VERSION string to kernel module name". Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-07classes/npm: set HOME during do_installPaul Eggleton
In do_compile we set HOME so that ~/.npm* only get created in the work directory; we need to do the same in do_install as well or they'll go into the user's home directory which we do not want. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-07classes/populate_sdk_ext: account for custom image tasksPaul Eggleton
Any custom tasks that were added on the image between do_image_complete and do_build were not being taken into account. Use the newly added bb.build.tasksbetween() function to take care of that. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-07classes/patch: switch to new bb.build.tasksbetween() functionPaul Eggleton
A generic version of the code to work out the tasks between two tasks (based on the code here) has been added to bb.build, so use that instead. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-07classes/populate_sdk_ext: remove unnecessary dependencies breaking SDK_TARGETSPaul Eggleton
Up until recently it was possible to set SDK_TARGETS to include a native recipe you wanted installed into the sysroot when installing the eSDK. I'm not sure what happened but now when you try to add a native recipe to SDK_TARGETS you get a missing task error because this recipe has no do_package_write_* task. Of course such a task dependency is erroneous and is apparently caused by setting SDK_RDEPENDS. I've checked and it turns out that we no longer need to set SDK_RDEPENDS anyway (probably because we explicitly set up task dependencies further down in the class, which I don't think we were fully doing in early versions of the eSDK). Thus, drop setting this variable to restore the functionality. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-07staging: Add missing parameter to debug messageRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-07staging: Improve file creation resilianceRichard Purdie
If you abort a build mid execution of the staging extend_sysroot function there are currently races and cleanup of that function may fail. This change splits the code into separate phases so that the manifests are manipulated before files are installed, meaning we should be able to reverse actions if builds fail, crash or are interrupted. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-07staging: Add shared manifest supportRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-07staging: Don't put ptest files into the sysrootRichard Purdie
This wastes space/time as the ptest files aren't going to be used in the sysroot so add them to the blacklist. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-05image_types_wic: remove dependency to do_bootimgEd Bartosh
Removing task dependency do_wic -> do_bootimg as wic doesn't depend on hddimg/booimg anymore. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-05image: rename image-wic -> image_types_wicEd Bartosh
Make name of the wic image type class consistent with existing naming scheme for image types. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-05kernel-yocto: log the BSP definition fileBruce Ashfield
When debugging a kernel configuration issue, one of the first questions is "what BSP was used". To answer this qusetion, we log the BSP .scc file that was used to generate the kernel configuration in the kernel source meta directory. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-05kern-tools: re-enable scc merge commandBruce Ashfield
The ability to merge two branches directly from a .scc file was dropped during the streamlining of the tools. As was pointed out by David Vincent <freesilicon@gmail.com>, there is once again a valid use case for this functionality, so we restore the capability. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-02uninative: Make patchelf modified files sparseRichard Purdie
When we switched to recipe specific sysroots (rss), performance took a nose dive. Its easy to blame rss but it turns out not to be entirely at fault. Three configurations are compared here: a) Pre-RSS (revision 45df694a9f472ac2f684aadac4d864c3dfdc48a7) b) Post-RSS (revision 226a508da955439b881b2f0a544a3aee76e59919) c) as b) with this change Overall build times: a) 22794.25user 2687.88system 30:32.84elapsed 1390%CPU (0avgtext+0avgdata 919056maxresident)k b) 22677.25user 3238.79system 36:16.68elapsed 1190%CPU (0avgtext+0avgdata 918896maxresident)k c) 23571.84user 3383.65system 31:36.83elapsed 1421%CPU (0avgtext+0avgdata 919068maxresident)k For the overall build and sstate directories, du -s shows: a) 3992588 build-pre-rss/sstate-cache 30804484 build-pre-rss/tmp b) 4013272 build-with-rss/sstate-cache 36519084 build-with-rss/tmp c) 4014744 build-with-rss2/sstate-cache 35336960 build-with-rss2/tmp However more worryingly: $ du -s build-pre-rss/tmp/sysroots/ 2506092 build-pre-rss/tmp/sysroots/ $ du -s build-with-rss/tmp/sysroots-components/ 3790712 build-with-rss/tmp/sysroots-components/ $ du -s build-with-rss2/tmp/sysroots-components/ 2467544 build-with-rss2/tmp/sysroots-components/ These numbers *should* be equivalent but as you can see, b) is ~1.2GB larger. The reason turned out to be patchelf. Taking a specific binary from a specific recipe, bc from bc-native, in a) its 82kb (stripped) yet in b) its 2.17MB. $ ./patchelf --set-interpreter /bin/rp bc warning: working around a Linux kernel bug by creating a hole of 2084864 bytes in ‘bc’ https://github.com/NixOS/patchelf/blob/master/src/patchelf.cc#L710 shows that this "hole" is just padded zeros using memset, its not a proper sparse hole. This patch copies files with cp --sparse=always after modifying them with patchelf, then replacing the original file. The better fix will be to fix this in patchself itself and seek() there when writing the new file but that means new uninative tarballs and will take a bit of work so I'm proposing this workaround in the meantime. Also, this patch drops error handling since subprocess check_output() tracebacks will print this information if the command fails so we can simplify the code.
2017-02-01staging: Reduce the number of mkdirs callsRichard Purdie
The number of mkdir calls was showing up high on the profile charts since it was getting called once per file which is excessive. Each call results in one or more syscalls which is bad for performance. Cache which directories we've seen to reduce the calls to a more reasonable number and speed up recipe specific sysroots. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-01sstate/staging: Batch log messages for performanceRichard Purdie
According to profile data, repeated calls to bb.debug and bb.note in the extend_recipe_sysroot() codepath were accounting for 75% of the time (1.5s) in calls from tasks like do_image_complete. This batches up the log messages into one call into the logging system which gives similar behaviour to disabling the logging but retains the debug information. Since setscene_depvalid is also called from bitbake's setscene code, we have to be a little creative with the function parameters and leave the other debug output mechanism in place. This should hopefully speed up recipe specific sysroots. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31relocatable: Make native .pc files relocatableRichard Purdie
The native .pc files currently have hardcoded paths in them meaning each has to be relocated at final install time. pkg-config has built in functionality to avoid this, namely the pcfiledir variable. This function translates .pc files to use the variable meaning further relocation later is unnecessary. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31utils: Avoid need to relocate wrapper scriptsRichard Purdie
Whilst the path to the executable is dynamically determined, the passed in environment variables or parameters are not relocatable and rely on the sstate remapping code. In the recipe specific sysroot case this has become more costly. This patch translates such paths into relocatable entries which means that a sed replacement at final installation isn't needed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31oeqa/runtime/cases: Rename syslog module to oe_syslogAníbal Limón
Debian based distros has a builtin syslog module so when try to load tests using unittest it references the builtin module instead of runtime/cases. [YOCTO #10964] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31testimage.bbclass: Fixes about suites and dependenciesMariano Lopez
There are some missing suites on sato-sdk and lsb-sdk images so add it. The createrepo-native needs to be built before run testimage in order to create a repository from install packages. The DL_DIR data also needs to be updated from the current bitbake environment instead of use the value from testdata file. [YOCTO #10964] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31populate_sdk_ext: fix == bashismPatrick Ohly
Found via verify-bashisms. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31rootfs-postcommands.bbclass: drop insert_feed_uris functionMing Liu
The source makes no reference to insert_feed_uris any more, simply drop the unused reference, to avoid confusing the developers. Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-31meta: remove remaining True option to getVar callsMing Liu
This is a complementary fix to commit 7c552996: [ meta: remove True option to getVar calls ] it intended to remove all True option to getVar calls, but there are still some remaining. Search made with the following regex: getVar ?\((.*), True\) Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-31testimage.bbclass: Allow to run tests on autobuilder's imagesMariano Lopez
With the change to the new framework data store dependecy was removed, instead a new file is generated and used in testimage. When testing builds from the autobuilders the test data values are from the autobuilder, including the paths. Some tests require paths to current environment in order to run, this commit will update such paths and fix the error of running images donwloaded from autobuilders. [YOCTO #10964] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-31externalsrc: Hide created symlinks with .git/info/excludeOla x Nilsson
Add created symlinks to the exclude file. This will both make them less distracting and hide them from the srctree_hash_files function. Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-31sstate: Make SSTATE_SCAN_CMD vars configurable using weak defaults.Kristian Amlie
For this we move them out of the python section so they can be overridden on a per-recipe basis. The motivation for this change is that not all tool chains need the path modifications provided by the command, and these will provide alternative or empty commands. The Go compiler is such an example. Signed-off-by: Kristian Amlie <kristian.amlie@mender.io> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-31toolchain-shar-extract: compare SDK and host gcc versionsEd Bartosh
If ext sdk is built by gcc version higher than host gcc version and host gcc version is 4.8 or 4.9 the installation is known to fail due to the way uninative sstate package is built. It's a known issue and we don't have a way to fix it for above mentioned combinations of build and host gcc versions. Detected non-installable combinations of gcc versions and print an installation error. [YOCTO #10881] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-31package_deb: handle allarch when mapping tune to dpkg architecturesRoss Burton
It was discovered that buildtools-tarball can't be built with Debian packaging: E: Unable to locate package nativesdk-buildtools-perl-dummy The package exists but dpkg doesn't see it because the Architecture field isn't valid: for this package the Architecture field is 'allarch' which isn't in the list of valid architectures we define. package_deb already has a mapping of OE architectures (PACKAGE_ARCH) to dpkg architectures (DPKG_ARCH), for example our x86_64 is amd64 in dpkg. However allarch.bbclass sets an invalid TARGET_ARCH of 'allarch' (to break anything which attempts to use the target architecture) and package_deb relied on the PACKAGE_ARCH check later turning the Architecture field into 'all'. This usually works, but nativesdk-buildtools-perl-dummy inherits allarch but then changes PACKAGE_ARCH to buildtools-dummy-nativesdk to isolate the packages in a separate feed. We can handle this by explictly checking for allarch in the TARGET_ARCH check, as that everything that inherits allarch will want to have Architecture: all in their packages. [ YOCTO #10700 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31distrodata: add DATETIME to vardepsexclude for do_distro_check.Ross Burton
This task uses DATETIME so add it to vardepsexclude so bitbake doesn't refuse to execute the task when the time changes between the controller and the worker calculating the hash. [ YOCTO #10960 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31grub-efi.bbclass: use 'grub-efi-' prefixEd Bartosh
grub-efi recipe added 'grub-efi-' prefix to the file name of efi binary. Changed grub-efi.bbclass accordingly. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-01-31isoimage-isohybrid: use TRANSLATED_TARGET_ARCH instead of MACHINE_ARCHEd Bartosh
isoimage-sihybrid plugin uses MACHINE_ARCH to get the name of initrd image. It doesn't work for all machines, for example for quemux86-64 machine MACHINE_ARCH is quemux86_64 and initrd name is core-image-minimal-initramfs-qemux86-64.cpio.gz Used TRANSLATED_TARGET_ARCH variable to get the initrd image name. Replaced MACHINE_ARCH->TRANSLATED_TARGET_ARCH in WICVARS variable to make it available from <image>.env file. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-01-31image-wic: remove HDDDIR from WICVARSEd Bartosh
Removed HDDDIR as it's not used by wic anymore. Stopped usage of HDDDIR in wic test suite. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-01-31wic: use INITRD_LIVE in isoimage-isohybridEd Bartosh
INITRD variable is not set if hddimg is disabled. isoimage-isohybrid can't get correct name for initrd if INITRD variable is not set. Added INITRD_LIVE to WICVARS and used it in isoimage-isohybrid code to get initrd artifact name. Used INITRD if INITRD_LIVE is not set. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-01-31image-wic: move wic code to image-wic.bbclassEd Bartosh
There is a lot of wic code in image.bbclass and image_types.bbclass Having all code separated in one file should make it more readable and easier to maintain. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>