[U-Boot] [PATCH v3 00/10] sunxi: Bug fixes, sun4i and sun5i support and network improvements

Hans de Goede
2014-07-09T08:44:33Z

Hi,

On 07/09/2014 10:00 AM, Ian Campbell wrote:
> On Tue, 2014-07-08 at 09:47 +0200, Hans de Goede wrote:
>> Have you looked at extending the SPL buildsys bits, which in essence do
>> 2 builds, to do 3 builds for sunxi, so that we simply always build
>> both SPL flavors?
>
> I hadn't thought of it. Is it only the SPL binary which differs between
> FEL and non-FEL then?

AFAIK, Yes.

Note an alternative to doing 3 builds would be to move the load
address for the mmc spl to 0x2000 too, and to change the mmc spl
header to jump to 0x2000 instead of 0x20. The question here is
if the spl with mmc support will fit if we don't use the first
0x2000 bytes. One thing we could do is move the stack to another
sram area (the area where we later copy the PSCI code for example),
which will free up some space.

We would then also need to modify the unified SPL to detect
whether it has booted from mmc or FEL, and only try to load the
real u-boot from mmc in the mmc boot case.

If we do this, we would just need to modify the final build steps
of the SPL build a bit to produce both SPL flavors.

I guess the big question is if we can make the mmc spl fit if
we load it at 0x2000. If you're interested in working on this
you should probably talk to hno about this. Another complication
is that the brom uses some of the 32k sram at address 0 when in
fel mode, so I think you cannot use all of it. hno can probably
give more details here about which bits of the first 32k sram
are used by the brom in fel mode and in mmc mode.

Regards,

Hans