Reply by Thomas December 11, 20092009-12-11
Hi Santiago,

we went through the thing already.
As Atmel support was below poor we had to do this ourselves.
Basically, I do not understand why Atmel is not tuning their SW and tools to provide better support.
SD on SAM9263 should be a "available and for free" by Atmel.

When we decided to do this, we didn`t know that 2 engineers are going to be made 100% busy plus overtime for 60 days. This is for boot, u-boot linux, ramdisk-buildroot Certainly we have to take into account: It took a long time as this is our first project for linux.

The first trap:
We were happy to discover at91bootstrap project Version 3.0 on the ATMEL www.
That thing was able to start from SD.
It loaded and started u-boot.
Everything seemed to be fine.

The second trap:
We drilled the changes for the SD into u-boot.
u-boot could start self developed apps form the SD and apps seemed to be running fine.

This is what we discovered:
when u-boot started linux...but linux crashed.
We thought for long time, something wrong in our u-boot sd implementation.
The we even tried to fined a fault in linux.
we hoovered throught the buildroot.

20 nights later:
we discovered that the culprit is the ATMEL Bootstrap V3.0.
Although it starts the u-boot nicely, it leaves already the evil somewhere in the system that makes it impossible for Linux to start up.

The Plan for boot:
We found out the other boot project from ATMEL boot version 1.14 was able to start the u-boot/Linux chain correctly although from on-board flash only. We decided to learn the boot114 to handle SD in the same way veriosn3.0 is doing it. We introduced a folder "sd" in the same directory level where "nand" "nor" folder was. From there we worked forward and pulled the files reqired from the version3.

The third trap:
at91bootstrap Version3 can be started form sd1 by romboot. But then it wants to load the application from sd0.
So you need 2 physical sd slots loaded each with a sd card.
Thank you, Atmel.

And some more work to do: Dive into the sd related code and introduce your changes there to make it dealing with sd1 only.

( doings for the u-boot to follow...)

Cheers
Thomas

--- In A..., "Thomas" wrote:
>
>
> > It is a bit difficult because the bootstrap must include the SD card
> > functionality and the bootstrap must have knowledge of the file system on
> > the SD crad.
> Hey, this is the eeeeeasy part. Standard.
>
>
> > I am not sure of the internal SRAM on AT91SAM9263/AT91SAM9g20 ,because as
> > far as I know the size of the bootstrap shouldn't exceed the internal SRAM
> Plenty of space.
> with at91sam9263 = 80k even less than half is sufficient.
>
> Hurdles are in other places.
> cheer
> Thomas
>

Reply by Thomas December 6, 20092009-12-06
> It is a bit difficult because the bootstrap must include the SD card
> functionality and the bootstrap must have knowledge of the file system on
> the SD crad.
Hey, this is the eeeeeasy part. Standard.

> I am not sure of the internal SRAM on AT91SAM9263/AT91SAM9g20 ,because as
> far as I know the size of the bootstrap shouldn't exceed the internal SRAM
Plenty of space.
with at91sam9263 = 80k even less than half is sufficient.

Hurdles are in other places.
cheer
Thomas

Reply by vishnu Tadepalli December 6, 20092009-12-06
Hi,

It is a bit difficult because the bootstrap must include the SD card
functionality and the bootstrap must have knowledge of the file system on
the SD crad.

I am not sure of the internal SRAM on AT91SAM9263/AT91SAM9g20 ,because as
far as I know the size of the bootstrap shouldn't exceed the internal SRAM
size.

Regards
T.V.R.Prasad

On Sun, Dec 6, 2009 at 5:16 PM, Santiago Morrison wrote:

> at91sam9263 and at91sam9g20
>
> --- On *Sat, 12/5/09, thomasschulte * wrote:
> From: thomasschulte
> Subject: [AT91SAM] Re: AT91Bootstrap and U-Boot
> To: A...
> Date: Saturday, December 5, 2009, 3:25 PM
> > I need to boot an AT91SAM from SD Card
> > and read , the U-Boot and the a linux image from SD Card as well
> >
> > As you know the At91Bootstrap has no support for booting from SD Card .
> > usually runs from Nor Flash / DataFlash
> >
> > does someone have info about how to modify the source of the
> AT91bootstrap and the u-boot to do it ?
>
> yes.
> did it.
> it is no fun.
> What mcu?
>
> cheers
> Thomas
>
>
>
Reply by Santiago Morrison December 6, 20092009-12-06
at91sam9263 and at91sam9g20

--- On Sat, 12/5/09, thomasschulte wrote:

From: thomasschulte
Subject: [AT91SAM] Re: AT91Bootstrap and U-Boot
To: A...
Date: Saturday, December 5, 2009, 3:25 PM

 

> I need to  boot an AT91SAM from SD Card

> and read , the U-Boot and the a linux image from SD Card as well

>

> As you know the At91Bootstrap has no support for booting from SD Card .

> usually runs from Nor Flash / DataFlash

>

> does  someone have info about  how to modify the source of the AT91bootstrap and the u-boot to do it ?

yes.

did it.

it is no fun.

What mcu?

cheers

Thomas
Reply by thomasschulte December 5, 20092009-12-05
> I need to boot an AT91SAM from SD Card
> and read , the U-Boot and the a linux image from SD Card as well
>
> As you know the At91Bootstrap has no support for booting from SD Card .
> usually runs from Nor Flash / DataFlash
>
> does someone have info about how to modify the source of the AT91bootstrap and the u-boot to do it ?

yes.
did it.
it is no fun.
What mcu?

cheers
Thomas

Reply by Amandeep Bhullar December 3, 20092009-12-03
Hi

I am afraid AT92 Bootstrap does not have support for that. I also want to
run everything from SDCard eliminating the need of having NAND flash or Data
Flash on the board.

In the latest version of U-boot source code; I went through
./doc/README.at91 file and noticed that it was possible to build U-boot only
in two ways where U-boot environment variables can only be stored either in
NAND Flash or DataFlash (or Nor Flash in AT91SAM9263), meaning U-boot must
reside in either DataFlash or NAND Flash (as I understand it). Hence, one
way (that I know so far) is to keep Bootstrap, U-boot in NAND Flash (or
DataFlash) and let U-boot use the Linux image and filesystem from the SD
card. For that we need latest version of U-boot and use mmcinit command to
initialize SD Card support in U-boot.

I put the same question as yours a couple of days back and Mr. Vishnu (an
expert on all this) is going to look into the source code to see if it is
possible at all to build the Bootstrap and U-boot with SD card support. I
will update you as soon as i hear anything.

Aman.
On Thu, Dec 3, 2009 at 6:40 AM, Santiago Morrison wrote:

> Hi all
> I need to boot an AT91SAM from SD Card
> and read , the U-Boot and the a linux image from SD Card as well
>
> As you know the At91Bootstrap has no support for booting from SD Card .
> usually runs from Nor Flash / DataFlash
>
> does someone have info about how to modify the source of the
> AT91bootstrap and the u-boot to do it ?
> Regards
>
> Santiago

--
--
Amandeep
Reply by Santiago Morrison December 3, 20092009-12-03
Hi all
I need to boot an AT91SAM from SD Card
and read , the U-Boot and the a linux image from SD Card as well

As you know the At91Bootstrap has no support for booting from SD Card .
usually runs from Nor Flash / DataFlash

does someone have info about how to modify the source of the AT91bootstrap and the u-boot to do it ?
Regards

Santiago