diff options
author | Chris Larson <chris_larson@mentor.com> | 2011-08-29 11:00:28 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-30 22:12:56 +0100 |
commit | d15df2e6f7d2e3a0395cd3a9eb22ec1c17649680 (patch) | |
tree | 3f72225b188bca9de810efa93b4b4cfaaefd3991 | |
parent | ea711865bd7845eb56f7b00d5a3846cdffb05293 (diff) | |
download | poky-d15df2e6f7d2e3a0395cd3a9eb22ec1c17649680.tar.gz |
image_types: add ext4 types from OE
(From OE-Core rev: c407d31a42786230062f21c8cf8dc8700dbc6f54)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | 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 cd901c105f..2bdda41945 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass | |||
@@ -1,4 +1,3 @@ | |||
1 | |||
2 | def get_imagecmds(d): | 1 | def get_imagecmds(d): |
3 | cmds = "\n" | 2 | cmds = "\n" |
4 | old_overrides = bb.data.getVar('OVERRIDES', d, 0) | 3 | old_overrides = bb.data.getVar('OVERRIDES', d, 0) |
@@ -61,6 +60,30 @@ IMAGE_CMD_ext3.gz () { | |||
61 | rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz | 60 | rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz |
62 | } | 61 | } |
63 | 62 | ||
63 | oe_mkext4fs () { | ||
64 | genext2fs -b $ROOTFS_SIZE -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} $1 | ||
65 | tune2fs -O extents,uninit_bg,dir_index,has_journal $1 | ||
66 | e2fsck -yfDC0 $1 || chk=$? | ||
67 | case $chk in | ||
68 | 0|1|2) | ||
69 | ;; | ||
70 | *) | ||
71 | return $chk | ||
72 | ;; | ||
73 | esac | ||
74 | } | ||
75 | |||
76 | IMAGE_CMD_ext4 () { | ||
77 | oe_mkext4fs ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4 | ||
78 | } | ||
79 | IMAGE_CMD_ext4.gz () { | ||
80 | rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz | ||
81 | oe_mkext4fs ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext4 | ||
82 | gzip -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext4 | ||
83 | mv ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext4.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4.gz | ||
84 | rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz | ||
85 | } | ||
86 | |||
64 | IMAGE_CMD_btrfs () { | 87 | IMAGE_CMD_btrfs () { |
65 | mkfs.btrfs -b `expr ${ROOTFS_SIZE} \* 1024` ${EXTRA_IMAGECMD} -r ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.btrfs | 88 | mkfs.btrfs -b `expr ${ROOTFS_SIZE} \* 1024` ${EXTRA_IMAGECMD} -r ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.btrfs |
66 | } | 89 | } |
@@ -104,6 +127,8 @@ IMAGE_DEPENDS_ext2 = "genext2fs-native" | |||
104 | IMAGE_DEPENDS_ext2.gz = "genext2fs-native" | 127 | IMAGE_DEPENDS_ext2.gz = "genext2fs-native" |
105 | IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native" | 128 | IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native" |
106 | IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native" | 129 | IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native" |
130 | IMAGE_DEPENDS_ext4 = "genext2fs-native e2fsprogs-native" | ||
131 | IMAGE_DEPENDS_ext4.gz = "genext2fs-native e2fsprogs-native" | ||
107 | IMAGE_DEPENDS_btrfs = "btrfs-tools-native" | 132 | IMAGE_DEPENDS_btrfs = "btrfs-tools-native" |
108 | IMAGE_DEPENDS_squashfs = "squashfs-tools-native" | 133 | IMAGE_DEPENDS_squashfs = "squashfs-tools-native" |
109 | IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" | 134 | IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" |