From: George Chan <gchan9...@gmail.com> Some androidboot images have gzipped kernel so we need to reuse extra mem block for holding gzipped boot.img, and let loadaddr to hold unzipped kernel data. Here we choose fastboot memory for reuse and avoid dramatically increase memory footprint.
Signed-off-by: George Chan <gchan9...@gmail.com> --- boot/bootmeth_android.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/boot/bootmeth_android.c b/boot/bootmeth_android.c index 654ebfdf1fc..27ca2907052 100644 --- a/boot/bootmeth_android.c +++ b/boot/bootmeth_android.c @@ -518,6 +518,18 @@ static int boot_android_normal(struct bootflow *bflow) int ret; ulong loadaddr = env_get_hex("loadaddr", 0); ulong vloadaddr = env_get_hex("vendor_boot_comp_addr_r", 0); + ulong fastboot_addr_r = env_get_hex("fastboot_addr_r", 0); + + /* + * Since there are some soc with very constrain mem footprint + * so dont borther to allocate extra block for androidboot img + * instead, reuse fastboot mem block for androidboot img + * + * The idea is to let loadaddr as source boot.img for unzip, + * and the original loadaddr is for holding unzipped kernel. + */ + if (fastboot_addr_r) + loadaddr = fastboot_addr_r; ret = run_avb_verification(bflow); if (ret < 0) -- 2.43.0