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
Quoted 5 lines · In message <[email protected]> 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.
Quoted 3 lines
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 at0xFFF00000. 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.
Quoted 1 line
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
Signature · 5 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de If you believe that feeling bad or worrying long enough will change a past or future event, then you are residing on another planet with a different reality system.
Quoted 5 lines · --- Wolfgang Denk
In message <[email protected]> you
Quoted 2 lines · wrote:
Can u-boot run on top of another bootloader? The board I'm working on
has a
Quoted 9 lines
Quoted 1 line
proprietary boot loader. I cannot totally abandon this bootloader
because
Quoted 1 line
the vendor is unwilling to disclose some critical details of the board.
So
Quoted 1 line
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
Quoted 5 lines · In message <[email protected]> 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.
Quoted 2 lines
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
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
The optimum committee has no members.
- Norman AugustineQuoted 11 lines
Quoted 1 line
At the very beginning u-boot is executed from flash. That's why there
are
Quoted 1 line
some functions with postfix
xxx_f(). Since the system has beeninitialized
Quoted 1 line
by the original bootloader, is it possible to skip this step and to
copy
Quoted 1 line
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. ;)
Quoted 6 lines
Quoted 3 lines
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