Skip to contentSkip to conversation

classes: Add Android sparse image class

PATCH Superseded Joshua Watt 2 participants 4 messages Mar 5, 2021 – Mar 8, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 classes: Add Android sparse image class

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

---
 meta-oe/classes/image_types_simg.bbclass | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 meta-oe/classes/image_types_simg.bbclass
meta-oe/classes/image_types_simg.bbclass new file +16 -0
new file mode 100644
index 000000000..a53fafe5e
@@ -0,0 +1,16 @@
+inherit image_types
+
+CONVERSIONTYPES += "simg"
+CONVERSION_CMD_simg() {
+    in="${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
+    out="${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.simg"
+    case "${type}" in
+        ext*)
+            ext2simg "$in" "$out"
+            ;;
+        *)
+            img2simg "$in" "$out"
+            ;;
+    esac
+}
+CONVERSION_DEPENDS_simg = "android-tools-native"
Signature · 1 line
2.30.0
#1 lore raw
Quoted 13 lines · Joshua Watt

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

---
 meta-oe/classes/image_types_simg.bbclass | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 meta-oe/classes/image_types_simg.bbclass
meta-oe/classes/image_types_simg.bbclass new file +0 -0
new file mode 100644
index 000000000..a53fafe5e

meta-oe/classes/image_types_simg.bbclass line 3

Quoted 3 lines
meta-oe/classes/image_types_simg.bbclass new file +3 -0
@@ -0,0 +1,16 @@
+inherit image_types
+
+CONVERSIONTYPES += "simg"

I wonder if the name could be made sparse-img ?
simg might indicate, signed image too.

Quoted 19 lines
meta-oe/classes/image_types_simg.bbclass new file +13 -1
+CONVERSION_CMD_simg() {
+    in="${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
+    out="${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.simg"
+    case "${type}" in
+        ext*)
+            ext2simg "$in" "$out"
+            ;;
+        *)
+            img2simg "$in" "$out"
+            ;;
+    esac
+}
+CONVERSION_DEPENDS_simg = "android-tools-native"
--

2.30.0

#2 lore raw
Quoted 7 lines · Khem Raj
Quoted 6 lines · Joshua Watt

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

---
  meta-oe/classes/image_types_simg.bbclass | 16 ++++++++++++++++
  1 file changed, 16 insertions(+)

create mode 100644 meta-oe/classes/image_types_simg.bbclass

Quoted 11 lines

meta-oe/classes/image_types_simg.bbclass line 3

Quoted 9 lines
meta-oe/classes/image_types_simg.bbclass new file +3 -0
new file mode 100644
index 000000000..a53fafe5e
@@ -0,0 +1,16 @@
+inherit image_types
+
+CONVERSIONTYPES += "simg"

I wonder if the name could be made sparse-img ?
simg might indicate, signed image too.

Ya we can do that

Quoted 20 lines
Quoted 20 lines
meta-oe/classes/image_types_simg.bbclass new file +13 -1
+CONVERSION_CMD_simg() {
+    in="${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
+    out="${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.simg"
+    case "${type}" in
+        ext*)
+            ext2simg "$in" "$out"
+            ;;
+        *)
+            img2simg "$in" "$out"
+            ;;
+    esac
+}
+CONVERSION_DEPENDS_simg = "android-tools-native"
--

2.30.0

#3 lore raw

PATCH v2 1/1 classes: Add Android sparse image class

In reply to Joshua Watt

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

---
 meta-oe/classes/image_types_sparse.bbclass | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 meta-oe/classes/image_types_sparse.bbclass
meta-oe/classes/image_types_sparse.bbclass new file +16 -0
new file mode 100644
index 000000000..1459f800a
@@ -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"
Signature · 1 line
2.30.0