summaryrefslogtreecommitdiff
path: root/common/image-android.c
diff options
context:
space:
mode:
authorMichael Trimarchi <michael@amarulasolutions.com>2016-06-10 19:54:37 +0200
committerTom Rini <trini@konsulko.com>2016-06-24 17:23:07 -0400
commit4f1318b29c7a20a694d02247917a6000f08dec9a (patch)
tree5078531cd70d3f752d58447299f105af0b9b50c3 /common/image-android.c
parentf8f9107d97b849afe69ca86e7abd8d1748ea7acd (diff)
common: image: minimal android image iminfo support
We already support iminfo for other images. The idea of this patch is start to have a minimal support for android image format. We still need to print id[] array Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/image-android.c')
-rw-r--r--common/image-android.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/common/image-android.c b/common/image-android.c
index b6a94b3a30..ee03b96aaa 100644
--- a/common/image-android.c
+++ b/common/image-android.c
@@ -145,3 +145,32 @@ int android_image_get_ramdisk(const struct andr_img_hdr *hdr,
*rd_len = hdr->ramdisk_size;
return 0;
}
+
+#if !defined(CONFIG_SPL_BUILD)
+/**
+ * android_print_contents - prints out the contents of the Android format image
+ * @hdr: pointer to the Android format image header
+ *
+ * android_print_contents() formats a multi line Android image contents
+ * description.
+ * The routine prints out Android image properties
+ *
+ * returns:
+ * no returned results
+ */
+void android_print_contents(const struct andr_img_hdr *hdr)
+{
+ const char * const p = IMAGE_INDENT_STRING;
+
+ printf("%skernel size: %x\n", p, hdr->kernel_size);
+ printf("%skernel address: %x\n", p, hdr->kernel_addr);
+ printf("%sramdisk size: %x\n", p, hdr->ramdisk_size);
+ printf("%sramdisk addrress: %x\n", p, hdr->ramdisk_addr);
+ printf("%ssecond size: %x\n", p, hdr->second_size);
+ printf("%ssecond address: %x\n", p, hdr->second_addr);
+ printf("%stags address: %x\n", p, hdr->tags_addr);
+ printf("%spage size: %x\n", p, hdr->page_size);
+ printf("%sname: %s\n", p, hdr->name);
+ printf("%scmdline: %s\n", p, hdr->cmdline);
+}
+#endif