
On Tue, Dec 05, 2023 at 04:49:47PM +0100, Soeren Moch wrote:
On 05.12.23 14:15, Maxim Uvarov wrote:
I think I solved the size issue on all the boards.
Key changes:
- remove compilation of original ping.c and tftp.c (tftp had also
server code, so I will partially bring it back.)
Interesting. @Tom: Is there other server code in u-boot, that is enabled by default (and can be used to reclaim code space)? Fur sure I do not need u-boot to act as server for tftp (maye nfs, others).
Note that we disabled NFS for everyone recently (I think it will be default off in v2024.01), and CMD_TFTPSRV isn't enabled by default for anyone. At this point, anything which could have an impact on size should be in Kconfig so examining the whole .config file might give other suggestions on what could be disabled for size.
- LTO=y
- CONFIG_LOGLEVEL=3 instead of 4.
- CONFIG_CMD_DATE is not set
- CONFIG_CMD_LICENSE is not set
- CONFIG_CMD_PING (if 1-6 did not help).
And these changes were enough for CI tagrets to build. I also tested that Raspberry PI 4B works fine (dhcp, ping). Looking for other boards to test.
For example for this tbs2910 board changes are:
Disabling CMD_DATE is unfortunate. This can help to debug RTC problems (already used it for this purpose). And, if we are that close to the size limit, than maybe we can get away for this series, but for sure will run into trouble for every other small change to u-boot core/driver code.
In general, I would suggest disabling CMD_LICENSE before disabling CMD_DATE as well. But I see that's already done here. The same would be with CONFIG_BOOTM_VXWORKS, but that's also off here.
Maybe disable the memtest command? It's not that good of a tester as it is. Or maybe CONFIG_MMC_VERBOSE=y can be turned off?