Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: mushketer888 on September 15, 2014, 04:16:00 PM

Title: Is it possible to boot from SD if i have NAND?
Post by: mushketer888 on September 15, 2014, 04:16:00 PM
Is it possible to boot from SD if i have NAND flash chip?
And how?
Title: Re: Is it possible to boot from SD if i have NAND?
Post by: dave-at-axon on September 15, 2014, 04:31:56 PM
Which OS?

I do this with Android all the time. I have an A20 with NAND but use MicroSD for developing and testing the Android builds and once I have it working, I move to NAND. It writes to the SD faster so ideal for during development. NAND runs faster of course but takes a lot longer to write to.

All you have to do is make sure you have a MicroSD version of the image and for NAND a valid version for that. To boot to NAND, just remove the MicroSD. To boot from MicroSD, insert that. :)
Title: Re: Is it possible to boot from SD if i have NAND?
Post by: mushketer888 on September 15, 2014, 04:38:23 PM
Just inserting an SD wow..easy :D
Hope it works that way

Im developing debian

You undestood me quite right (how to boot from nand or sd (switching boot mode))
big thanks
Title: Re: Is it possible to boot from SD if i have NAND?
Post by: mushketer888 on September 15, 2014, 04:47:15 PM
So the boot priority is:
1) SD
2) NAND

but it isnt mentioned anywhere (as i know) ..
Title: Re: Is it possible to boot from SD if i have NAND?
Post by: mushketer888 on September 15, 2014, 07:11:46 PM
NOPE!

it starts android from flash!
but doesnt start debian from sd
Title: Re: Is it possible to boot from SD if i have NAND?
Post by: dave-at-axon on September 16, 2014, 06:10:58 AM
Are you sure that the image on the SD was created to run from SD and you flashed it correctly.

Sorry, I don't know much about Debian but with Android it just works. No MicroSD with Android and it boots to NAND. Put in the MicroSD and it boots to the SD. I can confirm this by looking at the debug output.

Do you have a way to capture the debug output?
Title: Re: Is it possible to boot from SD if i have NAND?
Post by: mushketer888 on September 16, 2014, 11:33:49 AM
Only UART yet
It boots from NAND every time
I will double check all and try
Title: Re: Is it possible to boot from SD if i have NAND?
Post by: JohnS on September 16, 2014, 08:35:13 PM
It boots from SD before NAND if the SD has a valid image.  So there's your answer, it can't have a valid image.

Try linux-sunxi wiki for details of boot order etc.

John
Title: Re: Is it possible to boot from SD if i have NAND?
Post by: dave-at-axon on September 17, 2014, 05:35:42 AM
Check that the image on the SD is actually set for booting from SD. There is a setting in the FEX file which sets this and PhoenixSuit checks this when you programme the device. It must be set for SD or it will write to the NAND. I've found that if this is -1 then it will write to the SD if present and the NAND if not. I prefer to set this to the correct option.

If you have the DEBUG UART available, you can see which one PhoenixSuit uses when it programmes the image.
Title: Re: Is it possible to boot from SD if i have NAND?
Post by: mushketer888 on September 17, 2014, 03:16:16 PM
You all are absolutely right!
I wrote official .img and all is loading!
Thanks
Title: Re: Is it possible to boot from SD if i have NAND?
Post by: mushketer888 on September 17, 2014, 03:20:29 PM
But i was making all by tutorial
Strange