All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] image_types: add ext4 types from OE
@ 2011-08-29 18:00 Christopher Larson
  2011-08-29 18:00 ` [PATCH 2/2] image_types_uboot: fix a number of issues Christopher Larson
  2011-08-30 21:05 ` [PATCH 1/2] image_types: add ext4 types from OE Richard Purdie
  0 siblings, 2 replies; 4+ messages in thread
From: Christopher Larson @ 2011-08-29 18:00 UTC (permalink / raw)
  To: openembedded-core; +Cc: Chris Larson

From: Chris Larson <chris_larson@mentor.com>

Signed-off-by: Chris Larson <chris_larson@mentor.com>
---
 meta/classes/image_types.bbclass |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index cd901c1..2bdda41 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -1,4 +1,3 @@
-
 def get_imagecmds(d):
     cmds = "\n"
     old_overrides = bb.data.getVar('OVERRIDES', d, 0)
@@ -61,6 +60,30 @@ IMAGE_CMD_ext3.gz () {
 	rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz
 }
 
+oe_mkext4fs () {
+	genext2fs -b $ROOTFS_SIZE -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} $1
+	tune2fs -O extents,uninit_bg,dir_index,has_journal $1
+	e2fsck -yfDC0 $1 || chk=$?
+	case $chk in
+	0|1|2)
+	    ;;
+	*)
+	    return $chk
+	    ;;
+	esac
+}
+
+IMAGE_CMD_ext4 () {
+	oe_mkext4fs ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4
+}
+IMAGE_CMD_ext4.gz () {
+	rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz
+	oe_mkext4fs ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext4
+	gzip -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext4
+	mv ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext4.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4.gz
+	rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz
+}
+
 IMAGE_CMD_btrfs () {
 	mkfs.btrfs -b `expr ${ROOTFS_SIZE} \* 1024` ${EXTRA_IMAGECMD} -r ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.btrfs
 }
@@ -104,6 +127,8 @@ IMAGE_DEPENDS_ext2 = "genext2fs-native"
 IMAGE_DEPENDS_ext2.gz = "genext2fs-native"
 IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native"
 IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native"
+IMAGE_DEPENDS_ext4 = "genext2fs-native e2fsprogs-native"
+IMAGE_DEPENDS_ext4.gz = "genext2fs-native e2fsprogs-native"
 IMAGE_DEPENDS_btrfs = "btrfs-tools-native"
 IMAGE_DEPENDS_squashfs = "squashfs-tools-native"
 IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native"
-- 
1.7.3.2.430.g208247




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

* [PATCH 2/2] image_types_uboot: fix a number of issues
  2011-08-29 18:00 [PATCH 1/2] image_types: add ext4 types from OE Christopher Larson
