summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/configs/khadas-vim3_android.h25
-rw-r--r--include/configs/khadas-vim3l_android.h25
-rw-r--r--include/configs/meson64_android.h6
-rw-r--r--include/image.h24
4 files changed, 66 insertions, 14 deletions
diff --git a/include/configs/khadas-vim3_android.h b/include/configs/khadas-vim3_android.h
index 0e2953fe71b..551ab51c881 100644
--- a/include/configs/khadas-vim3_android.h
+++ b/include/configs/khadas-vim3_android.h
@@ -41,10 +41,27 @@
"name=rootfs,size=-,uuid=" ROOT_UUID
#endif
-#define EXTRA_ANDROID_ENV_SETTINGS \
- "board=vim3\0" \
- "board_name=vim3\0" \
+#define CFG_EXTRA_ENV_SETTINGS \
+ "board=vim3\0" \
+ "board_name=vim3\0" \
+ "bootmeths=android\0" \
+ "bootcmd=bootflow scan\0" \
+ "adtb_idx=3\0" \
+ "partitions=" PARTS_DEFAULT "\0" \
+ "mmcdev=2\0" \
+ "fastboot_raw_partition_bootloader=0x1 0xfff mmcpart 1\0" \
+ "fastboot_raw_partition_bootenv=0x0 0xfff mmcpart 2\0" \
+ "stdin=" STDIN_CFG "\0" \
+ "stdout=" STDOUT_CFG "\0" \
+ "stderr=" STDOUT_CFG "\0" \
+ "dtboaddr=0x08200000\0" \
+ "loadaddr=0x01080000\0" \
+ "fdt_addr_r=0x01000000\0" \
+ "scriptaddr=0x08000000\0" \
+ "kernel_addr_r=0x01080000\0" \
+ "pxefile_addr_r=0x01080000\0" \
+ "ramdisk_addr_r=0x13000000\0" \
-#include <configs/meson64_android.h>
+#include <configs/meson64.h>
#endif /* __CONFIG_H */
diff --git a/include/configs/khadas-vim3l_android.h b/include/configs/khadas-vim3l_android.h
index f39a3782d66..1869249e7c9 100644
--- a/include/configs/khadas-vim3l_android.h
+++ b/include/configs/khadas-vim3l_android.h
@@ -41,10 +41,27 @@
"name=rootfs,size=-,uuid=" ROOT_UUID
#endif
-#define EXTRA_ANDROID_ENV_SETTINGS \
- "board=vim3l\0" \
- "board_name=vim3l\0" \
+#define CFG_EXTRA_ENV_SETTINGS \
+ "board=vim3l\0" \
+ "board_name=vim3l\0" \
+ "bootmeths=android\0" \
+ "bootcmd=bootflow scan\0" \
+ "adtb_idx=2\0" \
+ "partitions=" PARTS_DEFAULT "\0" \
+ "mmcdev=2\0" \
+ "fastboot_raw_partition_bootloader=0x1 0xfff mmcpart 1\0" \
+ "fastboot_raw_partition_bootenv=0x0 0xfff mmcpart 2\0" \
+ "stdin=" STDIN_CFG "\0" \
+ "stdout=" STDOUT_CFG "\0" \
+ "stderr=" STDOUT_CFG "\0" \
+ "dtboaddr=0x08200000\0" \
+ "loadaddr=0x01080000\0" \
+ "fdt_addr_r=0x01000000\0" \
+ "scriptaddr=0x08000000\0" \
+ "kernel_addr_r=0x01080000\0" \
+ "pxefile_addr_r=0x01080000\0" \
+ "ramdisk_addr_r=0x13000000\0" \
-#include <configs/meson64_android.h>
+#include <configs/meson64.h>
#endif /* __CONFIG_H */
diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h
index 77364bbf9cf..d6ef0a83a68 100644
--- a/include/configs/meson64_android.h
+++ b/include/configs/meson64_android.h
@@ -104,12 +104,6 @@
"elif test $board_name = sei610; then " \
"echo \" Reading DTB for sei610...\"; " \
"setenv dtb_index 1;" \
- "elif test $board_name = vim3l; then " \
- "echo \" Reading DTB for vim3l...\"; " \
- "setenv dtb_index 2;" \
- "elif test $board_name = vim3; then " \
- "echo \" Reading DTB for vim3...\"; " \
- "setenv dtb_index 3;" \
"else " \
"echo Error: Android boot is not supported for $board_name; " \
"exit; " \
diff --git a/include/image.h b/include/image.h
index c52fced9b40..9be5acd8158 100644
--- a/include/image.h
+++ b/include/image.h
@@ -1802,6 +1802,30 @@ struct cipher_algo *image_get_cipher_algo(const char *full_name);
struct andr_image_data;
/**
+ * android_image_get_bootimg_size() - Extract size of Android boot image
+ *
+ * This is used to extract the size of an Android boot image
+ * from boot image header.
+ *
+ * @hdr: Pointer to boot image header
+ * @boot_img_size: On exit returns the size in bytes of the boot image
+ * Return: true if succeeded, false otherwise
+ */
+bool android_image_get_bootimg_size(const void *hdr, u32 *boot_img_size);
+
+/**
+ * android_image_get_vendor_bootimg_size() - Extract size of Android vendor-boot image
+ *
+ * This is used to extract the size of an Android vendor-boot image
+ * from vendor-boot image header.
+ *
+ * @hdr: Pointer to vendor-boot image header
+ * @vendor_boot_img_size: On exit returns the size in bytes of the vendor-boot image
+ * Return: true if succeeded, false otherwise
+ */
+bool android_image_get_vendor_bootimg_size(const void *hdr, u32 *vendor_boot_img_size);
+
+/**
* android_image_get_data() - Parse Android boot images
*
* This is used to parse boot and vendor-boot header into