[PATCH] ARM: Align image end to 8 bytes to fit DT alignment
Simon Glass
sjg at chromium.org
Thu May 15 21:27:06 CEST 2025
Hi Marek,
On Mon, 12 May 2025 at 18:11, Marek Vasut <marek.vasut at mailbox.org> wrote:
>
> Align U-Boot image end to 8 bytes to make sure DT alignment requirement
> is fulfilled. This fixes a possible failure in fdt_find_separate() in
> case the U-Boot image is aligned to 4 Bytes and DT is appended at the
> end at already 8 Byte aligned offset.
>
> Signed-off-by: Marek Vasut <marek.vasut at mailbox.org>
> ---
> Cc: Ilias Apalodimas <ilias.apalodimas at linaro.org>
> Cc: Sam Edwards <cfsworks at gmail.com>
> Cc: Tom Rini <trini at konsulko.com>
> Cc: u-boot at lists.denx.de
> ---
> arch/arm/cpu/u-boot.lds | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds
> index 817e7a983ae..b2109e03ce3 100644
> --- a/arch/arm/cpu/u-boot.lds
> +++ b/arch/arm/cpu/u-boot.lds
> @@ -153,14 +153,14 @@ SECTIONS
> __efi_runtime_rel_stop = .;
> }
>
> - . = ALIGN(4);
> + . = ALIGN(8);
> __image_copy_end = .;
>
> /*
> * if CONFIG_USE_ARCH_MEMSET is not selected __bss_end - __bss_start
> * needs to be a multiple of 4 and we overlay .bss with .rel.dyn
> */
> - .rel.dyn ALIGN(4) : {
> + .rel.dyn ALIGN(8) : {
> __rel_dyn_start = .;
> *(.rel*)
> __rel_dyn_end = .;
> --
> 2.47.2
>
Reviewed-by: Simon Glass <sjg at chromium.org>
Does the same need apply to SPL?
Regards,
Simon
More information about the U-Boot
mailing list