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>
diff --git a/include/android_image.h b/include/android_image.h
index 99e7803..d503c98 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 @@
 	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 */