It looks like a cool device.
I think you may be able to dump the original firmware using
"spiflash-read" command of the sunxi-fel tool after you boot the device
into the FEL mode.
By the way, some of the information there is outdated but the rest may
be useful in the following wiki page:
http://linux-sunxi.org/Retrieving_device_information
Regards,
Gediz
That's good news.
> But attempts to read anything from it are failing with time out.
> sudo ./sunxi-fel read 0x42400000 0x82d0 boot1.header
> sudo ./sunxi-fel read 0x43000000 0x20000 script.bin
>
> The exact error message is: usb_bulk_send() ERROR -7: Operation timed out
>
> What could be the cause of this ?
Memory space for A10 (sun4i) starts from 0x40000000 according to the
memory map (http://linux-sunxi.org/Memory_map). 0x42400000 and
0x43000000 are in the range of the general memory space so this is an
attempt to reach the DRAM. If DRAM memory controller is not initialized
yet, trying to access to the mentioned addresses may fail. You may
consider using "sunxi-fel spl" or "sunxi-fel uboot" commands and
initialize the DRAM first. But you would need an SPL (sunxi-spl.bin) or
U-Boot (u-boot-sunxi-with) file, produced by U-Boot. Further information
can be found on the help output of the sunxi-fel tool.
On 10.09.2020 15:09, Adrian N wrote:
> I only noticed now Gediz that you mentioned 'spiflash-read', not 'read'.
> So I tried again. No luck.
>
> sudo ./sunxi-fel spiflash-info
>
> says:
>
> SPI support not implemented yet for 1623 (A10)!
>
> So what are the options now?
It's really interesting because as far as I know, SPI flash controller
of A10, A13 and A20 are too much similar if not completely same and
apparently A13 and A20 are supported by sunxi-fel. I did not work with
any board that is powered by A10 before but the first thing I'd do is a
dirty hack: adding 0x1623 to the list of the supported devices (in here
https://github.com/linux-sunxi/sunxi-tools/blob/7fe6024211ffed3024b0491ee9f2a19c17848c12/fel-spiflash.c#L154)
and see the result. I really have no other idea.
On 10.09.2020 15:36, Adrian N wrote:
> But, maybe the timeout is caused by the device not really having that
> much memory.
> So I tried with a lower address, sudo ./sunxi-fel read 0x0 0x90000
> xxxx.bin and it did work
According to the memory map, again, SRAM (on-chip RAM which does not
require an external init routine) starts from address 0x0 and goes until
0x0002ffff. But 0x90000 exceeds even after the Bank B of the SRAM so
0x90000 is probably not a valid address. So "xxxx.bin" is partly the
contents of the SRAM, and remaining part is most likely zero filled.
You're welcome. I'm glad it worked out. It would be even better to be
able to debug the board with a console. I think 128 MBs of DRAM and 16
MBs of SPI flash can easily handle a modest application. You can do it.
On 14.09.2020 10:27, Adrian N wrote:
> Hi,
>
> I've created a trivial PR for adding SPI flash support for A10 :
> https://github.com/linux-sunxi/sunxi-tools/pull/138
> It seems that nothing more was needed, just adding the ID to the
> supported list.
>
> Thanks!
That's cool. Our next fellow hacker won't have to tinker around. And I
admire you, by the way. I'm using sunxi-fel for around two years and did
not have an opportunity to contribute to the tool :)
So, thank you too!