summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSafae Ouajih <souajih@baylibre.com>2023-02-06 00:50:18 +0100
committerTom Rini <trini@konsulko.com>2023-04-04 14:50:47 -0400
commit57e405e1f4745cdca49a4a6b260afe68592b1d5c (patch)
treef183ac57317f4ad8e3e77d78e87ab75f3c59e30b /include
parent636da2039aea4ea3a638b14da0a9ec258897a10c (diff)
android: boot: support bootconfig
Support Bootconfig feature. - The bootconfig feature replaces the androidboot.* kernel cmdline options. This was adapted from downstream [1] commit : 7af0a0506d4d ("cuttlefish: support bootconfig parameters"). Link:[1] https://android.googlesource.com/platform/external/u-boot/ Signed-off-by: Safae Ouajih <souajih@baylibre.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Diffstat (limited to 'include')
-rw-r--r--include/android_image.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/android_image.h b/include/android_image.h
index 99e78035082..d503c980b23 100644
--- a/include/android_image.h
+++ b/include/android_image.h
@@ -25,6 +25,14 @@
#define ANDR_VENDOR_BOOT_ARGS_SIZE 2048
#define ANDR_VENDOR_BOOT_NAME_SIZE 16
+#define BOOTCONFIG_MAGIC "#BOOTCONFIG\n"
+#define BOOTCONFIG_MAGIC_SIZE 12
+#define BOOTCONFIG_SIZE_SIZE 4
+#define BOOTCONFIG_CHECKSUM_SIZE 4
+#define BOOTCONFIG_TRAILER_SIZE BOOTCONFIG_MAGIC_SIZE + \
+ BOOTCONFIG_SIZE_SIZE + \
+ BOOTCONFIG_CHECKSUM_SIZE
+
struct andr_boot_img_hdr_v3 {
u8 magic[ANDR_BOOT_MAGIC_SIZE];
@@ -337,6 +345,9 @@ struct andr_image_data {
const char *kcmdline_extra; /* vendor-boot extra kernel cmdline */
const char *image_name; /* asciiz product name */
+ ulong bootconfig_addr; /* bootconfig image address */
+ ulong bootconfig_size; /* bootconfig image size */
+
u32 kernel_addr; /* physical load addr */
ulong ramdisk_addr; /* physical load addr */
ulong ramdisk_ptr; /* ramdisk address */