aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/image_types.bbclass
AgeCommit message (Collapse)Author
2013-11-20image_types: newer btrfs.mkfs needs an empty file to build the disk inSaul Wold
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-11-04image_types: Improve dependency handling between types (and use for sum.jffs2)Richard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-26image_types.bbclass: fix endiannes for sumtool (jffs2 summary)Andrea Adami
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. Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-10-26image_types.bbclass: do not force --no-cleanmarkers for jffs2Andrea Adami
Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-10-14image types: split live into iso and hddimgValentin Popa
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] Signed-off-by: Valentin Popa <valentin.popa@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-30image_types.bbclass: use mkfs.cramfs instead of makecramfsAndrea Adami
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. Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-26image_types.bbclass: replace genext2fs with populate-extfs.shRobert Yang
* 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] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-27image_types.bbclass: set 'filetype' ext4 featureEnrico Scholz
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. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-07image_types.bbclass: add ubifs to IMAGE_TYPESAndrea Adami
* 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' Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-21image_types.bbclass: remove the old imagesRobert Yang
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] 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>
2013-05-03image_types: fix default location of kernel when generating elf imagesTomas Frydrych
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. Signed-off-by: Tomas Frydrych <tomas@sleepfive.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29image_types.bbclass: Replace squashfs-lzma with squashfs-xzMarc Ferland
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. Signed-off-by: Marc Ferland <ferlandm@sonatest.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-18image_types.bbclass: only create links if the target existsAndreas Oberritter
When creating images containing many partitions, rootfs.$type may not be available. Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-16image_types.bbclass: Add and update comments regarding image types.Robert P. J. Day
Explain the elf/cpio.gz snippet of code, and update a comment to reflect the correct variable name. No functional change. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-19image_types: fix squashfs-lzma image creationSaul Wold
This removes the dependency on a seperate binary which we don't seem to have. So, use mksquashfs's -comp lzma to replace that functionality [YOCTO #3126] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14image_types.bbclass: Round up ROOTFS_SIZE after base_size checkAndrei Gherzan
If we round up ROOTFS_SIZE to IMAGE_ROOTFS_ALIGNMENT before checking if base_size is greater then IMAGE_ROOTFS_SIZE, we can end up adding an unaligned value to IMAGE_ROOTFS_SIZE. Obviously, if IMAGE_ROOTFS_EXTRA_SPACE was overwritten with an unaligned value. So let's add the round up code after the base_size calculus and it's comparison. Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-07image_types.bbclass: add variable for HobKang Kai
Add a new variable "IMAGE_EXTENSION_live" for Hob to map image type "live" with real image file extension names. This is for Hob to remove the hard-coded maps. Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19Convert tab indentation in python functions into four-spaceRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-16image_types.bbclass: Default XZ_COMPRESSION_LEVEL to -e -6Andrei Gherzan
Having XZ_COMPRESSION_LEVEL on -e -9 and -T 0 will make xz eat more than 6Gb memory. Reduce this to -6 to make xz to use about 471Mb on the tested machine. Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-16image_types.bbclass: Add XZ variable to set number of threads to be used ↵Andrei Gherzan
while compressing Default this variable to 0. This will make xz use as many threads as there are CPU cores on the system. Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-16image_types.bbclass: Fix COMPRESS_CMD for xz to redirect compressed data to fileAndrei Gherzan
Having -c modifier makes xz to output the compressed data to stdout. In this way the needed data will be in the do_rootfs log. Redirect data to ${IMAGE_NAME}.rootfs.${type}.xz . Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-04image_types: Add elf image typeRaymond Danks
On x86, an ELF image file may be stored as a coreboot payload. The image file is constructed, using the mkelfimage utility, from a kernel and an initrd. Signed-off-by: Raymond Danks <ray.danks@se-eng.com> Acked-by: Darren Hart <dvhart@linux.intel.com>
2012-05-09image_types.bbclass: redefine EXTRA_IMAGECMD_jffs2 to leverage siteinfoTing Liu
Signed-off-by: Ting Liu <b28495@freescale.com>
2012-03-27image_types: remove duplicate setting of -i for inode countSaul Wold
inode count is already set in the EXTRA_IMAGECMD definition Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-26image_types.bbclass: Define runnable and deployable patternDongxiao Xu
Define runnable image type and machine pattern. Define deployable image type. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-13image_types: ensure .rootfs.ext3 is created before vmdk is created.Dexuan Cui
In the case of self-hosted-image.bb, IMAGE_FSTYPES = "vmdk", so the variables alltypes and subimages don't contain ext3, and .rootfs.ext3 won't be created, and finally the generated .hddimg and .vmdk don't have an actual rootfs -- the size of the .vmdk file is only about 9MB. [YOCTO #2067] Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2012-03-08image_types: add IMAGE_ROOTFS_ALIGNMENTKen Werner
Introduce a new variable called IMAGE_ROOTFS_ALIGNMENT that allows to control the aligment of the size of the rootfs. Its default value is set to 1KiB so that the existing behaviour is not changed. In case the SD card emulation of a QEMU system emulator gets used you may set the alignment to 2MiB. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-02image_types: Ensure duplicate compressed types aren't createdRichard Purdie
This allows IMAGE_FSTYPES = "tar.bz2 tar.bz2" to work (and now is faster since it will only do it once). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-02image_types.bbclass: We need to preserve order in the types variable and ↵Richard Purdie
avoid set() Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-02image_types: Ensure dependencies for compression types containing multiple ↵Richard Purdie
dots are handled correctly This ensures dependencies for image types like ext2.gz.u-boot are handled correctly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-01image-vmdk: Create image_vmdk class and setup image and image_types to use itSaul Wold
This creates a new image_vmdk class similar to live. The image_vmdk class needs to have a hddimg created by the image-live class, so it inherits it directly. The changes to image_types is to ensure that both live and vmdk images get the ext3 tools and dependencies. Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-29image_types: Correctness fixesRichard Purdie
* Add a newline to improve the output formatting * Use set() to turn the list into a set of unique items to prevnt the same image code running twice (for e.g. IMAGE_FSTYPES = "tar.gz tar.bz2") * Support multiple compression extensions such as ".gz.u-boot" * Fix basetype/type typo and fix multiple image generation Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-29image_types.bbclass: fix bzip2 and xz compression commandsOtavio Salvador
We need to use -f (force) or the command fails in the image file already exists. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-29image_types.bbclass: properly support IMAGE_LINK_NAME as emptyOtavio Salvador
[RP: Remove unneeded len()] Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-28image_types: Refactor compression code into a generic compression solutionRichard Purdie
The current approach of adding each different compressed image type doesn't scale. This patch changes the code so compressed images for each form are automatically available using the form <type>.<compression type> in IMAGE_FSTYPES. This doesn't change any existing externally visible behaviour and the image generation process becomes more efficient as a result too. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-23image_types: add vmdk type to use with VMwareSaul Wold
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-02-01image_types.bbclass: refactor cpio images generation.Andrea Adami
* Add common check for the presence of an /init * symlink, being 'touch' would fail with it * and 'touch -h' is not yet generally supported * (depends on distro on build host). Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
2012-01-17image_types.bbclass: Fix generating uncompressed ext2 imagesMatthew McClintock
Signed-off-by: Matthew McClintock <msm@freescale.com>
2012-01-05image_types: Fix rootfs size calcuationSaul Wold
The ROOTFS_SIZE calculation was not correctly taking into account the IMAGE_ROOTFS_EXTRA_SPACE variable, it would only be applied if the size as determined by the ((du * overhead) + extra space) was greater than the IMAGE_ROOTFS_SIZE, so if the du * overhead was smaller Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-03image_types: Ensure /init exists for cpio rootfs archivesDarren Hart
In order for the kernel to accept an initramfs as a rootfs, it must have /init - even if it is an empty file. Touch /init to ensure it exists for cpio and cpio.gz image types. When used with initrd and rootfs=/dev/ram0, this allows the cpio and cpio.gz images to be used as the rootfs. Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2011-12-22image-types: add btrfs as a supported fstypeNitin A Kamble
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2011-12-08image_types.bbclass: disable cleanmarkers for jffs2 imagesAndrea Adami
* Add '-n' to suppress cleanmarker nodes since jffs2 * is usually used for NAND flash and the cleanmarkers are created in * the OOB area by flash_eraseall -j * * From man pages: -n, --no-cleanmarkers * Do not write cleanmarker nodes to the beginning of each erase block. * This option can be useful for creating JFFS2 images for use on NAND flash, * and for creating images which are to be used on a variety of hardware with differing eraseblock sizes. Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
2011-12-08image_types.bbclass: implement jffs2 summary images (sum.jffs2)Andrea Adami
* Building the jffs2 filesystem to include summary information speeds up * the mount process considerably at the cost of increased size. * The rate of speedup is generally higher on NAND chips and on the chips * where the erase block size is large. Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
2011-11-30image_types.bbclass: add xz-native to deps for lzma ext2.lzma imagesMatthew McClintock
Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie
This is the result of running the following over the metadata: sed \ -e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \ -e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-07image_types bbclass: use 4k bytes per inode so we don't run out of space ↵Koen Kooi
immediately genext2fs only creates the minimum number of inodes, after this patch it will scale with the rootfs size Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
2011-10-19poky: fix broken ubifs link in deploy folderLauri Hintsala
Fix broken rootfs image link when ubifs is used. Function runimagecmd is using image name "${IMAGE_NAME}.rootfs.${type}". Let's use the same name in IMAGE_CMD_ubifs. Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
2011-09-29Add support for generating ext2.lzma{, .u-boot} imagesMatthew McClintock
Machines can now add ext2.lzma and ext2.lzma.u-boot images as a generated image type. Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-29Add support for generating ext2.bz2{, .u-boot} imagesMatthew McClintock
Machines can now add ext2.bz2 and ext2.bz2.u-boot images as a generated image type. This also adds an extra parameter to oe_mkimage which is the image compression type for mkimage Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-05image_types: Fix ubi images creationDenis Carikli
Without that commit ubinize.cfg lack a volume name value, and the related ubinize.cfg line looks like that: vol_name= which result in a broken ubi image,which after beeing flashed produce the following error: UBI error: vtbl_check: volume table check failed: record 0, error 11 wich result in a kernel panic because the rootfs can't be mounted. [RP: Moved from bitbake.conf to the .bbclass file] Signed-off-by: Denis Carikli <denis@eukrea.com> Acked-by: Anders Darander <anders@chargestorm.se> Acked-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>