summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorAndrea Adami <andrea.adami@gmail.com>2011-07-12 00:33:12 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-12 15:08:20 +0100
commit9534a96a63ecd08b55e56cf0368d2580ed2ed8b2 (patch)
treebf2c9a6a93266982f657d1b41247a9e08e266147 /meta/classes
parent1e433eef8f0eb5c29c80540702d52abae124d42c (diff)
downloadpoky-9534a96a63ecd08b55e56cf0368d2580ed2ed8b2.tar.gz
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 * (From OE-Core rev: 38334acdc60432baf4f89f95663d64fab240131b) 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.bbclass11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 8c862277bc..89a745c008 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -20,6 +20,10 @@ runimagecmd () {
20 ln -s ${IMAGE_NAME}.rootfs.${type} ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${type} 20 ln -s ${IMAGE_NAME}.rootfs.${type} ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${type}
21} 21}
22 22
23
24XZ_COMPRESSION_LEVEL ?= "-e -9"
25XZ_INTEGRITY_CHECK ?= "crc32"
26
23IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" 27IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}"
24 28
25IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}" 29IMAGE_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}/$
55IMAGE_CMD_tar = "cd ${IMAGE_ROOTFS} && tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar ." 59IMAGE_CMD_tar = "cd ${IMAGE_ROOTFS} && tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar ."
56IMAGE_CMD_tar.gz = "cd ${IMAGE_ROOTFS} && tar -zcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.gz ." 60IMAGE_CMD_tar.gz = "cd ${IMAGE_ROOTFS} && tar -zcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.gz ."
57IMAGE_CMD_tar.bz2 = "cd ${IMAGE_ROOTFS} && tar -jcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.bz2 ." 61IMAGE_CMD_tar.bz2 = "cd ${IMAGE_ROOTFS} && tar -jcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.bz2 ."
62IMAGE_CMD_tar.xz = "cd ${IMAGE_ROOTFS} && tar --xz -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.xz ."
58IMAGE_CMD_cpio = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)" 63IMAGE_CMD_cpio = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)"
59IMAGE_CMD_cpio.gz = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | gzip -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz)" 64IMAGE_CMD_cpio.gz = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | gzip -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz)"
65IMAGE_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}"
66IMAGE_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}"
67
60IMAGE_CMD_ubi () { 68IMAGE_CMD_ubi () {
61 echo \[ubifs\] > ubinize.cfg 69 echo \[ubifs\] > ubinize.cfg
62 echo mode=ubi >> ubinize.cfg 70 echo mode=ubi >> ubinize.cfg
@@ -88,6 +96,9 @@ IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native"
88IMAGE_DEPENDS_btrfs = "btrfs-tools-native" 96IMAGE_DEPENDS_btrfs = "btrfs-tools-native"
89IMAGE_DEPENDS_squashfs = "squashfs-tools-native" 97IMAGE_DEPENDS_squashfs = "squashfs-tools-native"
90IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" 98IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native"
99IMAGE_DEPENDS_tar.xz = "tar-native xz-native"
100IMAGE_DEPENDS_cpio.lzma = "xz-native"
101IMAGE_DEPENDS_cpio.xz = "xz-native"
91IMAGE_DEPENDS_ubi = "mtd-utils-native" 102IMAGE_DEPENDS_ubi = "mtd-utils-native"
92IMAGE_DEPENDS_ubifs = "mtd-utils-native" 103IMAGE_DEPENDS_ubifs = "mtd-utils-native"
93 104