[U-Boot-Users] can i load u-boot into RAM and jump to it as a test?

(i posted something similar to this on the SF forum before i realized there was a real mailing list. oops.)
before i commit myself to reflashing with u-boot, i'd like to know if it's possible to just load it into RAM and use the current bootloader to jump to it, just to see the menu come up, nothing more.
working with an 8xx board, 850DE-based, and as a test, i did a configure with RPXlite_config (even though, technically, it's not exactly an RPXlite but close). generated u-boot.bin and used embedded planet's planet core (PC) bootloader to download it into RAM. at this point, am i allowed to just use PC to
g <download address> ??
we could do that with PC -- compile a new version, download it to RAM and jump to it, just to see that it seemed to function at the basic level.
thoughts? i've tried it, and every time i use PC to transfer control, i get nothing -- immediate hang. maybe a serial comms problem? who knows?
rday

In message Pine.LNX.4.60.0408261529410.19204@enoriver.com you wrote:
before i commit myself to reflashing with u-boot, i'd like to know if it's possible to just load it into RAM and use the current bootloader to jump to it, just to see the menu come up, nothing more.
No, this is not possible.
[And this has been discussed many, many times before.]
planet's planet core (PC) bootloader to download it into RAM. at this point, am i allowed to just use PC to
g <download address> ??
Of course you are allowed to do that, but please don't be disappointed - it will not work.
Best regards,
Wolfgang Denk

before i commit myself to reflashing with u-boot, i'd like to know if it's possible to just load it into RAM and use the current bootloader to jump to it, just to see the menu come up, nothing more.
You can do it, but for starting in ram some changes are needed; for example, you cannot change IMMR or program SRAM controller when you start from RAM.
For testing the personal modification of u-boot in my board, I have a standard starting u-boot in flash (that I never modify when running fine), and every change is made in the same version but compiled for starting in ram; so I can test every change very quickly. For adding command or some functionalities this is good, but you cannot test all the HW init part.
Regards Enzo

The main things to #ifdef out are: - The ram init code. - The serial init code - the bat init code - the cache in ram trick and point the stack to an unused area of memory. - The relocate_code function since you are already in ram. - make sure you change the TEXT_BASE variable to point to the area in ram you want to run.
I've done this (ran u-boot from ram) on many different boards and it's not that diifcult if you know what you're doing.:-) BTW, bedbug comes in handy since the symbol addresses map directly to the link addresses...
--- "Robert P. J. Day" rpjday@mindspring.com wrote:
(i posted something similar to this on the SF forum before i realized there was a real mailing list. oops.)
before i commit myself to reflashing with u-boot, i'd like to know if it's possible to just load it into RAM and use the current bootloader to jump to it, just to see the menu come up, nothing more.
working with an 8xx board, 850DE-based, and as a test, i did a configure with RPXlite_config (even though, technically, it's not exactly an RPXlite but close). generated u-boot.bin and used embedded planet's planet core (PC) bootloader to download it into RAM. at this point, am i allowed to just use PC to
g <download address> ??
we could do that with PC -- compile a new version, download it to RAM and jump to it, just to see that it seemed to function at the basic level.
thoughts? i've tried it, and every time i use PC to transfer control, i get nothing -- immediate hang. maybe a serial comms problem? who knows?
rday
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
__________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail

In message 20040828040400.96687.qmail@web13822.mail.yahoo.com you wrote:
I've done this (ran u-boot from ram) on many different boards and it's not that diifcult if you know what you're doing.:-)
This may be true, but it is WRONG for the original poster's question: he asked if you can run an image from RAM before birnung the SAME image to the final position in flash.
As you mentioned, many changes are necessary, and the final flash image will bue completely untested in all these areas then. And one of these untested areas is the most critical in all systems: the setup of the memory controller and SDRAM initialization.
Best regards,
Wolfgang Denk

Sorry, I didn't see that. I thought he was just asking if u-boot could be modified to run from ram...
--- Wolfgang Denk wd@denx.de wrote:
In message 20040828040400.96687.qmail@web13822.mail.yahoo.com you wrote:
I've done this (ran u-boot from ram) on many different
boards
and it's not that diifcult if you know what you're doing.:-)
This may be true, but it is WRONG for the original poster's question: he asked if you can run an image from RAM before birnung the SAME image to the final position in flash.
As you mentioned, many changes are necessary, and the final flash image will bue completely untested in all these areas then. And one of these untested areas is the most critical in all systems: the setup of the memory controller and SDRAM initialization.
Best regards,
Wolfgang Denk
-- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de I have been over into the future, and it works. - Lincoln Steffens in _Letters_ (1938) vol. 1, p. 463
__________________________________ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail

On Sat, 28 Aug 2004, Frank wrote:
Sorry, I didn't see that. I thought he was just asking if u-boot could be modified to run from ram...
ok, i didn't mean to start this tendentious a thread, sorry. what i was after was a way to "test drive" u-boot without committing it to flash, but there might be a simple way around this for me.
currently, i have embedded planet's planet core loader in flash, and i have the ability to compile more images, including a combo image that consists of both a flash burner and some image. i have the ability to load *that* combo image to RAM, and run it, which will burn to flash whatever the accompanying image is. at the moment, this is naturally an updated PC boot loader but there's nothing to suggest that it can't be any arbitrary image, such as u-boot.
anyway, that's getting off topic, so i'll just let this thread die. but i did learn several things from the feedback, thanks.
rday

Dear Robert,
in message Pine.LNX.4.60.0408291024150.3835@localhost.localdomain you wrote:
ok, i didn't mean to start this tendentious a thread, sorry. what i was after was a way to "test drive" u-boot without committing it to flash, but there might be a simple way around this for me.
No, there isn't.
I don't understand why this seems to be so hard to believe:
In general, THERE IS NO WAY to test the final U-Boot image without burning it to the correct location in flash (i. e. such that it gets started when the processor comes up out of reset).
Get yourself a BDI2000, learn how to erase and program flash memory, and just burn the image to flash; there is ZERO risk involved with this. Actually it's the most natural way top develop and test this type of software.
Best regards,
Wolfgang Denk
participants (4)
-
Figini Enzo
-
Frank
-
Robert P. J. Day
-
Wolfgang Denk