diff options
author | Mike Looijmans <mike.looijmans@topic.nl> | 2015-09-11 19:06:40 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-14 20:46:36 +0100 |
commit | 62fca975cf8621c2f0218dd8a37a8322c2cb09b8 (patch) | |
tree | 44e41e20f06fd7452eff70d7defc582f65637954 /meta/classes | |
parent | 722aa22d157f27025a5e78d0c8db16769cb9cf8b (diff) | |
download | poky-62fca975cf8621c2f0218dd8a37a8322c2cb09b8.tar.gz |
image_types.bbclass: Restore compatibility with previous UBI filesystems
Support for multiple ubi images has broken dozens of machine deployment scripts
in two ways:
Previously, ubi filesystems would be named $IMAGE_NAME as one would expect. The
current version would append "_rootfs" to that name for no reason. Fix it so that
the name for ubi images remains unchanged if there is only one image to build.
Machines would append to IMAGE_CMD_ubi, adding extra image processing of their
own. This is broken now that IMAGE_CMD_ubi became a variable instead of a function.
Make IMAGE_CMD_ubi a function again, this also makes for more logical quotes (I
was surprised to find that " within " would even work).
(From OE-Core rev: b6e64de541b37bc5c558c4ad362a0467291a5609)
Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/image_types.bbclass | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index ecb066bf99..306403e310 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass | |||
@@ -120,7 +120,11 @@ UBI_VOLNAME ?= "${MACHINE}-rootfs" | |||
120 | multiubi_mkfs() { | 120 | multiubi_mkfs() { |
121 | local mkubifs_args="$1" | 121 | local mkubifs_args="$1" |
122 | local ubinize_args="$2" | 122 | local ubinize_args="$2" |
123 | local vname="_$3" | 123 | if [ -z "$3" ]; then |
124 | local vname="" | ||
125 | else | ||
126 | local vname="_$3" | ||
127 | fi | ||
124 | 128 | ||
125 | echo \[ubifs\] > ubinize${vname}.cfg | 129 | echo \[ubifs\] > ubinize${vname}.cfg |
126 | echo mode=ubi >> ubinize${vname}.cfg | 130 | echo mode=ubi >> ubinize${vname}.cfg |
@@ -158,7 +162,9 @@ IMAGE_CMD_multiubi () { | |||
158 | done | 162 | done |
159 | } | 163 | } |
160 | 164 | ||
161 | IMAGE_CMD_ubi = "multiubi_mkfs "${MKUBIFS_ARGS}" "${UBINIZE_ARGS}" "${UBI_VOLNAME}"" | 165 | IMAGE_CMD_ubi () { |
166 | multiubi_mkfs "${MKUBIFS_ARGS}" "${UBINIZE_ARGS}" | ||
167 | } | ||
162 | 168 | ||
163 | IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS}" | 169 | IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS}" |
164 | 170 | ||