[U-Boot] [PATCH 1/2] armv8: calculate __bss_size in u-boot-spl.lds

Oded Gabbay oded.gabbay at gmail.com
Tue Jan 17 10:27:43 CET 2017


Hi Mashiro,
Could you please also take a look at the patch I sent to add the
missing __bss_size ?

Thanks,
Oded

On Mon, Dec 26, 2016 at 4:20 PM, Oded Gabbay <oded.gabbay at gmail.com> wrote:
> This patch adds a missing __bss_size symbol to the default armv8
> u-boot-spl.lds file.
> Makefile.spl relies on __bss_size to be present when it creates the SPL
> image. It uses that symbol to create a pad file that will be used to place
> the dtb after the bss section.
> In ARMv8 default u-boot-spl.lds, __bss_size was missing and therefore, the
> pad file was always 0. As a result, the dtb was placed after
> _image_binary_end, which caused a failure when loading it inside the SPL.
>
> Signed-off-by: Oded Gabbay <oded.gabbay at gmail.com>
> Cc: Albert Aribaud <albert.u.boot at aribaud.net>
> ---
>  arch/arm/cpu/armv8/u-boot-spl.lds | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/cpu/armv8/u-boot-spl.lds b/arch/arm/cpu/armv8/u-boot-spl.lds
> index cc427c3..e7799cc 100644
> --- a/arch/arm/cpu/armv8/u-boot-spl.lds
> +++ b/arch/arm/cpu/armv8/u-boot-spl.lds
> @@ -70,6 +70,7 @@ SECTIONS
>                 KEEP(*(.__bss_end));
>         } >.sdram
>
> +       __bss_size = __bss_end - _image_binary_end;
>         /DISCARD/ : { *(.dynsym) }
>         /DISCARD/ : { *(.dynstr*) }
>         /DISCARD/ : { *(.dynamic*) }
> --
> 2.7.4
>


More information about the U-Boot mailing list