[U-Boot] Running u-boot without relocation to RAM?

Hi,
I´m working on running U-Boot from a Leon3-System on an evaluation board from Actel. Some GPIO and "Hello World" programs are already running.
Now I created the necessary files for my board/sytem and compiling of U-Boot goes well, but starting this application nothing is happening on the serial terminal. After checking my U-Boot and system configuration again, I think that my very small RAM area of only 16 kB might be the problem while U-Boot relocates itself to RAM at startup.
So is it possible to completly disable the relocation process at startup and run U-Boot with having opcode in PROM and data in RAM? If yes, how could I achieve this?
I already tried to remove the corresponding code in the start.S and searched the README for switches, but without success.
Best regards,
Tobias Kraitschy

Hi Tobias,
Kraitschy, Tobias wrote:
Hi,
I´m working on running U-Boot from a Leon3-System on an evaluation board from Actel. Some GPIO and "Hello World" programs are already running.
Now I created the necessary files for my board/sytem and compiling of U-Boot goes well, but starting this application nothing is happening on the serial terminal. After checking my U-Boot and system configuration again, I think that my very small RAM area of only 16 kB might be the problem while U-Boot relocates itself to RAM at startup.
Yes. Major problem.
So is it possible to completly disable the relocation process at startup and run U-Boot with having opcode in PROM and data in RAM? If yes, how could I achieve this?
You would be the first to achieve this.
One of the fundamental assumptions of u-boot is that it copies itself into RAM and runs out of RAM. There are many good reasons for this: RAM tends to be faster, it allows u-boot to reprogram flash without jumping extra hoops, u-boot is a boot *loader* to load a "real" OS (into RAM), "real" OSes require gobs of RAM, etc.
While it isn't impossible, it appears to be a pretty daunting task. On the other hand, everything looks daunting when you start. Y'know, "a trip of a thousand miles starts with the first step" sort of stuff.
I already tried to remove the corresponding code in the start.S and searched the README for switches, but without success.
Nobody has had success yet, but maybe they just haven't tried hard enough. ;-)
Best regards,
Tobias Kraitschy
Best regards, gvb

So is it possible to completly disable the relocation process at startup and run U-Boot with having opcode in PROM and data in RAM? If yes, how could I achieve this?
I already tried to remove the corresponding code in the start.S and searched the README for switches, but without success.
Did you try the "CONFIG_SKIP_RELOCATE_UBOOT" ? I am not sure if it serves your purpose here. It depends upon whether or not your "start.S" uses it at all.
-Alfred

alfred steele wrote:
So is it possible to completly disable the relocation process at startup and run U-Boot with having opcode in PROM and data in RAM? If yes, how could I achieve this?
I already tried to remove the corresponding code in the start.S and searched the README for switches, but without success.
Did you try the "CONFIG_SKIP_RELOCATE_UBOOT" ? I am not sure if it serves your purpose here. It depends upon whether or not your "start.S" uses it at all.
-Alfred
Tobias can try CONFIG_SKIP_RELOCATE_UBOOT, but it isn't likely to work as is. That flag is to configure u-boot to be loaded directly into RAM and run out of RAM (i.e. no relocation from flash to RAM). U-Boot was not designed to run from flash (aka. XIP - eXecute In Place) and nobody has done that as far as I know.
That doesn't mean u-boot cannot run XIP, it means that it will take an unknown amount of effort to make it happen.
gvb
participants (4)
-
alfred steele
-
Jerry Van Baren
-
Jerry Van Baren
-
Kraitschy, Tobias