mbox series

[v3,0/2] sunxi: Fix boot of Cubietruk and al.

Message ID 20171020121614.9863-1-maxime.ripard@free-electrons.com
Headers show
Series sunxi: Fix boot of Cubietruk and al. | expand

Message

Maxime Ripard Oct. 20, 2017, 12:16 p.m. UTC
Hi

Most featureful boards, such as the Cubietruck, have been broken since
the release 2017.09 (the two variants of the Olinuxino-Lime2 and the
cubietruck at least, possibly more since then).

This is due to a size increase of the binary that will trip us across
the size we've been using in our default configuration since forever,
and widely distributed through the u-boot-sunxi-with-spl.bin file.

We would have several 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.

The second one would be to move the environment to a filesystem file,
which would also break all the existing users. This can be envisionned
as a long term fix though.

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. However, this will always result in pointless and
endless discussions, so let's move away from that.

The final one that has been implemented would be to just build U-Boot
using thumb2 to push back the issue until hopefully I'm no longer
maintainer or the switch to the env filesystem would have been done.

I've also added a patch to make sure that the compilation breaks and
that we can notice.

Maxime

Changes from v2:
  - Reorder the patches
  - Changed the wording of U-boot to U-Boot
  - Changed the hardcoded value for CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR


Maxime Ripard (2):
  sunxi: Enable THUMB build for the U-Boot binary
  sunxi: binman: Add U-Boot binary size check

 arch/arm/Kconfig               |  1 +
 arch/arm/dts/sunxi-u-boot.dtsi | 12 ++++++++++++
 2 files changed, 13 insertions(+)

Comments

Maxime Ripard Oct. 24, 2017, 7:50 a.m. UTC | #1
On Fri, Oct 20, 2017 at 02:16:12PM +0200, Maxime Ripard wrote:
> Hi

> 

> Most featureful boards, such as the Cubietruck, have been broken since

> the release 2017.09 (the two variants of the Olinuxino-Lime2 and the

> cubietruck at least, possibly more since then).

> 

> This is due to a size increase of the binary that will trip us across

> the size we've been using in our default configuration since forever,

> and widely distributed through the u-boot-sunxi-with-spl.bin file.

> 

> We would have several 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.

> 

> The second one would be to move the environment to a filesystem file,

> which would also break all the existing users. This can be envisionned

> as a long term fix though.

> 

> 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. However, this will always result in pointless and

> endless discussions, so let's move away from that.

> 

> The final one that has been implemented would be to just build U-Boot

> using thumb2 to push back the issue until hopefully I'm no longer

> maintainer or the switch to the env filesystem would have been done.

> 

> I've also added a patch to make sure that the compilation breaks and

> that we can notice.


Applied both, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com