How to install Debian to NAND

Revision as of 04:59, 23 December 2015 by LubOlimex (talk | contribs) (FAQ)

How to install Debian to the NAND memory

It is possible to install the official Debian Jessie images to the NAND memory of your A20 board.

Note that currently only the Debian Jessie images for the A20 boards contain such a NAND installation option.

How to do it?

1. Download and extract the latest official Debian Jessie image from the wiki article for your board. Note that the procedure below is not possible with the Wheezy releases, only with the Jessie ones.

The script would not work with custom images.

2. Write the image to a micro SD card using your favorite software (like Win32 Disc Imager or dd).

3. Insert the prepared card in your board and boot the board.

4. Establish connection to the command line interface of the board.

5. Execute nandinstall script.

6. Wait until Debian installs on the NAND memory (it takes around 10 minutes).

7. Shut down the board and remove the microSD card.

8. Now you can boot from the NAND memory.

FAQ

Q: I did everything like you explained above and when I boot from the NAND I receive only black screen. Nothing on the console. What did I do wrong???

A: You did nothing wrong. The script above was written and tested on board that already had Android installed on the NAND memory. The problem is related to the fact that we no longer load Android to the NAND memory of A20 boards. No Android on the NAND = script not working.

It seems that the problem is caused by boot0 and boot1 code on the device, boot0 and boot1 code is located at a special area, which only the tools released by Allwinner (PhoenixSuit) can access. The problem is that the tools are not open-source and no one knows what happens exactly.

There are two workarounds:

1) Install Android to the NAND first using PhoenixSuit or LiveSuit (depending on the board) and then perform the nandinstall script again. The wiki of each board has instructions and images for Android install via the USB.

2) If you prefer to use Linux computer:

You can use CT_NandBoot software - you need a Linux computer to set the proper boot0 and boot1 in the NAND. It is faster than using PhoenixSuit and loading Android images (it takes one command and ~20 seconds to set the NAND correct under Linux). Then you can use the nandinstall script mentioned in the beginning of the article.

How to do it:

  • Get the sources of the program on your Linux computer:


# git clone https://github.com/phelum/CT_NandBoot

  • Install libusb:


# sudo apt-get install libusb-1.0-0-dev

  • Compile the program:


# cd CT_NandBoot

# make

  • Put the board into bootloader mode (press recovery button; apply power, apply mini USB; release button) and execute:


sudo ./bootfix

  • Wait around 20 seconds process to finish


Now the board should be able to operate with the nandinstall script as usual.