All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] Add support for generating ext2.bz2{, .u-boot} images
@ 2011-09-29  5:52 Matthew McClintock
  2011-09-29  5:52 ` [PATCH 2/7] Add support for generating ext2.lzma{, " Matthew McClintock
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Matthew McClintock @ 2011-09-29  5:52 UTC (permalink / raw)
  To: yocto

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>
---
 meta/classes/image_types.bbclass       |    9 ++++++++-
 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 c24b326..4619ebe 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 10fa2f7..aee88a6 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"
-- 
1.7.6.1




^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-10-26  2:16 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-29  5:52 [PATCH 1/7] Add support for generating ext2.bz2{, .u-boot} images Matthew McClintock
2011-09-29  5:52 ` [PATCH 2/7] Add support for generating ext2.lzma{, " Matthew McClintock
2011-09-29  5:52 ` [PATCH 3/7] Make git fetch run with -f so rebased branches don't fail Matthew McClintock
2011-09-29  5:56   ` McClintock Matthew-B29882
2011-09-29  5:52 ` [PATCH 4/7] Add new IMAGE_CLASSES variable for classes for image generation Matthew McClintock
2011-09-29  5:52 ` [PATCH 5/7] scripts/oe-buildenv-internal: Add SOCKS5_{USER, PASSWD} to BB_ENV_EXTRAWHITE Matthew McClintock
2011-09-29  5:58   ` McClintock Matthew-B29882
2011-09-29  5:52 ` [PATCH 6/7] Fix sysprof for powerpc64 Matthew McClintock
2011-09-29  5:52 ` [PATCH 7/7] Add proper deps for nfs-utils, util-linux, and strace Matthew McClintock
2011-10-12 12:06   ` [yocto] " Martin Jansa
2011-10-12 12:06     ` Martin Jansa
2011-10-13 11:44     ` [PATCH] nfs-utils: separate nfs-utils-client and nfs-utils-stats Martin Jansa
2011-10-14 12:37       ` Richard Purdie
2011-10-25  8:10     ` [PATCH 7/7] Add proper deps for nfs-utils, util-linux, and strace Martin Jansa
2011-10-26  2:16       ` McClintock Matthew-B29882

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.