[U-Boot-Users] u-boot on top of another bootloader

Hi,
Can u-boot run on top of another bootloader? The board I'm working on has a proprietary boot loader. I cannot totally abandon this bootloader because the vendor is unwilling to disclose some critical details of the board. So I'm thinking of putting u-boot on top of it. Is this idea feasible?
The original boot loader is at 0xFFF00000. One thing I need to do is to move the u-boot location to somewhere else. AFAIK u-boot usually locates at 0xFFF00000. What feature of a board decides the address of the first instruction?
Thanks, -Shawn.
__________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail

In message 20040622013446.79298.qmail@web20730.mail.yahoo.com you wrote:
Can u-boot run on top of another bootloader? The board I'm working on has a proprietary boot loader. I cannot totally abandon this bootloader because the vendor is unwilling to disclose some critical details of the board. So I'm thinking of putting u-boot on top of it. Is this idea feasible?
It is possible. Basicly the same modifications need to be made like when attempting to boot from RAM.
The original boot loader is at 0xFFF00000. One thing I need to do is to move the u-boot location to somewhere else. AFAIK u-boot usually locates at 0xFFF00000. What feature of a board decides the address of the first
This is not correct. It may be true on some boards, but is not a general rule.
instruction?
The first instruction is determined by your processor and it's configuration, i. e. from where it fetches the first insruction when waking up out of reset. Common addresses are 0x0000, 0x0100, 0xFFF00100, 0xFFFFFFFC, etc.
Best regards,
Wolfgang Denk

--- Wolfgang Denk wd@denx.de wrote:
In message 20040622013446.79298.qmail@web20730.mail.yahoo.com you wrote:
Can u-boot run on top of another bootloader? The board I'm working on
has a
proprietary boot loader. I cannot totally abandon this bootloader
because
the vendor is unwilling to disclose some critical details of the board.
So
I'm thinking of putting u-boot on top of it. Is this idea feasible?
It is possible. Basicly the same modifications need to be made like when attempting to boot from RAM.
What I'm planning to do is as follows. The board's processor is MPC8245. 1. Put u-boot at 0xFFE00000; 2. After power-on the proprietary bootloader starts and initializes the system. 3. On the bootloader execute 'go 0xFFE00000' to load u-boot. u-boot is going to initialize the system again except the proprietary part - CPLD programming.
At the very beginning u-boot is executed from flash. That's why there are some functions with postfix xxx_f(). Since the system has been initialized by the original bootloader, is it possible to skip this step and to copy the necessary part of u-boot to RAM and then to execute it from RAM?
Since it's an MPC8245 board, I use SL8245 as an example. I'm not sure how to configure those IBATs and DBATs. I dumped these registers from BDI2000 but these values just don't make sense to me. For example, the dumped IBAT0U and IBAT0L are ibat0u : 0x1fa4093d ibat0l : 0x4cf40039
#define CFG_IBAT0L (CFG_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) #define CFG_IBAT0U (CFG_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) But from the configuration in the hearder file, they should be 0x00000012 and 0x00001FFF.
What are these four pairs of IBAT for? Each one for a specific range of memory space?
I did built an image and put it at 0xFFE00000. However it cannot step forward from the very first instruction. (gdb) c Continuing.
Program received signal SIGSTOP, Stopped (signal) 0xffe00000 in ?? () at /code/u-boot-1.1.1/cpu/mpc824x/start.S:98 98 _start: (gdb)
Why?
Thank you very much, -Shawn.
__________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail

In message 20040623021134.57900.qmail@web20704.mail.yahoo.com you wrote:
At the very beginning u-boot is executed from flash. That's why there are some functions with postfix xxx_f(). Since the system has been initialized by the original bootloader, is it possible to skip this step and to copy the necessary part of u-boot to RAM and then to execute it from RAM?
Everything is possible. The question is if it makes sense to change too many things, i. e. how much effort it will make and which advantages you have when doing these changes.
I did built an image and put it at 0xFFE00000. However it cannot step forward from the very first instruction.
Who says that the first instruction is at offset 0? And for which address was your image linked?
Best regards,
Wolfgang Denk

At the very beginning u-boot is executed from flash. That's why there
are
some functions with postfix xxx_f(). Since the system has been
initialized
by the original bootloader, is it possible to skip this step and to
copy
the necessary part of u-boot to RAM and then to execute it from RAM?
Everything is possible. The question is if it makes sense to change too many things, i. e. how much effort it will make and which advantages you have when doing these changes.
Yeah. I totally agree. The difference between newbies and experts is that experts know exactly how much effort a change will make and how to do it. Newbies have to learn from experts and practices. Please bear with me. ;)
I did built an image and put it at 0xFFE00000. However it cannot step forward from the very first instruction.
Who says that the first instruction is at offset 0? And for which address was your image linked?
My stupidity. The first instruction should be at 0xFFE00100 in my case. The image is linked at 0xFFE00000.
Now the code is running but certainly has problems. I'm trying to fix them.
THanks, -Shawn.
__________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail
participants (3)
-
Shawn
-
Shawn Jin
-
Wolfgang Denk