aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2016-04-04classes/buildhistory: fix grammar in commentsPaul Eggleton
Fix a minor grammatical error in the comments here. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-04classes/buildhistory: fix filtering of depends-nokernel.dotPaul Eggleton
For images we produce a number of filtered dependency .dot files for readability, the first of which is depends-nokernel.dot which filters out just the kernel itself (not kernel modules). Unfortunately the filter specifications hadn't been updated for the dash-to-underscore removal or the 4.x kernel upgrade, thus the filtering wasn't actually doing anything. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-04classes/buildhistory: optimise getting package size listPaul Eggleton
Invoking oe-pkgdata-util in turn for every package in the list was slow with a large image. Modify oe-pkgdata-util's read-value command to take an option to read the list of packages from a file, as well as prefix the value with the package name; we can then use this to get all of the package sizes at once. This reduces the time to gather this information from minutes to just a second or two. Fixes [YOCTO #7339]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03image-vm: Exclude DISK_SIGNATURE_GENERATED from task signatureRichard Purdie
Otherwise the task hash changes between server and worker context leading to changing task checksums. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03populate_sdk_ext: Exclude BBTASKDEPDATA from task signatureRichard Purdie
Otherwise the task hash changes between server and worker context leading to changing task checksums. The dependency data here is tracked by other pieces of the signature. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03kernel-yocto: enforce SRC_URI specified branchBruce Ashfield
During the simplication and cleanup of branches and kernel meta data handling, the ability to force build a branch that didn't match the meta data was dropped. There are valid uses cases when a different branch should be built (testing, development, etc), so we restore the capability with this change. If after the kernel meta data is processed the current branch does not match the SRC_URI specified branch, a warning is generated about the impending branch switch and that the user should double check that they are building what they expect. WARNING: After meta data application, the kernel tree branch is standard/base. The WARNING: SRC_URI specified branch standard/gt. The branch will be forced to standard/gt, WARNING: but this means the board meta data (.scc files) do not match the SRC_URI specification. WARNING: The meta data and branch standard/gt should be inspected to ensure the proper WARNING: kernel is being built. Reported-by: Steve Sakoman" <steve.sakoman@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03insane.bbclass: avoid false positives on library locationBill Randle
package_qa_check_libdir() reports that the file libsoletta.so.0.0.1-gdb.py in /usr/share/gdb/auto-load is in the wrong location. Before generating a warning for files in non-standard locations, check that the file is an actual elf file (and hence a real library file). [YOCTO #9215] Signed-off-by: Bill Randle <william.c.randle@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03grub-efi.bbclass: use GRUB_ROOT rather than APPEND for root deviceRobert Yang
Use APPEND for grub's root device may cause confusion, for example, when building efi + pcbios, there maybe be two root=/dev/ram0, one of them would be carried to the installed target, and the target would fail to boot. Use GRUB_ROOT to fix the problem, and remove SYSLINUX_ROOT from APPEND will fix the problem. [YOCTO #9354] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03base: Fixup PACKAGECONFIG incorrect mappingsRichard Purdie
PACKAGECONFIG doesn't work in cross-canadian recipes at the moment as DEPENDS are prepended with mlprefix. A recipe is either nativesdk, native or target so adjust the if statements accordingly, use inherits_class for more accurate recipe classification and add cross-canadian support. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-01classes/packagegroup: Refactor code to be simplerUlf Magnusson
This makes the code a bit shorter and more readable. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-01image: Fix debugfs image type recursion loopFreudiger Raphael
The debugfs prefix is striped from t, but not from baset. Therefore baset never matches t. Signed-off-by: Freudiger Raphael <raphael.freudiger@siemens.com> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31base.bbclass: avoid duplicate call to d.getVar('LICENSE', True)Andre McCurdy
Reuse the 'license' variable, instead of calling d.getVar('LICENSE', True) again. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31base.bbclass: drop obsolete HOSTTOOLS_WHITELIST_GPL-3.0Andre McCurdy
base.bbclass sets 'check_license' to False (and therefore skips license checking completely) for native, nativesdk, etc recipes (ie anything which could potentially be classed as "host tools"), so supporting a dedicated whitelist of GPLv3 host tools is not necessary. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31image-vm.bbclass: remove invalid codeRobert Yang
It has been done in syslinux.bbclass. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31image-live.bbclass/image-vm.bbclass: remove duplicated codeRobert Yang
Move the common code to live_vm_common.bbclass and remove duplicated ones. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31bootimg.bbclass: merge it into image-live.bbclassRobert Yang
They are doing the same things: create live images, merge them into one bbclass makes it easy to understand. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31boot-directdisk.bbclass: merge it into image-vm.bbclassRobert Yang
They are doing the same things: create virtual machine images, merge them into one bbclass makes it easy to understand. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31image.bbclass: Make unneeded packages for a read-only rootfs configurablePeter Kjellerstedt
Previously the list of packages that are considered unneeded for a read-only rootfs was hardcoded. This made it impossible to, e.g., have shadow installed on a system with a read-only rootfs, but where /etc is mounted writable. This also lists ${VIRTUAL-RUNTIME_update-alternatives} rather than update-alternatives (as was previously the case) since this should actually remove the intended package. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31oe-publish-sdk: exclude sstate-cache if publishing minimal SDKPaul Eggleton
If SDK_EXT_TYPE is set to "minimal" then the SDK won't contain many sstate artifacts, and you're required to set up an sstate mirror in this case anyway so there's no point publishing the "stub" sstate-cache directory from within the SDK since it won't be useful for update purposes and may be confused with the real sstate-cache. There is however a possibility that people might publish the real sstate-cache directory under the same output directory provided to oe-publish-sdk, thus deleting it after extracting (as we were doing with other files we wanted to clean up at the end) would be problematic, besides which extracting it and then deleting it is wasteful. Thus, introduce a "-p" command line option to the SDK installer that we can use to tell tar not to extract the items we don't want when publishing. This has the added benefit of mostly keeping references to these in the place they belong i.e. in populate_sdk_ext.bbclass. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31classes/populate_sdk_ext: support setting vars from environment at build timePaul Eggleton
When running bitbake you may pass in values of variables from the external environment (making use of BB_ENV_EXTRAWHITE), and you may choose to do this when building the extensible SDK, for example: MACHINE=qemuarm bitbake -c populate_sdk_ext core-image-minimal You would naturally expect those settings to be reflected in the extensible SDK itself; however they were not, since we were only considering local.conf and auto.conf. Check the variables mentioned in BB_ENV_EXTRAWHITE to see if any are different than the values set in local.conf/auto.conf and add lines setting them in the SDK's local.conf if so. Fixes [YOCTO #9339]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31image-live.bbclass: DEPENDS on syslinuxRobert Yang
The mkisofs requires syslinux/isolinux.bin which is provided by target syslinux, for pcbios, the depends is already there, but for EFI, it isn't, so add the depends. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-30sanity.bbclass: Use pythonexception to raise real exceptions without backtracesRichard Purdie
If the sanity code encounters a version change is doesn't understand, the current output is unreadable and confusing for the user, particularly due to the presence of the backtrace. Use improved functionality in bitbake to improve this and correctly pass python exceptions around. [YOCTO #9291] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-30uninative: Switch md5sum -> sha256Richard Purdie
There are various concerns about md5 so use sha256 instead. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-30archiver.bbclass: addtask do_deploy_archives_setsceneRobert Yang
There was a do_deploy_archives_setscene, but no addtask. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2016-03-29siteinfo: Fix musl 64bit targetsKhem Raj
Found that ssize_t was being wrongly computed for mips64 musl because it was using wrong cache files. alias them to glibc versions, musl doesn't _yet_ have target incompatibilities to note in siteinfo thankfully. Add musl aliases for aarch64 and ppc64 targets Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-29buildhistory.bbclass: create image directory when neededPatrick Ohly
buildhistory_get_imageinfo() assumed that the buildhistory directory for the image had already been created earlier. That assumption is not true for special images (like the virtual swupd images from meta-swupd) where the entire traditional do_rootfs/do_image is skipped. Creating files-in-image.txt still makes sense for such images, so support them by creating the directory also in buildhistory_get_imageinfo(). Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28conf/bitbake.conf package.bbclass: fix dbg package not contain sources while ↵Hongxu Jia
-fdebug-prefix-map used Tweak DEBUG_FLAGS to use "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}" as source target path in DWARF. While use gdb to debug binary, it could work with sources in dbg package. While -fdebug-prefix-map is used for compiling, we do not need invoking debugedit to edit DWARF at do_package time, but list where sources files are. The copydebugsources uses the list to copy sources to dbg package. It works whether -fdebug-prefix-map used or not. [YOCTO #9305] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28externalsrc: remove nostamp from do_configureMarkus Lehtonen
Extend the srctree_hash_files() function in externalsrc.bbclass to handle non-Git source trees. If the source tree is not a git repository, srctree_hash_files() now simply adds the whole source tree as a dependency, causing bitbake to basically hash every file in it. Hidden files and directories in the source tree root are ignored by the glob currently used. This has the advantage of automatically ignoring .git directory, for example. During the first bitbake run preparing of the task runqueue may take much longer if the source tree is not a git repository. The reason is that all the files in the source tree are hashed. Subsequent builds are not significantly slower because (most) file hashes are found from the cache. [YOCTO #8853] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28externalsrc: do not use do_configure[nostamp] for git srctreesMarkus Lehtonen
Be a bit more intelligent than mindlessly re-compiling every time. Instead of always using 'nostamp' flag for do_compile run a python function to get a list of files to add as 'file-checksums' flag. The intention is to only re-run do_compile if something in the source tree content changes. This python function, srctree_hash_files(), works differently, depending if the source tree is a git repository clone or not. If the source tree is a git repository, the function runs 'git add .' and 'git write tree' to get a hash of the working tree and writes this hash into a file under the .git directory. This file containing the hash is then returned as the file for the task to depend on. Hash is changed if any changes are made in the source tree causing the task to be re-run. A trick is used to parse the recipe every time so that the hash file gets updated. If the source tree is not a git repository behaviour remains the same. In this case srctree_hash_files() currently sets the 'nostamp' flag for do_compile causing it to be re-run every time. This method of tracking changes source tree changes to determine if re-build is needed does not work perofectly, though. Many packages are built under ${S} which effectively changes the source tree causing some unwanted re-compilations. However, if do_compile of the recipe does not produce new/different artefacts on every run (as commonly is and should be the case) the re-compilation loop stops. Thus, you should usually see only one re-compilation (if any) after which the source tree is "stabilized" and no more re-compilations happen. [YOCTO #8853] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28archiver.bbclass: Just archive gcc-source for all gcc recipesMariano Lopez
It is pointless to archive several times the gcc source. This change will archive gcc source once, for the gcc-source-{PV} recipe. [YOCTO #9327] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28gio-module-cache: Add class for Gio modulesJussi Kukkonen
The new class uses gio-querymodules tool on postinst and postrm. This regenerates the module cache which is useful to avoid loading modules that are not needed at runtime: If a Gio module is not listed in the cache file it will always get loaded. * Add a postinst-intercept 'gio-module-cache': it runs gio-querymodules using qemuwrapper. This is required because the tool actually loads the modules to generate the cache. * Add a gio-module-cache class that adds postinstall and postrm scripts. In the sysroot population case use the new intercept. * Inherit the new class in glib-2.0, glib-networking and gconf. Fixes [YOCTO #9241]. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28image.bbclass: run wicenv task only for wic imagesEd Bartosh
Currently do_wicenv task is run for all images. However, its result is used only to produce wic image. It's better to run this task only for wic images. If another rootfs is required to produce wic image, dependency to its do_wicenv must be added to the wic image recipy. Stopped running do_wicenv for all images. Added explicit dependency to this task in wic-image-minimal recipe. [YOCTO #9095] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28rootfs-postcommands: don't write manifest when IMAGE_MANIFEST emptyJoshua Lock
Return early in write_image_manifest () if the IMAGE_MANIFEST variable is unset. This allows us to prevent writing of the manifest where we prevent images being created for a recipe by unsetting IMAGE_FSTYPES. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28bitbake.conf: rename 'gobject-introspection-data' machine feature to ↵Alexander Kanavin
'qemu-usermode' The new value is more general and better reflects what having the feature really means. Introspection data, then, is built only if 'gobject-introspection-data' is in DISTRO_FEATURES and 'qemu-usermode' is in MACHINE_FEATURES. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-26kernel.bbclass: consider .csp firmware filesKhem Raj
Fixes kernels which package sb16 firmware e.g. directories were installed but not shipped in any package: /lib/firmware/sb16 /lib/firmware/sb16/ima_adpcm_playback.csp /lib/firmware/sb16/ima_adpcm_init.csp /lib/firmware/sb16/mulaw_main.csp /lib/firmware/sb16/ima_adpcm_capture.csp /lib/firmware/sb16/alaw_main.csp Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-26icecc.bbclass: replace icc with iceccAlex Franco
Make this class more clear and consistent, and avoid confusion with the Intel C compiler (icc); the changes affect function names, and calls to those functions [YOCTO #8934] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-26icecc.bbclass: expand package archAlex Franco
Expanding PACKAGE_ARCH might be necessary as it is being checked against to determine if this is allarch [YOCTO #8934] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-26icecc.bbclass: add icc_is_allarch inherit checkAlex Franco
Additional check for inheritance of allarch.bbclass, for when checking that PACKAGE_ARCH == "all" is not enough to be sure a recipe is "allarch"; e.g. nativesdk-buildtools type recipes [YOCTO #8934] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-26classes/sanity: use proper multi-line string literalsPaul Eggleton
A python string literal isn't meant to be split over multiple lines unless it is explicitly multi-line. Use three quotes to indicate that. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25uninative: don't try to relocate static binariesRoss Burton
patchelf will understandably error out if there isn't a .interp section to relocate, so don't try to relocate static binaries. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25uninative: ensure patchelf errors are visibleRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-24archiver.bbclass: Fix tar name for git repositoriesMariano Lopez
When archiving the original source, the git repositories have the name as they are in the $DL_DIR plus the source revision; i.e. "git.yoctoproject.org.linux-yocto-4.4.git.89419d8b90_dadb436904.tar.gz". This change set the tar name to $PF.tar.gz instead, to have consistency with the others archives created by the class. Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-24archiver.bbclass: Fix gcc-source corner caseMariano Lopez
Bitbake couldn't add the task ar_configured when trying to archive the configured source for gcc-source-${PV} recipes. This is because the task depended in the do_configure and this task doesn't exist for gcc-source. This fix allows to archive configured gcc-source recipe. Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-24archiver.bbclass: Fix use of ARCHIVER_WORKDIR and ARCHIVER_OUTDIRMariano Lopez
Currently do_unpack_and_patch() and do_ar_configured() are using the ARCHIVER_OUTDIR as the ARCHIVER_WORKDIR, this lead to have duplicated files inside the tars when using the archiver class for patched and configured source. Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-24archiver.bbclass: Don't expand python functions in dumpdataMariano Lopez
Currently the dumpdata task expands python data in the datastore, in some functions this causes a silent error and the task will fail. The change also rewrite the function to make a bit clearer. Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-24sanity.bbclass: check host tool dependencies on change in NATIVELSBSTRINGBill Randle
When a user upgrades their host distro, it may no longer have all the required tools installed, but this won't be caught by bitbake resulting in possible build errors. Rather than check for installed tools on every startup, use the NATIVELSBSTRING change as indicator to rescan for host tool dependencies. Store the NATIVELSBSTRING in the sanity_info file. [YOCTO #8585] Signed-off-by: Bill Randle <william.c.randle@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-24package.bbclass: Treat .node files same as .so when checking what to stripBrendan Le Foll
Typically in a node/npm compiled modules the module is named .node. This is a binary module without a wrapper so it can actually be relatively large if unstripped. Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-24bootimg.bbclass: only inherit syslinux when pcbiosRobert Yang
syslinux.bbclass should not be seen when use efi. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-24grub-efi.bbclass: make it can build vm and live togetherRobert Yang
* Make it can build vm and live (e.g., iso + vmdk) together as we did for syslinux. * GRUBCFG -> GRUB_CFG as other GRUB_FOO vars Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-24bootimg.bbclass: fix settings for grub-efi.bbclassRobert Yang
Fixed: - Found potential conflicted var LABELS ... Set LABELS to "boot install" would build out broken images when build vm + live together, use set_live_vm_vars() to fix the problem. - Use ROOT and LABEL in boot-directdisk.bbclass and image-foo.bbclass, they are not only used by syslinux.bbclass, but also grub-efi.bbclass, add "SYSLINUX_" prefix would mislead users. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>