On Thu, Oct 19, 2017 at 09:28:03AM -0400, Tom Rini wrote: > On Thu, Oct 19, 2017 at 10:26:46AM +0200, Maxime Ripard 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?) > > So, where is the over-run exactly? We have CONFIG_SPL_MAX_SIZE to > ensure that we have SPL fitting within constraints. For U-Boot itself > we don't have a generic check but it's usually done with a custom linker > script (which could in turn just #include the regular one I think).
The overlap is between the end of the U-Boot binary (so SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR in this case + U-Boot size) and ENV_OFFSET. I've been able to add a check in the u-boot-sunxi-with-spl.bin for the size, but I guess we could have something generic as well. This seems to not be very trivial to do though, since some offsets (ENV_OFFSET) are in bytes, and some other in storage units (SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR in blocks, SYS_SPI_U_BOOT_OFFS and SYS_NAND_U_BOOT_OFFS in bytes), and then some other are just booting from a partition and we can't really do anything there. I'll send the patches, let's start the discussion from there. Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
signature.asc
Description: PGP signature
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot