summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew McClintock <msm@freescale.com>2011-09-28 23:20:59 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-29 16:54:38 +0100
commit8836afca8a520c199bd57cccfa3e114ae373c214 (patch)
treee0035a54932ea7d29f9d3835b7dce13eb0e50fd5
parent8240072c70ba13033e10ebd954e3f4d0b7c0a552 (diff)
downloadpoky-8836afca8a520c199bd57cccfa3e114ae373c214.tar.gz
poky-8836afca8a520c199bd57cccfa3e114ae373c214.tar.bz2
poky-8836afca8a520c199bd57cccfa3e114ae373c214.zip
Add support for generating ext2.lzma{, .u-boot} images
Machines can now add ext2.lzma and ext2.lzma.u-boot images as a generated image type. (From OE-Core rev: 927b2ce72c026e5e41bdd5690c48ebbc8b19e45e) Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/image_types.bbclass11
-rw-r--r--meta/classes/image_types_uboot.bbclass6
2 files changed, 15 insertions, 2 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 4619ebe109..2260915729 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -53,6 +53,13 @@ IMAGE_CMD_ext2.bz2 () {
mv ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2.bz2 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2.bz2
rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz
}
+IMAGE_CMD_ext2.lzma () {
+ rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz
+ genext2fs -b $ROOTFS_SIZE -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2
+ lzma -f -7 ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2
+ mv ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2.lzma ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2.lzma
+ rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz
+}
IMAGE_CMD_ext3 () {
genext2fs -b $ROOTFS_SIZE -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3
@@ -134,6 +141,8 @@ IMAGE_DEPENDS_jffs2 = "mtd-utils-native"
IMAGE_DEPENDS_cramfs = "cramfs-native"
IMAGE_DEPENDS_ext2 = "genext2fs-native"
IMAGE_DEPENDS_ext2.gz = "genext2fs-native"
+IMAGE_DEPENDS_ext2.bz2 = "genext2fs-native"
+IMAGE_DEPENDS_ext2.lzma = "genext2fs-native"
IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native"
IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native"
IMAGE_DEPENDS_ext4 = "genext2fs-native e2fsprogs-native"
@@ -148,4 +157,4 @@ IMAGE_DEPENDS_ubi = "mtd-utils-native"
IMAGE_DEPENDS_ubifs = "mtd-utils-native"
# This variable is available to request which values are suitable for IMAGE_FSTYPES
-IMAGE_TYPES = "jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma"
+IMAGE_TYPES = "jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma"
diff --git a/meta/classes/image_types_uboot.bbclass b/meta/classes/image_types_uboot.bbclass
index aee88a64e6..65dc91b3ff 100644
--- a/meta/classes/image_types_uboot.bbclass
+++ b/meta/classes/image_types_uboot.bbclass
@@ -13,6 +13,10 @@ IMAGE_DEPENDS_ext2.bz2.u-boot = "genext2fs-native e2fsprogs-native u-boot-mkimag
IMAGE_CMD_ext2.bz2.u-boot = "${IMAGE_CMD_ext2.bz2} \
oe_mkimage ${IMAGE_NAME}.rootfs.ext2.bz2 bzip2"
+IMAGE_DEPENDS_ext2.lzma.u-boot = "genext2fs-native e2fsprogs-native u-boot-mkimage-native"
+IMAGE_CMD_ext2.lzma.u-boot = "${IMAGE_CMD_ext2.lzma} \
+ oe_mkimage ${IMAGE_NAME}.rootfs.ext2.lzma lzma"
+
IMAGE_DEPENDS_ext3.gz.u-boot = "genext2fs-native e2fsprogs-native u-boot-mkimage-native"
IMAGE_CMD_ext3.gz.u-boot = "${IMAGE_CMD_ext3.gz} \
oe_mkimage ${IMAGE_NAME}.rootfs.ext3.gz gzip"
@@ -21,4 +25,4 @@ IMAGE_DEPENDS_ext4.gz.u-boot = "genext2fs-native e2fsprogs-native u-boot-mkimage
IMAGE_CMD_ext4.gz.u-boot = "${IMAGE_CMD_ext4.gz} \
oe_mkimage ${IMAGE_NAME}.rootfs.ext4.gz gzip"
-IMAGE_TYPES += "ext2.gz.u-boot ext2.bz2.u-boot ext3.gz.u-boot ext4.gz.u-boot"
+IMAGE_TYPES += "ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot ext3.gz.u-boot ext4.gz.u-boot"