
On Thu, Oct 19, 2017 at 12:10:44PM +0300, Siarhei Siamashka wrote:
On Thu, Oct 19, 2017 at 11:26 AM, Maxime Ripard maxime.ripard@free-electrons.com wrote:
Hi,
Most featureful boards, such as the Cubietruck, have been broken since the release 2017.09.
This is due to a size increase of the binary that will trip us across the size we've been using in the u-boot-sunxi-with-spl.bin file.
We would have two ways to work around it. The first one would be to just increase the offset of the environment. However, since it would break all the environments of our users and possibly the custom partition scheme that they would have created, it doesn't really seem like a smart move.
Another one would be to start trimming down a bit our enabled options in order to reduce the size and to gain some extra space for users customisations. I've taken care some of the low hanging fruits, and we should probably take another go at it in the future (and add a size check in the image build somehow?)
Maxime
Maxime Ripard (3): ARM: sunxi: Disable USB host options by default ARM: sunxi: Disable FAT write by default efi_loader: Do not enable it by default for sunxi
arch/arm/Kconfig | 4 ---- lib/efi_loader/Kconfig | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-)
We can first enable Thumb2 build by default for 32-bit sunxi boards and this should fix Cubietruck problems.
$ cat .config | grep THUMB CONFIG_HAS_THUMB2=y # CONFIG_SYS_THUMB_BUILD is not set CONFIG_SPL_SYS_THUMB_BUILD=y
As a test, enabling CONFIG_SYS_THUMB_BUILD=y in Cubietruck_defconfig reduces the size of the resulting U-Boot binary.
== Before: ==
$ arm-linux-gnueabihf-size u-boot text data bss dec hex filename 489398 26492 249240 765130 bacca u-boot.orig
== After: ==
$ arm-linux-gnueabihf-size u-boot text data bss dec hex filename 366314 26492 249232 642038 9cbf6 u-boot
Yes, I would strongly encourage enabling Thumb2 support instead of removing various features.
I would also encourage looking at moving environment either "up", or switching to env in filesystem in the future as a "Yes, we broke your existing setup, but we gave you a real useful feature".