]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
mach-snapdragon: Enhance android image handling memory footprint
authorGeorge Chan <gchan9527@gmail.com>
Sun, 18 May 2025 11:16:20 +0000 (19:16 +0800)
committerTom Rini <trini@konsulko.com>
Tue, 24 Jun 2025 13:54:51 +0000 (07:54 -0600)
In order to unzipped kernel from androidboot img, extra memory for
loadaddr is needed. So once fastboot is enabled fastboot memory also
share with loadaddr.

That can balance with memory constrain soc and android usecase.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: George Chan <gchan9527@gmail.com>
Link: https://lore.kernel.org/r/20250518-android-boot-v3-3-02c8768e131f@gmail.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
arch/arm/mach-snapdragon/board.c

index 5547d6d054f2cdb7081f5dfcb78f9e27c58c268b..fe29f2ea6e91268a70f83b3babe5471565fb8939 100644 (file)
@@ -508,8 +508,12 @@ int board_late_init(void)
        status |= env_set_hex("ramdisk_addr_r", addr_alloc(SZ_128M));
        status |= env_set_hex("kernel_comp_addr_r", addr_alloc(KERNEL_COMP_SIZE));
        status |= env_set_hex("kernel_comp_size", KERNEL_COMP_SIZE);
-       if (IS_ENABLED(CONFIG_FASTBOOT))
-               status |= env_set_hex("fastboot_addr_r", addr_alloc(FASTBOOT_BUF_SIZE));
+       if (IS_ENABLED(CONFIG_FASTBOOT)) {
+               addr = addr_alloc(FASTBOOT_BUF_SIZE);
+               status |= env_set_hex("fastboot_addr_r", addr);
+               /* override loadaddr for memory rich soc */
+               status |= env_set_hex("loadaddr", addr);
+       }
        status |= env_set_hex("scriptaddr", addr_alloc(SZ_4M));
        status |= env_set_hex("pxefile_addr_r", addr_alloc(SZ_4M));
        addr = addr_alloc(SZ_2M);