Hi, All!
I'm working on booting A20 (Olimex A20-SOM) from NAND. Due to lack of 
information/howtos and any kind of inctructions on the internet I had to 
start to make my own way. I've managed to build kernel (5.2.21) with NAND 
support. Tried to write U-Boot Olinuxino, denx U-Boot and sunxi-mainline 
U-Boot (all of them are built by me with A20-Olimex-SOM-EVB_defconfig) with 
flash_erase/nandwrite from linux. I tried to build so called boot0 image 
with sunxi-spl-image-builder (with u-boot.bin, u-boot-sunxi-with-spl.bin 
and sunxi-spl.bin as source). None of them started the board (not even a 
single message in UART). BROM reacts by falling to FEL-mode with all that 
"images" after reseting (this was important information for me in my next 
researches).
Then I've found "first" version of bootfix (CT_NandBoot), which "restores" 
proprietary boot0 and boot1 in NAND via FEL mode. And it did - boot0 and 
boot1 start and hang (NAND was empty at that moment). But at that moment I 
knew that my board and its NAND are healthy and can boot from NAND. Then I 
tried nandinstall from proprietary Debian 8 system. It created (I suppose 
by means of nand-part) "bootloader" partition (starting from 128 block and 
16384 blocks size). The system (BROM->boot0->boot1) started old proprietary 
SUNXI U-Boot that was written to NAND by nandinstall script. Okay, my next 
idea was to replace u-boot.bin in nanda ("bootloader") partition with my. I 
did it with Debian 8. And boot0/boot1 started my U-Boot. But unluckily scsi 
operations (reset, scan) hang the board. Replacing u-boot.bin with 
u-boot-sunxi-with-spl.bin lead to hang after "jump to". It looks like two 
SPLs (U-Boot's and Allwinner's) conflict.
Then I tried to replace boot0 and boot1 files in bootfix - it rejected to 
upload them despite they had eGON BT signature. Then accidentally I've 
found "second" bootfix which allows to upload any files as boot0 and boot1 
(FEX still can reject data on A20 side).
But none of my images worked. But (!) on some of them, sunxi-spl.bin, for 
example, A20 does not fall to FEL-mode. This means that it kinda starts my 
SPL, but hangs.
I tried to load my u-boot-sunxi-with-spl.bin via FEL (sunxi-fel uboot 
u-boot-sunxi-with-spl.bin). And it starts normally and scsi works.
"second" bootfix contains files sunxi-spl.bin_last_ok and 
u-boot-dtb.bin_last_ok (no config is included). I've uploaded them by means 
of bootfix and this SPL starts from NAND. But prints:

U-Boot SPL 2017.11-dirty (Mar 30 2018 - 22:22:01)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from NAND
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###


May be this is because it's built for A20 Lime2 (it contains string 
"sun7i-a20-olinuxino-lime2"). But that means that U-Boot _can_ be built for 
NAND and can be written via FEL + bootfix (this is pretty nice method) 
without proprietary boot0/boot1.
At this point I'm stuck.
What do I do wrong? How can I build U-Boot with correct signature for A20 
BROM which can be flashed to NAND?

P.S.
I don't need to put kernel in NAND, loading kernel from SATA is okay. It's 
all about excluding SD-card from boot process by any available schema.

P.P.S.
Sorry for my language.

-- 
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 linux-sunxi+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/ae16e179-7629-4537-97ce-3e2d9e05a4dcn%40googlegroups.com.

Reply via email to