Skip to contentSkip to conversation

arm: Enable SYS_THUMB_BUILD on AT91

PATCH In review Sean Anderson 4 participants 11 messages Nov 5, 2023 – Nov 17, 2023 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: Enable SYS_THUMB_BUILD on AT91

Several AT91 boards are quite close to their SPL size limit. For example, sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit and doesn't even fit with older GCCs.

All AT91 processors should have thumb support. Enable SYS_THUMB_BUILD. This shrinks SPL by around 30%.

---
This has been BUILD TESTED ONLY!

 arch/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/Kconfig +1 -0
index d812685c984..a589cee395d 100644
@@ -568,6 +568,7 @@ config ARCH_AT91
 	select GPIO_EXTRA_HEADER
 	select SPL_BOARD_INIT if SPL && !TARGET_SMARTWEB
 	select SPL_SEPARATE_BSS if SPL
+	imply SYS_THUMB_BUILD
 
 config ARCH_DAVINCI
 	bool "TI DaVinci"
Signature · 1 line
2.37.1
#1 lore raw
Quoted 10 lines · Sean Anderson

Several AT91 boards are quite close to their SPL size limit. For example, sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit and doesn't even fit with older GCCs.

All AT91 processors should have thumb support. Enable SYS_THUMB_BUILD. This shrinks SPL by around 30%.

---
This has been BUILD TESTED ONLY!

We in turn need this for Sean's other cleanup series to go in. Is this OK? Would it be safer if it was only for CPU_V7A ? I do have recollections of thumb being sometimes buggy prior to v7a cores. Thanks!

Signature · 1 line
Tom
#2 lore raw
Quoted 9 lines · Tom Rini
Quoted 7 lines · Sean Anderson

Several AT91 boards are quite close to their SPL size limit. For example, sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit and doesn't even fit with older GCCs.

All AT91 processors should have thumb support. Enable SYS_THUMB_BUILD. This shrinks SPL by around 30%.

Quoted 8 lines
Quoted 3 lines

---
This has been BUILD TESTED ONLY!

We in turn need this for Sean's other cleanup series to go in. Is this OK? Would it be safer if it was only for CPU_V7A ? I do have recollections of thumb being sometimes buggy prior to v7a cores. Thanks!

Hi Tom,

I would like this to be tested on a few boards at least. There are boards with Cortex A5, A7 and ARM926 which are important, one of each of them and booting Linux should be enough I think. Nicolas, Aubin ? I remember you guys have also a CI tool that is fairly easy to use if you just push a branch/commit.

+ Mihai as well.

Eugen

#3 lore raw

Hi Eugen,

I built new binaries with CONFIG_SYS_THUMB_BUILD=y for sam9x60_curiosity, sama5d29_curiosity, sama7g5ek and new sam9x75_curiosity board. I used the latest u-boot/master branch for this test.
I noticed that the file size of the binaries have beed reduced with aprox 150KiB due to CONFIG_SYS_THUMB_BUILD=y.
After flashing the new binaries on these boards I can confirm that on all boards the linux kernel was booted properly from mmc, qspi-flash, nand-flash and usb. I tested using bootm and bootz commands.

Best regards,
Mihai Sain

--------------------------------------------------------------------

Quoted 9 lines · Tom Rini
Quoted 7 lines · Sean Anderson

Several AT91 boards are quite close to their SPL size limit. For example, sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit and doesn't even fit with older GCCs.

All AT91 processors should have thumb support. Enable SYS_THUMB_BUILD. This shrinks SPL by around 30%.

Quoted 8 lines
Quoted 3 lines

---
This has been BUILD TESTED ONLY!

We in turn need this for Sean's other cleanup series to go in. Is this OK? Would it be safer if it was only for CPU_V7A ? I do have recollections of thumb being sometimes buggy prior to v7a cores. Thanks!

Hi Tom,

I would like this to be tested on a few boards at least. There are boards with Cortex A5, A7 and ARM926 which are important, one of each of them and booting Linux should be enough I think. Nicolas, Aubin ? I remember you guys have also a CI tool that is fairly easy to use if you just push a branch/commit.

+ Mihai as well.

Eugen

#4 lore raw
Quoted 7 lines · On 11/17/23 11:15, [email protected] wrote:

Hi Eugen,

I built new binaries with CONFIG_SYS_THUMB_BUILD=y for sam9x60_curiosity, sama5d29_curiosity, sama7g5ek and new sam9x75_curiosity board. I used the latest u-boot/master branch for this test.
I noticed that the file size of the binaries have beed reduced with aprox 150KiB due to CONFIG_SYS_THUMB_BUILD=y.
After flashing the new binaries on these boards I can confirm that on all boards the linux kernel was booted properly from mmc, qspi-flash, nand-flash and usb. I tested using bootm and bootz commands.

Thank you Mihai,

Tom, Sean, are you okay with this going in the next merge window ? It is definitely not a fix, so that would be the best.

Eugen

Quoted 33 lines

Best regards,
Mihai Sain

--------------------------------------------------------------------

Quoted 9 lines · Tom Rini
Quoted 7 lines · Sean Anderson

Several AT91 boards are quite close to their SPL size limit. For example, sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit and doesn't even fit with older GCCs.

