summaryrefslogtreecommitdiff
path: root/include/android_image.h
diff options
context:
space:
mode:
authorAlex Deymo <deymo@google.com>2017-04-02 08:49:47 (GMT)
committerTom Rini <trini@konsulko.com>2017-05-12 02:03:37 (GMT)
commit210a7176ee11b6af6746ba7ca025f5b9afbcb003 (patch)
tree331934d551e69736cd6c95cae473bb75e7fccdef /include/android_image.h
parentb1f2a17c780ce9b1d7666bcc6eef82ce9bb4b27f (diff)
downloadu-boot-fsl-qoriq-210a7176ee11b6af6746ba7ca025f5b9afbcb003.tar.xz
image: Update include/android_image.h
Update the Android image header format to the latest version published in AOSP. The original code moved to a new repository, so this patch also updates the reference to that path. Signed-off-by: Alex Deymo <deymo@google.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/android_image.h')
-rw-r--r--include/android_image.h24
1 files changed, 19 insertions, 5 deletions
diff --git a/include/android_image.h b/include/android_image.h
index 094d60a..dfd4d9d 100644
--- a/include/android_image.h
+++ b/include/android_image.h
@@ -1,8 +1,8 @@
/*
* This is from the Android Project,
- * Repository: https://android.googlesource.com/platform/bootable/bootloader/legacy
- * File: include/boot/bootimg.h
- * Commit: 4205b865141ff2e255fe1d3bd16de18e217ef06a
+ * Repository: https://android.googlesource.com/platform/system/core/
+ * File: mkbootimg/bootimg.h
+ * Commit: d162828814b08ada310846a33205befb69ef5799
*
* Copyright (C) 2008 The Android Open Source Project
*
@@ -12,10 +12,13 @@
#ifndef _ANDROID_IMAGE_H_
#define _ANDROID_IMAGE_H_
+typedef struct andr_img_hdr andr_img_hdr;
+
#define ANDR_BOOT_MAGIC "ANDROID!"
#define ANDR_BOOT_MAGIC_SIZE 8
#define ANDR_BOOT_NAME_SIZE 16
#define ANDR_BOOT_ARGS_SIZE 512
+#define ANDR_BOOT_EXTRA_ARGS_SIZE 1024
struct andr_img_hdr {
char magic[ANDR_BOOT_MAGIC_SIZE];
@@ -31,14 +34,25 @@ struct andr_img_hdr {
u32 tags_addr; /* physical addr for kernel tags */
u32 page_size; /* flash page size we assume */
- u32 unused[2]; /* future expansion: should be 0 */
+ u32 unused; /* reserved for future expansion: MUST be 0 */
+
+ /* operating system version and security patch level; for
+ * version "A.B.C" and patch level "Y-M-D":
+ * ver = A << 14 | B << 7 | C (7 bits for each of A, B, C)
+ * lvl = ((Y - 2000) & 127) << 4 | M (7 bits for Y, 4 bits for M)
+ * os_version = ver << 11 | lvl */
+ u32 os_version;
char name[ANDR_BOOT_NAME_SIZE]; /* asciiz product name */
char cmdline[ANDR_BOOT_ARGS_SIZE];
u32 id[8]; /* timestamp / checksum / sha1 / etc */
-};
+
+ /* Supplemental command line data; kept here to maintain
+ * binary compatibility with older versions of mkbootimg */
+ char extra_cmdline[ANDR_BOOT_EXTRA_ARGS_SIZE];
+} __attribute__((packed));
/*
* +-----------------+