summaryrefslogtreecommitdiffstats
path: root/meta/classes/image_types.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* image_types.bbclass: whitespace and reorderPeter A. Bigot2014-11-061-1/+15
| | | | | | | | | | | | Use a multi-line value to set IMAGE_TYPES and put all the compressed versions of a format on one line. Other than moving ext2.lzma this is just whitespace. (From OE-Core rev: dd93b3a950d063f4e3020362c636006f51fb5782) Signed-off-by: Peter A. Bigot <pab@pabigot.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: Make ubi depend on ubifsPascal Bach2014-11-041-0/+2
| | | | | | | | | | | The ubi command assumes the ubifs file is present. This makes sure this is really the case. (From OE-Core rev: 0a947408f32d7ab10d2004e7d9332296b82191a3) Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Support image type "squashfs-lzo"Mike Looijmans2014-08-151-1/+3
| | | | | | | | | | | Add "squashfs-lzo" to the image types. LZO compression support has been in both kernel and squashfs tools for many years, but OE never enabled it. (From OE-Core rev: ab659b1c1e13fd6863893abff86990d88aa36790) Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: Fix ubi filesystem return codesRichard Purdie2014-06-031-1/+2
| | | | | | | | | | | | If the first command returns an error, it will not cause the image generation step to fail. Simply split up the statement into multiple lines to avoid this issue, they no longer need to be one line expressions. [YOCTO #6391] (From OE-Core rev: f8125a1e9b6893a12355d55d4df584a8d97f0bff) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cpio rootfs build: Avoid modifying rootfs dirJonas Eriksson2014-03-271-3/+5
| | | | | | | | | | | | | | | | | | | The Linux kernel requires that initrd images contain a /init file for the image to be used as an initrd, even if it is empty. Adding it into the rootfs directory creates a race, that can upset tar when building both a .tar and .cpio image file ("tar: .: file changed as we read it"). Additionally, whether or not the tar file will contain the /init file is also up to the race condition. To avoid this problem, move the /init addition out from the rootfs directory, and thus only include it in the .cpio image. (From OE-Core rev: 706055503f493a5af73240c0983c46dbe31d8fe9) Signed-off-by: Jonas Eriksson <jonas.eriksson@enea.com> Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com> Cc: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: use 4096 instead of 8192 bytes-per-inodeRobert Yang2014-03-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | The image not correctly created if 'ptest-pkgs' is in IMAGE_FEATURES, this is because there is no free inode left. We can use 4096 instead of 8192 bytes-per-inode to fix the problem, and most of the distributions us 4096, such as Ubuntu, Suse, Fedora and CentOS. There are another problems: * There are error message when there is no free inode left if we run the mke2fs command manually, but they are not in log.do_rootfs. * The image generation doesn't stop when error happens because mke2fs doesn't return failed for this case. Will fix them in other threads. [YOCTO #5957] (From OE-Core rev: 09ab3a00598d06e3a1bf871811c2ac37359c74da) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: use mke2fs -d to create the ext2/3/4 imageRobert Yang2014-03-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used populate-extfs.sh which invoked the debugfs to create the image, now the mke2fs' option "-d root-directory" can do the same thing, and which is more faster, for example, the core-imag-sato: * In the past: $ time mke2fs -t ext4 rootfs.ext4 real 0m0.249s user 0m0.036s sys 0m0.132s $ time populate-extfs.sh /path/to/rootfs/ rootfs.ext4 real 0m29.355s user 0m10.637s sys 0m5.544s * Now: $ time mkfs.ext4 -F -d /path/to/rootfs/ rootfs.ext4 real 0m6.338s user 0m3.824s sys 0m1.356s More than 25 seconds are saved. [YOCTO #4083] (From OE-Core rev: 6338fe9ba338615317a4e7ccc99287b236ac77ae) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: fix cpio IMAGE_CMD to preserve working directoryJonathan Liu2014-02-211-1/+1
| | | | | | | | | | | | The working directory is changed in a subshell when executing cpio to preserve the working directory for any subsequent commands. This is to keep the working directory consistent when generating multiple image types. (From OE-Core rev: 5ff6cb920f8be9068a23f7bf0cb1b9a9ff1eda5b) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image*.bbclass, bootimg.bbclass: add image type dependenciesLaurentiu Palcu2014-02-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The following dependencies were manually added in the image creation code. However, in order to have an image dependency mechanism in place, use a new variable, IMAGE_TYPEDEP, to declare that an image type depends on another being already created. The following dependencies are added by this commit: elf -> cpio.gz live -> ext3 vmdk -> ext3 iso -> ext3 hddimg -> ext3 This commit adds also another new variable: IMAGE_TYPES_MASKED. Currently, masking out certain types from IMAGE_FSTYPES was hardcoded in the image creation code. [YOCTO #5830] (From OE-Core rev: 5e2796aa28e02ae3a076c6593c6533753720b13d) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: minor, inline CPIO_TOUCH_INIT()Matthieu Crapet2014-02-201-7/+3
| | | | | | | | | | | | Since generic compression solution has been introduced (see revision b7e4ed41ee480f00b7265341e9e2d2c2b9135143), CPIO_TOUCH_INIT() is only called by IMAGE_CMD_cpio. (From OE-Core rev: e856e04e6134ce98e89027864f69b2ab48d40dcc) Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: Fix tar IMAGE_CMD to not change directories1.6_M3.final1.6_M3Khem Raj2014-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | below commit commit 9d9bca8785911e8ae06d507bbfb99d6a811f072e Author: Jonathan Liu <net147@gmail.com> Date: Mon Feb 17 21:46:28 2014 +1100 lib/oe/image.py: fix working directory The working directory needs to be changed before the image creation commands instead of afterwards. exposed an issue when generating tar images, where it would cd into rootfs and then create the rootfs tarball and remain there since the cmd to cd into deploy dir moved up the immediate following cmd like tar.bz2 or tar.gz were still looking for tarball in current directory which esentially was not deploy dir but IMAGE_ROOTFS instead (From OE-Core rev: 9a98b8bfe13b94d89a9e39cca821f26fdeaeffc3) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: sum.jffs2 is replaced by jffs2.sumDmitry Eremin-Solenikov2014-02-141-3/+1
| | | | | | | | | | Previous commit added support for sum 'compression' (rather postprocessing) of jffs2 images. Drop support for sum.jffs2 image type. (From OE-Core rev: 295c6c1452c8789a8b1d0090ff09a5cd7cf16507) Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types bbclass: use compression framework for jffs2 sum imagesDmitry Eremin-Solenikov2014-02-141-2/+5
| | | | | | | | | | | | | | | | | I got hit by a missing dependency in generation of sum.jffs2 images - at runtime, when images are generated using bitbake pool, it is possible for sum.jffs2 image to be scheduled for generation before jffs2 image is fully generated. Insted of adding additional hacks, reimplement sum.jffs2 generation as a compression scheme on top of plain jffs2 images. For now support for sum.jffs2 images is left in, it will be removed by the subsequent commit. (From OE-Core rev: 2a15a364fdf85b0b18ba63fdb2a745a52b96478e) Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>