Re: [PATCH 02/10] spl: Kconfig: Address support for compressed U-BOOT raw binary

2023-07-25 Thread Manoj Sai
On Sun, Jul 2, 2023 at 9:04 PM Simon Glass  wrote:
>
> Hi Manoj,
>
> On Fri, 30 Jun 2023 at 13:12, Manoj Sai
>  wrote:
> >
> > Add the support that ,if compression support is enabled in SPL
> > a 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 
> > Signed-off-by: Suniel Mahesh 
> > ---
> >  common/spl/Kconfig | 15 +++
> >  1 file changed, 15 insertions(+)
> >
> > diff --git a/common/spl/Kconfig b/common/spl/Kconfig
> > index 2c042ad306..5dd1f3c469 100644
> > --- a/common/spl/Kconfig
> > +++ b/common/spl/Kconfig
> > @@ -1547,6 +1547,21 @@ config SPL_AT91_MCK_BYPASS
> >   The external source has to provide a stable clock on the XIN pin.
> >   If this option is disabled, the SoC expects a crystal oscillator
> >   that needs driving on both XIN and XOUT lines.
>
> blank line here
>
> > +choice
> > +   prompt "Location for compressed U-BOOT raw binary"
>
> compressed U-Boot binary
>
> > +   depends on SPL_GZIP || SPL_LZMA
> > +   default SPL_UBOOT_COMPRESSED_BINARY_FIT_USER_DEFINED_AREA
>
> missing help
>
> This is too long and there is a lot ot redundancy.. How about 
> SPL_GZIP_FROM_ADDR
>
> > +
> > +config SPL_UBOOT_COMPRESSED_BINARY_FIT_USER_DEFINED_AREA
> > +   bool "compressed U-BOOT raw binary user-defined location"
>
> missing help
>
> blank line
>
> > +endchoice
>
> But you only have one thing in the choice, so can you just drop the
> choice and use a bool instead?
>
> > +
> > +config SPL_UBOOT_COMPRESSED_BINARY_FIT_USER_DEF_ADDR
>
> How about SPL_GZIP_LOADADDR?
>
>
Hi simon ,

We modified to use the CONFIG_SYS_LOAD_ADDR as the source RAM address
to store the  compressed U-Boot
 binary which will be defined in a machine defconfig file in place of
defining a new RAM address and with the help of this change,
able to load and boot the compressed U-boot.

-spl_load_fit_image function , will uncompress the U-BOOT binary which
is placed in the CONFIG_SYS_LOAD_ADDR to
default CONFIG_SYS_TEXT_BASE location and able to load and boot the
compressed U-boot.

These two patches  will be removed in the next v2 patchset which are
related  to adding new RAM address to store compressed U-boot.
1) 
https://patchwork.ozlabs.org/project/uboot/patch/20230630121146.513345-3-abbaraju.manoj...@amaruasolutions.com/
2) 
https://patchwork.ozlabs.org/project/uboot/patch/20230630121146.513345-4-abbaraju.manoj...@amarulasolutions.com/

Regards,
A . Manoj sai

> > +   hex "Address of memory where compressed U-BOOT raw binary is stored"
>
> U-Boot (please fix throughout)
>
> > +   depends on SPL_UBOOT_COMPRESSED_BINARY_FIT_USER_DEFINED_AREA
> > +   help
> > + The FIT image containing the compressed U-BOOT raw binary will be 
> > stored
> > + in an area defined at compilation time. This is the address for 
> > this area.
> >  endmenu
> >
> >  config TPL
> > --
> > 2.25.1
> >
>
> Regards,
> Simon


Re: [PATCH 02/10] spl: Kconfig: Address support for compressed U-BOOT raw binary

2023-07-02 Thread Simon Glass
Hi Manoj,

On Fri, 30 Jun 2023 at 13:12, Manoj Sai
 wrote:
>
> Add the support that ,if compression support is enabled in SPL
> a 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 
> Signed-off-by: Suniel Mahesh 
> ---
>  common/spl/Kconfig | 15 +++
>  1 file changed, 15 insertions(+)
>
> diff --git a/common/spl/Kconfig b/common/spl/Kconfig
> index 2c042ad306..5dd1f3c469 100644
> --- a/common/spl/Kconfig
> +++ b/common/spl/Kconfig
> @@ -1547,6 +1547,21 @@ config SPL_AT91_MCK_BYPASS
>   The external source has to provide a stable clock on the XIN pin.
>   If this option is disabled, the SoC expects a crystal oscillator
>   that needs driving on both XIN and XOUT lines.

blank line here

> +choice
> +   prompt "Location for compressed U-BOOT raw binary"

compressed U-Boot binary

> +   depends on SPL_GZIP || SPL_LZMA
> +   default SPL_UBOOT_COMPRESSED_BINARY_FIT_USER_DEFINED_AREA

missing help

This is too long and there is a lot ot redundancy.. How about SPL_GZIP_FROM_ADDR

> +
> +config SPL_UBOOT_COMPRESSED_BINARY_FIT_USER_DEFINED_AREA
> +   bool "compressed U-BOOT raw binary user-defined location"

missing help

blank line

> +endchoice

But you only have one thing in the choice, so can you just drop the
choice and use a bool instead?

> +
> +config SPL_UBOOT_COMPRESSED_BINARY_FIT_USER_DEF_ADDR

How about SPL_GZIP_LOADADDR?


> +   hex "Address of memory where compressed U-BOOT raw binary is stored"

U-Boot (please fix throughout)

> +   depends on SPL_UBOOT_COMPRESSED_BINARY_FIT_USER_DEFINED_AREA
> +   help
> + The FIT image containing the compressed U-BOOT raw binary will be 
> stored
> + in an area defined at compilation time. This is the address for 
> this area.
>  endmenu
>
>  config TPL
> --
> 2.25.1
>

Regards,
Simon


[PATCH 02/10] spl: Kconfig: Address support for compressed U-BOOT raw binary

2023-06-30 Thread Manoj Sai
Add the support that ,if compression support is enabled in SPL
a 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 
Signed-off-by: Suniel Mahesh 
---
 common/spl/Kconfig | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 2c042ad306..5dd1f3c469 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -1547,6 +1547,21 @@ config SPL_AT91_MCK_BYPASS
  The external source has to provide a stable clock on the XIN pin.
  If this option is disabled, the SoC expects a crystal oscillator
  that needs driving on both XIN and XOUT lines.
+choice
+   prompt "Location for compressed U-BOOT raw binary"
+   depends on SPL_GZIP || SPL_LZMA
+   default SPL_UBOOT_COMPRESSED_BINARY_FIT_USER_DEFINED_AREA
+
+config SPL_UBOOT_COMPRESSED_BINARY_FIT_USER_DEFINED_AREA
+   bool "compressed U-BOOT raw binary user-defined location"
+endchoice
+
+config SPL_UBOOT_COMPRESSED_BINARY_FIT_USER_DEF_ADDR
+   hex "Address of memory where compressed U-BOOT raw binary is stored"
+   depends on SPL_UBOOT_COMPRESSED_BINARY_FIT_USER_DEFINED_AREA
+   help
+ The FIT image containing the compressed U-BOOT raw binary will be 
stored
+ in an area defined at compilation time. This is the address for this 
area.
 endmenu
 
 config TPL
-- 
2.25.1