How to install Debian on NAND in A20-MICRO?

Started by iso9660, October 17, 2013, 06:58:28 PM

Previous topic - Next topic

JohnS

Very old thread so don't expect any reply.

Olimex and others have posted things on here, the net, etc, so go reading...

John

lauhub

Yes, I also noticed that last answer was in May 2015, so I have hope :)

I already read a lot, and as Mad Demus seems to have some information, I just ask.

luimarma

As some people have problems following the installation and it was also not workking for me with the last stable olimex image (wheez release 10), I add here what I have found usefull in my case.
The latest oficial image has nand support compiled as a module and not static in the kernel, thus  the root file system cannot be mounted.
I wanted to avoid the fact of recompiling the kernel, instead I created a uImage with the kernel untouched and a initramfs with all molules in.
You can download it at https://drive.google.com/file/d/0B_9NYwOX30jYcE90WFJ2akJJcXc/view?usp=sharing
Copy this file to /mnt/nandc/boot as an aditional step of Mad Demus post (thanks for the post) just after
# mount /dev/nandc /mnt/nandc
Also I founf that also after this still the root could not be found, but in this case it was a naming convention problem.
Create a file called uEnv.txt under /mnt/nandc/boot and add the following line:
extraargs=root=/dev/nandc

If you follow Mad Demus post and add this two things to the recipe it will work like a charm.

LubOlimex

Hey guys,

The latest releases of the images for all A20 boards include a script for easy installation to the NAND memory. Links to torrents with the latest images are available at the wiki article for your board.

You need to prepare a microSD card with the latest Debian Jessie image for your board and then boot. Then execute "nandinstall" and wait. That is all you need to do.

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

oldpenguin

Hello all

Be sure to follow the advice that is written when flash programming is done

Pass 5: Checking group summary information
/dev/nandb: 39624/243360 files (0.2% non-contiguous), 220636/972528 blocks

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

That was my case. I had to download and compile bootfix (need libusb-1.0).
The procedure to start FEL mode is a bit tricky. You'd be better be an octopus to be able to do all these things at once  ;)
Connect power, press both reset and recovery buttons, connect mini usb cable, release reset button, and finally release the recovery button. The board is now in FEL mode.
Confirm running dmesg in the host system.
Now run ./bootfix
When it finishes, the board boots immediately from flash  :)

Its too bad there's no way to program the "hidden" part from the code itself.

Regards

pete_l

#80
Quote from: LubOlimex on November 23, 2015, 08:23:03 AM
Hey guys,

The latest releases of the images for all A20 boards include a script for easy installation to the NAND memory. Links to torrents with the latest images are available at the wiki article for your board.

You need to prepare a microSD card with the latest Debian Jessie image for your board and then boot. Then execute "nandinstall" and wait. That is all you need to do.

Best regards,
Lub/OLIMEX
OK just to make sure I'm crystal clear and there is no doubt. The "latest release" on the website at this time is Debian Jessie release 4: A20-OLinuXino-MICRO Debian Jessie with kernel 3.4.103+ release 11
Will this install onto NAND ?  ... stay tuned and I'll answer my own question  :D


.... and the answer is: yes it does. Write the 2GB image to an SD card, boot that, su to root, run nandinstall and sit back. No tricks, complications or intervention.
When you are asked to reboot, wait until all the LEDs stop flashing and the screen goes blue before pulling the power cord out.

Good job!

bpir1

#81
I have A20-Olinuxino-Micro with 4gb NAND flash olimex Board. I am trying to load the Debian jessie NAND image to NAND flash using method given in the following link.

https://www.olimex.com/wiki/How_to_install_Debian_to_NAND

I have downloaded the A20-OLinuXino-MICRO Debian Jessie with kernel 3.4.103+ release 14.img and installed into 8GB micro SD Card using Win 32 Disk Imager. Then I am using the nandinstall command but it is giving following error

root@A20-OLinuXino:~# nandinstall


#    #   ##   #####  #    # # #    #  ####
#    #  #  #  #    # ##   # # ##   # #    #
#    # #    # #    # # #  # # # #  # #
# ## # ###### #####  #  # # # #  # # #  ###
##  ## #    # #   #  #   ## # #   ## #    #
#    # #    # #    # #    # # #    #  ####


Your data on /dev/nand will lost, Are you sure to continue?[y/n] y
Re-partitioning NAND device
usage: /usr/lib/nandinstall/nand-part [-f a10|a20] nand-device
       /usr/lib/nandinstall/nand-part nand-device 'name2 len2 [usertype2]' ['name3 len3 [usertype3]'] ...
       /usr/lib/nandinstall/nand-part [-f a10|a20] nand-device start1 'name1 len1 [usertype1]' ['name2 len2 [usertype2]'] ...

Also I tried the nand-part command but the result is same only.
root@A20-OLinuXino:~# nand-part -f a20 /dev/nand
usage: nand-part [-f a10|a20] nand-device
       nand-part nand-device 'name2 len2 [usertype2]' ['name3 len3 [usertype3]'] ...
       nand-part [-f a10|a20] nand-device start1 'name1 len1 [usertype1]' ['name2 len2 [usertype2]'] ...
root@A20-OLinuXino:~#

Also there is no output through the HDMI display(Means no display output). I logged in with ssh and executed the commands. Also there is no /dev/nand file present.

Please help with this problem.

Thanks
Bpir1

JohnS

Maybe you're affected by the first thing in the FAQ in the link you posted?

John

bpir1

I tried the FAQ procedure also. But the problem is as soon as I connect the Olinuxino a20 Board to the computer with Phoenixsuit running, the computer will receive an exception and it will start rebooting.

