aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2015-08-30image.py: write bitbake variables to .env fileEd Bartosh
Write set of bitbake variables used by wic into build/tmp/sysroots/<machine>/imagedata/<image>.env List of variables is defined in WICVARS variable in meta/classes/image_types.bbclass. This is needed for wic to be able to get bitbake variables without running 'bitbake -e'. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30image_types.bbclass: add wic image typeEd Bartosh
wic image type is used to produce partitioned images. Image configuration should be stored in either <recipe>.<machine>.wks or <recipe>.wks file. .wks file should be put to the same location as image recipe and have the same name. [YOCTO #7672] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30dump: allow to have datastore vars on dump commandsMariano Lopez
This allows to have datastore variables in the dump commands and will get the data when a new instance it's created. Also this remove special cases from the commands. [YOCTO #8118] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2015-08-30dump: Created new classes for dump host and targetMariano Lopez
It makes sense to separate the dump commands from the oeRuntimeTest class, this way it can be used in all the test context. These are the changes included in this patch: - Created classes: BaseDumper, HostDumper, TargetDumper - Create an instance of HostDumper in imagetest.bbclass and add it to TestContext class, this way any class that have access to the TestContext would be able to dump logs from the host - Create an instance of TargetDumper in QemuTarget class after get the runner, this way it is accessible during the tests. [YOCTO #8118] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2015-08-30classes/buildhistory: add build result to commit messagePaul Eggleton
We have the command in the commit message, we might as well have the build result as well (succeeded/failed and whether or not it was interrupted by the user). The interrupted part relies upon a change to BitBake to extend the BuildCompleted event to include an attribute for that, but will not fail if the attribute is not present. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30classes/buildhistory: include metadata revisions in commit messagePaul Eggleton
We do already commit these into the repository itself, but have them in the commit message as well as a reference. As part of this, refactor out running "git commit" into a separate function so we don't have to duplicate the code in the two places we call it. Implements [YOCTO #7966]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30classes/buildhistory: handle additional files at recipe levelPaul Eggleton
Avoid an error when attempting to remove previous data if it's not a subdirectory - we were assuming that anything that wasn't named "latest" or "latest_srcrev" had to be a directory. This makes it possible to have a buildhistory_emit_pkghistory_append which writes additional files at the recipe level. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30classes/buildhistory: fix permissions in package file listingPaul Eggleton
If we want the correct file permissions to show up here as they would on the target, we need to run the command under pseudo. Normally we'd set the fakeroot varflag on the function and that would be enough, but it turns out that setting fakeroot on a non-task function that you execute using bb.build.exec_func() isn't working at the moment. Work around this by simply using FAKEROOTENV and FAKEROOTCMD. Unfortunately that means we have to duplicate the command for the two cases but I couldn't find a better means of doing that that actually works. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30classes/buildhistory: tweak buildhistory_list_pkg_filesPaul Eggleton
* Avoid using ${...} for shell variables (since they could be expanded as bitbake variables if present) * Use files-in-package.txt rather than files-in-<packagename>.txt; the file is already in a subdirectory named with the package name and this naming is consistent with that of files-in-image.txt. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30classes/buildhistory: indent recently added function consistentlyPaul Eggleton
Shell functions use tabs in this file. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30classes/buildhistory: exclude . in file listingsPaul Eggleton
We don't care about the permissions on the top-level directory in which the files are contained, just everything under it; this also avoids lists with just this entry in it for empty packages. Affects file listings for both images and packages. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30classes/buildhistory: ensure we push when "no changes" commits are madePaul Eggleton
If there aren't any changes, we still make a commit to the buildhistory repo, but this wasn't being pushed if BUILDHISTORY_PUSH_REPO is set. Move the push to the end to make it unconditional. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30testimage: Run commands in target and host when test failsMariano Lopez
This patch modify three files altought two of them are minimal modifications. This version includes the changes proposed by Paul. testimage.bbclass: Create new vars for easy modification of the dump directory and commands to be run on host and target when a test fails TESTIMAGE_DUMP_DIR: Directory to save the dumps testimage_dump_target: Commands to run on target testimage_dump_host: Commands to run on host oetest.py: - Allow to use the vars defined in testimage class - Now able to run commands in the host and dump the results - Fix an issue with the condition where to run the dump commands (Before it run the commands every test after a failure, now it runs the commands only in tests that failed) - Fix the output to stdout [YOCTO #8118] (From OE-Core rev: 26fe645457633f90bb5ddbb12f5f7b9ca4a06cc5) 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>
2015-08-30autotools.bbclass: Allow dependency tracking option to be overriddenRoy Li
CONFIGUREOPT_DEPTRACK can not be overridden since it is set by = Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30package_*.bbclass: Ensure OVERRIDES doesn't change sstate signatureRichard Purdie
Changes to OVERRIDES (e.g. from changing MACHINE) should not change the sstate signatures of do_package_write_*. Exclude the variable explicitly in the package classes to avoid this. (From OE-Core rev: 5826a9260138c437f87ba1a9f84d5c08442b997d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30nativesdk.bbclass: set sbindir to bindirChristopher Larson
The sbindir vs bindir separation really doesn't mean much in this context, and toolchain-scripts.bbclass doesn't add sbindir to the PATH, so set the former to the latter. (From OE-Core rev: 51a19850700bd96e3d2e104e1626aceb73a48e72) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30update-rc.d.bbclass: explicitly dep on initscriptsChristopher Larson
update-rc.d doesn't just want an initscripts package, it wants initscripts-functions. In the case where VIRTUAL-RUNTIME_initscripts is set to nothing, update-rc.d still needs initscripts-functions to satisfy its runtime dependencies. Further, we shouldn't be using a *runtime* virtual in a *build time* variable. This should resolve image creation failures with configurations without sysv initscripts when a recipe inherits update-rc.d and doesn't inherit systemd. (From OE-Core rev: e6642ae0849e5ac3174c643a7693af25d829d6d1) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30image.bbclass: re-run do_rootfs when feature packages changeChristopher Larson
Currently, FEATURE_PACKAGE_<feature> isn't in any vardeps, so changing the packages for a feature won't change the checksum for do_rootfs. Rather than explicitly adding those to vardeps, just use the expanded form of FEATURE_INSTALL and FEATURE_INSTALL_OPTIONAL, so the actual list of packages from the features goes into the checksum. (From OE-Core rev: fdd1669e04bd8219344b1896b9d9c6a187e4f84e) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30cross-canadian.bbclass: support for TCLIBC="baremetal"Juro Bystricky
Allow "baremetal" builds. (From OE-Core rev: 0cd3121058ea620c74622f1200c8040696b4d1d8) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-29Empty image: filesystem allocationAlex Franco
Increase sparse image block size when ROOTFS_SIZE is smaller than the minimum needed for ext4 to fit into it. [YOCTO #7664] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-29Empty image: package list splitting and iterationAlex Franco
A few short fixes to splitting/iteration done over package lists in license.bbclass, package_manager.py and rootfs.py. [YOCTO #7664] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-24package_rpm.bbclass : escape "%" in files and directories nameSébastien Mennetrier
The rpm process replace all the "%name" in the spec file by the name of the package. So, if the package is composed of some files or directories named "%name...", the rpm package process failed. Replace all "%" present in files or directories names by "%%%%%%%%" to correctly escape "%" due to the number of times that % is treated as an escape character. Jeff Johnson says this is the Right Thing To Do. [ YOCTO #5397 ] Signed-off-by: Sébastien Mennetrier <smennetrier@voxtok.com> Signed-off-by: Michaël Burtin <mburtin@voxtok.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-24classes/insane: fix QA check message referring to nativesdkPaul Eggleton
nativesdk has been a prefix rather than a suffix for some time now. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-24classes/cmake: add arch conversion routineAlexander Kanavin
cmake expects target architecture strings in the format of uname(2), which do not always match TARGET_ARCH (e.g. powerpc vs ppc). Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-24classes/gnomebase: change tarball compression to xzAlexander Kanavin
Upstream, xz has been the only format for some time now, so let's make it the default and adjust recipes that package old stuff. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-24kernel-arch: Force BFD kernel when using gcc for linkingKhem Raj
We redefine LD to point to ld.bfd when building kernel, which works in most cases since kbuild system calls out for bare LD most of the time, however some of newer kernels e.g. 4.1+ have some code added which can call gcc directly to do the linking job e.g. arm vdso code This causes build failures when we have configured the default cross toolchain to use gold linker as default. Errors like BFD: arch/arm/vdso/vdso.so: Not enough room for program headers, try linking with -N | arm-angstrom-linux-gnueabi-objcopy:arch/arm/vdso/vdso.so[.hash]: Bad value start happening. With this patch we force gcc to choose bfd linker as well Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-24gnome: move introspection options to gnomebaseRoss Burton
The gnome class is really a convenience class to include other classes, so move the introspection arguments into gnomebase.bbclass. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-19binconfig-disabled: write an message to stderr to help confused developersRoss Burton
Often configure scripts or Makefiles that use the stub scripts written by binconfig-disabled fail mysteriously with no obvious problem. Attempt to solve this by writing an error to stderr which hopefully makes it to the logs. [ YOCTO #8169 ] Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-19package_deb.bbclass: Allow UTF-8 characters on control filesLeonardo Sandoval
Allow UTF-8 characters on control files. Also handle an expection in case of invalid characters (non UTF-8). [YOCTO #6693] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-19archiver.bbclass: Run deploy_archives in $WORKDIRClemens Lang
In recipes that are exempt from source code archiving due to COPYLEFT_LICENSE_EXCLUDE, do_deploy_archives does not have a transitive dependency on do_unpack. Given enough parallelism, this means do_deploy_archives can run at the same time or before do_unpack. Because do_deploy_archives did not specify a working directory, its working directory was ${B}, which defaults to ${S}, which may be set by a recipe to a directory that is created by do_unpack. In this case, do_deploy_archives can fail because do_unpack deletes and re-creates the directory and do_deploy_archives cannot change into the non-existent directory. Avoid this problem by explicitly specifying a working directory for do_deploy_archives (and for do_deploy_all_archives as well for good measure). Signed-off-by: Clemens Lang <clemens.lang@bmw-carit.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-19image_types.bbclass: allow replacing tar commandPatrick Ohly
Usually, the host's tar command is sufficient. However, special cases like archiving xattrs depend on a modern GNU tar version. The new IMAGE_CMD_TAR makes that possible, with xattrs given as example. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-16IMAGES_FSTYPES: default to EXT4Juro Bystricky
The following IMAGES_FSTYPES defaulted to ext3: "vmdk", "vdi", "qcow2", "live", "iso", "hddimg" This patch changes the default for those IMAGES_FSTYPES to ext4 in order to bring the images more in line with other BSPs. Besides improvements in performance and reliability ext4 provides additional functionality as well (option to turn off the journaling, dynamic resizing of VDI volumes etc.). Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-14kernel: Correct mishandling of linux.bin for building uImageHe Zhe
Building uImage fails when KEEPUIMAGE is not "yes". Remove wrong removal of linux.bin before compressing it. 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>
2015-08-14distrodata: Make self-contained.Aníbal Limón
Include by default all the files needed to perform checkpkg task. These files are copied from meta-yocto because they refers recipes in oe-core, the only missing file are maintainers.inc because it needs consensus between OE-Core and Yocto project to define a common set of maintainers. [YOCTO #7895] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-11Revert "base.bbclass/blacklist.bbclass: remove doc item when d.getVarFlags()"Ross Burton
This deletes and therefore breaks PACKAGECONFIG[doc], so revert. This reverts commit b741780d43ad412f6a1ae91d8489ec3522447ea2. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-11cml1.bbclass: make menuconfig task configurableStefan Müller-Klieser
Menuconfig is sometimes not the most convenient way to configure a kernel, as the default color scheme can be hard to read. This variable gives you access to the MENUCONFIG_COLOR variable or lets you select nconfig, e.g. by setting it in your local.conf: KCONFIG_CONFIG_COMMAND = "MENUCONFIG_COLOR=mono menuconfig" or KCONFIG_CONFIG_COMMAND = "nconfig" Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-11kernel.bbclass: dont assume ${B}/include/generated existsAndre McCurdy
Older kernels (e.g. 2.6.32) don't create an include/generated directory, so check that the directory exists before trying to copy files from it in do_shared_workdir(). Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-11sanity.bbclass: check SSTATE_DIR, DL_DIR and *MIRROR for broken symlinksMikko Rapeli
This change makes broken symlinks stand out clearly instead of bitbake failing with odd error messages. Tested locally with broken symlink as SSTATE_DIR, DL_DIR and SSTATE_MIRROR. Change-Id: I2e92702237ab3bdb897d0bdefcf33480aabbc288 Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-09systemd.bbclass: Use systemd_system_unitdirPau Espin Pedrol
Signed-off-by: Pau Espin Pedrol <pau.espin@aweurope.be> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-09bootimg.bbclass:iso: determine the -iso-level only if there is a rootfsRicardo Neri
It may be possible that some bootable images do not use a rootfs; this may be the case if the bootable image utilize only an initrd for all its needs. If there is not rootfs, the size calculation will fail. Furthermore, given that the iso9660 conformance level is determined using the size of rootfs, it makes sense to not make the calculation if there is not such rootfs. Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01useradd_base.bbclass: do not warn when the user existsRobert Yang
Use bbnote rather than bbwarn when the user exists, otherwise we would always get the warnings when rebuild the recipe or build with mulitlib, everything is OK if the user exists, so it should not be a warning. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01useradd_base.bbclass: print PN when bbnote/bbwarn/bbfatalRobert Yang
Print PN will help debug: WARNING: openssh: user sshd already exists, not re-creating it Which is better than: WARNING: user sshd already exists, not re-creating it Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01base.bbclass/blacklist.bbclass: remove doc item when d.getVarFlags()Robert Yang
The FOO[doc] is set in meta/conf/documentation.conf, we need remove it from d.getVarFlags()'s return dict when it causes many loops. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01base.bbclass: move invalid PACKAGECONFIG checking to insane.bbclassRobert Yang
There was a problem when check invalid PACKAGECONFIG in the anonymous function (when parsing), for example, there are two versions of a recipe: foo_1.0.bb foo_2.0.bb While foo_2.0.bb has a "PACKAGECONFIG[item] = 'x,y,z'", but foo_1.0.bb doesn't, if we set PACKAGECONFIG_pn-foo = "item" in a conf file, we would get the warning about invalid PACKAGECONFIG for foo_1.0.bb. Delay the checking to build time will fix the problem. [YOCTO #8065] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01populate_sdk_ext: pass BBPATH to devtool --bbpathChristopher Larson
Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01populate_sdk_ext: use lnr, not ln -sr, for portabilityChristopher Larson
Not all hosts are running sufficiently new coreutils. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01base.bbclass: Note when including pn with INCOMPATIBLE_LICENSESBeth Flanagan
We need to be able to tell people if we WHITELIST a recipe that contains an incompatible licese. Example: If we set WHITELIST_GPL-3.0 ?= "foo", foo will end up on an image even if GPL-3.0 is incompatible. This is the correct behaviour but there is nothing telling people that it is even happening. Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-31license_class: Fix choose_lic_set into incompatible licenseAníbal Limón
Use canonical_license when doing evaluation of license expresion since INCOMPATIBLE_LICENSE are already canonized. [YOCTO #8080] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-31distrodata.bbclass: drop the manual upstream version check logicAlexander Kanavin
It's already taken care of in meta/lib/oe/recipeutils.py Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-31distrodata.bbclass: do not skip -native recipes in checkpkg taskAlexander Kanavin
Some recipes are available only in the -native flavour, and we need to check their upstream version too from the command line. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>