diff options
author | Romuald JEANNE <romuald.jeanne@st.com> | 2023-03-09 08:54:52 +0100 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-03-21 04:33:00 -1000 |
commit | 705b5c51610a1d5a267a3f6559667a5f70fbadf5 (patch) | |
tree | a17087e8ec1e8bbcfae446aae7ac7b4475175356 | |
parent | a45bc475c7d983aef57c51dc51cb24902959e6f6 (diff) | |
download | openembedded-core-705b5c51610a1d5a267a3f6559667a5f70fbadf5.tar.gz |
image_types: fix vname var init in multiubi_mkfs() function
As vname var is needed in multiubi_mkfs() function, we need to keep it
defined and use it as parameter to the new write_ubi_config() function.
See [YOCTO #15027]
Signed-off-by: Romuald JEANNE <romuald.jeanne@st.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 8b5e1cce35e129b21d871ab45b03811fdb6eaf8f)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | meta/classes-recipe/image_types.bbclass | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/meta/classes-recipe/image_types.bbclass b/meta/classes-recipe/image_types.bbclass index 764e6a5574..c6cb8f5336 100644 --- a/meta/classes-recipe/image_types.bbclass +++ b/meta/classes-recipe/image_types.bbclass @@ -157,11 +157,7 @@ UBI_VOLTYPE ?= "dynamic" UBI_IMGTYPE ?= "ubifs" write_ubi_config() { - if [ -z "$1" ]; then - local vname="" - else - local vname="_$1" - fi + local vname="$1" cat <<EOF > ubinize${vname}-${IMAGE_NAME}.cfg [ubifs] @@ -183,7 +179,12 @@ multiubi_mkfs() { bbfatal "MKUBIFS_ARGS and UBINIZE_ARGS have to be set, see http://www.linux-mtd.infradead.org/faq/ubifs.html for details" fi - write_ubi_config "$3" + if [ -z "$3" ]; then + local vname="" + else + local vname="_$3" + fi + write_ubi_config "${vname}" if [ -n "$vname" ]; then mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs ${mkubifs_args} |