diff options
author | Andrea Adami <andrea.adami@gmail.com> | 2011-07-12 00:33:12 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-12 15:03:53 +0100 |
commit | 38334acdc60432baf4f89f95663d64fab240131b (patch) | |
tree | f76d2accbd69869b0c03f4d0e4a849a04e703f85 /meta/classes | |
parent | 2b6900ad73919a0ecb8c5f1de31744ce7afe65f5 (diff) | |
download | openembedded-core-38334acdc60432baf4f89f95663d64fab240131b.tar.gz openembedded-core-38334acdc60432baf4f89f95663d64fab240131b.tar.bz2 openembedded-core-38334acdc60432baf4f89f95663d64fab240131b.tar.xz openembedded-core-38334acdc60432baf4f89f95663d64fab240131b.zip |
image_types.bbclass: add support for tar.xz, cpio.xz, cpio.lzma
* 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>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/image_types.bbclass | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 8c862277b..89a745c00 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass @@ -20,6 +20,10 @@ runimagecmd () { ln -s ${IMAGE_NAME}.rootfs.${type} ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${type} } + +XZ_COMPRESSION_LEVEL ?= "-e -9" +XZ_INTEGRITY_CHECK ?= "crc32" + IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}" @@ -55,8 +59,12 @@ IMAGE_CMD_squashfs-lzma = "mksquashfs-lzma ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/$ IMAGE_CMD_tar = "cd ${IMAGE_ROOTFS} && tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar ." IMAGE_CMD_tar.gz = "cd ${IMAGE_ROOTFS} && tar -zcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.gz ." IMAGE_CMD_tar.bz2 = "cd ${IMAGE_ROOTFS} && tar -jcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.bz2 ." +IMAGE_CMD_tar.xz = "cd ${IMAGE_ROOTFS} && tar --xz -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.xz ." IMAGE_CMD_cpio = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)" IMAGE_CMD_cpio.gz = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | gzip -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz)" +IMAGE_CMD_cpio.xz = "type cpio >/dev/null; cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | xz -c ${XZ_COMPRESSION_LEVEL} --check=${XZ_INTEGRITY_CHECK} > ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.xz) ${EXTRA_IMAGECMD}" +IMAGE_CMD_cpio.lzma = "type cpio >/dev/null; cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | xz --format=lzma -c ${XZ_COMPRESSION_LEVEL} --check=${XZ_INTEGRITY_CHECK} >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.lzma) ${EXTRA_IMAGECMD}" + IMAGE_CMD_ubi () { echo \[ubifs\] > ubinize.cfg echo mode=ubi >> ubinize.cfg @@ -88,6 +96,9 @@ IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native" IMAGE_DEPENDS_btrfs = "btrfs-tools-native" IMAGE_DEPENDS_squashfs = "squashfs-tools-native" IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" +IMAGE_DEPENDS_tar.xz = "tar-native xz-native" +IMAGE_DEPENDS_cpio.lzma = "xz-native" +IMAGE_DEPENDS_cpio.xz = "xz-native" IMAGE_DEPENDS_ubi = "mtd-utils-native" IMAGE_DEPENDS_ubifs = "mtd-utils-native" |