summaryrefslogtreecommitdiffstats
path: root/meta/classes/image_types.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* image_types.bbclass: fix a race between the ubi and ubifs FSTYPESHongxu Jia2019-05-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ubi, ubifs and multiubi FSTYPES calls `mkfs.ubifs' to create UBIFS images. In do_image_ubi, $vname is empty, the name of UBIFS image conflicts with the one in do_image_ubifs, and it's a race risk. [do_image_ubi] mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs ${mkubifs_args} [do_image_ubi] [do_image_ubifs] mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ubifs ${MKUBIFS_ARGS} [do_image_ubifs] In do_image_multiubi, $vname is not empty, the UBIFS image name does not conflict with others. So do not call mkfs.ubifs in do_image_ubi and depend on do_image_ubifs to create UBIFS images. The fix does not affect do_image_multiubi which still call mkfs.ubifs to create multiple UBIFS images and symlinks. [YOCTO #13272] (From OE-Core rev: 5e900f2c9319843c8905713dd3dd12a1ad435976) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: use cpio-native to build cpio imagesRoss Burton2019-01-081-0/+1
| | | | | | | | | | | | | | | | | | | | | As per the previous commit, upstream cpio has a bug which means it crashes on append. If the image being built has already had testimage ran then cpio-native will be in the sysroot. It's also possible that some distributions are shipping this broken CVE patch too. Now that our cpio-native is fixed, until we can be sure that the host cpio isn't broken depend on cpio-native if building a cpio image. [ YOCTO #13042 ] (From OE-Core rev: c3b9aedcbe538d7fa74bd814644b4899769dec46) (From OE-Core rev: a75eba71145efa1c3d206c5e5c00608a50f013bc) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: Fix a shell syntax error in do_image_ubiRichard Purdie2018-10-201-1/+1
| | | | | | | | | | DEBUG: Executing shell function do_image_ubi | /home/pokybuild/yocto-worker/nightly-oe-selftest/build/build-st-31289/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/run.do_image_ubi.7928: 123: [: missing ] (From OE-Core rev: e1c6442872c9361b6b61a83adcce9cade2f2ecd2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: use pigz to create .gz filesRoss Burton2018-04-131-1/+1
| | | | | | | | | | | Since pigz is no longer a drop-in replacement for gzip (oe-core 1624b7b) the image creation has been using gzip instead of pigz, despite still depending on pigz-native. Fix this by invoking pigz explicitly. (From OE-Core rev: 214fa7fe3b162162d2fa8b31eec28bedd86fcc7d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: Rename lz4_legacy to lz4Maxin B. John2018-03-201-2/+1
| | | | | | | | | | | | | | | | LZ4 format currently used by the Linux kernel is the 'legacy' format. In order to avoid creating an image that can't be used as a compressed initial ramdisk with Linux kernel, rename lz4_legacy to lz4. [YOCTO #12461] [YOCTO #12149] (From OE-Core rev: 0c62a9b272d381bd5a16cfef19ecd1a15f521473) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: tar with --numeric-ownerMax Krummenacher2018-02-061-1/+1
| | | | | | | | | | | | | | | If --numeric-owner is neither used when creating or extracting the archive containing the rootfs then tar tries to change the numeric uid/gid of the files based on user/group names of the host used to extract the archive. Create the archive with --numeric-owner to remove the burden of having to use --numeric-owner when extracting. (From OE-Core rev: 061e04cb6335a10f560e57255b7335b8c9891207) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: don't use deprecated functions from utils.bbclassRoss Burton2018-01-301-1/+1
| | | | | | | | | | | 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. (From OE-Core rev: c97acbd034532895ce57c6717ed1b3ccc7900b0d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: add support for modern f2fs flash filesystemSaul Wold2018-01-231-0/+20
| | | | | | | | | | | | | | | | The f2fs filesystem is a newer flash filesystem that is available in meta-filesystems. This needs a minimum sized blank space to operate in correctly. The f2fs has overprovision functionality and when building smaller filesystems, you actually need more space, therefore under 500M (or so) double the amount of space needed in order to handle the overprovision functions in f2fs. (From OE-Core rev: dec029686a47b574edfce4472fe2167db54398fb) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: use stat to get sparse file's sizeRobert Yang2018-01-041-1/+1
| | | | | | | | | The "ls -s sparse_file"'s result is 0, use stat to replace of it. (From OE-Core rev: 1b2ec7a04069a0af2d4164c24109a5fa2fd0b1f6) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: Remove ELF typeSaul Wold2018-01-021-13/+0
| | | | | | | | | | | | As warned in a proir commit, it's time to remove the elf image type, it is not long used anywhere (that I am aware of) and the mkelfimage tool has been removed from the upstream coreboot code base. (From OE-Core rev: 2781e8d608c0fd2108aeab294f982e9249793852) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: btrfs use sparse file creationSaul Wold2017-12-181-1/+1
| | | | | | | | | | | | This will speed up file creation and still allow the btrfs tools to create a full btrfs image. This is similar to what we do for ext234 FS types. (From OE-Core rev: de2f2fc9e8e6d874a11e69adc2f438975a5c1359) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: Add debugging code to ext4 fs creationSaul Wold2017-11-211-0/+4
| | | | | | | | | | | | | We have seen a small number of issues with ROOTFS_SIZE not getting computed correctly, resulting in a failure in the mke2fs processing and populating the resulting new filesystem. This information should help us to reproduce [YOCTO #12304] (From OE-Core rev: 3a72f6783e142d53d19b37811a854d08d32485ab) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: Fix bmaptool support for RSSTom Rini2017-10-071-0/+3
| | | | | | | | | | | | | With RSS we need to ensure that when making a bmap image that the python3 that we created is found via /usr/bin/env rather than the host python3. Otherwise we're relying on the build host to have bmaptool support installed. (From OE-Core rev: a93c5869cb716cba5e05bbe4fc2e1c11adb9e30f) 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>
* image_types: support lz4 compressed squashfsEnrico Scholz2017-09-121-1/+3
| | | | | | | (From OE-Core rev: de70799af1a8bfe2fac22b90401053275d4714ba) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: improve reproducibility of .gz filesJuro Bystricky2017-08-311-1/+1
| | | | | | | | | | When compressing with "gzip", do not save the time stamp in the compressed file metadata. (From OE-Core rev: a88c16c2dc5dd7e2fbf7ca908a8b48da7be8b34c) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Convert vmdk/vdi/qcow2 to strict CONVERSION_CMD typesTom Rini2017-07-301-5/+7
| | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 929ba563f1bc7195c4981b8e139c432b2cc388ea) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: ignore tar exit code 1Ed Bartosh2017-07-301-1/+2
| | | | | | | | | | | | | | | | | | | | tar exists with 1 and produces warning "file changed as we read it" if content is changed while tar archives it. Even hardlinking content causes tar to fail this way as it changes file ctime. Other tasks running in parallel with do_image_tar may need to hardlink rootfs content in order to change it, e.g. do_image_wic does this to update etc/fstab. Ignored tar exit code 1 to be able to hardlink rootfs content while do_rootfs_tar is tarring it. [RP: Removed bashism] (From OE-Core rev: 402b4cffbb4c58cfee93db18192f2b218ee0ae35) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: Make u-boot signed images more versatileTom Rini2017-07-251-2/+4
| | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 65f27122950a35a67ce39ae4cfe93d0dca6b0dab) 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>
* image_types: use initrd from pre-sstate directoryEd Bartosh2017-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | mkelfImage was failing trying to use initrd from ${DEPLOY_DIR_IMAGE}: DEBUG: Python function extend_recipe_sysroot finished | DEBUG: Executing shell function do_image_elf | Cannot open `tmp/deploy/images/qemux86/core-image-minimal-qemux86.cpio.gz': No such file or directory As the images have only one deploy point it's not possible to reference something the images themselves are deploying. They need to reference it in the "pre-sstate" directory ${IMGDEPLOYDIR}, not the post sstate one ${DEPLOY_DIR_IMAGE}. Fixed by using ${IMGDEPLOYDIR} instead of ${DEPLOY_DIR_IMAGE} in mkelfImage command line. [YOCTO #11767] (From OE-Core rev: 13d675b0f8968bcfdf36035fd959be285e3da378) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: fix squashfs-lzo and squashfs-xz buildsEd Bartosh2017-07-171-2/+2
| | | | | | | | | | | | | | | | | | | Dependencies required for squashfs-lzo and squashfs-xz image builds were assigned to do_image_squashfs-lzo and do_image_squashfs-xz. As these tasks don't exist the dependencies were not installed and builds were failing. Correct task names for these image types are: do_image_squashfs_lzo and do_image_squashfs_xz because '-' and '.' are replaced by '_' in all do_image* task names. [YOCTO #11760] (From OE-Core rev: 1f8fc803262cdcc26dabc28af70bf0fdaf2e5847) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: remove Hob convenience variableJoshua Lock2017-07-171-3/+0
| | | | | | | | | | | IMAGE_EXTENSION_live is no longer used. It was used by Hob to map the live image type, but Hob is no longer part of the Bitbake codebase. (From OE-Core rev: 2b30dcdc903c1b0c18e14e39b954177628d058bd) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: fix kernel target on elf's image dependenciesLeonardo Sandoval2017-07-081-1/+1
| | | | | | | | | | Kernel recipes provides 'virtual/kernel' so remove the native part. (From OE-Core rev: 50e6f23ef1e304c335d44e3e8e7a6cfa5a93fa86) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: get rid of IMAGE_DEPENDSEd Bartosh2017-06-281-18/+27
| | | | | | | | | | | | | | | | | | | The IMAGE_DEPENDS_<type> variables can be set to add dependencies for individual image types. Those dependencies are added to the do_rootfs task, while they really should be added to the specific image type tasks. These variables are not documented anywhere. Replaced usage of IMAGE_DEPENDS_<type> with explicitly added dependencies to do_image_<type> tasks. [YOCTO #11302] (From OE-Core rev: c5f33d466122e53be910fa448af60ef3937eb828) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: Prompt error message on missing setting in UBI and UBIFSChoong YinThong2017-06-281-0/+6
| | | | | | | | | | | | | | Prompt error message to guide user add argument MKUBIFS_ARGS and UBINIZE_ARGS on every UBI and UBIFS image creation. [YOCTO #11589] (From OE-Core rev: 4a63fa70462eb5a780380b92f916cc8e295246fc) Signed-off-by: Choong YinThong <yin.thong.choong@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: perform fsck on created ext imageEnrico Jorns2017-03-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | When performing a file system check, the image created with mkfs will trigger Pass 3A ('Optimizing directories') which turns the file system into state "changed" (EXT2_FLAG_CHANGED). This will let fsck request a reboot by setting the return code flag "2". The result of this is that each ext-image built with oe-core will trigger a reboot during the first time an fsck is triggered. A common case where this might occur is when fsck detects having a future superblock write time. This always happens when booting a newly created ext4 rootfs with a target that does not have a recent time set. This patch moves the initial fsck run that performs the optimization from the target to the host system and thus prevents the target from performing an avoidable reboot. (From OE-Core rev: a93d005934192402d7cceb36016b25b7d0c65547) Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Ulrich Ölmann <uol@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: increase filesystem size for BTRFSEd Bartosh2017-03-221-5/+6
| | | | | | | | | | | | | | | | 16777216 bytes is a minimal possible filesystem size for BTRFS. mkfs.btrfs fails to create a filesystem if rootfs size is too small. Increased filesystem size to make it possible for mkfs.btrfs to create an image for small rootfs directories, e.g. for core-image-minimal. [YOCTO #11163] (From OE-Core rev: 17c2b1ca8a4e2023583645840db61bbde22bf65e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-container.bbclass: Add the "container" IMAGE_FSTYPESRandy Witt2017-02-191-0/+1
| | | | | | | | | | | | | 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] (From OE-Core rev: e45f074b792a43aa2fd84a5a3f0e20bf1d88ad7e) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: fix image dependency chain collectionAndre McCurdy2017-02-071-1/+1
| | | | | | | | | | | If image type "foo" depends on image type "bar.xz", then dependencies should be collected from the base image type (ie "IMAGE_DEPENDS_bar") not from "IMAGE_DEPENDS_bar.xz". (From OE-Core rev: 8a9f249a9166347cc0468191ce130003e3d306e1) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-wic: move wic code to image-wic.bbclassEd Bartosh2017-01-311-95/+0
| | | | | | | | | | | There is a lot of wic code in image.bbclass and image_types.bbclass Having all code separated in one file should make it more readable and easier to maintain. (From OE-Core rev: 786368568a9525212e69f5cbf6da236f0a6be013) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: change location of .env filesEd Bartosh2017-01-311-1/+1
| | | | | | | | | | | | | | | Current location of .env files $STAGING_DIR/imagedata. It doesn't depend on machine and be rewritten by the builds for different machines. Changed location to $STAGING_DIR/$MACHINE/imagedata to avoid .env files to be rewritten. (From OE-Core rev: 94245144f5cef344d90bc2a7b3267cdae9d192e4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: use correct output directoryEd Bartosh2017-01-311-1/+1
| | | | | | | | | | | | | Wic put result images into <output dir>/build, which was confusing. Now it's fixed in wic code and images are put into output directory. Changed code in image_types to reflect this. [YOCTO #10783] (From OE-Core rev: 3983507bf859f6c3c29e9dea06ffe51f42c0759c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gzip/pigz/expat/image: Simplify gzip-native/pigz-nativeRichard Purdie2017-01-281-1/+1
| | | | | | | | | With recipe specific sysroots, the gzip-replacement-native dance/class is obsolete, simplify the code accordingly. (From OE-Core rev: 39865fdf3698a130f792d41853f9c9ca1901e335) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: rebuild .wks file when .wks.in changesPatrick Ohly2017-01-281-0/+4
| | | | | | | | | | | | | | | | | | | WKS_FILE(S) can refer to .wks.in files which get expanded during the build by do_write_wks_template. The actual content of the .wks.in file gets added to the recipe meta data during parsing, and thus we need to ensure that the recipe gets re-parsed when the file changes. This fixes two related problems: - editing the .wks.in file and rebuilding an image did not recreate the image unless something else changed or "bitbake -c clean" was used explicitly - when forcing a rebuild, the cached meta data and the actual one do not match, leading to "ERROR: Taskhash mismatch ... for ....bb.do_write_wks_template" (From OE-Core rev: d00b95b18237b276c221b16dfc511a6da150ef06) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: put .env files to ${STAGING_DIR}/imgdata/Ed Bartosh2017-01-231-1/+1
| | | | | | | | | | | | | | As STAGING_DIR_TARGET started to point to a recipe specific sysroot wic is not able to add .env files when .wks file refers to multiple rootfs recipes. Used STAGING_DIR instead of STAGING_DIR_TARGET to make the directory with .env files the same for all recipes. (From OE-Core rev: 3797cfd7473d3f9b7c0d999dcf9cd9608c8c7c6c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: add RECIPE_SYSROOT_NATIVE to WICVARSEd Bartosh2017-01-231-1/+1
| | | | | | | | | | Added RECIPE_SYSROOT_NATIVE to the WICVARS for wic to be able to access it when run from bitbake. (From OE-Core rev: 3443ff47374c7e20ea54e838609b991f3f72810e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: build wic-toolsEd Bartosh2017-01-231-0/+1
| | | | | | | | | | Added dependency do_image_wic -> wic-tools:do_build to ensure that all required tools are ready to use by wic. (From OE-Core rev: 9f547605d2bec282c5679fb35cd5b28a37c5a0d5) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: IMAGE_TYPEDEP_ now adds deps for conversion typesRandy Witt2017-01-161-3/+11
| | | | | | | | | | | | | | Previously if IMAGE_TYPEDEP_* contained a conversion type of the form, "foo.bar", the dependency on CONVERSION_DEPENDS_bar would not get added to the task depends for do_rootfs. [YOCTO #10883] (From OE-Core rev: 037d39898e0e16c6d5b24a8d3844abfb328d3c14) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: look for wks files in <layer>/wicEd Bartosh2017-01-161-1/+1
| | | | | | | | | | | | Added <layer>/wic directory to the list of paths to look for wks files. This makes wic behaviour consistent when invoked manually and by bitbake. (From OE-Core rev: d345985db69dc86e9a8f8e2506b250d8780374cb) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVar callsJoshua Lock2016-12-161-12/+12
| | | | | | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: Add support for lzo compressed initial ramdiskVesa Jääskeläinen2016-10-281-1/+3
| | | | | | | | (From OE-Core rev: 881347f6169890c63eab30017b9d63a67600439e) Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: Add support to compress initramfs with lz4Vesa Jääskeläinen2016-10-281-1/+2
| | | | | | | | | | | | | | | Changed to use lz4 as lz4c seems to be deprecated. Removed use of redirection in favor of using output file. As Linux kernel supports only legacy format for initial ramdisk add COMPRESS_CMD_lz4_legacy mode in case some users are using newer format. (From OE-Core rev: 0ce5ccc7ec81a1e875c025fa0b384afdbe77fa45) Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: Use softer setting of WKS_FILESaul Wold2016-10-251-1/+1
| | | | | | | | | | | This will allow for more flexibility and overrides in BSP layers. (From OE-Core rev: 1886ab2f1dc1e3b5758a85604998e8deb9198f5e) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: add dependency do_image_wic -> do_bootimgEd Bartosh2016-10-151-0/+5
| | | | | | | | | | | | | | | | | | To produce certain types of images wic uses do_bootimg results to assemble final image. For example, it copies BOOT/EFI directory produced by do_bootimg to boot partition for every EFI image. The tricky part of this is that do_bootimg task is not always run, so we can't always make do_image_wic depend on do_bootimg. We only need to do it if do_bootimg present in task graph. Thank to Cristopher Larson for this fix. (From OE-Core rev: 1a961b4becf677c9eb07c5b24a8ddb75044663d1) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: remove redundant dependencyEd Bartosh2016-09-281-1/+0
| | | | | | | | | | | | | Removed parted-native dependency from do_image_wic as it's already mentioned in IMAGE_DEPENDS_wic variable. Thanks to Christopher Larson for pointing out to this. (From OE-Core rev: 82353471ccaae59967df7f14de0b4065cbc8169a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: add parted-native to do_image_wic dependsEd Bartosh2016-09-201-0/+1
| | | | | | | | | | | | As parted is always used by wic it makes sense to make do_image_wic dependent on parted-native:do_populate_sysroot. This should help to avoid adding it to all wic image recipes. (From OE-Core rev: c687c9fcc010947f52e1cd153ea74ae5f6343ca4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Deploy images to IMGDEPLOYDIREd Bartosh2016-09-041-22/+22
| | | | | | | | | | | | | | | | | Changed deployment directory from DEPLOY_DIR_IMAGE to IMGDEPLOYDIR to make sstate machinery to do final deployment and generate manifest. Renamed variable deploy_dir to deploy_dir_image in selftest code to avoid confusion with DEPLOYDIR variable. Updated the code of rootfs.py:Rootfs class to use IMGDEPLOYDIR variable as it's now used as a new deployment destination. (From OE-Core rev: 6d969bacc718e21a5246d4da9bf9639dcae29b02) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: check COMPRESS_DEPENDS for backwards compatibilityMikko Ylinen2016-09-031-0/+1
| | | | | | | | | | | | To complete the transition/renaming to chained image type CONVERSION while maintaining bacwards compatibility to COMPRESS(ION), make sure also COMPRESS_DEPENDS is checked. Without this, the dependencies for legacy COMPRESSIONTYPES do not get built. (From OE-Core rev: 12a8ee44f05e21d5814e31cb9e13c9eab236b836) Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: use COMPRESSIONTYPES variable for backward compatibilityEd Bartosh2016-08-251-1/+7
| | | | | | | | | | | Recent renaming of COMPRESSIONTYPES variable can break recipes that still use it. Including value of COMPRESSIONTYPES variable into CONVERSIONTYPES should prevent this. (From OE-Core rev: 5b00d9bf5ebf2350e4a4d09b436193efba80a85c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: rename COMPRESS(ION) to CONVERSIONPatrick Ohly2016-08-181-25/+25
| | | | | | | | | | | | | | | | | | | With the enhanced functionality, the term "compression" is no longer accurate, because the mechanism also gets used for conversion operations that do not actually compress data. It is possible to remove this naming problem in a backward-compatible manner by including COMPRESSIONTYPES in CONVERSIONTYPES and checking for the old COMPRESS_CMD/DEPENDS as fallbacks. [YOCTO #9346] (From OE-Core rev: 9d68c024790850cab72ead1e3372a5fcec4ef7b0) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: support template .wks.in files for wicChristopher Larson2016-07-201-0/+46
| | | | | | | | | | | | | | | | | | | | | These files are treated as the contents of a bitbake variable, so usual bitbake variable references are supported. I considered using another templating mechanism, for example the one used by yocto-layer, but then we'd end up largely mapping metadata variables to template fields anyway, which is a pointless indirection. Let bitbake expand the variables directly instead. This feature lets us, for example, reference ${APPEND} in --append, and avoid hardcoding the serial console tty in the wks file, and let the user's changes to APPEND affect wic the way they do the other image construction mechanisms. The template is read in and set in a variable at parse time, so changes to the variables referenced by the template will result in rebuilding the image. (From OE-Core rev: 51cb21fe5f050874d52f5b05a8a1de79ea4ebf2f) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>