All AT91 processors should have thumb support. Enable SYS_THUMB_BUILD. This shrinks SPL by around 30%.

Quoted 8 lines
Quoted 3 lines

---
This has been BUILD TESTED ONLY!

We in turn need this for Sean's other cleanup series to go in. Is this OK? Would it be safer if it was only for CPU_V7A ? I do have recollections of thumb being sometimes buggy prior to v7a cores. Thanks!

Hi Tom,

I would like this to be tested on a few boards at least. There are boards with Cortex A5, A7 and ARM926 which are important, one of each of them and booting Linux should be enough I think. Nicolas, Aubin ? I remember you guys have also a CI tool that is fairly easy to use if you just push a branch/commit.

+ Mihai as well.

Eugen

#5 lore raw
Quoted 9 lines · Eugen Hristev
Quoted 7 lines · On 11/17/23 11:15, [email protected] wrote:

Hi Eugen,

I built new binaries with CONFIG_SYS_THUMB_BUILD=y for sam9x60_curiosity, sama5d29_curiosity, sama7g5ek and new sam9x75_curiosity board. I used the latest u-boot/master branch for this test.
I noticed that the file size of the binaries have beed reduced with aprox 150KiB due to CONFIG_SYS_THUMB_BUILD=y.
After flashing the new binaries on these boards I can confirm that on all boards the linux kernel was booted properly from mmc, qspi-flash, nand-flash and usb. I tested using bootm and bootz commands.

Quoted 4 lines

Thank you Mihai,

Tom, Sean, are you okay with this going in the next merge window ? It is definitely not a fix, so that would be the best.

Thanks. I was looking at this for a series to go in to -next at this point, so v2024.04 release.

Signature · 1 line
Tom
#6 lore raw
In reply to Sean Anderson
Quoted 8 lines · Sean Anderson

Several AT91 boards are quite close to their SPL size limit. For example, sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit and doesn't even fit with older GCCs.

All AT91 processors should have thumb support. Enable SYS_THUMB_BUILD. This shrinks SPL by around 30%.

[...]

Applied to u-boot/next, thanks!

Signature · 1 line
Tom
#7 lore raw
Quoted 6 lines · Tom Rini
Quoted 4 lines · Sean Anderson

Several AT91 boards are quite close to their SPL size limit. For example, sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit and doesn't even fit with older GCCs.

Quoted 7 lines
Quoted 4 lines

All AT91 processors should have thumb support. Enable SYS_THUMB_BUILD. This shrinks SPL by around 30%.

[...]

Applied to u-boot/next, thanks!

so I'd assume that it would go through at91 tree.

#8 lore raw
Quoted 10 lines · Eugen Hristev
Quoted 9 lines · Tom Rini
Quoted 7 lines · Sean Anderson

Several AT91 boards are quite close to their SPL size limit. For example, sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit and doesn't even fit with older GCCs.

All AT91 processors should have thumb support. Enable SYS_THUMB_BUILD. This shrinks SPL by around 30%.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

[...]

Applied to u-boot/next, thanks!

so I'd assume that it would go through at91 tree.

Ah, sorry. Since it was blocking two other series from coming in and you had gotten it tested I had assumed I could pull it to -next now to unblock that work.

Signature · 1 line
Tom
#9 lore raw
Quoted 13 lines · Tom Rini
Quoted 12 lines · Eugen Hristev
Quoted 11 lines · Tom Rini
Quoted 8 lines · Sean Anderson

Several AT91 boards are quite close to their SPL size limit. For example, sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit and doesn't even fit with older GCCs.

All AT91 processors should have thumb support. Enable SYS_THUMB_BUILD. This shrinks SPL by around 30%.

[...]

Quoted 9 lines
Quoted 4 lines
Quoted 2 lines

Applied to u-boot/next, thanks!

so I'd assume that it would go through at91 tree.

Ah, sorry. Since it was blocking two other series from coming in and you had gotten it tested I had assumed I could pull it to -next now to unblock that work.

This is yet another time at91 patches get applied directly. Maybe you do not really need an at91 maintainer ?

#10 lore raw
Quoted 17 lines · Eugen Hristev
Quoted 16 lines · Tom Rini
Quoted 15 lines · Eugen Hristev
Quoted 13 lines · Tom Rini
Quoted 8 lines · Sean Anderson

Several AT91 boards are quite close to their SPL size limit. For example, sama5d27_wlsom1_ek_mmc is just 173 bytes short of its limit and doesn't even fit with older GCCs.

All AT91 processors should have thumb support. Enable SYS_THUMB_BUILD. This shrinks SPL by around 30%.

[...]

Applied to u-boot/next, thanks!

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

so I'd assume that it would go through at91 tree.

Ah, sorry. Since it was blocking two other series from coming in and you had gotten it tested I had assumed I could pull it to -next now to unblock that work.

This is yet another time at91 patches get applied directly. Maybe you do not really need an at91 maintainer ?

U-Boot does not tend to have the strict sub-tree breakdown that the kernel does. Given what happened last time I was hoping that reaching out and then that you were able to have the changes tested would be sufficient for changes going to -next, rather than the current release. In future I will just wait for changes to come via the at91 tree, like I do for some other areas where the overall custodian prefers to have a more strict policy. Sorry.

Signature · 1 line
Tom