aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/classes
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2021-03-08 15:51:18 -0600
committerKhem Raj <raj.khem@gmail.com>2021-03-08 14:11:59 -0800
commit58ddb1445b38fddf4726c130d7036371152666c1 (patch)
tree8cae42e8c4a8e2f91c119840d570bb7c4f50e24b /meta-oe/classes
parentbd09abe3e319f02b6901a56643a235c799c0f157 (diff)
downloadmeta-openembedded-contrib-58ddb1445b38fddf4726c130d7036371152666c1.tar.gz
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>
Diffstat (limited to 'meta-oe/classes')
-rw-r--r--meta-oe/classes/image_types_sparse.bbclass16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta-oe/classes/image_types_sparse.bbclass b/meta-oe/classes/image_types_sparse.bbclass
new file mode 100644
index 0000000000..1459f800a5
--- /dev/null
+++ b/meta-oe/classes/image_types_sparse.bbclass
@@ -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"