path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* sstate.bbclass: Don't create symlinks, download to the correct locationRandy Witt2016-05-251-9/+3
| | | | | | | | | | | | Previously the sstate was all downloaded to the same directory and then symlinks were added in the directories that pointed to the siginfo and sstate in the parent directory. This change makes it so that now the files are just downloaded to the correct location without the need for symlinks. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd: Fix infinite build loopRichard Purdie2016-05-231-6/+6
| | | | | | | | | | http://git.openembedded.org/openembedded-core-contrib/commit/?id=642c6cf0b6a0371de476513162bd0cefa9c438b3 introduces a problem if the USERADD_PARAM variable has trailing whitespace as the code infinitely loops causing build hangs. Add a similar sed expression to $remaining to avoid this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: additional output in create_symlinksPatrick Ohly2016-05-221-3/+5
| | | | | | | | | | When a symlink does not get created, it is useful for debugging to log what would have been created and why it was skipped. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
* image.bbclass: support duplicate compression typesPatrick Ohly2016-05-221-1/+9
| | | | | | | | | | | | | | | | | | | When a derived distro adds a certain type, say zip, to COMPRESSIONTYPES and later OE-core does the same, we end up with the type being listed twice, and that would have undesired effects (commands generated twice). So to support such loosely coupled extension, we de-duplicated the list of types first. Alternatively, such a situation could also be treated as error. But that seems unnecessary because typically commands for the same type will also do the same thing. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
* meta: Update to modern exception syntaxRichard Purdie2016-05-212-2/+2
| | | | | | | Update older exception syntax to modern one required by python 3. Compatible with python 2.7. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-uimage: Fix python indentationRichard Purdie2016-05-211-6/+6
| | | | | | Use spaces, not tabs for python functions. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/scripts: python3: rename file -> openRichard Purdie2016-05-211-3/+2
| | | | | | | | | | file() API doesn't exist in python 3, convert to open(). Also handle some cases where files aren't closed. Compatible with python 2.7. [Contributions from Ed and Richard] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/kernel: check OLDEST_KERNEL at configure timePaul Eggleton2016-05-201-0/+14
| | | | | | | | | | | | | | If the kernel being built is older than OLDEST_KERNEL and we're building with glibc, then the C library we're building is probably not going to be compatible with the kernel and we should warn the user. (This is easier to do here rather than when building glibc, because we don't necessarily have the information we need to determine the kernel version there, whereas we do here.) Fixes [YOCTO #8653]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
* classes/kernel: fix typoPaul Eggleton2016-05-201-1/+1
| | | | | | | KERNEL_VERISON -> KERNEL_VERSION (in a comment) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
* classes/populate_sdk_ext: adjust variable blacklistingPaul Eggleton2016-05-201-0/+4
| | | | | | | | | | | | * Blacklist SSTATE_DIR, DL_DIR and TMPDIR by default to avoid problems such as the one mentioned in [YOCTO #9605]. * Blacklist BB_NUMBER_PARSE_THREADS since we already blacklist BB_NUMBER_THREADS and they may be set separately. Fixes [YOCTO #9605]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
* kernel: fitimage: Repair misuse of shell test commandMarek Vasut2016-05-201-1/+1
| | | | | | | | | | | | | | The kernel fitImage must be amended with signature if and only if UBOOT_SIGN_ENABLE = 1 . In the current case, the UBOOT_SIGN_ENABLE could be either 0 (default) or 1 , which test -n always correctly interprets as non-empty string, thus always true. This does not match the logic above though, so replace the test with check which passes only for UBOOT_SIGN_ENABLE = 1 . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Yannick Gicquel <yannick.gicquel@iot.bzh> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
* kernel: moves KERNEL_SRC_PATH to bitbake.confMing Liu2016-05-191-4/+0
| | | | | | | | "/usr/src/kernel" is being hard-coded in multiple recipes so far, move its definition to bitbake.conf. Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_regex.inc: remove deprecated fileMaxin B. John2016-05-191-1/+0
| | | | | | | | Remove this file as it has been deprecated in the previous release. New entries should be added to recipes itself. Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd.bbclass: Strip trailing ';' in cmd paramsKhem Raj2016-05-191-7/+7
| | | | | | | | | | | | | | | | | | | | | | When there are more than 1 packages in a recipe requiring useradd services, they are concatnated and a ';' is inserted just after each of the users being added by the packages. A situation arises in cases where this is controlled by PACKAGECONFIG then we add a ';' separator in the USERADD_PARAM value itself for each packagecofig since we do not know which one will be picked, we end up in situation where the final string returned from get_all_cmd_params() appears to be a; ; b; c; and then the logic which uses these cmds triggers with ';' as separator but in this case it will fail after executing useradd 'a' because the next cmd it will call will be just a whitespace This is highlighted by the systemd patch to add more users as needed by systemd 229 components. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd: use bindir_native for pseudo PATHMartin Jansa2016-05-191-2/+2
| | | | | | | | * useradd/userdel functions will fail for recipes which override their target prefix (e.g. to /opt/foo), because it will try to use pseudo from native-sysroot/opt/foo/bin/pseudo Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: Remove exported testMariano Lopez2016-05-181-120/+17
| | | | | | | | Exported tests now have their own class, so the code in testimage is not needed anymore. Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testexport.bbclass: Split testimage classMariano Lopez2016-05-181-0/+150
| | | | | | | | | | | | This adds a new class that only export tests of images, the code was taken from testimage class and most of it wasn't modified. Just add some vars for the new class. testexport class require testimage class to get the test suites defined for all the images. Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/base: get_lic_checksum_file_list imporve validaton of url'sAníbal Limón2016-05-171-0/+3
| | | | | | | | | | | When specify an URL different that supported file:// the function returns an empty path causing an exception without notice the user that the URL is Malformed. [YOCTO #9211] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Ensure we sort the value used for SSTATETASKS for determinismRichard Purdie2016-05-161-1/+1
| | | | | | | This avoids 'basehash changed' errors with python 3 but could break build determinism in general. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/oeqa: Update for print statements and file() -> open() for python3Richard Purdie2016-05-164-16/+16
| | | | | | Found some more syntax cleanups needed for python3. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: fix py3 SyntaxError in cfgscript print()Tim Orling2016-05-141-1/+1
| | | | | | | Update so this works with python3. Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image types: add bmap generation optionAlexander D. Kanevskiy2016-05-141-1/+3
| | | | | | | | | | | | bmap image conversion type allows to create block map files for sparse images. Bmap file can be used together with bmap-tools for efficiently flash images to raw devices (hdd or usb drive) [YOCTO #9414] Signed-off-by: Alexander D. Kanevskiy <kad@kad.name> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: add support for zip compressionPatrick Ohly2016-05-141-1/+5
| | | | | | | | | | Support for the other compression format is not always readily available on all OSes. Using zip instead of, say, xz is less efficient, but perhaps more user-friendly for users on such OSes. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* report-error: Replace the build directory path in the error textMichael Wood2016-05-141-0/+5
| | | | | | | | | | Replace the TOPDIR in the output error file so that the error report once submitted can then be more easily matched to find duplicate error reports. This also reduces the need to manually redact any information that might be in the error log path such as hostnames or home directories. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: adjust default level of XZ compressionAlexander D. Kanevskiy2016-05-131-1/+1
| | | | | | | | | | XZ extreme compression method usually uses a lot more CPU time with not that often big saving on space. Same goes with -6 level of compression. Compression level -3 usually the best balance for time/size, especially on big images. Signed-off-by: Alexander D. Kanevskiy <kad@kad.name> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: enable verbose buildsRoss Burton2016-05-131-1/+1
| | | | | | | | To help debugging build problems pass VERBOSE=1 to make so that the makefiles print their commands, just like we do with autotools. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc-runtime, libgcc: Symlink c++ header and startup files in target_triplet ↵Khem Raj2016-05-131-0/+1
| | | | | | | | | | | | | | | | | | | | | for SDK use We build SDKs such that gcc-cross-candian is built for only one target *-*-linux and then use -muclibc or -mmusl to let it compile code for other libc variants. This works fine when libc = glibc however it does not work for c++ programs when libc != glibc since there are c++ headers installed under ${includedir}/c++/${BINV}/${TARGET_SYS} which is fine when gcc-runtime and gcc-cross-candian uses same --target options gxx includedir searches in right triplet, but it fails with musl/uclibc since gcc will look for glibc based triplet but gcc-runtime will install them under musl/uclibc triplet. This patch symlinks the musl/uclibc triplet to glibc triplet when libc != glibc This fixes SDKs for musl/uclibc Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* conf: bump minimum kernel to 3.2.0Khem Raj2016-05-131-1/+1
| | | | | | | | | | glibc 2.24 have raised the bar for minimum supported kernel for more details see http://repo.or.cz/glibc.git/commit/5b4ecd3f95695ef593e4474b4ab5a117291ba5fc Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-common.bbclass: Use sed instead of grepKhem Raj2016-05-131-4/+2
| | | | | | | | | Squash two install cmds into one Replace grep with sed substitution logic, optimizes away mv cmd Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging.bbclass: Make it easier to define which dirs to stagePeter Kjellerstedt2016-05-131-33/+42
| | | | | | | | | | | | | The directories that should be staged in the sysroot are now specified in the SYSROOT_DIRS variable. Extra directories that should be staged for native are specified in SYSROOT_DIRS_NATIVE. Finally, directories that should not be staged are specified in SYSROOT_DIRS_BLACKLIST. This also removes the sysroot_stage_libdir() function as it is no longer used (it was just a wrapper for sysroot_stage_dir()). Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Drop unneeded LIC_FILES_CHKSUM valuesPaul Eggleton2016-05-112-6/+0
| | | | | | | | With the changes to insane.bbclass we don't need LIC_FILES_CHKSUM to be set for recipes that don't actually pull in any source. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/insane: do not force LIC_FILES_CHKSUM unless SRC_URI is setPaul Eggleton2016-05-111-3/+3
| | | | | | | | | | | | | Recipes such as images and packagegroups don't actually fetch or build any source, so there's really no point having LIC_FILES_CHKSUM set. Forcing users to set it (as we have done for images inheriting image.bbclass) just makes things more difficult for the user for no discernable benefit. The easiest way to adjust this check is simply to skip it if SRC_URI is not set since this is a pretty good indicator that no source is being pulled in. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-alternatives: Fix determinism issueRichard Purdie2016-05-111-2/+2
| | | | | | | | | | | | getVarFlags returns a dict and there is therefore no sort order. This means the order of the X_VARDEPS_X variables can change and hence the task checksums can change. This can lead to rebuilds of any parts of the system using update-alternatives and their dependees. This is a particular issue under python v3. Add in a sort to make the order of the variables deterministic. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Fix IMAGE_FEATURES determinism issueRichard Purdie2016-05-111-1/+1
| | | | | | | | | | | remain_features uses a dict which means the order is not deterministic. This can lead to the task hash changing depending on the state of the memory at parse time. This is particularly noticeable under python v3. Since the dict is helpful in constructing the data, pass the data through sort() so the order is always deterministic. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* metadata_scm.bbclass: Do not assume ${COREBASE} is a Git repoPeter Kjellerstedt2016-05-111-3/+2
| | | | | | | | | | | | | | | | | | The functions base_detect_revision() and base_detect_branch() try to extract SCM meta information from the path returned by base_get_scmbasepath(), which currently returns ${COREBASE}. However, making the assumption that ${COREBASE} contains SCM meta information can be false. It is true for Poky, but not necessarily other environments. A better option is to look for the SCM meta information based on the meta layer. Since this works as expected for Git but not SVN, the call to base_get_metadata_svn_revision() from base_detect_revision() was also removed. This is not expected to affect anyone (partly based on the comment in base_get_metadata_svn_revision()). Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
* populate_sdk_ext: Change lockedsigs task mismatch to a warningRandy Witt2016-05-091-1/+1
| | | | | | | | | | | | | | It has been determined that it is highly likely that users might get signatures that don't match in an extensible sdk. This doesn't necessarily happen with oe-core, so we can set the mismatch to an error during testing if we like. However, for the case where users are creating their own sdks, we don't need an error halting their progress. locked-sigs will still function as it should. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
* populate_sdk_ext.bbclass : Show logfile in case the SDK EXT installation failedLeonardo Sandoval2016-05-091-1/+1
| | | | | | | | | | | To avoid lots of output in the SDK EXT installation phase, system redirects it to a logfile ($target_sdk_dir/preparing_build_system.log) but in case of error, the contents should be shown so debugging could be faster. [YOCTO #9576] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
* classes/image_vm: allow different filesystems to be used for VM images.Ian Reinhart Geiser2016-05-091-6/+7
| | | | | | | | | This allows for things like btrfs to be used vs just ext4. The default value of ext4 is kept so there is no functional change unless VM_ROOTFS_TYPE is set in the inherting recipe. Signed-off-by: Ian Reinhart Geiser <geiseri@geekcentral.pub> Signed-off-by: Ross Burton <ross.burton@intel.com>
* kernel-yocto: allow branch auditing to be suspendedBruce Ashfield2016-05-091-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | When working on the yocto-bsp and kernel-lab update for yocto 1.2 we found it was impossible for a end-user BSP to isolate patches on a branch, since with the following commit: [kernel-yocto: enforce SRC_URI specified branch] Any new branch would be switched to whatever was specified on the SRC_URI and undoing the work that the yocto-bsp tool did to support board specific patches. To fix this, we'll keep the enforcing of branch consistency enabled by default, but introduce a variable "KMETA_AUDIT" that when not set will skip the check. There's no impact for existing users, and it is only something that other plumbing commands and tools will need to use (or care about). [YOCTO: #9120] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
* image_types: fix image/compression dependency collectionRoss Burton2016-05-091-20/+16
| | | | | | | As compressions can be chained (i.e. cpio.bz2.md5sum) we need to walk the fstype list to collect the dependencies from each step. Signed-off-by: Ross Burton <ross.burton@intel.com>
* image_types.bbclass: add WIC_CREATE_EXTRA_ARGSChristopher Larson2016-05-091-1/+3
| | | | | | | This'll be of use to pass things like --bmap. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
* image-live.bbclass: make the INITRD optionalChristopher Larson2016-05-091-1/+1
| | | | | | | | This aligns with image-vm, and makes sense for wic bootimg-efi images, which don't actually want any of the live installer bits. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
* packagegroup.bbclass: set LICENSE and LIC_FILES_CHKSUMRobert Yang2016-05-061-0/+5
| | | | | | | | | | | | * Use "??=" in bitbake.conf to set LICENSE, so that it can overrided by packagegroup.bbclass and recipes. * Use "?=" to set LICENSE and LIC_FILES_CHKSUM to MIT by default in packagegroup.bbclass, this won't impact any packagegroup recipes which use non-MIT license, since they can be overrided by the recipe. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: package_qa_check_license -> populate_lic_qa_checksumRobert Yang2016-05-061-9/+6
| | | | | | | | | | | The package_qa_check_license() was in do_qa_configure which had a potential problem, when the recipe sets do_configure[noexec] = "1", then the license checking won't run, which may hidden license issues. Rename it to populate_lic_qa_checksum() and run in do_populate_lic[postfuncs] which is more reasonable (when no populate license, no license checking). Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: remove workdir from package_qa_check_license()Robert Yang2016-05-061-2/+2
| | | | | | | The parameter workdir is not used in package_qa_check_license() Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: fitimage: basic support for fitimage signatureYannick Gicquel2016-05-061-2/+43
| | | | | | | | | | | | | | | | | This is an initial support of fitImage signature to enable U-Boot verified boot. This feature is implemented by adding a signature tag to the configuration section of the generated fit-image.its file. When a UBOOT_SIGN_ENABLE variable is set to "1", the signature procedure is activated and performs a second call to mkimage to sign the fitImage file and to include the public key in the deployed U-Boot device tree blob. (This implementation depends on the use of CONFIG_OF_SEPARATE in U-Boot.) As the U-Boot device tree blob is appended in the deploy dir, a dependency on 'u-boot:do_deploy' is added when the feature is activated. Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: fitimage: support device tree compiler optionsYannick Gicquel2016-05-061-1/+7
| | | | | | | | | | | This introduces a new variable to set the device tree compiler options while calling mkimage ('-D' option). By default, this variable is not set but it can be defined in a configuration file, as following example: UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb -p 2000" Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* u-boot: deploy u-boot-nodtb and dtb filesYannick Gicquel2016-05-061-0/+22
| | | | | | | This enable the deployment of u-boot-nodtb.bin and u-boot.dtb files. Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* u-boot: basic support of dtb append for verified bootYannick Gicquel2016-05-061-0/+67
| | | | | | | | | | | | | This introduces a new uboot-sign.class to support U-Boot verified boot. This part delivers the new class file, with related environment variables, and a new task intended to run before do_install task and which performs the concatenation of the u-boot-nodtb.bin and the device tree blob. The 'cat' command used overrides the u-boot.bin in both DEPLOYDIR & build dir to propagate the changes in later tasks (do_install, do_package, etc.) Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: add default for CACHED_CONFIGUREVARSRoss Burton2016-05-061-0/+2
| | | | | | | | Ensure that this variable has a default value so that we don't get debug messages that the variable couldn't be expanded. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>