[PATCH] 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%.
Signed-off-by: Sean Anderson seanga2@gmail.com --- This has been BUILD TESTED ONLY!
arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index d812685c984..a589cee395d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -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"

On Sat, Nov 04, 2023 at 10:27:42PM -0400, Sean Anderson wrote:
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%.
Signed-off-by: Sean Anderson seanga2@gmail.com
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!

On 11/16/23 20:47, Tom Rini wrote:
On Sat, Nov 04, 2023 at 10:27:42PM -0400, Sean Anderson wrote:
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%.
Signed-off-by: Sean Anderson seanga2@gmail.com
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

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
--------------------------------------------------------------------
On 11/16/23 20:47, Tom Rini wrote:
On Sat, Nov 04, 2023 at 10:27:42PM -0400, Sean Anderson wrote:
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%.
Signed-off-by: Sean Anderson seanga2@gmail.com
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

On 11/17/23 11:15, Mihai.Sain@microchip.com 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
Best regards, Mihai Sain
On 11/16/23 20:47, Tom Rini wrote:
On Sat, Nov 04, 2023 at 10:27:42PM -0400, Sean Anderson wrote:
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%.
Signed-off-by: Sean Anderson seanga2@gmail.com
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

On Fri, Nov 17, 2023 at 01:58:35PM +0200, Eugen Hristev wrote:
On 11/17/23 11:15, Mihai.Sain@microchip.com 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.
Thanks. I was looking at this for a series to go in to -next at this point, so v2024.04 release.

On Sat, 04 Nov 2023 22:27:42 -0400, Sean Anderson wrote:
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!

On 11/17/23 15:40, Tom Rini wrote:
On Sat, 04 Nov 2023 22:27:42 -0400, Sean Anderson wrote:
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!
so I'd assume that it would go through at91 tree.

On Fri, Nov 17, 2023 at 03:45:02PM +0200, Eugen Hristev wrote:
On 11/17/23 15:40, Tom Rini wrote:
On Sat, 04 Nov 2023 22:27:42 -0400, Sean Anderson wrote:
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!
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.

On 11/17/23 15:46, Tom Rini wrote:
On Fri, Nov 17, 2023 at 03:45:02PM +0200, Eugen Hristev wrote:
On 11/17/23 15:40, Tom Rini wrote:
On Sat, 04 Nov 2023 22:27:42 -0400, Sean Anderson wrote:
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!
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 ?

On Fri, Nov 17, 2023 at 03:49:57PM +0200, Eugen Hristev wrote:
On 11/17/23 15:46, Tom Rini wrote:
On Fri, Nov 17, 2023 at 03:45:02PM +0200, Eugen Hristev wrote:
On 11/17/23 15:40, Tom Rini wrote:
On Sat, 04 Nov 2023 22:27:42 -0400, Sean Anderson wrote:
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!
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.
participants (4)
-
Eugen Hristev
-
Mihai.Sain@microchip.com
-
Sean Anderson
-
Tom Rini