A20-OLinuXIno-LIME2-4GB - install to NAND

Started by desu, April 28, 2017, 12:17:05 PM

Previous topic - Next topic

desu

Hi all,

Recently I bought a LIME2-4GB board with a NAND chip. It successfully boots from an SD card, but I can't make it boot from NAND.

nand-install script finishes well, but after reboot nothing happens.

I tried to use https://github.com/linux-sunxi/sunxi-livesuite.git, but when I choose Android image and attach the board, this error occurs:
pcall FAILED Tools_51.lua:38: attempt to perform arithmetic on local 'j' (a nil value) 2 209

I read everything I could find on linux-sunxi wiki, but still can't get what is the current (like, in 2017) way of using NAND with A20 CPU. Could someone provide an up-to-day info on this issue? My ultimate goal is to build mainline u-boot and mainline kernel for NAND flash, but now I want to at least start anything from NAND.

Any help would be highly appreciated.

LubOlimex

There is a chance that your board doesn't have the boot regions fixed. Try the CT_NandBoot fix described at the bottom of this wiki article: https://www.olimex.com/wiki/How_to_install_Debian_to_NAND

Which image are you using exactly (provide me with the link where you got it)?

Please test with this Debian image exactly: https://www.olimex.com/wiki/images/f/fe/A20-lime2_mainline_uboot_sunxi_kernel_3.4.103_jessie_NAND_rel_10.torrent

Best regards,
Lub/OLIMEX

Technical support and documentation manager at Olimex

desu

Thanks for the answer, Lub!

I tried the CT_NandBoot tool, but got the following error:
Quotelibusb usb_bulk_send error -1 (= LIBUSB_ERROR_IO)
Full log: https://pastebin.com/TAnjpR9H

Meanwhile, sunxi-fel tool works:
Quote$ sudo ./sunxi-fel version
AWUSBFEX soc=00001651(A20) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000

And yes, I am using the very same image (which I downloaded last week):
Quote$ md5sum a20-lime2_mainline_uboot_sunxi_kernel_3.4.103_jessie_NAND_rel_10.img
70a3b3b6317ecd531e47ea47ee9efa08  a20-lime2_mainline_uboot_sunxi_kernel_3.4.103_jessie_NAND_rel_10.img

Is there anything else I can do to debug this issue?

LubOlimex

#3
1) How much time did it take for the nandinstall script to complete?

2) Did it end up with the following lines:

"

*** Success! remember to REMOVE your SD card from board ***
*** Read http://tinyurl.com/qyee5k2, if the board won't boot from NAND ***

shutdown now?
"

3) When you try to boot without the SD card inserted, there is nothing printed over the UART debug? Also no LED blinking?

4) Also what are the contents of /boot/uEnv.txt (cat /boot/uEnv.txt)?

5) How do you power the board? The error that you get is a bit strange, as if it has something related to the USB ports (do you have USB cable attached to the board)?

By the way the fact that you purchased the board "recently" lowers the chance of improperly configured boot regions. These are properly configured here.

Best regards,
Lub/OLIMEX


Technical support and documentation manager at Olimex

desu

1) It took about 10 min to complete

2) Yes, you can see full log here: https://pastebin.com/Z4b2Lnq3 (I cut a couple of thousand lines in the middle)

3) That's correct - nothing in UART and no blinking

4)
Quote# cat /boot/uEnv.txt
root=/dev/mmcblk0p2

5) I use both USB OTG cable and external power. Tried each of them separately, too. Also tried another cable and another USB port on my computer.

Please note that even though I bought the board recently, I did it from a local reseller. The board itself might be old (how do I check it? it says Rev.C)

LubOlimex

The rest seems fine. If there was a hardware problem with the board - the script wouldn't succeed. For example, if the NAND was faulty the script wouldn't be able to run for more than a few seconds (can't format or copy files to something broken). Pretty sure the boot sectors are still not properly configured and the boot never happens (hence no messages at all).

I also tested the nandinstall script in the latest image on the LIME2-4GB boards that I have here and the installation and consequent boot work fine here.

I suspect the methods of fixing boot regions you tried so far haven't been successful. Unfortunately, I can't vouch for the Linux tools available for this task. Note that entering fel mode (with a card or sunxi-fel) is not equal to fixing boot regions. I have no experience with tools like sunxi-fel or CT_NandBoot myself so if somebody knows more about these tools feel free to contribute.

The only way to be sure that the boot sectors are properly configured is by uploading Android to the NAND of the board using PhoenixSuit. I recommend using a Windows machine or probably virtual machine of Windows (not sure about that) to run PhoenixSuit. Follow the instructions here: https://www.olimex.com/wiki/A20-OLinuXino-LIME2#How_to_download_new_Android_image_to_the_NAND_memory_of_my_A20_board.3F and use this image: https://www.olimex.com/wiki/images/a/a5/A20_Lime2_android_4_22_NAND_LCD7_HDMI_release1.torrent

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

desu

I finally managed to run it all from NAND by installing Android using PhoenixSuit on Windows (with external power connected).

Thanks, Lub