I had followed the following procedure to load android to olinuxino a20 board.

https://www.olimex.com/wiki/A20-OLinuXino-MICRO#Android_images

But the result is same.
Please help me with this

Thanks

LubOlimex

Try as root - "sudo su nandinstall". If the problem persists please try to execute the script via serial connection (USB<->serial cable).

In all scenarios the script should complete successfully. If the boot regions are not properly configured, nothing would boot without a card. But the install script should complete successfully anyway. What you posted doesn't seem like an error.

Also try a few more times to execute the script (it bugs sometimes and stops in the beginning, I don't know why).

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

bpir1

Hi Thanks for the reply.

I have logged in to the Olinuxino A20 board using SSH connection with root as username and password as olimex. Then I am trying the nandinstall command.

root@A20-OLinuXino:~# nandinstall


#    #   ##   #####  #    # # #    #  ####
#    #  #  #  #    # ##   # # ##   # #    #
#    # #    # #    # # #  # # # #  # #
# ## # ###### #####  #  # # # #  # # #  ###
##  ## #    # #   #  #   ## # #   ## #    #
#    # #    # #    # #    # # #    #  ####


Your data on /dev/nand will lost, Are you sure to continue?[y/n] y
Re-partitioning NAND device
usage: /usr/lib/nandinstall/nand-part [-f a10|a20] nand-device
       /usr/lib/nandinstall/nand-part nand-device 'name2 len2 [usertype2]' ['name3 len3 [usertype3]'] ...
       /usr/lib/nandinstall/nand-part [-f a10|a20] nand-device start1 'name1 len1 [usertype1]' ['name2 len2 [usertype2]'] ...


Now I am trying to first load the official android image for Olinuxino A20 board using Phoenixsuit. But the thing is after loading for 5%, image loading is getting stuck.

Following is the screenshot of the phoenixsuit which gets stuck at the 5%.





Please help me with this.

bpir1

Hi,

I have a20-olinuxino-Micro with 4GB nand flash. I am using the A20-OLinuXino-MICRO_Debian_Jessie_with_kernel_3.4.103+_release_14.img. But the image is not having any of the NAND drivers. There are no files called /dev/nand, /dev/nanda, /dev/nandc.

Is their any debian images with nand drivers, Please Tell me what should I do?

Thanks

LubOlimex

Hello again,

I managed to get the same error if I try to run nandinstall script on a board with eMMC flash.

I believe that your board has eMMC flash instead of NAND flash.

If your board has eMMC memory instead of NAND memory, use the image suitable for eMMC and run ./emmc.sh script instead. Note that images for boards with NAND and eMMC are different. It is also explained here:

https://www.olimex.com/wiki/How_to_install_Debian_to_eMMC

The image suitable for A20-OLinuXino-eMMC is this one: https://www.olimex.com/wiki/images/c/cd/A20_OLinuxino_Micro_debian_Jessie_34_103_2G_EMMC_release_14.torrent

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

bpir1


Hi all,

I have A20-Olinuxino-Micro-n8gb NAND flash board. I am trying to install Linux NAND image. I have downloaded the linux image for NAND flash and gave nandinstall command but I am getting following error.


#    #   ##   #####  #    # # #    #  ####
#    #  #  #  #    # ##   # # ##   # #    #
#    # #    # #    # # #  # # # #  # #
# ## # ###### #####  #  # # # #  # # #  ###
##  ## #    # #   #  #   ## # #   ## #    #
#    # #    # #    # #    # # #    #  ####


Re-partitioning NAND device
check partition table copy 0: mbr: version 0xa7dfce57, magic �6}7߳
magic �6}7߳ is not softw411
check partition table copy 1: mbr: version 0xa7dfce57, magic �6}7߳
magic �6}7߳ is not softw411
check partition table copy 2: mbr: version 0xa7dfce57, magic �6}7߳
magic �6}7߳ is not softw411
check partition table copy 3: mbr: version 0xa7dfce57, magic �6}7߳
magic �6}7߳ is not softw411
all partition tables are bad!
check partition table copy 0: mbr: version 0xa7dfce57, magic �6}7߳
check partition table copy 1: mbr: version 0xa7dfce57, magic �6}7߳
check partition table copy 2: mbr: version 0xa7dfce57, magic �6}7߳
check partition table copy 3: mbr: version 0xa7dfce57, magic �6}7߳

ready to write new partition tables:
mbr: version 0x00000200, magic softw411
2 partitions
partition  1: class =         DISK, name =   bootloader, partition start =      128, partition size =    16384 user_type=0
partition  2: class =         DISK, name =        linux, partition start =    16512, partition size =        0 user_type=0

write new partition tables? (Y/N)

verifying new partition tables:
check partition table copy 0: mbr: version 0xa7dfce57, magic �6}7߳
magic �6}7߳ is not softw411
check partition table copy 1: mbr: version 0xa7dfce57, magic �6}7߳
magic �6}7߳ is not softw411
check partition table copy 2: mbr: version 0xa7dfce57, magic �6}7߳
magic �6}7߳ is not softw411
check partition table copy 3: mbr: version 0xa7dfce57, magic �6}7߳
magic �6}7߳ is not softw411
all partition tables are bad!
rereading partition table... returned 0
Check partition table

*** Re-partition NAND device /dev/nand failed, Partition table has damaged ***

To fix the partition table, You can try to run nandinstall again. If the error still there, then you need to use livesuit restore a factory image first, then run nandinstall.

After this error, I rerun nandinstall command, still same error. Please tell me the solution to it.

Thanks
Bpipi