diff mbox series

[03/10] rockchip: RAM location for the compressed U-BOOT raw binary

Message ID 20230630121146.513345-4-abbaraju.manojsai@amarulasolutions.com
State Superseded
Delegated to: Kever Yang
Headers show
Series support for booting the compressed U-boot binary on Rockchip based SOC's | expand

Commit Message

Manoj Sai June 30, 2023, 12:11 p.m. UTC
Add the support that ,if compression support is enabled in SPL
a RAM location needs to be defined as the source address where
compressed U-BOOT raw binary will be stored.

spl_load_fit_image function takes care that, compressed U-Boot raw
binary which is placed at this address, will be uncompressed to default
CONFIG_SYS_TEXT_BASE location.

Signed-off-by: Manoj Sai <abbaraju.manojsai@amarulasolutions.com>
---
 arch/arm/mach-rockchip/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

Comments

Simon Glass July 2, 2023, 3:34 p.m. UTC | #1
Hi Manoj,

On Fri, 30 Jun 2023 at 13:12, Manoj Sai
<abbaraju.manojsai@amarulasolutions.com> wrote:
>
> Add the support that ,if compression support is enabled in SPL
> a RAM location needs to be defined as the source address where
> compressed U-BOOT raw binary will be stored.
>
> spl_load_fit_image function takes care that, compressed U-Boot raw
> binary which is placed at this address, will be uncompressed to default
> CONFIG_SYS_TEXT_BASE location.

But isn't that where U-Boot runs from? So if you load it there, how
can you uncompress it to the same place?
Reviewed-by: Simon Glass <sjg@chromium.org>
Anyway I agree this is a sensible default.

>
> Signed-off-by: Manoj Sai <abbaraju.manojsai@amarulasolutions.com>
> ---
>  arch/arm/mach-rockchip/Kconfig | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
> index 9d6d20bf8e..d8d9c1964d 100644
> --- a/arch/arm/mach-rockchip/Kconfig
> +++ b/arch/arm/mach-rockchip/Kconfig
> @@ -520,6 +520,9 @@ config ROCKCHIP_SPI_IMAGE
>  config LNX_KRNL_IMG_TEXT_OFFSET_BASE
>         default TEXT_BASE
>
> +config SPL_UBOOT_COMPRESSED_BINARY_FIT_USER_DEF_ADDR
> +       default 0x5000000 if ROCKCHIP_RK3399 || ROCKCHIP_RK3328
> +
>  source "arch/arm/mach-rockchip/px30/Kconfig"
>  source "arch/arm/mach-rockchip/rk3036/Kconfig"
>  source "arch/arm/mach-rockchip/rk3066/Kconfig"
> --
> 2.25.1
>

Reviewed-by: Simon Glass <sjg@chromium.org>

Regards,
Simon
diff mbox series

Patch

diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index 9d6d20bf8e..d8d9c1964d 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -520,6 +520,9 @@  config ROCKCHIP_SPI_IMAGE
 config LNX_KRNL_IMG_TEXT_OFFSET_BASE
 	default TEXT_BASE
 
+config SPL_UBOOT_COMPRESSED_BINARY_FIT_USER_DEF_ADDR
+	default 0x5000000 if ROCKCHIP_RK3399 || ROCKCHIP_RK3328
+
 source "arch/arm/mach-rockchip/px30/Kconfig"
 source "arch/arm/mach-rockchip/rk3036/Kconfig"
 source "arch/arm/mach-rockchip/rk3066/Kconfig"