Patchwork [1/2] image_types.bbclass: Fix generating uncompressed ext2 images

login
register
mail settings
Submitter Matthew McClintock
Date Jan. 12, 2012, 5:13 p.m.
Message ID <1326388412-9899-1-git-send-email-msm@freescale.com>
Download mbox | patch
Permalink /patch/19201/
State Accepted
Commit d0687295456bcf240be657e6b5b508f718ca9ebd
Headers show

Comments

Matthew McClintock - Jan. 12, 2012, 5:13 p.m.
Signed-off-by: Matthew McClintock <msm@freescale.com>
---
 meta/classes/image_types.bbclass |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
Saul Wold - Jan. 17, 2012, 8:11 p.m.
On 01/12/2012 09:13 AM, Matthew McClintock wrote:
> Signed-off-by: Matthew McClintock<msm@freescale.com>
> ---
>   meta/classes/image_types.bbclass |    7 ++++++-
>   1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
> index 3010549..4908ed9 100644
> --- a/meta/classes/image_types.bbclass
> +++ b/meta/classes/image_types.bbclass
> @@ -40,7 +40,12 @@ IMAGE_CMD_sum.jffs2 = "${IMAGE_CMD_jffs2}&&  sumtool -i ${DEPLOY_DIR_IMAGE}/${IM
>
>   IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
>
> -IMAGE_CMD_ext2 = "genext2fs -b $ROOTFS_SIZE -i 4096 -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2"
> +IMAGE_CMD_ext2 () {
> +	rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}&&  mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}
> +	genext2fs -b $ROOTFS_SIZE -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext2
> +	mv ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext2 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2
> +	rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}
> +}
>   IMAGE_CMD_ext2.gz () {
>   	rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}&&  mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}
>   	genext2fs -b $ROOTFS_SIZE -i 4096 -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext2
Merged into OE-Core

Thanks
	Sau!

Patch

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 3010549..4908ed9 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -40,7 +40,12 @@  IMAGE_CMD_sum.jffs2 = "${IMAGE_CMD_jffs2} && sumtool -i ${DEPLOY_DIR_IMAGE}/${IM
 
 IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
 
-IMAGE_CMD_ext2 = "genext2fs -b $ROOTFS_SIZE -i 4096 -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2"
+IMAGE_CMD_ext2 () {
+	rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}
+	genext2fs -b $ROOTFS_SIZE -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext2
+	mv ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext2 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2
+	rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}
+}
 IMAGE_CMD_ext2.gz () {
 	rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}
 	genext2fs -b $ROOTFS_SIZE -i 4096 -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext2