[U-Boot] [PATCH 0/3] sunxi: Fix boot of Cubietruk and al.

Maxime Ripard maxime.ripard at free-electrons.com
Thu Oct 19 13:26:24 UTC 2017


Hi Siarhei,

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 at 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

I just gave it a try, and indeed it solves the issue for all the
boards. Thanks for the suggestion!

I'll send the patches.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171019/92dd9a42/attachment.sig>


More information about the U-Boot mailing list