summaryrefslogtreecommitdiffstats
path: root/meta/classes/image_types.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Activate the new python rootfs/image creation routinesLaurentiu Palcu2014-02-111-113/+0
| | | | | | | | | | | | | | This commit will: * remove old bash code common to all backends; * create a new do_rootfs() python function that will use the new rootfs/image creation routines; * allow creation of dpkg based images; * fail for rpm/opkg (not implemented yet); (From OE-Core rev: a83144bac8d67704ff66f5dc0fc56f5b63979694) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types bbclass: add support for tar.lz4 and cpio.lz4Koen Kooi2014-01-141-2/+4
| | | | | | | (From OE-Core rev: 0a541a0497902ee9993449b47da853b6c6a306d9) Signed-off-by: Koen Kooi <koen.kooi@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: newer btrfs.mkfs needs an empty file to build the disk inSaul Wold2013-11-201-0/+1
| | | | | | | (From OE-Core rev: 836396a3450e7bf151956e87bd92f70c5050c995) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: Improve dependency handling between types (and use for sum.jffs2)Richard Purdie2013-11-041-7/+12
| | | | | | | | | | | | We're seeing a pattern of one image type needing to depend on another type. A good example is jffs2 and sum.jffs2. This patch makes sum.jffs2 depend on jffs2 which will then allow a EXTRA_IMGAGECMD to be set for sum.jffs2 individually without changing the jffs2 command. This allows the -pad option to be configured differently. (From OE-Core rev: 4a05f4f03b7d710e9e19a97f5d2c35d101e2c648) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: fix endiannes for sumtool (jffs2 summary)Andrea Adami2013-10-261-1/+1
| | | | | | | | | | | | | | | | | | | | | For mkfs.jffs2 endianness can be be expressed in the long or short form with the optional size argument: --little-endian -l Strangely the sumtool has a different syntax and does accept the forms: --littleendian -l Prefer the short form valid for both tools. (From OE-Core rev: be566b6f77423f7f676bc6b0511966651d687871) Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: do not force --no-cleanmarkers for jffs2Andrea Adami2013-10-261-2/+2
| | | | | | | | (From OE-Core rev: b3249f238d669f5f2422207f9c4414b64e24eb73) Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image types: split live into iso and hddimgValentin Popa2013-10-141-4/+9
| | | | | | | | | | | | | | Changes to split live into iso and hddimg without adding a new image type class. This patch has only a visible effect on HOB and solves part 2 of #3197 [YOCTO #3197] (From OE-Core rev: f05ae5f57d9d1bd839fae0e3f353d4e0e303a183) Signed-off-by: Valentin Popa <valentin.popa@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: use mkfs.cramfs instead of makecramfsAndrea Adami2013-08-301-2/+2
| | | | | | | | | | | | The former is provided by util-linux and the latter is now to be removed for meta-filesystems. This allows to generate cramfs images whithout extra layers. (From OE-Core rev: 451546a9d2f675ac331f72f4e66317685d931aba) Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: replace genext2fs with populate-extfs.shRobert Yang2013-08-261-28/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The benefits: - Really support ext4 - Support the sparse file (we lost the sparse file in the image in the past, the sparse file became into the common file) - Fix the error reported by fsck: (ext2/ext3) Inode 1025, i_size is 16384, should be 17408. - Have a uniform code for ext2/3/4 generation * Comments from Darren Hart: Basically, genext2fs doesn't support creating ext4 filesystems. It creates, as I understand it, an ext2 filesystem, then adds a journal, and sets some bits. It can't support the newer features like extents. So what we end up with is a bit of a hack for a filesystem. The ext tools (e2fsprogs) unfortunately don't provide an integrated solution for generating prepopulated filesystem images as many other mkfs* tools do. One thing missing was symlink support in libext2fs. I added that support and demonstrated a script which uses the e2fsprogs debugfs tool that can populate the newly formatted filesystem from a directory and without root privileges. [YOCTO #3848] (From OE-Core rev: 40c3e18f43b2f074cec97d21aeb8d21f26dd5048) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: set 'filetype' ext4 featureEnrico Scholz2013-06-281-1/+1
| | | | | | | | | | | | | | | Generating filesystems with this flag allows more efficient directory traversals because getdents() returns the filetype in 'd_type' which allows to avoid an extra lstat() call. Creating ext4 filesystems with 'mkfs.ext4' sets this flag by default too. (From OE-Core rev: 75e077025397f3bde84e60a9da2c0564ade09b39) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: add ubifs to IMAGE_TYPESAndrea Adami2013-06-071-1/+1
| | | | | | | | | | | | * the IMAGE_TYPES variable is used exclusively by hob * IMAGE_CMD_ubifs is already present in the class * ubifs images can be flashed on existing ubi volumes with 'ubiupdatevol' (From OE-Core rev: 0dc5a90b2d95ad21025769b0300390a4ff0052ac) Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: remove the old imagesRobert Yang2013-05-211-1/+5
| | | | | | | | | | | | | | Remove the old image before the new one generated to save disk space when RM_OLD_IMAGE is set to 1, this is an easy way to keep the DEPLOY_DIR_IMAGE clean. [YOCTO #4391] (From OE-Core rev: b3e2e405c53d63bc71872d41f455507be833e7eb) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: fix default location of kernel when generating elf imagesTomas Frydrych2013-05-031-1/+1
| | | | | | | | | | | Generation of elf images fails because kernel images are no longer staged under ${STAGING_DIR_HOST}/kernel, but rather ${STAGING_DIR_HOST}/usr/src/kernel. This patch fixes the path to point to the correct location. (From OE-Core rev: 6e57a3231fb29f869d476b8511d6f4393f82651b) Signed-off-by: Tomas Frydrych <tomas@sleepfive.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: Replace squashfs-lzma with squashfs-xzMarc Ferland2013-03-291-3/+3
| | | | | | | | | | | | | | | | | | | Booting an image generated with squashfs-lzma results in a kernel error: "Filesystem uses "lzma" compression. This is not supported". Currently (well at least in Linux 3.8) the officially supported decompressors are: * LZO * XZ * ZLIB This change makes sure we use a supported compression algorithm for squashed root filesystems. (From OE-Core rev: d915e2e084257830c43f7f21af3aec24b7e1a211) Signed-off-by: Marc Ferland <ferlandm@sonatest.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: only create links if the target existsAndreas Oberritter2013-03-181-1/+3
| | | | | | | | | | When creating images containing many partitions, rootfs.$type may not be available. (From OE-Core rev: cf8e9d8942fdddaac21fca46137120da959c814c) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: Add and update comments regarding image types.Robert P. J. Day2013-01-161-1/+4
| | | | | | | | | | | Explain the elf/cpio.gz snippet of code, and update a comment to reflect the correct variable name. No functional change. (From OE-Core rev: 0ca4a3a25e4495bf6e2e3932c019bd15856faf55) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>