classes: Add Android sparse image class

Adds a class to create sparse image files using the Android tools

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Joshua Watt
2021-03-08 15:51:18 -06:00
committed by Khem Raj
parent bd09abe3e3
commit 58ddb1445b
@@ -0,0 +1,16 @@
inherit image_types
CONVERSIONTYPES += "sparse"
CONVERSION_CMD_sparse() {
in="${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
out="${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sparse"
case "${type}" in
ext*)
ext2simg "$in" "$out"
;;
*)
img2simg "$in" "$out"
;;
esac
}
CONVERSION_DEPENDS_sparse = "android-tools-native"