* [PATCH 0/3] k3: am62x: image size fixes
@ 2026-05-18 9:26 Sascha Hauer
2026-05-18 9:26 ` [PATCH 1/3] ARM: k3: am62x: move stack to end of SRAM Sascha Hauer
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Sascha Hauer @ 2026-05-18 9:26 UTC (permalink / raw)
To: BAREBOX
With the current configuration the initial barebox image for the AM62x
is limited to 0x3a800 bytes. the current image fits well into it, but
Let's make a bit more space available by moving DMDATA up to offset
0x3d000 giving us another 10KiB for the initial barebox image. Also set
CONFIG_BAREBOX_MAX_IMAGE_SIZE in the k3-r5_defconfig to 0x3d000 to not
exceed this limit unnoticed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
Sascha Hauer (3):
ARM: k3: am62x: move stack to end of SRAM
ARM: k3: am62x: make more space for r5 barebox binary
ARM: k3: k3-r5_defconfig: limit image size to maximum available space
arch/arm/boards/am625-sk/entry-r5.S | 2 +-
arch/arm/boards/beagleplay/entry-r5.S | 2 +-
arch/arm/configs/k3-r5_defconfig | 2 +-
images/Makefile.k3 | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
---
base-commit: c7bdd78be7cc9449a49a429a342c83f8085b1475
change-id: 20260518-k3-am62x-image-size-fixes-3af12ef5b363
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 1/3] ARM: k3: am62x: move stack to end of SRAM
2026-05-18 9:26 [PATCH 0/3] k3: am62x: image size fixes Sascha Hauer
@ 2026-05-18 9:26 ` Sascha Hauer
2026-05-18 9:26 ` [PATCH 2/3] ARM: k3: am62x: make more space for r5 barebox binary Sascha Hauer
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Sascha Hauer @ 2026-05-18 9:26 UTC (permalink / raw)
To: BAREBOX
Our available SRAM ends at 0x43c3e000. Move the initial stack the to not
waste 0x1000 bytes of scarce SRAM.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/am625-sk/entry-r5.S | 2 +-
arch/arm/boards/beagleplay/entry-r5.S | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boards/am625-sk/entry-r5.S b/arch/arm/boards/am625-sk/entry-r5.S
index e724e5550c..c0ece084a0 100644
--- a/arch/arm/boards/am625-sk/entry-r5.S
+++ b/arch/arm/boards/am625-sk/entry-r5.S
@@ -3,7 +3,7 @@
#define SRAM_BASE 0x43c00000
-#define STACK_TOP SRAM_BASE + 0x3d000
+#define STACK_TOP SRAM_BASE + 0x3e000
.arm
.section .text_head_entry_start_am625_sk_r5;
diff --git a/arch/arm/boards/beagleplay/entry-r5.S b/arch/arm/boards/beagleplay/entry-r5.S
index 712f0f4b8c..8f961651eb 100644
--- a/arch/arm/boards/beagleplay/entry-r5.S
+++ b/arch/arm/boards/beagleplay/entry-r5.S
@@ -3,7 +3,7 @@
#define SRAM_BASE 0x43c00000
-#define STACK_TOP SRAM_BASE + 0x3d000
+#define STACK_TOP SRAM_BASE + 0x3e000
.arm
.section .text_head_entry_start_beagleplay_r5;
--
2.47.3
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 2/3] ARM: k3: am62x: make more space for r5 barebox binary
2026-05-18 9:26 [PATCH 0/3] k3: am62x: image size fixes Sascha Hauer
2026-05-18 9:26 ` [PATCH 1/3] ARM: k3: am62x: move stack to end of SRAM Sascha Hauer
@ 2026-05-18 9:26 ` Sascha Hauer
2026-05-18 9:41 ` Ahmad Fatoum
2026-05-18 9:26 ` [PATCH 3/3] ARM: k3: k3-r5_defconfig: limit image size to maximum available space Sascha Hauer
2026-05-18 13:33 ` [PATCH 0/3] k3: am62x: image size fixes Sascha Hauer
3 siblings, 1 reply; 8+ messages in thread
From: Sascha Hauer @ 2026-05-18 9:26 UTC (permalink / raw)
To: BAREBOX
On the AM62x we have 0x3e000 bytes available for the initial r5 barebox
binary and the dmdata. The dmdata is currently hardcoded at offset
0x3a800 in the SRAM leaving only the space below that for the barebox
binary. The dmdata only has a size of 1362 bytes. Let's be generous and
give it 4096 bytes of maximum space, so move it up to 0x3d000 leaving
mode space for the barebox binary.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
images/Makefile.k3 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/images/Makefile.k3 b/images/Makefile.k3
index 789f77722a..12538541b0 100644
--- a/images/Makefile.k3
+++ b/images/Makefile.k3
@@ -92,7 +92,7 @@ quiet_cmd_k3_am62x_image = K3_am62x_IMG $@
$(SYSFW_$(@F)):2:0:0:00040000 \
$(SYSFWDATA_am625):18:0:0:00067000 \
$$inner \
- $(DMDATA_am625):17:16:0:43c3a800 \
+ $(DMDATA_am625):17:16:0:43c3d000 \
--key "$(KEY_$(@F))" --out $@
ifdef CONFIG_FIRMWARE_K3_AM62L_OPTEE
--
2.47.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] ARM: k3: am62x: make more space for r5 barebox binary
2026-05-18 9:26 ` [PATCH 2/3] ARM: k3: am62x: make more space for r5 barebox binary Sascha Hauer
@ 2026-05-18 9:41 ` Ahmad Fatoum
0 siblings, 0 replies; 8+ messages in thread
From: Ahmad Fatoum @ 2026-05-18 9:41 UTC (permalink / raw)
To: Sascha Hauer, BAREBOX
On 5/18/26 11:26 AM, Sascha Hauer wrote:
> On the AM62x we have 0x3e000 bytes available for the initial r5 barebox
> binary and the dmdata. The dmdata is currently hardcoded at offset
> 0x3a800 in the SRAM leaving only the space below that for the barebox
> binary. The dmdata only has a size of 1362 bytes. Let's be generous and
> give it 4096 bytes of maximum space, so move it up to 0x3d000 leaving
> mode space for the barebox binary.
more
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> images/Makefile.k3 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/images/Makefile.k3 b/images/Makefile.k3
> index 789f77722a..12538541b0 100644
> --- a/images/Makefile.k3
> +++ b/images/Makefile.k3
> @@ -92,7 +92,7 @@ quiet_cmd_k3_am62x_image = K3_am62x_IMG $@
> $(SYSFW_$(@F)):2:0:0:00040000 \
> $(SYSFWDATA_am625):18:0:0:00067000 \
> $$inner \
> - $(DMDATA_am625):17:16:0:43c3a800 \
> + $(DMDATA_am625):17:16:0:43c3d000 \
> --key "$(KEY_$(@F))" --out $@
>
> ifdef CONFIG_FIRMWARE_K3_AM62L_OPTEE
>
--
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 |
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/3] ARM: k3: k3-r5_defconfig: limit image size to maximum available space
2026-05-18 9:26 [PATCH 0/3] k3: am62x: image size fixes Sascha Hauer
2026-05-18 9:26 ` [PATCH 1/3] ARM: k3: am62x: move stack to end of SRAM Sascha Hauer
2026-05-18 9:26 ` [PATCH 2/3] ARM: k3: am62x: make more space for r5 barebox binary Sascha Hauer
@ 2026-05-18 9:26 ` Sascha Hauer
2026-05-18 9:37 ` Ahmad Fatoum
2026-05-18 13:33 ` [PATCH 0/3] k3: am62x: image size fixes Sascha Hauer
3 siblings, 1 reply; 8+ messages in thread
From: Sascha Hauer @ 2026-05-18 9:26 UTC (permalink / raw)
To: BAREBOX
On the AM62x we have 0x3e000 bytes available for SBL usage. The upper
0x1000 bytes are used by the DMDATA, so set maximum image size to
0x3d000.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/configs/k3-r5_defconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/configs/k3-r5_defconfig b/arch/arm/configs/k3-r5_defconfig
index ece3d00947..6d8391c55e 100644
--- a/arch/arm/configs/k3-r5_defconfig
+++ b/arch/arm/configs/k3-r5_defconfig
@@ -8,7 +8,7 @@ CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
CONFIG_NAME="k3-r5_defconfig"
CONFIG_ENVIRONMENT_VARIABLES=y
CONFIG_IMAGE_COMPRESSION_XZKERN=y
-CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x10000000
+CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x3d000
CONFIG_MALLOC_SIZE=0x0
CONFIG_MALLOC_TLSF=y
CONFIG_KALLSYMS=y
--
2.47.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] ARM: k3: k3-r5_defconfig: limit image size to maximum available space
2026-05-18 9:26 ` [PATCH 3/3] ARM: k3: k3-r5_defconfig: limit image size to maximum available space Sascha Hauer
@ 2026-05-18 9:37 ` Ahmad Fatoum
2026-05-18 10:38 ` Sascha Hauer
0 siblings, 1 reply; 8+ messages in thread
From: Ahmad Fatoum @ 2026-05-18 9:37 UTC (permalink / raw)
To: Sascha Hauer, BAREBOX
Hello,
On 5/18/26 11:26 AM, Sascha Hauer wrote:
> On the AM62x we have 0x3e000 bytes available for SBL usage. The upper
What's a SBL?
> 0x1000 bytes are used by the DMDATA, so set maximum image size to
> 0x3d000.
Cheers,
Ahmad
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> arch/arm/configs/k3-r5_defconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/configs/k3-r5_defconfig b/arch/arm/configs/k3-r5_defconfig
> index ece3d00947..6d8391c55e 100644
> --- a/arch/arm/configs/k3-r5_defconfig
> +++ b/arch/arm/configs/k3-r5_defconfig
> @@ -8,7 +8,7 @@ CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
> CONFIG_NAME="k3-r5_defconfig"
> CONFIG_ENVIRONMENT_VARIABLES=y
> CONFIG_IMAGE_COMPRESSION_XZKERN=y
> -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x10000000
> +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x3d000
> CONFIG_MALLOC_SIZE=0x0
> CONFIG_MALLOC_TLSF=y
> CONFIG_KALLSYMS=y
>
--
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 |
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] ARM: k3: k3-r5_defconfig: limit image size to maximum available space
2026-05-18 9:37 ` Ahmad Fatoum
@ 2026-05-18 10:38 ` Sascha Hauer
0 siblings, 0 replies; 8+ messages in thread
From: Sascha Hauer @ 2026-05-18 10:38 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: BAREBOX
On 2026-05-18 11:37, Ahmad Fatoum wrote:
> Hello,
>
> On 5/18/26 11:26 AM, Sascha Hauer wrote:
> > On the AM62x we have 0x3e000 bytes available for SBL usage. The upper
>
> What's a SBL?
Secondary Boot Loader I guess. TI speak
Sascha
>
> > 0x1000 bytes are used by the DMDATA, so set maximum image size to
> > 0x3d000.
>
> Cheers,
> Ahmad
>
> >
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> > arch/arm/configs/k3-r5_defconfig | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm/configs/k3-r5_defconfig b/arch/arm/configs/k3-r5_defconfig
> > index ece3d00947..6d8391c55e 100644
> > --- a/arch/arm/configs/k3-r5_defconfig
> > +++ b/arch/arm/configs/k3-r5_defconfig
> > @@ -8,7 +8,7 @@ CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
> > CONFIG_NAME="k3-r5_defconfig"
> > CONFIG_ENVIRONMENT_VARIABLES=y
> > CONFIG_IMAGE_COMPRESSION_XZKERN=y
> > -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x10000000
> > +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x3d000
> > CONFIG_MALLOC_SIZE=0x0
> > CONFIG_MALLOC_TLSF=y
> > CONFIG_KALLSYMS=y
> >
>
> --
> 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 |
>
>
--
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 |
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] k3: am62x: image size fixes
2026-05-18 9:26 [PATCH 0/3] k3: am62x: image size fixes Sascha Hauer
` (2 preceding siblings ...)
2026-05-18 9:26 ` [PATCH 3/3] ARM: k3: k3-r5_defconfig: limit image size to maximum available space Sascha Hauer
@ 2026-05-18 13:33 ` Sascha Hauer
3 siblings, 0 replies; 8+ messages in thread
From: Sascha Hauer @ 2026-05-18 13:33 UTC (permalink / raw)
To: BAREBOX, Sascha Hauer
On Mon, 18 May 2026 11:26:37 +0200, Sascha Hauer wrote:
> With the current configuration the initial barebox image for the AM62x
> is limited to 0x3a800 bytes. the current image fits well into it, but
> Let's make a bit more space available by moving DMDATA up to offset
> 0x3d000 giving us another 10KiB for the initial barebox image. Also set
> CONFIG_BAREBOX_MAX_IMAGE_SIZE in the k3-r5_defconfig to 0x3d000 to not
> exceed this limit unnoticed.
>
> [...]
Applied, thanks!
[1/3] ARM: k3: am62x: move stack to end of SRAM
https://git.pengutronix.de/cgit/barebox/commit/?id=a117841b9b9a (link may not be stable)
[2/3] ARM: k3: am62x: make more space for r5 barebox binary
https://git.pengutronix.de/cgit/barebox/commit/?id=14a7948a067e (link may not be stable)
[3/3] ARM: k3: k3-r5_defconfig: limit image size to maximum available space
https://git.pengutronix.de/cgit/barebox/commit/?id=6446c59dbc5d (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-05-18 15:32 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-18 9:26 [PATCH 0/3] k3: am62x: image size fixes Sascha Hauer
2026-05-18 9:26 ` [PATCH 1/3] ARM: k3: am62x: move stack to end of SRAM Sascha Hauer
2026-05-18 9:26 ` [PATCH 2/3] ARM: k3: am62x: make more space for r5 barebox binary Sascha Hauer
2026-05-18 9:41 ` Ahmad Fatoum
2026-05-18 9:26 ` [PATCH 3/3] ARM: k3: k3-r5_defconfig: limit image size to maximum available space Sascha Hauer
2026-05-18 9:37 ` Ahmad Fatoum
2026-05-18 10:38 ` Sascha Hauer
2026-05-18 13:33 ` [PATCH 0/3] k3: am62x: image size fixes Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox