summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-08-29 11:00:28 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-30 22:12:56 +0100
commitd15df2e6f7d2e3a0395cd3a9eb22ec1c17649680 (patch)
tree3f72225b188bca9de810efa93b4b4cfaaefd3991 /meta
parentea711865bd7845eb56f7b00d5a3846cdffb05293 (diff)
downloadpoky-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>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/image_types.bbclass27
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
2def get_imagecmds(d): 1def 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
63oe_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
76IMAGE_CMD_ext4 () {
77 oe_mkext4fs ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4
78}
79IMAGE_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
64IMAGE_CMD_btrfs () { 87IMAGE_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"
104IMAGE_DEPENDS_ext2.gz = "genext2fs-native" 127IMAGE_DEPENDS_ext2.gz = "genext2fs-native"
105IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native" 128IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native"
106IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native" 129IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native"
130IMAGE_DEPENDS_ext4 = "genext2fs-native e2fsprogs-native"
131IMAGE_DEPENDS_ext4.gz = "genext2fs-native e2fsprogs-native"
107IMAGE_DEPENDS_btrfs = "btrfs-tools-native" 132IMAGE_DEPENDS_btrfs = "btrfs-tools-native"
108IMAGE_DEPENDS_squashfs = "squashfs-tools-native" 133IMAGE_DEPENDS_squashfs = "squashfs-tools-native"
109IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" 134IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native"