common: android: rename and export load_android_image()

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I7398b83bff0fd0dedd77834ee2a8ff14f2ae11e0
This commit is contained in:
Joseph Chen 2019-12-17 10:47:07 +08:00
parent 7b2520c78e
commit 6527836d2a
2 changed files with 12 additions and 6 deletions

View File

@ -1051,9 +1051,9 @@ out:
} }
#endif #endif
static int load_android_image(struct blk_desc *dev_desc, int android_image_load_by_partname(struct blk_desc *dev_desc,
char *boot_partname, const char *boot_partname,
unsigned long *load_address) unsigned long *load_address)
{ {
disk_partition_t boot_part; disk_partition_t boot_part;
int ret, part_num; int ret, part_num;
@ -1185,8 +1185,9 @@ int android_bootloader_boot_flow(struct blk_desc *dev_desc,
printf("Not AVB images, AVB skip\n"); printf("Not AVB images, AVB skip\n");
env_update("bootargs", env_update("bootargs",
"androidboot.verifiedbootstate=orange"); "androidboot.verifiedbootstate=orange");
if (load_android_image(dev_desc, boot_partname, if (android_image_load_by_partname(dev_desc,
&load_address)) { boot_partname,
&load_address)) {
printf("Android image load failed\n"); printf("Android image load failed\n");
return -1; return -1;
} }
@ -1206,7 +1207,9 @@ int android_bootloader_boot_flow(struct blk_desc *dev_desc,
* 2. Load the boot/recovery from the desired "boot" partition. * 2. Load the boot/recovery from the desired "boot" partition.
* Determine if this is an AOSP image. * Determine if this is an AOSP image.
*/ */
if (load_android_image(dev_desc, boot_partname, &load_address)) { if (android_image_load_by_partname(dev_desc,
boot_partname,
&load_address)) {
printf("Android image load failed\n"); printf("Android image load failed\n");
return -1; return -1;
} }

View File

@ -1300,6 +1300,9 @@ long android_image_load(struct blk_desc *dev_desc,
unsigned long load_address, unsigned long load_address,
unsigned long max_size); unsigned long max_size);
int android_image_load_by_partname(struct blk_desc *dev_desc,
const char *boot_partname,
unsigned long *load_address);
#endif /* CONFIG_ANDROID_BOOT_IMAGE */ #endif /* CONFIG_ANDROID_BOOT_IMAGE */
int bootm_parse_comp(const unsigned char *hdr); int bootm_parse_comp(const unsigned char *hdr);