On Tue, 3 Feb 2015 21:18:54 -0700 Simon Glass <s...@chromium.org> wrote:
> (What does FEL stand for?) That's a good question. I believe that it might be based on the "jump to fel" message from the console output of the Allwinner's BOOT0 bootloader: http://linux-sunxi.org/FEL#Serial_output Other than this, I don't know what this name stands for. In fact the FEL code has a special entry point at 0xffff0020, which is the target of this "jump to fel" action in BOOT0: https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff0000.s#L9 It initializes the USB hardware again, and I believe that this is the reason why I have some problems trying to use this method. So far the flow looks like this: 1. The SPL is uploaded to SRAM and executed (to initialize DRAM) and other things. 2. As the last step in the SPL ('return_to_fel' in your code), we just transfer control directly to 0xffff0020 instead of using the address from the lr register. 3. The USB stack in my PC seems to be a bit confused by the MBUS hardware re-init. For example, the next "fel ver" command fails for me with a timeout. However the follow up fel commands work fine, and I can successfully "write" and "exe" the main u-boot binary. The incomplete demo patch for the fel tool has been posted at http://lists.denx.de/pipermail/u-boot/2015-February/204024.html > This is an attempt to make sunxi's FEL code fit with the normal U-Boot > boot sequence instead of creating its own. > > Most of the FEL special-case code is removed, although I may have gone too > far with my changes to generate a u-boot-sunxi-with-spl.bin file even when > FEL is enabled. This may not be possible since the MMC stack makes SPL > too large for FEL anyway, although it may be possible for other boot > mediums. This is actually very good. If we can resolve the jump to 0xffff0020 problems (try to perform a clean USB shutdown before doing this?), then the SPL size limitation for USB booting is gone and we get a unified SPL binary for both SD card boot and boot over USB. With no need for a lot of special sunxi things in the U-Boot boot sequence. I'm going to have another look at it today in the evening to see if the remaining problems can be resolved. > This series is available at u-boot-dm, branch sunxi-working. Thanks a lot for this work. -- Best regards, Siarhei Siamashka _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot