[U-Boot] at91rm9200 linking problem (?)

Andreas Bießmann andreas.devel at googlemail.com
Mon Jun 20 11:04:06 CEST 2011


Dear Marcin Górski,

Am 20.06.2011 10:36, schrieb Marcin Górski:
> Hello,
> 
> I'm trying to port U-Boot to ARM&EVA board (with AT92RM9200 cpu). I'm a little bit confused about usage of CONFIG_SYS_TEXT_BASE macro. As mentioned many times before U-Boot shouldn't be run from RAM, so I set CONFIG_SYS_TEXT_BASE to point a DataFlash memory. But when I do that not only .text section but also .data and .bss sections are linked to flash memory. When I run U-Boot I get "prefetch_abort" exception (which I believe is due to invalid memory location access). On the other hand, when I set  CONFIG_SYS_TEXT_BASE to point to RAM location U-Boot hangs just after the start:

unfortunately I did not get at91rm9200ek working to boot from NOR flash
or dataflash correctly. I'm working on that, but only in my rare spare
time. If you get it working, please tell it to me.

> U-Boot> go 0x22000000
> ## Starting application at 0x22000000 ...
> 
> U-Boot 2011.03 (Jun 20 2011 - 00:56:19)
> 
> DRAM:  1 MiB
> 
> To load a new image I use an old version of U-Boot (1.1.6) that was previously installed on this board.  This is the very first time when I use U-Boot , any suggestion will be appreciated.

That is Ok, but you need to SKIP_LOWLEVEL_INIT (or similar) to prevent
the start.S to re-initiate the SDRAM (which was done by the first
loader, u-boot 1.1.6 here).

You need to link your new U-Boot to an address somewhere in SDRAM (e.g.
0x22000000, if your system has more than 32MiB) and then use the first
stage loader (u-boot 1.1.6 here) to transfer the new u-boot exactely to
that address! But keep in mind to _not_ touch the SDRAM configuration if
you have some data in SDRAM ;)

You can use the at91bootstarp as first stage bootloader in future. But I
recommend you to invest some time to get U-Boot as SPL working on that
architecture.

regards

Andreas Bießmann


More information about the U-Boot mailing list