image_types_sparse: Fix syntax error

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>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Chris Dimich 2023-09-08 18:28:50 +02:00 committed by Armin Kuster
parent af8bbeb0b8
commit 6439ce2fe5

View File

@ -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"