[PATCH] fixup! scripts: gen-dtb-s: reference OF IMD entries automatically
Sascha Hauer
sha at pengutronix.de
Mon Apr 17 00:00:58 PDT 2023
On Fri, Apr 14, 2023 at 04:11:54PM +0200, Ahmad Fatoum wrote:
> While the reference is just there, so linker garbage collection doesn't
> remove it, it's still a reference and it will be relocated.
>
> This means it must be aligned, otherwise we will crash doing an unaligned
> access during relocation if device tree size isn't evenly divisible by
> pointer length...
>
> Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> ---
> scripts/gen-dtb-s | 2 ++
> 1 file changed, 2 insertions(+)
Applied, thanks
Sascha
>
> diff --git a/scripts/gen-dtb-s b/scripts/gen-dtb-s
> index 6a624e0bd5d0..f6fa1525933e 100755
> --- a/scripts/gen-dtb-s
> +++ b/scripts/gen-dtb-s
> @@ -51,6 +51,7 @@ echo ".incbin \"$dtb\""
> echo "__dtb_${name}_end:"
> echo ".global __dtb_${name}_end"
> if [ "$imd" = "y" ]; then
> + echo ".balign ASM_SZPTR"
> echo "ASM_PTR __barebox_imd_OF_${name}"
> fi
> echo ".balign STRUCT_ALIGNMENT"
> @@ -70,6 +71,7 @@ echo ".incbin \"$dtb.z\""
> echo "__dtb_z_${name}_end:"
> echo ".global __dtb_z_${name}_end"
> if [ "$imd" = "y" ]; then
> + echo ".balign ASM_SZPTR"
> echo "ASM_PTR __barebox_imd_OF_${name}"
> fi
> echo ".balign STRUCT_ALIGNMENT"
> --
> 2.39.2
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list