summaryrefslogtreecommitdiffstats
path: root/meta/classes/image_types.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* image_types.bbclass: fix image dependency chain collectionAndre McCurdy2017-05-181-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: 854fff614059100494326adeec7c48fa5272d080) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8a9f249a9166347cc0468191ce130003e3d306e1) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: IMAGE_TYPEDEP_ now adds deps for conversion typesRandy Witt2017-05-181-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: c0ff0e1ff872b04006b26c6db4f8c9cf053b0764) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 037d39898e0e16c6d5b24a8d3844abfb328d3c14) Signed-off-by: Armin Kuster <akuster808@gmail.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>
* image_types.bbclass: add intermediate var for WKS_FILE_CHECKSUMChristopher Larson2016-07-201-1/+2
| | | | | | | | | | This is a bit nicer to work with, and easier to override. (From OE-Core rev: 44f1d3cc613563b8d5be61a2648d0cd336fea728) 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>
* image/image_types.bbclass: fix fatal error during cpio debugfs creationAndré Draszik2016-06-121-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If /init is just a symlink to /sbin/init, debugfs creation fails with the following error: ERROR: Error: The image creation script '<...>/debugfs.create_image.cpio' returned 1: touch: cannot touch '<...>/cpio_append/init': Permission denied WARNING: exit code 1 from a shell command. ERROR: Function failed: do_rootfs The reason is that IMAGE_CMD_cpio() is run twice on the same WORKDIR. The first run creates a symlink in WORKDIR/cpio_append/init to point to /sbin/init, while the 2nd run then tries to 'touch' that link, which will fail, of course since /sbin/init is not usually writable by non-root users. Fix this by providing knowledge to the IMAGE_CMD_xxx() scripts with regards to the fact that they are being executed in the context of debugfs creation. The IMAGE_CMD_cpio() can now be intelligent in the sense that it can avoid all additional symlink handling during the debugfs run. The symlinks do not need to be part of the debugfs, so we can skip that part altogether in that case. (From OE-Core rev: 659ae1d7df28115429f6f31450fad6d1f86e3031) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@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] (From OE-Core rev: d3495d7b5ac90439691bafc5717a3bf1cf014737) 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. (From OE-Core rev: 27764738aa928959ca564e7299cf205c08684661) 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>
* image_types: adjust default level of XZ compressionAlexander D. Kanevskiy2016-05-141-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. (From OE-Core rev: e9dbf85828e9d4e16c6a96de8931cb15bbcd78bb) Signed-off-by: Alexander D. Kanevskiy <kad@kad.name> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: fix image/compression dependency collectionRoss Burton2016-05-111-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. (From OE-Core rev: 05c59ed987cdddc00e9e217032a69197e40a8448) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: add WIC_CREATE_EXTRA_ARGSChristopher Larson2016-05-111-1/+3
| | | | | | | | | | This'll be of use to pass things like --bmap. (From OE-Core rev: 90b2738fb07e329cb6b867fb37a929d562f27d15) 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>
* image_types: Ensure rootfs dependencies cover DEBUGFSRichard Purdie2016-04-191-1/+3
| | | | | | | | | If you configure a bz2 debugfs, pbzip2-native currently isn't built. This patch makes sure the dependencies are added. (From OE-Core rev: dd304a6fdc034d780e01e0055319e4a04aaad9d4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-vm.bbclass/image_types.bbclass: IMAGE_NAME -> IMAGE_LINK_NAMERobert Yang2016-04-091-1/+1
| | | | | | | | | | | | If we create hdddirect in the first time, and run bitbake to create vmimg in the second time, then the previouse created ${IMAGE_LINK_NAME}.hdddirect may can not be found since it contains the data string which are different. Use IMAGE_LINK_NAME to fix the problem. (From OE-Core rev: 4aa8f67867a05bdf4a5ba90c8235740910662847) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: fix elfRobert Yang2016-04-091-1/+2
| | | | | | | | | | | | | | Fixed: | DEBUG: Executing shell function do_image_elf | Cannot open `/path/to/tmp/sysroots/qemux86-64/usr/src/kernel/bzImage': (null) | WARNING: exit code 1 from a shell command. The bzImage is in DEPLOY_DIR_IMAGE (From OE-Core rev: 24536aa578e483fc2a8594628befa4c78a05681c) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: set nodesize for btrfsRobert Yang2016-04-091-1/+1
| | | | | | | | | | | | | | The default value is 16K which is too big to create image for core-image-minimal: rootfs.btrfs is too small to make a usable filesystem Minimum size for each btrfs device is 41943040. Use 4K as ext2/3/4 to fix the problem. (From OE-Core rev: a3e4dc0d800fbae3674b1657c872f70589fc893e) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: use compress framework to produce checksums for imagesAlexander D. Kanevskiy2016-04-061-1/+7
| | | | | | | | | | | | | | | | | | | | Existing compress framework for producing various compressed versions of images is powerfull enough to be extended for other uses, e.g. to convert types of images. It is possible to use it also to produce image checksums at the time of image generation. This commit adds support for all supported at the moment coreutils hashing algorithms: md5, sha1, sha224, sha256, sha384 and sha512 Usage: IMAGE_FSTYPES_append = " hddimg.sha256sum" (From OE-Core rev: 1fbd27122ac4403b8688bc41d128602564a05506) Signed-off-by: Alexander D. Kanevskiy <kad@kad.name> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image creation: allow overriding .rootfs suffixPatrick Ohly2016-03-071-29/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | By default, the image file name contains ".rootfs" to distinguish the image file from other files created during image building. However, for certain image types (for example, .hddimg) the ".rootfs" suffix is redundant because the type suffix alone already uniquely identifies the main image file (core-image-minimal-intel-corei7-64.hddimg instead of core-image-minimal-intel-corei7-64.rootfs.hddimg). With this change, distros that prefer the shorter image name can override the .rootfs suffix unconditionally with IMAGE_NAME_SUFFIX ?= '' in their distro configuration or with some condition check like this: python () { if <whole-disk image format active>: d.setVar('IMAGE_NAME_SUFFIX', '') } The exact logic when to remove the extra suffix depends on the distro and how it enables its own image type. (From OE-Core rev: 380ee36811939d947024bf78de907e3c071b834f) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: Embed IMAGE_NAME in ubinize config fileDrew Moseley2016-02-071-9/+9
| | | | | | | | | | | | | | | | | | | | | When using the FSTYPE multiubi, make sure that each image build has a unique config file. Without this there is a race condition when building multiple images in a single bitbake command which results in errors similar to: ERROR: Error: The image creation script 'blah/tmp/work/blah/core-image-base/1.0-r0/temp/create_image.multiubi' returned 1: iniparser: cannot open ubinize_normal.cfg ubinize: error!: cannot load the input ini file "ubinize_normal.cfg" mv: cannot stat 'ubinize_normal.cfg': No such file or directory WARNING: blah/tmp/work/blah/core-image-base/1.0-r0/temp/create_image.multiubi:1 exit 1 from mv ubinize${vname}.cfg blahtmp/deploy/images/blah/ (From OE-Core rev: bc7643846f9fcef13a02f9299faa5454c843e8b1) Signed-off-by: Drew Moseley <drew_moseley@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Fix wic environment issuesRichard Purdie2016-01-191-1/+0
| | | | | | | | | | | | | | | | | | | | | The wic environment function needs to run after the rootfs size is setup. We move this code to a specific task, and depend on that task from the wic images and other places its needed. This fixes: ====================================================================== FAIL: test_image_env (oeqa.selftest.wic.Wic) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/decorators.py", line 106, in wrapped_f return func(*args, **kwargs) File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/wic.py", line 218, in test_image_env self.assertTrue(var in content, "%s is not in .env file" % var) AssertionError: False is not true : ROOTFS_SIZE is not in .env file (From OE-Core rev: 606f9e2d7d8d389c8d4f5c3090139d3bb780e09c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Fix do_rootfs referencesRichard Purdie2016-01-111-3/+3
| | | | | | | | | After the separation of do_rootfs, some rootfs references need changing to image_complete. (From OE-Core rev: 59a5f596ca29b1eb8283706e3c60fbb39f9c2c23) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: Rebuild when WICVARS changeMariano Lopez2016-01-071-1/+2
| | | | | | | | | | | | | | | | | | | | The procces to do a wic image is to save a file with variables required by wic and then call wic using this file. Because this is external to bitbake if the vars change, the image won't be rebuild; an example of such is IMAGE_BOOT_FILES. This patch adds these variables to vardeps of do_rootfs when a wic image is build. This will rebuild the image if a variable needed by wic changes. [YOCTO #8693] (From OE-Core rev: 12c54d50ed4c321dc272beb3c6cb770965c979f1) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: improve wks path specificationChristopher Larson2015-11-241-7/+29
| | | | | | | | | | | | | Hardcoding a full input path with zero flexibility goes against everything the Yocto Project is about. Rework it to let the user specify the wks base filename with WKS_FILE and it'll search the layers for the wks file and use it. (From OE-Core rev: 8cc7f5229f5447c2183ac319dd52c7ed737ec89b) 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>
* image types: add hdddirectPatrick Ohly2015-09-281-2/+3
| | | | | | | | | | | | | | | | | | When image-vm.bbclass was introduced, it indirectly also introduced a ".hdddirect" image type based on boot-directdisk.bbclass. However, one could only get that image when also enabling at least one of the virtual machine images. The .hdddirect images are useful by themselves. By registering image-vm.bbclass as implementation of it, it becomes possible to select them with: IMAGE_FSTYPES = "hdddirect" (From OE-Core rev: e3ff509091cbbfdef851f8a3c9e31c7b76d37e89) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: Don't try to create ubi symlink twiceMike Looijmans2015-09-231-10/+12
| | | | | | | | | | | | | | | | | | | | | | Fixes b6e64de541b37 "Restore compatibility with previous UBI filesystems" The multivolume UBI code creates symlinks for each volume. If the volume name is empty, it will create a symlink that the rootfs code will attempt to create again later, resulting in a crash like this (unless IMAGE_LINK_NAME is blank): ERROR: Error executing a python function in .../recipes-core/images/my-image.bb: File: '.../oe-core/meta/lib/oe/image.py', lineno: 203, function: _create_symlinks *** 0203: os.symlink(src, dst) Exception: OSError: [Errno 17] File exists To prevent this from happening, only create symlinks to volumes that have a name, and let the rootfs script create the default symlink later. (From OE-Core rev: fce257892488b9ef537526ccf412e9deda37c439) Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: Restore compatibility with previous UBI filesystemsMike Looijmans2015-09-141-2/+8
| | | | | | | | | | | | | | | | | Support for multiple ubi images has broken dozens of machine deployment scripts in two ways: Previously, ubi filesystems would be named $IMAGE_NAME as one would expect. The current version would append "_rootfs" to that name for no reason. Fix it so that the name for ubi images remains unchanged if there is only one image to build. Machines would append to IMAGE_CMD_ubi, adding extra image processing of their own. This is broken now that IMAGE_CMD_ubi became a variable instead of a function. Make IMAGE_CMD_ubi a function again, this also makes for more logical quotes (I was surprised to find that " within " would even work). (From OE-Core rev: b6e64de541b37bc5c558c4ad362a0467291a5609) Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.py: write bitbake variables to .env fileEd Bartosh2015-08-301-0/+4
| | | | | | | | | | | | | | | | Write set of bitbake variables used by wic into build/tmp/sysroots/<machine>/imagedata/<image>.env List of variables is defined in WICVARS variable in meta/classes/image_types.bbclass. This is needed for wic to be able to get bitbake variables without running 'bitbake -e'. (From OE-Core rev: 861ce6c5d4836df1a783be3b01d2de56117c9863) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: add wic image typeEd Bartosh2015-08-301-0/+12
| | | | | | | | | | | | | | | | wic image type is used to produce partitioned images. Image configuration should be stored in either <recipe>.<machine>.wks or <recipe>.wks file. .wks file should be put to the same location as image recipe and have the same name. [YOCTO #7672] (From OE-Core rev: 3658a3278a3752d4aa72cdff4aa8c9f5e1d90f93) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Empty image: filesystem allocationAlex Franco2015-08-291-1/+9
| | | | | | | | | | | | Increase sparse image block size when ROOTFS_SIZE is smaller than the minimum needed for ext4 to fit into it. [YOCTO #7664] (From OE-Core rev: 6938791ff97a23430afb4aa16d71aa8729a12ead) Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: allow replacing tar commandPatrick Ohly2015-08-191-1/+13
| | | | | | | | | | | | Usually, the host's tar command is sufficient. However, special cases like archiving xattrs depend on a modern GNU tar version. The new IMAGE_CMD_TAR makes that possible, with xattrs given as example. (From OE-Core rev: d8db122114f4d0600b662f79b3673108b4b6c0b7) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* IMAGES_FSTYPES: default to EXT4Juro Bystricky2015-08-161-1/+1
| | | | | | | | | | | | | | | | | The following IMAGES_FSTYPES defaulted to ext3: "vmdk", "vdi", "qcow2", "live", "iso", "hddimg" This patch changes the default for those IMAGES_FSTYPES to ext4 in order to bring the images more in line with other BSPs. Besides improvements in performance and reliability ext4 provides additional functionality as well (option to turn off the journaling, dynamic resizing of VDI volumes etc.). (From OE-Core rev: 2b56d671d2f0ef22786c97e29e1215eb80c94490) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Support for qcow2Christian Ziethén2015-07-251-2/+3
| | | | | | | | | | | Add support for qcow2 image format. Implemented in the same way as the previously existing vmdk and vdi solutions. (From OE-Core rev: c1f9ed400e4b5fe5be4fac86021dea11a7546035) Signed-off-by: Christian Ziethén <christian.ziethen@linaro.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: add support for multiple ubi sizesPushpal Sidhu2015-07-081-12/+43
| | | | | | | | | | | | | | | | | | | | | Add new FSTYPE called 'multiubi'. This new type has the ability to create multple ubi's, something that's extremely useful on boards that can include varying flash sizes (e.g. 256MB vs 2GB). Because we don't want to reuse code, I extracted the mkfs and ubinize commands out to a new function that will handle the creation of both multiple ubi's, as well as the 'ubi' FSTYPE (so as not to break current boards). Due to the single processes nature of the OE when doing it's 'create_image', this new multiubi_mkfs function also creates it's own symlinks as well as cleans up it's own cfg file. (From OE-Core rev: 1255476161f409a0999650c2c8bdaf36b1ba4b95) Signed-off-by: Pushpal Sidhu <psidhu@gateworks.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: use pbzip2 for images requiring bz2 compressionAndre McCurdy2015-06-271-2/+2
| | | | | | | (From OE-Core rev: b269fbe6585df97d02211dc5711e88833365e572) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Support for VDIJuro Bystricky2015-06-111-2/+3
| | | | | | | | | | | | | Added support for VirtualBox VDI format. The support was implemented by merging with the already existing VMDK support for VM player by creating a new class image-vm.bbclass. This class replaces the previous VMDK only image-vmdk.class. (From OE-Core rev: 0a3e8eb9f592c3f1edd2c7521855f7406541651a) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: Add missing ext4 supportRichard Purdie2015-03-311-1/+2
| | | | | | | | | | | | | This is particularly problematic since qemu images switched to ext4 by default and now cannot work properly with UIs like hob. This patch adds in ext4 to the appropriate IMAGE* variables fixing this. [YOCTO #7426] (From OE-Core rev: e6aab245623b6ba1ca5f06632d1028c863cef737) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: Fix MIN_BTRFS_SIZE to be 1024 blocks to match ROOTFS_SIZESaul Wold2015-03-101-1/+1
| | | | | | | | | | [YOCTO #7392] (From OE-Core rev: b75e23568d72aea3c508492c129c361bedd98eb4) 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: Error out if BTRFS image is too smallSaul Wold2015-02-141-2/+7
| | | | | | | | | | [YOCTO #6804] (From OE-Core rev: 14a1c035ba654aff1ec09d884f0b0acf7b83ab79) 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>
* btrfs: create an empty file to build the fs inSaul Wold2015-02-021-2/+2
| | | | | | | | | | | | The newer btrfs-utils needs an empty file to build the filesystem in, so create an empty file and use it for the mkfs to build the fs in. [YOCTO #6804] (From OE-Core rev: 224c24d8a8ea6230ed56ea61cdb86e78c5ec4311) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: manage 'cpio_append' directoryEnrico Scholz2015-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | For cpio images, do_rootfs() can operate on a dirty '${WORKDIR}/cpio_append' directory which contains e.g. files from previous builds. This can cause unwanted files in the image or can break the build. E.g. when there is a cpio_append/init -> /sbin/init symlink symlink, the 'ln -sf' can fail due to SELinux restrictions: | $ ls -la cpio_append/init | lrwxrwxrwx. 1 ensc ensc 10 22. Jan 16:26 cpio_append/init -> /sbin/init | | $ strace ln -sf /sbin/init cpio_append/init | ... | stat("cpio_append/init", 0x7fffbb9ca310) = -1 EACCES (Permission denied) | exit_group(1) = ? Patch cleans up 'cpio_append' before executing the 'do_rootfs' task by adding it to 'cleandirs'. An alternative implementation (which avoids creation of this empty dir for non-cpio images) might remove it within IMAGE_CMD_cpio, but this might break builds where people rely on the existence of this directory (e.g. to add local files). (From OE-Core rev: 4db3cc2360289c062fa0df4678f2f2ef990f0c1a) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: fixed 'init' creation for cpio imagesEnrico Scholz2015-01-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | When /init is a dangling symlink or a symlink to a file which can not be stated on the build system (e.g. due to SELinux restrictions), the '[ ! -e .../init ]' test will succeed which causes the manual creation of /init. E.g. here: | $ ls -la cpio_append/init | lrwxrwxrwx. 1 ensc ensc 10 22. Jan 16:26 cpio_append/init -> /sbin/init | | $ strace /bin/test -e cpio_append/init | stat("cpio_append/init", 0x7fff374a9db0) = -1 EACCES (Permission denied) | exit_group(1) = ? To test for the existence of a file, both '-L' and '-e' checks must be executed and to prevent SELinux noise, the '-L' should happen before '-e'. (From OE-Core rev: 2aa5d2880ee3578f4965f245addd365fb7b1c1ca) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: Rework code to map types for 'ext3'Otavio Salvador2014-12-251-1/+1
| | | | | | | (From OE-Core rev: df00cb53f0548d34e5865b6fff314bff641af6e7) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: Respect IMAGE_TYPEDEP dependenciesOtavio Salvador2014-12-251-0/+2
| | | | | | | | | | The IMAGE_TYPEDEP dependencies also need to be taken into account when building an IMAGE_FSTYPE. (From OE-Core rev: 055fddd601536109e0574e84dc6570c322f22d44) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: Populate cpio /init as symlinkNathan Rossi2014-12-191-1/+5
| | | | | | | | | | | | | | | | For cpio/ramfs the kernel will first attempt to execute /init and will emit the following error as the file is empty: Failed to execute /init (error -13) If /sbin/init exists symlink to it so the kernel can immediately start the correct init executable instead of an empty file. (From OE-Core rev: 3505558e067fdde4ab7aaaf3c50886f292d7c166) Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>