diff options
-rw-r--r-- | meta/classes/image_types.bbclass | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 32d4cd4c76..f643ed3ce7 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass | |||
@@ -139,16 +139,18 @@ IMAGE_CMD:cpio () { | |||
139 | } | 139 | } |
140 | 140 | ||
141 | UBI_VOLNAME ?= "${MACHINE}-rootfs" | 141 | UBI_VOLNAME ?= "${MACHINE}-rootfs" |
142 | UBI_VOLTYPE ?= "dynamic" | ||
143 | UBI_IMGTYPE ?= "ubifs" | ||
142 | 144 | ||
143 | multiubi_mkfs() { | 145 | multiubi_mkfs() { |
144 | local mkubifs_args="$1" | 146 | local mkubifs_args="$1" |
145 | local ubinize_args="$2" | 147 | local ubinize_args="$2" |
146 | 148 | ||
147 | # Added prompt error message for ubi and ubifs image creation. | 149 | # Added prompt error message for ubi and ubifs image creation. |
148 | if [ -z "$mkubifs_args" ] || [ -z "$ubinize_args" ]; then | 150 | if [ -z "$mkubifs_args" ] || [ -z "$ubinize_args" ]; then |
149 | bbfatal "MKUBIFS_ARGS and UBINIZE_ARGS have to be set, see http://www.linux-mtd.infradead.org/faq/ubifs.html for details" | 151 | bbfatal "MKUBIFS_ARGS and UBINIZE_ARGS have to be set, see http://www.linux-mtd.infradead.org/faq/ubifs.html for details" |
150 | fi | 152 | fi |
151 | 153 | ||
152 | if [ -z "$3" ]; then | 154 | if [ -z "$3" ]; then |
153 | local vname="" | 155 | local vname="" |
154 | else | 156 | else |
@@ -157,9 +159,9 @@ multiubi_mkfs() { | |||
157 | 159 | ||
158 | echo \[ubifs\] > ubinize${vname}-${IMAGE_NAME}.cfg | 160 | echo \[ubifs\] > ubinize${vname}-${IMAGE_NAME}.cfg |
159 | echo mode=ubi >> ubinize${vname}-${IMAGE_NAME}.cfg | 161 | echo mode=ubi >> ubinize${vname}-${IMAGE_NAME}.cfg |
160 | echo image=${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs >> ubinize${vname}-${IMAGE_NAME}.cfg | 162 | echo image=${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.${UBI_IMGTYPE} >> ubinize${vname}-${IMAGE_NAME}.cfg |
161 | echo vol_id=0 >> ubinize${vname}-${IMAGE_NAME}.cfg | 163 | echo vol_id=0 >> ubinize${vname}-${IMAGE_NAME}.cfg |
162 | echo vol_type=dynamic >> ubinize${vname}-${IMAGE_NAME}.cfg | 164 | echo vol_type=${UBI_VOLTYPE} >> ubinize${vname}-${IMAGE_NAME}.cfg |
163 | echo vol_name=${UBI_VOLNAME} >> ubinize${vname}-${IMAGE_NAME}.cfg | 165 | echo vol_name=${UBI_VOLNAME} >> ubinize${vname}-${IMAGE_NAME}.cfg |
164 | echo vol_flags=autoresize >> ubinize${vname}-${IMAGE_NAME}.cfg | 166 | echo vol_flags=autoresize >> ubinize${vname}-${IMAGE_NAME}.cfg |
165 | if [ -n "$vname" ]; then | 167 | if [ -n "$vname" ]; then |
@@ -198,7 +200,7 @@ IMAGE_CMD:multiubi () { | |||
198 | IMAGE_CMD:ubi () { | 200 | IMAGE_CMD:ubi () { |
199 | multiubi_mkfs "${MKUBIFS_ARGS}" "${UBINIZE_ARGS}" | 201 | multiubi_mkfs "${MKUBIFS_ARGS}" "${UBINIZE_ARGS}" |
200 | } | 202 | } |
201 | IMAGE_TYPEDEP:ubi = "ubifs" | 203 | IMAGE_TYPEDEP:ubi = "${UBI_IMGTYPE}" |
202 | 204 | ||
203 | IMAGE_CMD:ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ubifs ${MKUBIFS_ARGS}" | 205 | IMAGE_CMD:ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ubifs ${MKUBIFS_ARGS}" |
204 | 206 | ||
@@ -329,7 +331,7 @@ CONVERSION_DEPENDS_gzsync = "zsync-curl-native" | |||
329 | RUNNABLE_IMAGE_TYPES ?= "ext2 ext3 ext4" | 331 | RUNNABLE_IMAGE_TYPES ?= "ext2 ext3 ext4" |
330 | RUNNABLE_MACHINE_PATTERNS ?= "qemu" | 332 | RUNNABLE_MACHINE_PATTERNS ?= "qemu" |
331 | 333 | ||
332 | DEPLOYABLE_IMAGE_TYPES ?= "hddimg iso" | 334 | DEPLOYABLE_IMAGE_TYPES ?= "hddimg iso" |
333 | 335 | ||
334 | # The IMAGE_TYPES_MASKED variable will be used to mask out from the IMAGE_FSTYPES, | 336 | # The IMAGE_TYPES_MASKED variable will be used to mask out from the IMAGE_FSTYPES, |
335 | # images that will not be built at do_rootfs time: vmdk, vhd, vhdx, vdi, qcow2, hddimg, iso, etc. | 337 | # images that will not be built at do_rootfs time: vmdk, vhd, vhdx, vdi, qcow2, hddimg, iso, etc. |