aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/image_types.bbclass
AgeCommit message (Collapse)Author
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>
2011-09-05image_types.bbclass: use per-image dirs for extX.gz images generationDmitry Eremin-Solenikov
Currently image_types.bbclass uses deploy/images/${MACHINE}tpm.gz dir for temporary files when generating extX.gz images. This can lead to races and strange errors during image generation. To overcome this use deploy/images/${MACHINE}tpm.gz-${PN} dir for temporary files. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-30image_types: add ext4 types from OEChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27classes/image*: Revamp creation of live imagesSaul Wold
This creates a live image as an IMAGE_FSTYPES, thus removing the need to have additional -live.bb recipes. To create a live image one just needs to add live to the IMAGE_FSTYPES list Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-07-26classes/image_types: IMAGE_TYPES was missing some entriesJoshua Lock
Some of these entries are required by the GUI to enable the expected workflow of the ADT, namely a compressed rootfs image. Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-13classes/image_types: add a variable to list available IMAGE_FSTYPE'sJoshua Lock
This is for use in the Hob GUI to enable the user to change the type of the generated image. Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-12image_types.bbclass: add support for tar.xz, cpio.xz, cpio.lzmaAndrea Adami
* Once we add support for building kernel containing initramfs images * we expect compressed cpio archives. * Thus, add support for lzma and xz compressors for the initramfs images. * While there, add support for tar.xz as done in org.openembedded.dev. * * Patch was imported from the OpenEmbedded git server * (git://git.openembedded.org/openembedded) * * 'bitbake.conf: add cpio and ext4 .xz support' * commit 7977d3325a09e2edf4a8a1b02f48085f88f7a631 * Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> * * 'bitbake.conf: Define tar.xz image types.' * 1fca8dc50a821f4589fa5e339e6e279dd3c0dafe * Signed-off-by: Tom Rini <tom_rini@mentor.com> * * 'bitbake.conf: add XZ_INTEGRITY_CHECK and LZMA_COMPRESSION_LEVEL variables' * commit 312b42bcf2cc9b11266ba497ade68e8ddabb3007 * Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> * * 'bitbake.conf: unbreak and improve lzma image compression handling and adapt * linux-kexecboot.inc' * commit c382a9ce64bf4291572665652138aa01b2e54306 * Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> * Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-30image_types.bbclass: enable btrfs as one of the image typeNitin A Kamble
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2011-06-30image-types.bbclass: get the image size in the whole numberNitin A Kamble
Avoid fractions like 80.72 and round them to whole numbers. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2011-06-09image_types.bbclass: Since we apply the override, look for the standard name ↵Richard Purdie
variable, not the override name Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-25image_types: add IMAGE_ROOTFS_EXTRA_SPACESaul Wold
[YOCTO #886] This address 2 needs after the IMAGE_ROOTFS_SIZE is cleaned up, by removing the _ext2/3 overrides it allows for a cleaner override using IMAGE_ROOTFS_SIZE to create a large rootfs, or by setting the IMAGE_ROOTFS_EXTRA_SPACE, will allow for extra space allocated in Kilobytes above the base size (determined by du of the rootfs * IMAGE_OVERHEAD_FACTOR, default of 1.3). Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-05-25IMAGE_ROOTFS_SIZE CleanupSaul Wold
This basic cleanup removes the _ext2/3 overrides from places they no longer belong since they did not allow further overrides. In doing this the core-image-minimal* recipes can now set a reasonably small rootfs so that it's a realistic size for minimal. The new default for minimal is 8M and will be adujsted upward by the IMAGE_OVERHEAD_FACTOR (default of 1.3). This also fixes the ROOTFS_SIZE usage in the IMAGE_CMD_<fstype> code Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-05-18yaffs2: Remove yaffs2 from oe-coreSaul Wold
Move to meta-extras Also remove yaffs2 from image_types.bbclass Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-04-12Allow JFFS2 image options to be overriddenGary Thomas
Signed-off-by: Gary Thomas <gary@mlbassoc.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-03-24image_types.bbclass: Drop IMAGE_EXTRA_OPTION in favour of the more standard ↵Richard Purdie
EXTRA_IMAGECMD Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-24bitbake.conf/image.bbclass: Move image type information into image_types.bbclassRichard Purdie
Image generation code in .conf files is hard to read as it needs to be single line. By moving this to a separate class, multiline functions can be used instead improving readability. It also declutters bitbake.conf. There is no real functional change with this patch but it highlights the need for improvements in places such as the IMAGE_EXTRA_OPTION ext* specific variable which makes no sense. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>