diff options
author | Matthew McClintock <msm@freescale.com> | 2011-09-28 23:20:58 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-09-29 16:48:08 +0100 |
commit | 4502a83ce67ac778112c25a1f4fa097c47e895b1 (patch) | |
tree | 15da97504e7dfe537b6ad984bfbab64c10d72004 /meta/classes | |
parent | 946cd8df49a8873ff93ef5ec1e3cc745a21e2a8f (diff) | |
download | openembedded-core-4502a83ce67ac778112c25a1f4fa097c47e895b1.tar.gz openembedded-core-4502a83ce67ac778112c25a1f4fa097c47e895b1.tar.bz2 openembedded-core-4502a83ce67ac778112c25a1f4fa097c47e895b1.zip |
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
Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/image_types.bbclass | 9 | ||||
-rw-r--r-- | meta/classes/image_types_uboot.bbclass | 14 |
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 () { mv ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext2.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2.gz rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} } +IMAGE_CMD_ext2.bz2 () { + 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 + bzip2 -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2 + 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_ext3 () { 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" 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 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 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 @@ inherit image_types kernel-arch oe_mkimage () { - mkimage -A ${UBOOT_ARCH} -O linux -T ramdisk -C gzip -n ${IMAGE_NAME} \ + mkimage -A ${UBOOT_ARCH} -O linux -T ramdisk -C $2 -n ${IMAGE_NAME} \ -d ${DEPLOY_DIR_IMAGE}/$1 ${DEPLOY_DIR_IMAGE}/$1.u-boot } IMAGE_DEPENDS_ext2.gz.u-boot = "genext2fs-native e2fsprogs-native u-boot-mkimage-native" IMAGE_CMD_ext2.gz.u-boot = "${IMAGE_CMD_ext2.gz} \ - oe_mkimage ${IMAGE_NAME}.rootfs.ext2.gz" + oe_mkimage ${IMAGE_NAME}.rootfs.ext2.gz gzip" + +IMAGE_DEPENDS_ext2.bz2.u-boot = "genext2fs-native e2fsprogs-native u-boot-mkimage-native" +IMAGE_CMD_ext2.bz2.u-boot = "${IMAGE_CMD_ext2.bz2} \ + oe_mkimage ${IMAGE_NAME}.rootfs.ext2.bz2 bzip2" 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" + oe_mkimage ${IMAGE_NAME}.rootfs.ext3.gz gzip" IMAGE_DEPENDS_ext4.gz.u-boot = "genext2fs-native e2fsprogs-native u-boot-mkimage-native" IMAGE_CMD_ext4.gz.u-boot = "${IMAGE_CMD_ext4.gz} \ - oe_mkimage ${IMAGE_NAME}.rootfs.ext4.gz" + oe_mkimage ${IMAGE_NAME}.rootfs.ext4.gz gzip" -IMAGE_TYPES += "ext2.gz.u-boot ext3.gz.u-boot ext4.gz.u-boot" +IMAGE_TYPES += "ext2.gz.u-boot ext2.bz2.u-boot ext3.gz.u-boot ext4.gz.u-boot" |