[U-Boot-Users] u-boot as second stage boot loader

Hi!
I've got an at 91 rm 9200 based board with a 2MB _SERIAL_ flash connected to it. Since the flash is serial, it is not mapped to memory, and the board cannot boot from it. However, the first 16kbyte of this serial flash gets copied into the 16kbyte SRAM of the processor. Now I have a small boot loader loaded into the SRAM which initializes the SDRAM, can load pages from the serial flash, talk on the serial line,etc.
The next step would be to load u-boot as a second stage boot loader, however how can someone do this?
The memory configuration is like this: 0x0-0x4000 processor SRAM 0x4000-0x8000 processor ROM 0x20000000-0x21000000 SDRAM
As it can be seen, the SRAM is too small for the 80-90kbyte u-boot image... What is the solution? Maybe i could take the u-boot image apart, and copy the code before relocation into the sram and the code after relocation into SDRAM and then make a "mov r5,#0;mov pc,r5"?
Any help is appreciated! Regards, Zo

In message 1095763351.12961.9.camel@dual you wrote:
I've got an at 91 rm 9200 based board with a 2MB _SERIAL_ flash connected to it. Since the flash is serial, it is not mapped to memory, and the board cannot boot from it. However, the first 16kbyte of this serial flash gets copied into the 16kbyte SRAM of the processor. Now I have a small boot loader loaded into the SRAM which initializes the SDRAM, can load pages from the serial flash, talk on the serial line,etc.
The next step would be to load u-boot as a second stage boot loader, however how can someone do this?
Just use the pre-loader as supplied by Atmel with the at91rm9200 development kit.
Don't reinvent the wheel. Use the existing code.
Best regards,
Wolfgang Denk
participants (2)
-
Wolfgang Denk
-
Z.N.