summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew McClintock <msm@freescale.com>2011-09-28 23:20:58 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-29 16:54:38 +0100
commit8240072c70ba13033e10ebd954e3f4d0b7c0a552 (patch)
treebdcd6ebbbce571d717d25942ed1e038ed3736eb1
parent1e5ee838ab9234c5f9544a1ac8285c79aae8bd6d (diff)
downloadpoky-8240072c70ba13033e10ebd954e3f4d0b7c0a552.tar.gz
Add support for generating ext2.bz2{, .u-boot} images
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 (From OE-Core rev: 4502a83ce67ac778112c25a1f4fa097c47e895b1) Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/image_types.bbclass9
-rw-r--r--meta/classes/image_types_uboot.bbclass14
2 files changed, 17 insertions, 6 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index c24b326451..4619ebe109 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -46,6 +46,13 @@ IMAGE_CMD_ext2.gz () {
46 mv ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext2.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2.gz 46 mv ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext2.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2.gz
47 rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} 47 rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}
48} 48}
49IMAGE_CMD_ext2.bz2 () {
50 rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz
51 genext2fs -b $ROOTFS_SIZE -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2
52 bzip2 -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2
53 mv ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2.bz2 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2.bz2
54 rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz
55}
49 56
50IMAGE_CMD_ext3 () { 57IMAGE_CMD_ext3 () {
51 genext2fs -b $ROOTFS_SIZE -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3 58 genext2fs -b $ROOTFS_SIZE -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3
@@ -141,4 +148,4 @@ IMAGE_DEPENDS_ubi = "mtd-utils-native"
141IMAGE_DEPENDS_ubifs = "mtd-utils-native" 148IMAGE_DEPENDS_ubifs = "mtd-utils-native"
142 149
143# This variable is available to request which values are suitable for IMAGE_FSTYPES 150# This variable is available to request which values are suitable for IMAGE_FSTYPES
144IMAGE_TYPES = "jffs2 cramfs ext2 ext2.gz ext3 ext3.gz live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma" 151IMAGE_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"
diff --git a/meta/classes/image_types_uboot.bbclass b/meta/classes/image_types_uboot.bbclass
index 10fa2f7f8e..aee88a64e6 100644
--- a/meta/classes/image_types_uboot.bbclass
+++ b/meta/classes/image_types_uboot.bbclass
@@ -1,20 +1,24 @@
1inherit image_types kernel-arch 1inherit image_types kernel-arch
2 2
3oe_mkimage () { 3oe_mkimage () {
4 mkimage -A ${UBOOT_ARCH} -O linux -T ramdisk -C gzip -n ${IMAGE_NAME} \ 4 mkimage -A ${UBOOT_ARCH} -O linux -T ramdisk -C $2 -n ${IMAGE_NAME} \
5 -d ${DEPLOY_DIR_IMAGE}/$1 ${DEPLOY_DIR_IMAGE}/$1.u-boot 5 -d ${DEPLOY_DIR_IMAGE}/$1 ${DEPLOY_DIR_IMAGE}/$1.u-boot
6} 6}
7 7
8IMAGE_DEPENDS_ext2.gz.u-boot = "genext2fs-native e2fsprogs-native u-boot-mkimage-native" 8IMAGE_DEPENDS_ext2.gz.u-boot = "genext2fs-native e2fsprogs-native u-boot-mkimage-native"
9IMAGE_CMD_ext2.gz.u-boot = "${IMAGE_CMD_ext2.gz} \ 9IMAGE_CMD_ext2.gz.u-boot = "${IMAGE_CMD_ext2.gz} \
10 oe_mkimage ${IMAGE_NAME}.rootfs.ext2.gz" 10 oe_mkimage ${IMAGE_NAME}.rootfs.ext2.gz gzip"
11
12IMAGE_DEPENDS_ext2.bz2.u-boot = "genext2fs-native e2fsprogs-native u-boot-mkimage-native"
13IMAGE_CMD_ext2.bz2.u-boot = "${IMAGE_CMD_ext2.bz2} \
14 oe_mkimage ${IMAGE_NAME}.rootfs.ext2.bz2 bzip2"
11 15
12IMAGE_DEPENDS_ext3.gz.u-boot = "genext2fs-native e2fsprogs-native u-boot-mkimage-native" 16IMAGE_DEPENDS_ext3.gz.u-boot = "genext2fs-native e2fsprogs-native u-boot-mkimage-native"
13IMAGE_CMD_ext3.gz.u-boot = "${IMAGE_CMD_ext3.gz} \ 17IMAGE_CMD_ext3.gz.u-boot = "${IMAGE_CMD_ext3.gz} \
14 oe_mkimage ${IMAGE_NAME}.rootfs.ext3.gz" 18 oe_mkimage ${IMAGE_NAME}.rootfs.ext3.gz gzip"
15 19
16IMAGE_DEPENDS_ext4.gz.u-boot = "genext2fs-native e2fsprogs-native u-boot-mkimage-native" 20IMAGE_DEPENDS_ext4.gz.u-boot = "genext2fs-native e2fsprogs-native u-boot-mkimage-native"
17IMAGE_CMD_ext4.gz.u-boot = "${IMAGE_CMD_ext4.gz} \ 21IMAGE_CMD_ext4.gz.u-boot = "${IMAGE_CMD_ext4.gz} \
18 oe_mkimage ${IMAGE_NAME}.rootfs.ext4.gz" 22 oe_mkimage ${IMAGE_NAME}.rootfs.ext4.gz gzip"
19 23
20IMAGE_TYPES += "ext2.gz.u-boot ext3.gz.u-boot ext4.gz.u-boot" 24IMAGE_TYPES += "ext2.gz.u-boot ext2.bz2.u-boot ext3.gz.u-boot ext4.gz.u-boot"