@ 2011-08-29 18:00 ` Christopher Larson
  2011-08-30 21:05   ` Richard Purdie
  2011-08-30 21:05 ` [PATCH 1/2] image_types: add ext4 types from OE Richard Purdie
  1 sibling, 1 reply; 4+ messages in thread
From: Christopher Larson @ 2011-08-29 18:00 UTC (permalink / raw)
  To: openembedded-core; +Cc: Chris Larson

From: Chris Larson <chris_larson@mentor.com>

- Don't use a variable reference in the IMAGE_DEPENDS
- Inherit kernel-arch to get UBOOT_ARCH
- Don't include the .bz2 variants, since the base types aren't in
  oe-core
- Add the new types to IMAGE_TYPES
- Inherit image_types, to be certain we load after it

Signed-off-by: Chris Larson <chris_larson@mentor.com>
---
 meta/classes/image_types_uboot.bbclass |   25 ++++++++++++-------------
 1 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/meta/classes/image_types_uboot.bbclass b/meta/classes/image_types_uboot.bbclass
index f08ad8d..10fa2f7 100644
--- a/meta/classes/image_types_uboot.bbclass
+++ b/meta/classes/image_types_uboot.bbclass
@@ -1,21 +1,20 @@
+inherit image_types kernel-arch
+
 oe_mkimage () {
     mkimage -A ${UBOOT_ARCH} -O linux -T ramdisk -C gzip -n ${IMAGE_NAME} \
         -d ${DEPLOY_DIR_IMAGE}/$1 ${DEPLOY_DIR_IMAGE}/$1.u-boot
 }
 
-UBOOT_IMAGE_DEPENDS = "genext2fs-native e2fsprogs-native u-boot-mkimage-native"
+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"
 
-IMAGE_DEPENDS_ext2.gz.u-boot  = "${UBOOT_IMAGE_DEPENDS}"
-IMAGE_CMD_ext2.gz.u-boot      = "${IMAGE_CMD_ext2.gz}; oe_mkimage ${IMAGE_NAME}.rootfs.ext2.gz"
-IMAGE_DEPENDS_ext2.bz2.u-boot = "${UBOOT_IMAGE_DEPENDS}"
-IMAGE_CMD_ext2.bz2.u-boot     = "${IMAGE_CMD_ext2.bz2}; oe_mkimage ${IMAGE_NAME}.rootfs.ext2.bz2"
+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"
 
-IMAGE_DEPENDS_ext3.gz.u-boot  = "${UBOOT_IMAGE_DEPENDS}"
-IMAGE_CMD_ext3.gz.u-boot      = "${IMAGE_CMD_ext3.gz}; oe_mkimage ${IMAGE_NAME}.rootfs.ext3.gz"
-IMAGE_DEPENDS_ext3.bz2.u-boot = "${UBOOT_IMAGE_DEPENDS}"
-IMAGE_CMD_ext3.bz2.u-boot     = "${IMAGE_CMD_ext3.bz2}; oe_mkimage ${IMAGE_NAME}.rootfs.ext3.bz2"
+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"
 
-IMAGE_DEPENDS_ext4.gz.u-boot  = "${UBOOT_IMAGE_DEPENDS}"
-IMAGE_CMD_ext4.gz.u-boot      = "${IMAGE_CMD_ext4.gz}; oe_mkimage ${IMAGE_NAME}.rootfs.ext4.gz"
-IMAGE_DEPENDS_ext4.bz2.u-boot = "${UBOOT_IMAGE_DEPENDS}"
-IMAGE_CMD_ext4.bz2.u-boot     = "${IMAGE_CMD_ext4.bz2}; oe_mkimage ${IMAGE_NAME}.rootfs.ext4.bz2"
+IMAGE_TYPES += "ext2.gz.u-boot ext3.gz.u-boot ext4.gz.u-boot"
-- 
1.7.3.2.430.g208247




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

* Re: [PATCH 1/2] image_types: add ext4 types from OE
  2011-08-29 18:00 [PATCH 1/2] image_types: add ext4 types from OE Christopher Larson
  2011-08-29 18:00 ` [PATCH 2/2] image_types_uboot: fix a number of issues Christopher Larson
@ 2011-08-30 21:05 ` Richard Purdie
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2011-08-30 21:05 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Chris Larson

On Mon, 2011-08-29 at 11:00 -0700, Christopher Larson wrote:
> From: Chris Larson <chris_larson@mentor.com>
> 
> Signed-off-by: Chris Larson <chris_larson@mentor.com>
> ---
>  meta/classes/image_types.bbclass |   27 ++++++++++++++++++++++++++-
>  1 files changed, 26 insertions(+), 1 deletions(-)

Merged to master, thanks.

Richard




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

* Re: [PATCH 2/2] image_types_uboot: fix a number of issues
  2011-08-29 18:00 ` [PATCH 2/2] image_types_uboot: fix a number of issues Christopher Larson
@ 2011-08-30 21:05   ` Richard Purdie
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2011-08-30 21:05 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Chris Larson

On Mon, 2011-08-29 at 11:00 -0700, Christopher Larson wrote:
> From: Chris Larson <chris_larson@mentor.com>
> 
> - Don't use a variable reference in the IMAGE_DEPENDS
> - Inherit kernel-arch to get UBOOT_ARCH
> - Don't include the .bz2 variants, since the base types aren't in
>   oe-core
> - Add the new types to IMAGE_TYPES
> - Inherit image_types, to be certain we load after it
> 
> Signed-off-by: Chris Larson <chris_larson@mentor.com>
> ---
>  meta/classes/image_types_uboot.bbclass |   25 ++++++++++++-------------
>  1 files changed, 12 insertions(+), 13 deletions(-)

Merged to master, thanks.

Richard




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

end of thread, other threads:[~2011-08-30 21:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-29 18:00 [PATCH 1/2] image_types: add ext4 types from OE Christopher Larson
2011-08-29 18:00 ` [PATCH 2/2] image_types_uboot: fix a number of issues Christopher Larson
2011-08-30 21:05   ` Richard Purdie
2011-08-30 21:05 ` [PATCH 1/2] image_types: add ext4 types from OE Richard Purdie

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.