[U-Boot] Reactivating at91sam9rl

uprinz uprinz2 at netscape.net
Sun Jan 23 22:37:42 CET 2011


Hi!
I am new in here, so first a kind 'hello' to everyone in here.

I wanted to linux-ify a given board that is very similar to a AT91SAM9RL-EK.
Similar but not equal as it misses the LEDs and the dataflash. But I'd like
to add network later.

So here is a short summary of the story how I proceeded so you know what way
I took and whre you might jump in and help me a bit.

I got openocd more or less working with the board. I.e. I can control the
CPU and up-/download something to SRAM. So I was able to download a small
application. 

When this app worked, I adapted the original Atmel bootloader to my board,
as I have no dataflash and a so far unknown NAND Flash and I modified the
SDRAM setup. Loading the modded bootloader and executing it works fine. A
self written little memory test shows a working SDRAM. 

As the NAND is still empty I let the memory test active in the bootloader to
get a long boot delay. In that delay I could HALT the CPU and upload the
u-boot version 1.3.4 from the linux4sam buildroot demo code.
With a resume 0x23f00000 the u-boot started. Yea! I thought. 
With that u-boot I copied the bootloader and the u-boot itself into NAND and
setup up some enviroment variables. Saved and did a reset...

Outch: After the bootloader starts u-boot the u-boot fails at some NAND
things:
U-Boot 1.3.4 (Sep 24 2009 - 16:56:53)

DRAM:  64 MB
NAND:  nand_scan(): Cannot allocate oob_buf
0 MiB
Error Timeout

Now, If I reset the system, let the bootloader start, HALT the CPU and
upload u-boot via JTAG, and again resume it, it again works fine!

So I crawled the u-boot code and saw that there are some NAND chips listed
but my one is not in. So I flt I have to compile a version myself.

I had used buildroot with at91rm9200 two years ago with success, so I gave
it a try. But the version from linux4sam is horribly outdated. I think I
could spend hours by replacing links and recompile. It failed at the
beginning of the toolchain already...

So I started with a fresh checked out git version of u-boot and tried mixed
linux/windows work with yagarto. Unfortunately the initial configuration
doesn't work under windows, so I switched to linux completely and started
with a make at91sam9rlek_config, make.

I didn't get very far until the first compiler errors appear. Looks like
at91sam9rl is very old for u-boot too.

It started with a message that I had to define CONFIG_AT91FAMILY for that
chip. 
I added that one to the config.mk as it was with other at91sam9xxx cpus.

Later I got 'lost in the Matrix' :) as the legacy driver or lowlevel_init.S
likes to initialize the matrix controller of the CPU abut the defines for
SAM9RL are missing. I could find only two of the needed lines, but there is
one with an offset that I didn't understand.

Then I found out that in some older code there was no line telling about
legacy, so I disabled this define:
//#define CONFIG_AT91_LEGACY

Now it got very far but then compiling aborted with lots of missing hardware
defines like AT91_PIN_PBx, so the GPIOs where broken without the legacy
info. And the USARTs/DBGU where too.
It claims about dataflash related things, so I disabled the dataflash, I
thougt... But that doesn't help, I cannot find any #define or #undef that
declares dataflash to not exist on that board.

Now I'm a bit lost. Does someone have a working version of u-boot for
at91sam9rl, working in the meaning of compiling through? Or can someone give
me some hints of how to reactivate the at91sam9rl again. 

Many thanks in advance and best regards
Ulrich



-----
Best regards
Ulrich
-- 
View this message in context: http://old.nabble.com/Reactivating-at91sam9rl-tp30744086p30744086.html
Sent from the Uboot - Users mailing list archive at Nabble.com.



More information about the U-Boot mailing list