[PATCH v2 2/5] mach-snapdragon: Enhance android image handling memory footprint

Neil Armstrong neil.armstrong at linaro.org
Mon May 5 14:23:00 CEST 2025


On 05/05/2025 11:17, George Chan via B4 Relay wrote:
> From: George Chan <gchan9527 at gmail.com>
> 
> 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.
> 
> Signed-off-by: George Chan <gchan9527 at gmail.com>
> ---
>   arch/arm/mach-snapdragon/board.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/board.c
> index deae4d32378..3ee0933d962 100644
> --- a/arch/arm/mach-snapdragon/board.c
> +++ b/arch/arm/mach-snapdragon/board.c
> @@ -500,8 +500,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);

I wouldn't make it conditional on fastboot

> +	}
>   	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);
> 


Anyway

Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>


More information about the U-Boot mailing list