aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2018-07-11classes/buildhistory: properly process escaped chars from pkgdatapaule/buildhistory-fixes2Paul Eggleton
All values written out to pkgdata are escaped (see write_if_exists() in package.bbclass). In practice there tend not to be characters that need escaping except in the scriptlets (pkg_preinst, pkg_postinst, pkg_prerm and pkg_postrm) where currently we still see the escape codes in the corresponding files within buildhistory (e.g. \n and \t) and thus also in the output of buildhistory-diff, hindering proper diffing of changes. To fix this, when we read values from pkgdata and write them out to buildhistory, we need to interpret the escape codes by doing the exact reverse of what we do in package.bbclass. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-07-11classes/buildhistory: handle packaged files with names containing spacesPaul Eggleton
The FILELIST field of the package info file in the buildhistory repository is a space-separated list of all of the files in the package. If a name of a file packaged by a recipe contains a space character then of course the result was that we didn't handle its name properly. To fix that, use quotes around any filename containing spaces and at the other end use these quotes to extract the proper entries. Fixes [YOCTO #12742]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-07-10distutils3: pass build arguments when doing a cleanRoss Burton
We should pass the build arguments to setup.py when doing a clean, because sometimes the arguments are required for setup.py get started. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-10meson: improve code styleRoss Burton
Use elif for consistency. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-10kernel.bbclass: move variables for kernel artifacts names to separate bbclassMartin Jansa
* this makes it easier to access these variables from some other bbclass e.g. sdcard_image-rpi.bbclass in meta-raspberry where we need to know how some files in deploy are named, but we cannot inherit kernel.bbclass as it's used in image recipe not kernel recipe * alternatively we can move these to bitbake.conf like similar image variables are: meta/conf/bitbake.conf:IMAGE_BASENAME = "${PN}" meta/conf/bitbake.conf:IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}" meta/conf/bitbake.conf:IMAGE_LINK_NAME = "${IMAGE_BASENAME}-${MACHINE}" Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-10kernel.bbclass: use the consistent naming schema for initramfsMartin Jansa
* use INITRAMFS_BASE_NAME and INITRAMFS_SYMLINK_NAME variables, like other kernel artifacts are using * use "${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" instead of "${PV}-${PR}-${MACHINE}-${DATETIME}" to be consistent with other files * allow to modify default symlink name with INITRAMFS_SYMLINK_NAME instead of currently used: initramfs_symlink_name=${type}-initramfs-${MACHINE} Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-10kernel-devicetree.bbclass: Fix and simplify instalation of DTB filesMartin Jansa
* add 2 new variables: KERNEL_DTB_BASE_NAME KERNEL_DTB_SYMLINK_NAME instead of reusing KERNEL_IMAGE_SYMLINK_NAME and than expecting that default value ${MACHINE} was being used in e.g.: DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` * install normal DTB files only once even if there is multiple entries in KERNEL_IMAGETYPE_FOR_MAKE and don't prefix them with the type of the kernel image, use the KERNEL_IMAGETYPE_FOR_MAKE as a prefix only when installing them bundled with kernel or initramfs image. * deploy the files from ${D}/${KERNEL_IMAGEDEST}/ instead of kernel build directory, so that we don't need to call DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"` again in do_deploy * create all links in do_deploy task, because default KERNEL_DTB_BASE_NAME like KERNEL_IMAGE_BASE_NAME contains PKGR and PKGR is different in do_install and do_deploy, because kernel.bbclass calls meta/classes/kernel.bbclass:do_install[prefuncs] += "package_get_auto_pr" meta/classes/kernel.bbclass:do_deploy[prefuncs] += "package_get_auto_pr" * the filenames are a bit different, but with separate variable it should be easier for other bbclasses which use these DTB files to find them correctly, just use either the cannonical name $dtb_base_name.$dtb_ext or $dtb_base_name-${KERNEL_DTB_SYMLINK_NAME}.$dtb_ext because PKGR (and other PKG* variables) might be different in your task and kernel.do_deploy task. * fix DTB files being deployed with incorrect filenames when KERNEL_IMAGE_SYMLINK_NAME isn't set to ${MACHINE}, e.g. instead of the default: -rw-r--r-- 2 bitbake bitbake 1.4K Nov 20 07:41 deploy/images/raspberrypi3-64/Image-1-4.9.59+git0+e7976b2aff-r0.2-lirc-rpi-20171120043031.dtbo lrwxrwxrwx 2 bitbake bitbake 64 Nov 20 07:41 deploy/images/raspberrypi3-64/Image-lirc-rpi.dtbo -> Image-1-4.9.59+git0+e7976b2aff-r0.2-lirc-rpi-20171120043031.dtbo lrwxrwxrwx 2 bitbake bitbake 64 Nov 20 07:41 deploy/images/raspberrypi3-64/lirc-rpi.dtbo -> Image-1-4.9.59+git0+e7976b2aff-r0.2-lirc-rpi-20171120043031.dtbo I was getting: -rw-r--r-- 2 bitbake bitbake 1348 Nov 20 10:28 deploy/images/raspberrypi3-64/Image-linux-raspberrypi-lirc-rpi.dtbo lrwxrwxrwx 2 bitbake bitbake 37 Nov 20 10:28 deploy/images/raspberrypi3-64/Image-linux-raspberrypi-lirc-rpi-master-20171120102653.dtbo -> Image-linux-raspberrypi-lirc-rpi.dtbo lrwxrwxrwx 2 bitbake bitbake 37 Nov 20 10:28 deploy/images/raspberrypi3-64/lirc-rpi.dtbo -> Image-linux-raspberrypi-lirc-rpi.dtbo and e.g. sdcard_image-rpi.bbclass from meta-raspberrypi: https://github.com/agherzan/meta-raspberrypi/blob/37e4e18f4a745ce8dc11f7e40a29da0859ff13c6/classes/sdcard_image-rpi.bbclass was failing in: mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::${DTB_BASE_NAME}.dtb because ${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb doesn't exist in my build, due to DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` not replacing whole "${KERNEL_IMAGE_SYMLINK_NAME}" (read ${MACHINE}) with just ${DTB_BASE_NAME} * with this change applied the deploy dir looks like this: -rw-r--r-- 2 bitbake bitbake 1.4K Nov 20 15:49 deploy/images/raspberrypi3-64/lirc-rpi-1-4.9.59+git0+e7976b2aff-r0.8-raspberrypi3-64-20171120154716.dtbo lrwxrwxrwx 2 bitbake bitbake 74 Nov 20 15:49 deploy/images/raspberrypi3-64/lirc-rpi.dtbo -> lirc-rpi-1-4.9.59+git0+e7976b2aff-r0.8-raspberrypi3-64-20171120154716.dtbo lrwxrwxrwx 2 bitbake bitbake 74 Nov 20 15:49 deploy/images/raspberrypi3-64/lirc-rpi-raspberrypi3-64.dtbo -> lirc-rpi-1-4.9.59+git0+e7976b2aff-r0.8-raspberrypi3-64-20171120154716.dtbo and works correctly even with DISTRO using different naming scheme * the sdcard_image-rpi.bbclass still needs to be modified, I've provided updated version here: https://github.com/agherzan/meta-raspberrypi/pull/159 * mpc8315e-rdb.conf MACHINE in meta-yocto-bsp also needs small fix: https://lists.yoctoproject.org/pipermail/poky/2018-July/011436.html Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-10kernel-devicetree.bbclass: Use lowercase names for shell variablesMartin Jansa
* just to make it more clear what is local shell variable and what is replaced by bitbake from the metadata and also to prevent the variable to be incorrectly expanded by bitbake if someone happens to define e.g. DTB_BASE_NAME Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-07rootfs-postcommands: split ssh_allow_empty_passwordJackie Huang
"allow root login" should not be bundled in ssh_allow_empty_password, because some distro may want only one of "allow root login" and "allow empty password", so split it out into ssh_allow_root_login and add new imagefeature allow-root-login so they can be controlled separately, debug-tweaks will still include both of them. Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-06classes/sstate: Remove unused argumentJoshua Watt
Removes an unused argument to pstaging_fetch() Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-06classes/sstate: Remove trailing whitespaceJoshua Watt
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-06setuptools.bbclass: depend on python-setuptoolsRoss Burton
python-distribute is obsolete and is now simply a PROVIDES of python-setuptools, so use the right name. The identical change for setuptools3.bbclass was done in 2015 in 8922e60. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-06meson: map mipsel TARGET_ARCH to mips for the cross fileRoss Burton
Meson uses 'mips' for both big- and little-endian MIPS machines, so map mipsel to mips. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-06testsdk.bbclass: set PREMIRRORS for kernel to speed up testChen Qi
Currently if we do a testsdkext task for the image, it would take very long time to finish. The time is mostly spent fetching kernel source via network. We have done some configuration in auto.conf, trying to make use of own-mirrors.bbclass to avoid fetching kernel via network. However, the solution normally does not work. Below is some log from log.do_fetch. DEBUG: Fetcher failure: Unable to find file \ file:///path/to/downloads/git2_git.yoctoproject.org.linux-yocto.git.tar.gz \ anywhere. The tar.gz file is not available. It is generated only if BB_GENERATE_MIRROR_TARBALLS is set to "1". The default value of BB_GENERATE_MIRROR_TARBALLS is "0", and according to the manual, users need choose to set it to "1" only if they are trying to make a source mirror. So generally, this var's value is "0". Anyway, we do need to avoid fetching kernel source from network when doing testsdkext. So set PREMIRRORS in auto.conf to achieve this. After this change, the time reduces from 4209.131s to 1399.436s on my local machine. [YOCTO #12729] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-06patch: Jail patch_task_patch_prefunc in classes/patch into the workdirPablo Saavedra
With PATCHTOOL=git patches the changes in the patch_task_postfunc of the classes/patch. This works OK when the S dir is a Git repo but doesn't if the source is a tarball. The while condition in the patch_task_patch_prefunc must be jailed into the WORKDIR. In the opposite, when you are executing the recipe out of a Git subtree the function simply fails but when your recipes are into a Git repo the patch_task_postfunc execute a commit over your BSP local Git repo adding the changes in an arbitrary Git repo found in the path from the SOURCE directory to the '/'. This situation is highly probable in cases like ~home directories under the control of a .git repo or Yocto BSP which manage the meta layers as git submodules. This patch fix the changes introduced in classes/patch: when PATCHTOOL = "git" double-check the repository commit: 86ab56b55164393924b5e688b20e8f3f3f8fc578 Author: Paul Eggleton <paul.eggleton@linux.intel.com> Date: Tue Dec 5 14:36:58 2017 +1300 classes/patch: when PATCHTOOL = "git" double-check the repository If a bug is present or the user has set PATCHTOOL = "git" on a source tree that isn't git, if we try to perform git operations (such as committing or changing branches) when extracting source, then we might in fact be running those operations on the metadata repository if the build directory is underneath, say, poky or OE-Core, and that could make a mess. Check if the source tree is a git repository and refuse to continue if it isn't. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-06distutils: clean the build tree in do_configureRoss Burton
base_do_configure() tries to do "make clean" if there is a Makefile present. For most recipes using distutils there is not a Makefile, but we do know that "setup.py clean" will work so call that instead. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-05Revert "kernel-devicetree: Corrected normalize_dtb"Martin Jansa
This reverts commit 2e7f3b2b9318d1e5395ad58131eafb873f614326. It was breaking quite common use case that the dtb files are in some subdirectory and then kernel build fails to build them. As reported by khem: http://lists.openembedded.org/pipermail/openembedded-core/2018-July/152578.html me: http://lists.openembedded.org/pipermail/openembedded-core/2018-July/152579.html on raspberrypi3 build: make[3]: *** No rule to make target 'arch/arm/boot/dts/dwc2.dtbo'. Stop. arch/arm/Makefile:345: recipe for target 'dwc2.dtbo' failed make[2]: *** [dwc2.dtbo] Error 2 Makefile:146: recipe for target 'sub-make' failed and trevor on the IRC: 20:35:49 < tlwoerner> the recent 2e7f3b2b9318d1e5395ad58131eafb873f614326 commit in oe-core seems to cause dragonboard-410c's kernel to fail to build 20:36:26 < tlwoerner> for the dragonboard-410c, KERNEL_DEVICETREE is set to "qcom/apq8016-sbc.dtb" but the build failure is: 20:36:37 < tlwoerner> *** No rule to make target 'arch/arm64/boot/dts/dts/qcom/apq8016-sbc.dtb'. Stop. 20:36:44 < tlwoerner> i.e. the "qcom/" is getting removed 20:37:08 < tlwoerner> oops!! 20:37:33 < tlwoerner> wrong copy&paste, the actual error is: 20:37:36 < tlwoerner> *** No rule to make target 'arch/arm64/boot/dts/apq8016-sbc.dtb'. Stop. 20:37:53 < tlwoerner> i.e., the "qcom/" is being stripped out Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-05kernel-fitimage: add support for ext2.gz initramfs filesChunrong Guo
Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-04meson: map architecture to correct values in cross fileRoss Burton
The cross file specifies the host/target cpu_family, which should be one of a defined set of values[1] but if it isn't Meson won't complain and instead recipes may behave unexpectedly. [1] http://mesonbuild.com/Reference-tables.html#cpu-families Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-04meson: various class improvementsRoss Burton
- Ensure that the PACKAGECONFIG arguments are always in EXTRA_OEMESON - Log the arguments that are being passed in do_configure. - Do verbose builds so the compile logs are useful for debugging build problems Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-04multilib: Tweak previous cross-canadian multilib fixRichard Purdie
As well as setting RECIPE_SYSROOT we also need to set STAGING_DIR_HOST/TARGET. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-04staging: Always use the default sysroot for allarch recipesRichard Purdie
Without this, recipes can't find allarch data files like autoconf-archive. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-03kernel-devicetree: Corrected normalize_dtbPaulo Neves
The normalize_dtb function was buggy because it only converted from .dts suffix to .dtb suffix if the user passed a full source path to KERNEL_DEVICETREE containing the /dts/ path. The problem is that if the user did that there would be a warning. On the othet hand if user just set the variable KERNEL_DEVICETREE="file.dts" the bbclass translation to the respective .dtb target did not occur and make would fail saying it has no rule to make target file.dts This patch decouples the logic of having /dts/ in the path from the target translation. Signed-off-by: Paulo Neves <ptsneves@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-03kernel-fitimage: Make DTB key insertion optionalAlex Kiernan
If UBOOT_DTB_BINARY is empty, then don't try inserting the U-Boot signing keys into the DTB. In this configuration the keys are expected to be already present in U-Boot's DTB. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-02multilib: Fix issues with some cross-canadian toolchain sysrootsRichard Purdie
MACHINE = "qemumips64" MULTILIBS = "multilib:lib64 multilib:lib32" DEFAULTTUNE = "mips64-n32" DEFAULTTUNE_virtclass-multilib-lib64 = "mips64" DEFAULTTUNE_virtclass-multilib-lib32 = "mips32r2" bitbake core-image-minimal -c populate_sdk Results in gcc-cross-canadian-mips failing to build due to the use of an incorrect sysroot, fix this. All nativesdk pieces should be in the same sysroot (unprefixed). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-02staging: Improve fixup processing codeRichard Purdie
With the fixes to other parts of multilib, it was found that the fixup code's assumptions about the recipe sysroot were incorrect. We need to use the value calculated earlier in the function. It turns out there is a rather neat way to do this which cleans up the code as an added bonus. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-02classes/utils: Improve all_multilib_tune_valuesRichard Purdie
Currently there is duplication in the code, we can clean this up by extending the multilib variants list. This code also currently fails its its called from an existing multilib context since its assumes the data store passed in is the non-multilib case. When building an image, say lib32-core-image-sato, this leads to incorrect PATH values. To fix this, we also request a data store for the "" variant allowing this corner case to be fixed and for the function to correctly return values for each multilib even when a multilib is already selected. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-02staging/image: Fix multilib recipe sysroot issuesRichard Purdie
Currently if you enable multilib, then build an image, the multilib recipe sysroot is build in the wrong WORKDIR. If you then clean and rebuild the image you see "file exists" errors. This patch ensures the real WORKDIR is used consistently and then cleans/rebuilds also work correctly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-02license: Fix and extend recommendations for license packages.Alp Özmert
Changed package recommendations so that the license package of a recipe is recommended for all packages of a recipe instead of for one package given by the recipe name. Pre-patch behaviour results in a missing recommendation when a recipe does not have a package with the same name. Signed-off-by: Alp Özmert <info@ib-oezmert.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-28bitbake.conf: handle cmake -dev files packaging with default rulesAndre McCurdy
Move packaging rules for cmake -dev files from cmake.bbclass into bitbake.conf to handle recipes (e.g. harfbuzz 1.8.1) which build with autotools but also install cmake -dev files. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-28insane.bbclass: Don't let warnings make previous errors non-fatalOlof Johansson
package_qa_handle_error() returns True on non-fatal issues and False on fatal issues. But the current usage has been to do sane = package_qa_handle_error(...) which would always reset sanity status to be that of the last issue identified. This change the assignments to use the &= operator instead: sane &= package_qa_handle_error(...) As far as I can tell, this is not a real problem in practice, because warnings of different levels (WARN_QA, ERROR_QA) does not seem to have been mixed in a way that triggered this issue. Signed-off-by: Olof Johansson <olofjn@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-28insane.bbclass: Make missing license file fatalOlof Johansson
If a license file referenced from LIC_FILES_CHKSUM doesn't exist, insane.bbclass would output an error message, but would continue the build. This change makes this error fatal (as I suspect has been the intention). Signed-off-by: Olof Johansson <olofjn@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-28kernel: Set SOURCE_DATE_EPOCH to kernel git timestamp if not setAlex Kiernan
If SOURCE_DATE_EPOCH is unset (in addition to the existing "0" behaviour) parse out the top most commit timestamp from the kernel tree to use as the timestamp. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-28image: Set COREBASE as the git directory for timestampAlex Kiernan
When REPRODUCIBLE_TIMESTAMP_ROOTFS is unset and we want to parse one from git, use COREBASE as the base for the git command so we have a known repository which we're using. Without this the build may fail if the current directory is not part of a git repository. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-27systemd: escape paths passed to shellDamien Riegel
Systemd mount configuration file must have a name that match the mount point directory they control. So for instance, if a mount file contains [Mount] ... Where=/mnt/my-data The file must be named `mnt-my\x2ddata.mount`, or systemd will refuse to honour it. If this config file contains an [Install] section, it will silently fail because the unit file is not escaped properly when systemctl is called. To fix that, make sure paths are escaped through `shlex.quote`. Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-27mirrors: add Debian snapshot mirror for 2018Ross Burton
Add a Debian snapshot mirror from 2018 (specifically, 10th March, the date 9.4 was released) to DEBIAN_MIRRORS. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-06-21bitbake.conf/testimage: Add in compatiblity hacksRichard Purdie
The testimage changes break the autobuilder. The plan is to revert these hacks but due to various changes happening with the autobuilder, we need these for now to keep things working until we can move to the new autobuilder codebase. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-21image/testimage: Rework auto image test executionRichard Purdie
The TEST_IMAGE interface has never particularly worked and image testing currently gets configured manually. This reworks the interface to better serve the needs of its users, replacing it with TESTIMAGE_AUTO. This does away with the need for the separate class due to better bitbake APIs for changing tasks. TESTIMAGE_AUTO will automatically boot under qemu any image that is built. It also adds in dependencies so that any SDK for which testing is requested will automatically be built first. The code in bitbake.conf was error prone (e.g. testsdk wasn't considered), this improves it to standardise on IMAGE_CLASSES as the standard configuration mechanism. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-20image/image-live: Improve handling of live/iso/hddimg types (drop NOISO/NOHDD)Richard Purdie
The logic can be improved and the historical NOISO/NOHDD variables moved into the class and out of common code. The variables are also then removed in favour of directly controlling the behaviour from IMAGE_FSTYPES in line with all the other image types. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-20image: Combine all the class handling code into a single sectionRichard Purdie
Right now the code handling class inherits is spread all over and its hard to get an idea of what is happening overall. Combine all the code together to make it clearer. There shoould be no functionality changes. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-19rm_work: Simplify looping codeRichard Purdie
The current looping structure is confusing, simplify it a bit to improve readability. Should be no functionality changes. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-19rm_work: Improve code commentsRichard Purdie
This function is a little obtuse, add more comments about what its doing and why. Also combine some of the statements where possible to improve clarity. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-19rm_work: The do_setscene task has not existed for yearsRichard Purdie
Once, there were do_setscene tasks but this hasn't been the case for years, drop the old code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-19rm_work: Stop appending _setscene to do_image_complete_setscene stampsRichard Purdie
This is a reworked version of the issue which 5479654eeaaa0f81bfff54ca49369c87f1658705 attempted to fix. """ Each time I build my image after the first, I end up with a do_image_complete_setscene stamp file with an extra _setscene appended to the name. Eventually, the filenames end up being so long that mv complains and the build fails. It looks like this behaviour was introduced when the special handling was added for do_image_complete in 2ff9d40dc88d43567472218cf3d3faf414398c71. """ Instead of the original approach which broke do_package_setscene, add an entry to explictly stop the stacking _setscene pieces on do_image_complete. It's not straightforward to just move *do_image_complete* after the *_setscene* pattern because do_image_complete stamps would then match do_image*. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-19Revert "rm_work: Stop appending _setscene to do_image_complete_setscene stamps"Richard Purdie
Whilst this fixes the do_image_complete_setscene append problem, it creates a new problem since the code can no longer reach the *do_package_setscene.* code block below it. This breaks builds as per [YOCTO #12765]. Revert this change in search of a better fix. This reverts commit 5479654eeaaa0f81bfff54ca49369c87f1658705.
2018-06-18image.bbclass, populate_sdk_base.bbclass: make all variants of ↵Alexander Kanavin
qemuwrapper-cross available in sysroots The variants are needed in particular when executing postinst_intercepts as those may require running binaries built for different architectures and against different sets of library paths, when multilib is in use (or nativesdk host packages are installed), so a single global variant of the script was not working. I do understand expanding PATH and DEPENDS in this manner is hackish, however every other approach I could think of is worse. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18qemuwrapper-cross: enable multilib and nativesdk variants of the scriptAlexander Kanavin
Previously only one global variant of the script was created, which caused numerous issues: 1) multilib was not properly supported due to multilib variants each needing their own version of the qemu binary and library paths to be set 2) nativesdk was not properly supported for the same reason This patch also moves setting LD_LIBRARY_PATH directly into the recipe, as passing it down from other recipes did not work when said recipes were allarch, and adjusts calls to qemuwrapper from postinst-intercepts, so that its correct variant is selected. Also, the various qemu fallbacks in qemuwrapper script are all removed, as they are no longer necessary. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18gtk-immodules-cache.bbclass: convert cache creation to postinst_intercept ↵Alexander Kanavin
mechanism This has the following benefits: - consistent with how the other caches are created into target rootfs - only runs once per package manager transaction, instead of once per every immodule package - correctly postpones to first boot if qemu is not working; from postinst itself this would've required special arrangements to avoid what is now a do_rootfs failure. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18Only add uninative and checksum if inherited uninative classJeremy Puhlman
The checksum value is only calculated if the uninative class is inherited, so check for inherit before adding it to local.conf Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18Multilibize the UPDATERCPN variableJeremy Puhlman
The audit package specifies the following: UPDATERCPN = "auditd" However because it is not multilibized, the value "auditd" is used to search for the package to add the post install script too. In the mutlilib alternate abi case, that package does not exist. It ends up assigning the post install script to the lib32-audit-lic package, which subsequently failes to execute the script due to the initscript it is trying to turn on is not installed. Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>