Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: [SAM9-L9260] How to install linux
PostPosted: Mon Apr 11, 2011 4:53 pm 
Offline

Joined: Fri Apr 08, 2011 5:02 pm
Posts: 4
Hi!
I have the Olimex board SAM9-L9260. I was restored the default bootloader and kernel.
Now, when I connected board to power, bootloader hanging:
[code]RomBOOT
>

U-Boot 1.1.5 (Nov 2 2006 - 10:31:07)

DRAM: 64 MB
NAND: NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (<NULL> NAND 512MiB 3,)
2048 byte HW ECC not possible on 512 byte page size, fallback to SW ECC
512 MiB
DataFlash:AT45DB161
Nb pages: 4096
Page Size: 528
Size= 2162688 bytes
Logical address: 0xD0000000
Area 0: D0000000 to D0003FFF (RO)
Area 1: D0004000 to D0007FFF
Area 2: D0008000 to D0037FFF (RO)
Area 3: D0038000 to D020FFFF
In: serial
Out: serial
Err: serial
PHY not reset!!
Hit any key to stop autoboot: 0
Outside available DataFlash
Outside available DataFlash
## Booting image at 21500000 ...
Bad Magic Number
U-Boot>
[/code]
Is it bad ? How can I install linux on the board ?


Top
 Profile  
 
 Post subject: Re: [SAM9-L9260] How to install linux
PostPosted: Mon Apr 11, 2011 7:04 pm 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 574
That version of uBoot looks hideously old. Using 1.3.4 here on 9260/9G20 boards.

Become familiar with the LINUX4SAM materials http://www.at91.com/linux4sam/bin/view/Linux4SAM/

If the magic number is wrong it sounds like you are putting the kernel image at the wrong address within the data flash, or uBoot is using a different address (ie mismatch between you and software). Shouldn't the kernel be at 0x42000 within the dataflash?


Top
 Profile  
 
 Post subject: Re: [SAM9-L9260] How to install linux
PostPosted: Tue Apr 12, 2011 3:45 am 
Offline

Joined: Thu Apr 19, 2007 10:15 pm
Posts: 204
Location: USA
Hi there

You need to determine exactly what the default boot (or "autoboot") is doing: namely from where in DataFlash is the kernel image being read, and where in SDRAM is that image being written. This would all be in the "bootd" environment variable.

Use the "printenv" U-Boot command to display all of the environment variables (which probably didn't get restored).

Regards


Top
 Profile  
 
 Post subject: Re: [SAM9-L9260] How to install linux
PostPosted: Tue Apr 12, 2011 9:57 pm 
Offline

Joined: Fri Apr 08, 2011 5:02 pm
Posts: 4
Command printenv returns me:

U-Boot> printenv
bootdelay=3
baudrate=115200
bootcmd= cp.b 0xD0030000 0x21500000 0x0021BFD0; cp.b 0xD0300000 0x21100000 0x00400000; bootm 0x21500000
stdin=serial
stdout=serial
stderr=serial

Environment size: 173/16380 bytes
U-Boot>

While bootd returns me:

U-Boot> bootd
Outside available DataFlash
Outside available DataFlash
## Booting image at 21500000 ...
Bad Magic Number
U-Boot>

I don't know exactly what I must do next.


Top
 Profile  
 
 Post subject: Re: [SAM9-L9260] How to install linux
PostPosted: Tue Apr 12, 2011 10:35 pm 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 574
>>I don't know exactly what I must do next.

I'm not sure I'm hot to read all the documentation back to you, or go find it, so you might want to become more resourceful.

Suggest you download the AT91BootStrap and uBoot source, and examine it.

The "Outside available DataFlash" would seem to suggest the both the "cp.b" commands are FAILING. The boot THEN FAILS because there is no valid image at the location specified. You will need to revisit how you have put the kernel and file system images onto the DataFlash, and how you partitioned it. You'll need to investigate why the OLD version of uBoot is not working with your dataflash and/or board.

Compare your L9260 design against the reference design AT91SAM9260-EK board, and use that as starting point.

Have Olimex walk you through the board installation.


Top
 Profile  
 
 Post subject: Re: [SAM9-L9260] How to install linux
PostPosted: Wed Apr 13, 2011 4:23 am 
Offline

Joined: Thu Apr 19, 2007 10:15 pm
Posts: 204
Location: USA
Hi there

> This would all be in the "bootd" .

Oops. I need a refresher course on U-Boot.
The salient environment variable is "bootcmd", which in your case, is composed of 3 commands.

Look up the "cp" command at
http://www.denx.de/wiki/DULG/UBootCommandLineInterface
and you should be able to understand why each copy command generates an error. (Hint: what's the last (soft-mapped) location of DataFlash?)

Two copy commands in "bootcmd" are a bit unusual. The first copy would be for the kernel image. The second copy might be for the rootfs, but I'm not sure since I've never done it that way. The third command is the actual transfer of execution to the kernel.


> Area 0: D0000000 to D0003FFF (RO)
> Area 1: D0004000 to D0007FFF
> Area 2: D0008000 to D0037FFF (RO)
> Area 3: D0038000 to D020FFFF

You need to learn/validate how these DataFlash areas (aka partitions) are used.
Area 0 is usually allocated for holding the (second stage) bootloader binary image, and is write protected.
Area 1 is usually allocated for holding the environment variables of U-Boot.
Area 2 is usually allocated for holding the U-Boot binary image, and is write protected.
Area 3 is usually allocated for holding a Linux kernel image and filesystem.

If there really is a valid kernel image stored in Area 3 of DataFlash, then the two commands

cp.b 0xd0038000 0x21500000 0x1d8000
iminfo 0x21500000

should produce valid results (and hint what your "bootcmd" should be).

Regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 19 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: