* [PATCH v2] armv8: u-boot-spl.lds: Place binman symbols at end of binary
@ 2026-01-22 17:20 Jonas Karlman
2026-01-26 2:13 ` Peng Fan
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Jonas Karlman @ 2026-01-22 17:20 UTC (permalink / raw)
To: Tom Rini; +Cc: Jonas Karlman, u-boot
It can be useful in xPL to access symbols from binman, such as the
offset/position and size of a binman entry.
Place these binman symbols together at the end of the xPL binary for
ARMv8, similar to ARM and RISC-V.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
v2: Rebase on master after "arm: Update linker scripts to ensure
appended device tree is aligned".
---
arch/arm/cpu/armv8/u-boot-spl.lds | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/cpu/armv8/u-boot-spl.lds b/arch/arm/cpu/armv8/u-boot-spl.lds
index d9963846c4f4..b732133ce76d 100644
--- a/arch/arm/cpu/armv8/u-boot-spl.lds
+++ b/arch/arm/cpu/armv8/u-boot-spl.lds
@@ -55,6 +55,14 @@ SECTIONS
. = ALIGN(8);
} >.sram
+ .binman_sym_table : {
+ . = ALIGN(8);
+ __binman_sym_start = .;
+ KEEP(*(SORT(.binman_sym*)));
+ __binman_sym_end = .;
+ . = ALIGN(8);
+ } > .sram
+
__image_copy_end = .;
_end = .;
_image_binary_end = .;
--
2.52.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] armv8: u-boot-spl.lds: Place binman symbols at end of binary
2026-01-22 17:20 [PATCH v2] armv8: u-boot-spl.lds: Place binman symbols at end of binary Jonas Karlman
@ 2026-01-26 2:13 ` Peng Fan
2026-01-26 22:15 ` Jonas Karlman
2026-01-26 5:15 ` Simon Glass
2026-01-28 21:54 ` Tom Rini
2 siblings, 1 reply; 5+ messages in thread
From: Peng Fan @ 2026-01-26 2:13 UTC (permalink / raw)
To: Jonas Karlman; +Cc: Tom Rini, u-boot
Hi Jonas,
On Thu, Jan 22, 2026 at 05:20:54PM +0000, Jonas Karlman wrote:
>It can be useful in xPL to access symbols from binman, such as the
>offset/position and size of a binman entry.
Would you please disclose more details? What it will be used for?
Thanks,
Peng
>
>Place these binman symbols together at the end of the xPL binary for
>ARMv8, similar to ARM and RISC-V.
>
>Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
>---
>v2: Rebase on master after "arm: Update linker scripts to ensure
> appended device tree is aligned".
>---
> arch/arm/cpu/armv8/u-boot-spl.lds | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
>diff --git a/arch/arm/cpu/armv8/u-boot-spl.lds b/arch/arm/cpu/armv8/u-boot-spl.lds
>index d9963846c4f4..b732133ce76d 100644
>--- a/arch/arm/cpu/armv8/u-boot-spl.lds
>+++ b/arch/arm/cpu/armv8/u-boot-spl.lds
>@@ -55,6 +55,14 @@ SECTIONS
> . = ALIGN(8);
> } >.sram
>
>+ .binman_sym_table : {
>+ . = ALIGN(8);
>+ __binman_sym_start = .;
>+ KEEP(*(SORT(.binman_sym*)));
>+ __binman_sym_end = .;
>+ . = ALIGN(8);
>+ } > .sram
>+
> __image_copy_end = .;
> _end = .;
> _image_binary_end = .;
>--
>2.52.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] armv8: u-boot-spl.lds: Place binman symbols at end of binary
2026-01-22 17:20 [PATCH v2] armv8: u-boot-spl.lds: Place binman symbols at end of binary Jonas Karlman
2026-01-26 2:13 ` Peng Fan
@ 2026-01-26 5:15 ` Simon Glass
2026-01-28 21:54 ` Tom Rini
2 siblings, 0 replies; 5+ messages in thread
From: Simon Glass @ 2026-01-26 5:15 UTC (permalink / raw)
To: Jonas Karlman; +Cc: Tom Rini, u-boot
On Fri, 23 Jan 2026 at 06:21, Jonas Karlman <jonas@kwiboo.se> wrote:
>
> It can be useful in xPL to access symbols from binman, such as the
> offset/position and size of a binman entry.
>
> Place these binman symbols together at the end of the xPL binary for
> ARMv8, similar to ARM and RISC-V.
>
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
> ---
> v2: Rebase on master after "arm: Update linker scripts to ensure
> appended device tree is aligned".
> ---
> arch/arm/cpu/armv8/u-boot-spl.lds | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
Reviewed-by: Simon Glass <simon.glass@canonical.com>
> diff --git a/arch/arm/cpu/armv8/u-boot-spl.lds b/arch/arm/cpu/armv8/u-boot-spl.lds
> index d9963846c4f4..b732133ce76d 100644
> --- a/arch/arm/cpu/armv8/u-boot-spl.lds
> +++ b/arch/arm/cpu/armv8/u-boot-spl.lds
> @@ -55,6 +55,14 @@ SECTIONS
> . = ALIGN(8);
> } >.sram
>
> + .binman_sym_table : {
> + . = ALIGN(8);
> + __binman_sym_start = .;
> + KEEP(*(SORT(.binman_sym*)));
> + __binman_sym_end = .;
> + . = ALIGN(8);
> + } > .sram
> +
> __image_copy_end = .;
> _end = .;
> _image_binary_end = .;
> --
> 2.52.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] armv8: u-boot-spl.lds: Place binman symbols at end of binary
2026-01-26 2:13 ` Peng Fan
@ 2026-01-26 22:15 ` Jonas Karlman
0 siblings, 0 replies; 5+ messages in thread
From: Jonas Karlman @ 2026-01-26 22:15 UTC (permalink / raw)
To: Peng Fan; +Cc: Tom Rini, u-boot
Hi Peng,
On 1/26/2026 3:13 AM, Peng Fan wrote:
> Hi Jonas,
> On Thu, Jan 22, 2026 at 05:20:54PM +0000, Jonas Karlman wrote:
>> It can be useful in xPL to access symbols from binman, such as the
>> offset/position and size of a binman entry.
>
> Would you please disclose more details? What it will be used for?
The binman symbols can be used to get offsets of images in the binman
generated output, see [1] for U-Boot documentation and [2] for a feature
beside current normal usage of u-boot-img symbols in SPL.
Today the binman symbols will be spread out for ARMv8 SPL, this patch
concentrate the binman symbols to the end of the binary image, similar
to how it is handled for ARMv7 and RISC-V.
[1] https://docs.u-boot.org/en/latest/develop/package/binman.html#access-to-binman-entry-offsets-at-run-time-symbols
[2] https://lore.kernel.org/r/20260113143132.3401001-1-jonas@kwiboo.se
Regards,
Jonas
>
> Thanks,
> Peng
>
>>
>> Place these binman symbols together at the end of the xPL binary for
>> ARMv8, similar to ARM and RISC-V.
>>
>> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
>> ---
>> v2: Rebase on master after "arm: Update linker scripts to ensure
>> appended device tree is aligned".
>> ---
>> arch/arm/cpu/armv8/u-boot-spl.lds | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/arch/arm/cpu/armv8/u-boot-spl.lds b/arch/arm/cpu/armv8/u-boot-spl.lds
>> index d9963846c4f4..b732133ce76d 100644
>> --- a/arch/arm/cpu/armv8/u-boot-spl.lds
>> +++ b/arch/arm/cpu/armv8/u-boot-spl.lds
>> @@ -55,6 +55,14 @@ SECTIONS
>> . = ALIGN(8);
>> } >.sram
>>
>> + .binman_sym_table : {
>> + . = ALIGN(8);
>> + __binman_sym_start = .;
>> + KEEP(*(SORT(.binman_sym*)));
>> + __binman_sym_end = .;
>> + . = ALIGN(8);
>> + } > .sram
>> +
>> __image_copy_end = .;
>> _end = .;
>> _image_binary_end = .;
>> --
>> 2.52.0
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] armv8: u-boot-spl.lds: Place binman symbols at end of binary
2026-01-22 17:20 [PATCH v2] armv8: u-boot-spl.lds: Place binman symbols at end of binary Jonas Karlman
2026-01-26 2:13 ` Peng Fan
2026-01-26 5:15 ` Simon Glass
@ 2026-01-28 21:54 ` Tom Rini
2 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2026-01-28 21:54 UTC (permalink / raw)
To: Jonas Karlman; +Cc: u-boot
On Thu, 22 Jan 2026 17:20:54 +0000, Jonas Karlman wrote:
> It can be useful in xPL to access symbols from binman, such as the
> offset/position and size of a binman entry.
>
> Place these binman symbols together at the end of the xPL binary for
> ARMv8, similar to ARM and RISC-V.
>
>
> [...]
Applied to u-boot/master, thanks!
[1/1] armv8: u-boot-spl.lds: Place binman symbols at end of binary
commit: b8a820ac98fda6005ae131d89026c60bf7c9c535
--
Tom
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-01-28 21:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-22 17:20 [PATCH v2] armv8: u-boot-spl.lds: Place binman symbols at end of binary Jonas Karlman
2026-01-26 2:13 ` Peng Fan
2026-01-26 22:15 ` Jonas Karlman
2026-01-26 5:15 ` Simon Glass
2026-01-28 21:54 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.