summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
AgeCommit message (Collapse)Author
2019-02-28default-distrovars: Drop DISTRO_FEATURES_LIBCKhem Raj
After eglibc was merged into glibc, Kconfig support was also dropped so these libc features therefore are not effective anymore and can be removed Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05image.bbclass: respect PACKAGE_NO_GCONVKai Kang
It installs locale-base-* packages according to var IMAGE_LINGUAS. Packages locale-base-* are split in libc-package.bbclass if variable PACKAGE_NO_GCONV is not set. When none of ditro features libc-charsets libc-locales and libc-locale-code is set, PACKAGE_NO_GCONV is set. Then no locale-base-* is created and fails to create image. Clear IMAGE_LINGUAS in such situation. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-24image.bbclass: fix a wrong position blankMing Liu
A flaw was introduced by commit c5fa6034: [ image.bbclass: use prependVarFlag for postfuncs ] it changed to use prependVarFlag instead of appendVarFlag, then the blank also needs change to adapt it. Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16image.bbclass: add a missing blankMing Liu
When calling d.appendVarFlag, a blank is needed or else it could mess up the later appended variables. Reported-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-13rootfs: ensure that packages in IMAGE_INSTALL_DEBUGFS are existingAndrej Valek
Ensure that additional packages in IMAGE_INSTALL_DEBUGFS are available before installation. Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-18rootfs: possibility to add packages to debug rootfsAndrej Valek
Static libraries are not included in rootfs, it means, that sources are not going into debug rootfs. This option enables to install additional packages even if the standard package is not installed. Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-16image.bbclass: inherit and use image-postinst-interceptsChristopher Larson
Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15image: Use ${COREBASE}/meta for timestamp, fallback to bitbake.confAlex Kiernan
To handle the case where ${COREBASE} isn't the git directory, avoid erroring out when the git command fails. If we don't have a timestamp after this, fall back to the timestamp from conf/bitbake.conf. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15image: Add locale archive optimisationRichard Purdie
Refactor the locale archive function from the SDK to also make it work during general image creation. This reduces the size of the locales from 900MB to 220MB in core-image-lsb-sdk. The exception handling around subprocess was dropped as the standard subprocess exception printing is better handled than the catchall exception. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-25license_image: Fix raceRichard Purdie
The current code pokes into do_deploy manifests from do_image_complete when the do_image_complete task may or may not depend upon the do_deploy tasks in question. Often it gets lucky, sometimes it results in build failures. To fix this, split the functionality to its own task which can have the correct task dependencies. This means the data in BB_TASKDEPDATA is definitive, the other code can be dropped, as can the IMAGE_EXTRATYPES do_populate_lic dependencies from image.bbclass. This fixes bugs which show up as: NOTE: recipe linux-yocto-4.14.48+gitAUTOINC+d64aec9793_97c8063d2d-r0: task do_deploy: Started ERROR: core-image-minimal-1.0-r0 do_image_complete: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:write_deploy_manifest(d) 0003: File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass', lineno: 33, function: write_deploy_manifest 0029: 'w+').write(output) 0030:} 0031: 0032:python write_deploy_manifest() { *** 0033: license_deployed_manifest(d) 0034:} 0035: 0036:python license_create_manifest() { 0037: import oe.packagedata File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass', lineno: 191, function: license_deployed_manifest 0187: # It is necessary to mark this will be used for image manifest 0188: man_dic[dep]["IMAGE_MANIFEST"] = True 0189: man_dic[dep]["PN"] = dep 0190: man_dic[dep]["FILES"] = \ *** 0191: " ".join(get_deployed_files(dep_dic[dep])) 0192: with open(os.path.join(lic_dir, dep, "recipeinfo"), "r") as f: 0193: for line in f.readlines(): 0194: key,val = line.split(": ", 1) 0195: man_dic[dep][key] = val[:-1] File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass', lineno: 289, function: get_deployed_files 0285: """ 0286: 0287: dep_files = [] 0288: excluded_files = [] *** 0289: with open(man_file, "r") as manifest: 0290: all_files = manifest.read() 0291: for f in all_files.splitlines(): 0292: if ((not (os.path.islink(f) or os.path.isdir(f))) and 0293: not os.path.basename(f) in excluded_files): Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build-st-730/tmp/sstate-control/manifest-qemux86_64-linux-yocto.deploy' ERROR: core-image-minimal-1.0-r0 do_image_complete: Function failed: write_deploy_manifest ERROR: Logfile of failure stored in: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build-st-730/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/log.do_image_complete.50537 NOTE: recipe core-image-minimal-1.0-r0: task do_image_complete: Failed ERROR: Task (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/recipes-core/images/core-image-minimal.bb:do_image_complete) failed with exit code '1' NOTE: recipe linux-yocto-4.14.48+gitAUTOINC+d64aec9793_97c8063d2d-r0: task do_deploy: Succeeded 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-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-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-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-04-07classes: Use ${MACHINE_ARCH} instead of ${MACHINE} for stamp-extra-info task ↵Peter Kjellerstedt
flag Without this change, there will be two sstate index files in tmp/sstate-control for any machine that contains a dash in the name. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-12classes/recipes: Use expanded BUILD_REPRODUCIBLE_BINARIES valueJuro Bystricky
Replace the occurences of BUILD_REPRODUCIBLE_BINARIES with expanded values ${BUILD_REPRODUCIBLE_BINARIES} so the variable does not need to be exported. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04image: Remove the do_package_write_* tasksRichard Purdie
Now we're filtering tasks in the rpm indexing code so that tasks can only see the packages they really depend upon, having noexec package_write tasks around is causing problems since the tasks exist but don't have manifests. Removing the tasks entirely solves this problem and streamlines the task execution graph too. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-16classes: don't scan for CVEs in images or packagegroupsRoss Burton
There's no point even looking in the database for these, so unset CVE_PRODUCT. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-01-29meta: don't use deprecated functions from utils.bbclassRoss Burton
These functions were moved to meta/lib/oe in 2010 and the base_* functions in utils.bbclass were intended to be a short-term compatibility layer. They're still used in a few places, so update the callers to use the new functions. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-10image: Expand PV to avoid AUTOREV parsing failuresRichard Purdie
Currently, setting PV to include SRCPV for build-appliance results in: bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: Fetch command export ftp_proxy="http://proxy.yocto.io:5187/"; export FTP_PROXY="http://proxy.yocto.io:5187/"; export PATH="${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/usr/bin/python3-native:${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/usr/bin/python3-native:${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/usr/bin/python3-native:/home/pokybuild/ yocto-autobuilder/yocto-worker/buildtools/build/scripts:${TMPDIR}/ work/qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/usr/bin/x86_64-poky-linux:${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot/usr/bin/crossscripts:${TMPDIR}/work/qemux86_64-poky-linux/ build-appliance-image/fetcheravoidrecurse-r0/recipe-sysroot-native/usr/sbin: ${TMPDIR}/work/qemux86_64-poky-linux/build-appliance-image/ fetcheravoidrecurse-r0/recipe-sysroot-native/usr/bin:${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/sbin:${TMPDIR}/work/qemux86_64-poky-linux/ build-appliance-image/fetcheravoidrecurse-r0/recipe-sysroot-native/bin:/home/ pokybuild/yocto-autobuilder/yocto-worker/buildtools/build/bitbake/bin:${TMPDIR} /hosttools"; export HOME="/home/pokybuild"; git -c core.fsyncobjectfiles=0 ls-remote git://git.yoctoproject.org/poky failed with exit code 127, output: /bin/sh: 1: git: not found This is because PV is being expanded when TMPDIR is unset. Expand PV in advance to avoid this problem. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18image.bbclass: Add additional bb.debug to help track 12304Saul Wold
We actually caught the ext4 size issue in the wild with the debug output in the oe_mkext234fs() code, but it did not help. What that showed was that the get_rootfs_size was returning a default size of 8192, where as the actual rootfs was more like 10572, thus too large to fit in the created sparse file. This additional temporary debug code should help us determine where the failure might be. More debug for [YOCTO #12304] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08image.bbclass: let do_image depend on do_populate_lic of EXTRA_IMAGEDEPENDSMing Liu
The licenses of EXTRA_IMAGEDEPENDS recipes are being referenced in image postcommand write_deploy_manifest, but a dependency is missing between do_image and do_populate_lic of EXTRA_IMAGEDEPENDS recipes, this leads some license files not present when write_deploy_manifest runs, hence will cause build errors. Fixed by letting do_image depend on do_populate_lic of EXTRA_IMAGEDEPENDS recipes. Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08image.bbclass: Fix 'vardepsexclude' mechanism for image_cmd_${FSTYPE}Igor Romanov
Current mechanism doesn't allow to use any non-determenistic variable, except 'DATE' and 'DATETIME', inside IMAGE_CMD_${FSTYPE} prototype. Passing 'vardepsexclude' values from IMAGE_CMD_${FSTYPE}, so users will be able to avoid taskhash mismatch problems. Signed-off-by: Igor Romanov <i.romanov@inango-systems.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-21image.bbclass: Sorted ctypes to avoid basehash errorGerson Fernando Budke
When selected multiple subimages a similar error could happend: Variable do_image_cpio[subimages] value changed \ from 'cpio.gz.u-boot cpio.gz' to 'cpio.gz cpio.gz.u-boot' To avoid this, 'ctypes' should be sorted at 'gen_conversion_cmds'. This garantee that 'CONVERSION_CMD_xxx' are always written in tha same order and consequently 'do_image_cpio' have the same hash. Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-21classes/image: move image_qa to between rootfs and imageRoss Burton
It was noticed that do_image_qa is useless when rm_work is enabled as the rootfs directory is deleted before image_qa is called. This indicates that image_qa is incorrectly scheduled as it failing should mean images don't get generated, so move it between do_rootfs and do_image. Also, add a little bit more documentation to the comments. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-08-16image.bbclass: drop initramfs bundle related codeMing Liu
The original purpose of this code snippet was to repackage initramfs bundled kernel images before do_image_complete, to be able to be included by rootfs, but it's not going to achieve that since the initramfs bundled kernel images are not even installed to ${D}/boot after commit a49569e3a7534779bbe3f01a0647fd076c95798d: [ kernel.bbclass: do not copy bundled initramfs to /boot ] So there is not a initramfs bundled kernel package at all, we should drop the code, because it is leading kernel do_initramfs_bundle unnecessarily rerun and it's very time consuming and hence is impacting the performance a lot. Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-16image.bbclass: support binary reproducibilityJuro Bystricky
Added a new task "reproducible_final_image_task". If binary reproducibility is desired ($BUILD_REPRODUCIBLE_BINARIES" = "1"), then recursivley modify mtimes of all files to a reproducible vale. The value is obtained via REPRODUCIBLE_TIMESTAMP_ROOTFS. This task is executed as the very last step in image creation, once all the files in the image have been finalized. [YOCTO#11176] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-16image.bbclass: delete DATE variable tooStefan Agner
When creating a custom image which uses the DATE variable the basehash seems to change every day and lead to errors such as: ERROR: console-tdx-image-2.7.6-r0 do_image_customimg: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:set_image_size(d) ... Add DATE to the variables which should not get expanded early and to the vardepsexclude list for the image task. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31image: Make do_image_qa a dummy sstate task to match do_image_completeRichard Purdie
Similar to do_image_complete, make do_image_qa a dummy sstate task so that rm_work doesn't cause image generation to repeat on every new build command. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31image/rm_work: Promote do_image_complete to be more sstate likeRichard Purdie
We relied on the missing do_image_complete_setscene task to ensure the dummy sstate tarball that was created would never be used. This lead to its own issues and a better fix for SSTATE_SKIP_CREATION has now been merged. We can therefore make do_image_complete look like a more standard sstate task which means image generation doesn't keep rerunning when using rm_work. We do need to turn do_image_complete's stamp into an sstate version to handle this (it otherwise matches the do_image_* glob). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31image: Drop before do_build from do_rootfs and do_imageRichard Purdie
do_image_complete has the do_build dependency, these other two tasks don't need it. If this is present, it complicates the dependency tree and convinces rm_work that the tasks need to rerun even if they already did since the stamps are removed. Drop the unneeded dependency to help resolve this issue. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30image: Convert vmdk/vdi/qcow2 to strict CONVERSION_CMD typesTom Rini
The vmdk/vdi/qcow2 IMAGE_FSTYPEs predate wic. As such, they provide some similar underlying functionality in order to produce a "disk" image that in turn can be converted into different formats that various hypervisor types work with. They do not however provide the ability for other disk image types to be converted into these same output types. Furthermore, they are less flexible than what wic does provide. This drops the old style vmdk/vdi/qcow2 types and re-introduces them under the CONVERSION_CMD framework. The equivalent of vmdk is now wic.vmdk and so forth for the other types. Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25image: Fix "metadata is not deterministic" when chaining 2+ CONVERSION_CMDsTom Rini
When we have more than one CONVERSION_CMD being used, for example ext4.gz.sha256sum we will see errors about "metadata is not deterministic". This is because we do not have a stable order of intermediate files that will be removed in the generated shell command. We fix this by calling sorted() on the set of rm_tmp_images so that we will have a stable hash again. Cc: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25image_types.bbclass: Make u-boot signed images more versatileTom Rini
With the introduction of chaining compression/conversion support we can convert the old image_types_uboot.bbclass code that did a hand-chaining of a set of ${filesystem}.${compression} into generic and arbitrary support to sign whatever the user wants to sign for their image. This, for the record, does remove setting a valid compression type in the record in favour of just saying none. This is not a generally useful feature in U-Boot and I believe being versatile in terms of being able to pass in arbitrary compressions is more important. Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25image.bbclass: Correct chaining compression supportTom Rini
When chaining of compression/conversion types was added, we had a new way to handle doing things like "ext4.bz2.sha256sum" or "ext2.gz.u-boot". However, because the U-Boot image class isn't included normally, it wasn't properly converted at the time. After the support was added the "clean" argument that the .u-boot code uses no longer functions. The fix for this inadvertently broke chaining compression/conversion. First, correct the u-boot conversion code. Fixes: 46bc438374de ("image.bbclass: do exact match for rootfs type") Cc: Zhenhua Luo <zhenhua.luo@nxp.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06image.bbclass: create root symlinks in nativesdk target sysrootAmarnath Valluri
To match with the target image, the generated nativesdk's target sysroot also should have the root symlinks(/lib*, /bin/, /sbin). So, extended the 'create_merged_usr_symlinks' to reuse symlink creation part even for nativesdk using POPULATE_SDK_PRE_TARGET_COMMAND. Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06image: create symlinks needed for merged /usrAmarnath Valluri
Prepare the symlinks required for merged /usr at the time of rootfs creation. The links created in rootfs are: /bin --> /usr/sbin /sbin --> /usr/sbin /lib --> /usr/lib /lib64 --> /usr/lib64 We cannot make these symlinks as part of 'base-files' or some other package. Because at rootfs creation, installation of the package(say kernel) that depends on these root folders/links fails, if package manager installs this package prior to base-files. These symbolic links in top level folder should be present as long as - kernel tools use /lib/{module,firmware} - shell scripts uses "#!/bin/sh" Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28image.bbclass: use prependVarFlag for postfuncsEd Bartosh
It would be possible to achieve any order of calling functions if prefuncs are added with appendVarFlag and postfuncs with prependVarFlag. Then image_X.bbclass can add code with either pre/post-funcs or do_image_x_append or _prepend. The execution order would be: image_X prefuncs image prefuncs do_image_X_prepend from image_X.bbclass do_image_X from image.bbclass do_image_X_append from image_X.bbclass image postfuncs image_X postfuncs [YOCTO #11372] Thanks to Ola Nillsson for the idea. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-16meta: Drop further remnants of uclibc supportRichard Purdie
uclibc support was removed a while ago and musl works much better. Start to remove the various overrides and patches related to uclibc which are no longer needed. uclibc support in a layer would still be possible. I have strong reasons to believe nobody is still using uclibc since patches are missing and I doubt the metadata even parses anymore. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-14image.bbclass: fix setting of vardeps flagEd Bartosh
Added leading space to vardeps to avoid flag value to be added to the existing value without a separator. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-14image.bbclass: improve setup of flagsEd Bartosh
Replaced setVarFlag calls to appendVarFlag to allow modification of prefuncs, postfuncs and subimages flags in inherited image classes. [YOCTO #11372] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-14image.bbclass: cleanup: add new variable "task"Ed Bartosh
Replaced repeated expression "do_image_%s" % t with a variable 'task' to simplify the code and increase readability. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-16image.bbclass: allow override of image LICENSEPascal Bach
Currently the LICENSE of every image is hard set to MIT. This allows this to be overriden in derived images. Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-05-16image.bbclass: Set ROOTFS_RO_UNNEEDED correctlyDavid Vincent
Use a weak assignment for ROOTFS_RO_UNNEEDED to let users define their own list overriding defaults. Signed-off-by: David Vincent <freesilicon@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-13run-postinsts: simplify the logic of whether to install it to imagesAlexander Kanavin
The logic is scattered all over the place, but amounts to "install, unless the rootfs is read only". Let's express that directly. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2017-02-19image-container.bbclass: Add the "container" IMAGE_FSTYPESRandy Witt
The "container" fstype does very little other than pick tar.bz2 as the actual image type and disable installation of ROOTFS_BOOTSTRAP_INSTALL. [YOCTO #9502] Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-15image.bbclass: Use 'populate_sdk_base' for non-linux targetsNathan Rossi
When 'populate_sdk_ext' was first introduced in commit bf81d6bb7f6 it replaced the inheriting of 'populate_sdk_base'. For non-linux targets building the extensible SDK caused build errors, and the image class was changed to inherit 'populate_sdk' when targeting a non-linux SDK_OS (in commmit e471ce3464d). However inheriting 'populate_sdk' instead of 'populate_sdk_base' causes the SDK to always be built, this is not expected for the image class. This change makes the image class inherit 'populate_sdk_base' in the non-linux SDK_OS case so that it behaves the same as it is expected to behave where 'bitbake <image> -c populate_sdk' must be executed to generate the SDK deployables. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-15classes: Drop now unneeded update_data callsRichard Purdie
Now that the datastore works dynamically we don't need the update_data calls so we can just remove them. They're not actually done anything at all for a while. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>