On Mon, 31 Aug 2015 13:53:26 +0200
Hans de Goede <[email protected]> wrote:

> Hi,
> 
> On 31-08-15 12:24, Siarhei Siamashka wrote:
> > On Sun, 30 Aug 2015 11:59:10 +0200
> > Hans de Goede <[email protected]> wrote:
> >
> >> Hi,
> >>
> >> On 29-08-15 08:33, Siarhei Siamashka wrote:
> >>> This is a set of patches, which are intended to eventually support booting
> >>> Allwinner A80 over USB with the "fel spl" and "fel uboot" commands.
> >>>
> >>> The memory map in Allwinner A80 differs from all the other known
> >>> Allwinner SoC variant. The SPL (or BOOT0) load location is now moved
> >>> to 0x10000 from 0x0, which means that we can't have this address
> >>> hardcoded in the 'fel' tool, but need to make it configurable.
> >>>
> >>> Additionally, "fel: Report FEL stack pointers" improves diagnostic
> >>> messages by reporting the stack locations. Also "fel-to-spl-thunk.S:
> >>> Fix safety guard which checks for enabled cache" and "Makefile:
> >>> 'fel' tool depends on fel-to-spl-thunk.h" provide fixes for a few
> >>> minor problems, discovered when working on this code.
> >>>
> >>> The last patch "fel: add fel spl support for A80" has not been
> >>> fully tested on real A80 hardware yet (to boot at least the SD card
> >>> variant of BOOT0), so it should not be applied until somebody
> >>> confirms that it actually works.
> >>>
> >>>
> >>> Siarhei Siamashka (6):
> >>>     fel: Report FEL stack pointers
> >>>     fel: get rid of the FEL_EXEC_SCRATCH_AREA constant
> >>>     fel-to-spl-thunk.S: Fix safety guard which checks for enabled cache
> >>>     Makefile: 'fel' tool depends on fel-to-spl-thunk.h
> >>>     fel: Make the SPL load address configurable instead of hardcoded 0x0
> >>>     fel: add fel spl support for A80
> >>
> >> The entire series looks good to me and is:
> >>
> >> Acked-by: Hans de Goede <[email protected]>
> >
> > Thanks.
> >
> > Do you mean everything except for the last patch? I think that it should
> > not be pushed until somebody confirms that everything works fine on A80.
> > Right now the 'fel' tool prints a warning about unsupported SoC
> > type
> 
> Only for the fel spl / fel uboot commands, right?

Yes.

> , so people can easily get a good idea about what's going on if
> > it fails to work. But if we push untested A80 support and something
> > is wrong with it, then this situation would become more confusing for
> > the end users, which is undesirable.
> >
> > I hope that somebody can find time to do testing on Allwinner A80 and
> > report the results:
> >      http://linux-sunxi.org/FEL/USBBoot#Testing
> 
> I've fel booted the a80 in the past using some prebuilt fel capable
> boot0 binaries from allwinner. But I've always used write + exec for
> this never the spl command.

Here is some explanation about the differences between the usage of
the "spl" command and the "write + exec" approach:
    
http://linux-sunxi.org/FEL/USBBoot#General_description_of_the_.22fel_uboot.22_command_implementation

> Do you expect the spl command to work with a boot0 binary, rather
> then an actual spl binary ? If so I can give this a test, may be
> a while before I can make some time for this though.

It does not matter. We should be able to load the initial SRAM-only
part of any bootloader. The special support for FEL mode in the U-Boot
SPL is only needed to temporarily transfer control back to FEL. But any
bootloader should run and at least print something to the serial console.
This is enough to confirm that it works.


And there is one more (and a bit more advanced) task to improve A80
support in sunxi-tools. We need to also update the 'fel-sdboot.sunxi'
SD card image (it boots from the SD card and switches the device
into FEL mode without the need to press any buttons). Somebody needs
to look into Allwinner's bootloader sources and tweak
    https://github.com/linux-sunxi/sunxi-tools/blob/master/fel-sdboot.c

We can have a single unified 'fel-sdboot.sunxi' image for all SoC
variants by checking
    http://linux-sunxi.org/SRAM_Controller_Register_Guide#SRAM_VER_REG
But the code also needs to become position independent, so rewriting
it from C to ASM is probably also required.

-- 
Best regards,
Siarhei Siamashka

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to