diff mbox series

[mickledore] image_types_sparse: Fix syntax error

Message ID 20230908161739.2357133-1-bst@pengutronix.de
State New
Headers show
Series [mickledore] image_types_sparse: Fix syntax error | expand

Commit Message

Bastian Krause Sept. 8, 2023, 4:17 p.m. UTC
From: Chris Dimich <chris.dimich@boundarydevices.com>

When using the image type:

	IMAGE_FSTYPES += " wic.sparse"
	IMAGE_CLASSES += " image_types_sparse"

The following error arises:

	Syntax error: Bad function name

So need to remove function in favor of variable.

Signed-off-by: Chris Dimich <chris.dimich@boundarydevices.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bastian Krause <bst@pengutronix.de>
---
This is a backport of dff205f5a ("image_types_sparse: Fix syntax
error"), excluding the removal of IMAGE_NAME_SUFFIX because in
mickledore, ${IMAGE_NAME_SUFFIX} is and will not be included in
${IMAGE_NAME}.
---
 meta-oe/classes/image_types_sparse.bbclass | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/meta-oe/classes/image_types_sparse.bbclass b/meta-oe/classes/image_types_sparse.bbclass
index 69e24cbb7..25222fe5d 100644
--- a/meta-oe/classes/image_types_sparse.bbclass
+++ b/meta-oe/classes/image_types_sparse.bbclass
@@ -8,9 +8,11 @@  inherit image_types
 SPARSE_BLOCK_SIZE ??= "4096"
 
 CONVERSIONTYPES += "sparse"
-CONVERSION_CMD:sparse() {
-    INPUT="${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
-    truncate --no-create --size=%${SPARSE_BLOCK_SIZE} "$INPUT"
-    img2simg -s "$INPUT" "$INPUT.sparse" ${SPARSE_BLOCK_SIZE}
-}
+
+CONVERSION_CMD:sparse = " \
+    INPUT="${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" \
+    truncate --no-create --size=%${SPARSE_BLOCK_SIZE} "$INPUT" \
+    img2simg -s "$INPUT" "$INPUT.sparse" ${SPARSE_BLOCK_SIZE} \
+ "
+
 CONVERSION_DEPENDS_sparse = "android-tools-native"