A10 LIME Booting from NAND

Started by dexterq, March 11, 2014, 11:11:57 am

Previous topic - Next topic



I've soldered in 4GB NAND memory, missing 100nF capicitors and 10K rezistors.

NAND memory is readable and writable, all looks fine:

[    1.260519] [NAND] nand driver version: 0x2 0x9
[    1.311110] Dev Sunxi softw311 nand: part 1, start 2048, size 32768
[    1.322876] Dev Sunxi softw311 nand: part 2, start 34816, size 7747584
[    1.331411]  nand: nanda nandb
[    1.336993] [NAND]nand driver, ok.

Used many tutorials like:


But still no luck. u-boot do not start (there is no any activity on ttyS0).

I know that I'm missing something, but don't know what is it.

Can anybody point out me, what I'm doing wrong or not doing?



Its a long story and I don't know if it ends well..

I'm also desperately trying to boot from nand without success.

The secret sauce is that you have to have a mysterious/hidden boot loader that is placed in the first addresses of the flash, out the the main partitions. This code will be read by A10 when starting, if an SD card is not found.

It seems that this boot loader used to be actually two: boot0 and boot1. boot0 loads boot1 and boot1 searches the first FAT partition in nand for u-boot image and starts it.

It also seems it is not working that way anymore...Someone has been able to integrate boot0 + boot1 + u-boot into the same mysterious code, that is loaded directly. Look at the way the SD in A10 is working...

The problem is that nobody cared to do the same for booting from nand flash. u-boot and linux-sunxi with nand flash support are in a development tree branch where this is considered very low priority or ignored altogether.

With A13, at least you can flash an android image, and then reformat the partitions with nand-part and install linux. But yes, you need to use Livesuit to program the nand the first time, at least to program the damned SPL loader or whatever its called. After that it should be possible to dd it from the start of the flash and save it to program a fresh/virgin flash (I never managed to do that anyway).

For A10 there is nothing, not even an android image, so until further notice it is not possible to do.

Best regards


Always remember the only people who really know are at AW (Allwinner).  AW only publish some details.  Some more have been found out by unpaid volunteers giving up their spare time.  Like anyone, they do what interests them.

For more details, you may try asking AW.  Or join the volunteers and DIY.

The chips simply are largely undocumented.  AW could remedy that and do sound to be interested but currently that's all.



I've found the product that is using A10 Allwiner and boots from nand.
Sadly you have to purchase a module to download an image.



I've found them too.

They have quite interesting modules.

From the download page I am not completely sure they have actually something running from flash.
They just mention the software can be flashed with Phoenix suite or programmed into sd.
If you look at the image names they are named somethingSD. It's not obvious they are nand flash images.

If you look at sw resources, they just point to the same linux-sunxi and sunxi-bsp everybody is using...

I haven't looked into into sunxi-bsp lately, but will look again to see if something has changed.




They wroute:

"Prebuilt Images

Currently all of our firmware is distributed using the Allwinner Phoenix/LiveSuit format. Firmware can be flashed to the NAND using PhoenixSuit or to a MMC using PhoenixCard to create NAND installation or bootable cards. "

So i'm allmost sure that images are the nand's one.

However I've allready bought one of theirs development boards so we'll know soon.


and unfortunately they use Allwinner GPL violating boot binary blobs, hence can't be used to boot linux
linux-sunxi have work in progress for the MTD driver, we sent LIME with NAND Flash to the developer so GPL MTD driver will be done but nobody knows when



Nice to see Im not the only crazy one, soldering stuff to the board.



I had some sucess booting from the new soldered nand flash.

Please take into account that I don't have solid knowledge in this field, but I love to risk and experiment 8)

This is what I did, after a lot of googling:

I followed this guide: http://www.pcduino.com/os-image-install-notes/

In my case downloaded a10_kernel_disk32Imager_20130403.img from http://www.pcduino.com/download/
and writed it to a microsd card (in my case in /dev/sdb):

sudo dd if=./a10_kernel_disk32Imager_20130403.img of=/dev/sdb bs=1M

Then plugged the card in the A10 Lime and plugged the power. Nothing showed up in the screen. Waited about 2 or 3 minutes and unplugged.

shutdown, unplug power, remove the card, plug power

A linux logo appears and a message looking sd cards/usb drives with the update.sh and ubuntu image, as described in the guide above.

I tried to boot with that files in an sd or in the usb but it couldn't find them. Looking at the update.sh script, it just makes a dd of the image into the /dev/nandd partition

Downloaded pcduino_ubuntu_factory_20130906.7z from http://www.pcduino.com/download/ and extracted pcduino_ubuntu_20130906.img to and usb pen drive.

Booted with another SD containing the Olimex official debian. Booted normally.

Plugged and mounted the usb drive, opened a terminal and writed pcduino_ubuntu_20130906.img to /dev/nandd:

sudo dd if=/media/TOSHIBA/pcduino_ubuntu_20130906.img of=/dev/nandd bs=4M && sync

shutdown and unplug, remove sd card, plug power again

A blank screen appears with a blinking cursor. Hit ctrl-c and voila! linux console as root, but no X and no apt...

But now I don't know how to continue. It is obvious that the contents of /dev/nanda are specifically configured for the pcduino, and don't know what to change/replace there, and prefer to ask for advice before trying the compile-it-yourself way (http://linux-sunxi.org/Installing_to_NAND).

Any advice?



Hi dexterq,

There is one more board with A10 - Cubieboard, that is with higher price that Olimex's boards, but
there is Debian for that boards running from SD and NAND with u-boot.
You can try it on A10 Lime board http://cubian.org/downloads/

Here is the installation howto https://github.com/cubieplayer/cubian/wiki/Install-Cubian
Only one fix must be perform by hand in NAND/boot/uEnv.txt change
root=/dev/mmc0p1 rootwait    to  root=/dev/nandb rootwait
after nand installation.

Here is more info: http://linux-sunxi.org/Cubieboard

I'm interested in booting A13 from NAND flash and I will make some experiments, when my
board arrive.

Hope that some info will help!

@ Olimex - sorry that I'm posting links with concurrent boards, but the idea is to get experience from
there and make OLinuXino better. 


Hi Guys,
any progress on booting directly from NAND on A10-olinuxino-lime?



there is also forum thread about booting from A10-olinuxino-Lime NAND, https://www.olimex.com/forum/index.php?topic=3251.0, where is solution how to boot from NAND thaks to @pepahajek

It is not fully open source solution, but for test purposes it works.