VxWorks bootloader & PowerQUICC II, Booting the kernel

2 messages, 2 authors, 2000-09-27 · open the first message on its own page

VxWorks bootloader & PowerQUICC II, Booting the kernel

From: <hidden>
Date: 2000-09-27 15:11:48

Hi,

I try to boot the Linux kernel on a SBC8260 evaluation board using
the VxWorks bootloader.

In order to be able to load the whole kernel at address 0x900000,
I had to modify the ELF header of the zImage file. I basically changed
the length and the start address.

Question:

1. Why is the length in the ELF header wrong?

2. Why is the start address set to 0x400000 and not to 0x900000?


After loading the kernel, I try to run it:

Attaching network interface lo0... done.
Loading... 493164
entry = 0x900000
[VxWorks Boot]: g 900000
Starting at 0x900000...

program
Exception current instruction address: 0x00900000
Machine Status Register: 0x00089000
Condition Register: 0x24000082
Task: 0xfd37f8 "tBoot"

r0     =   e02684   sp     =   fd3498   r2     =        0   r3     =        0
r4     =  1000000   r5     =        0   r6     =        0   r7     =        0
r8     = 40000000   r9     =   e60000   r10    =   e5f1dc   r11    =   fd3498
r12    =        0   r13    =        0   r14    =        0   r15    =        0
r16    =        0   r17    =        0   r18    =        0   r19    =        0
r20    =        0   r21    =        0   r22    =        0   r23    =        0
r24    =        0   r25    =        0   r26    =        0   r27    =        0
r28    =   e010b8   r29    =   900000   r30    =        0   r31    =   fd3498
msr    =    89000   lr     =   e02690   ctr    =        0   pc     =   900000

[VxWorks Boot]:


.. but it crashes.

Any ideas? I'm using the kernel from HHL1.2, standard config but initrd disabled!

3. What am I doing wrong?

Thank you

Ruedi

Re: VxWorks bootloader & PowerQUICC II, Booting the kernel

From: Dan Malek <hidden>
Date: 2000-09-27 17:36:24

Ruedi.Hofer@ascom.ch wrote:
I try to boot the Linux kernel on a SBC8260 evaluation board using
the VxWorks bootloader.
Somewhere (and you can look through the archives as well as I can :-),
I posted a program that will hack a zImage so the VxWorks boot loader
will properly load and start it.....
In order to be able to load the whole kernel at address 0x900000,
I had to modify the ELF header of the zImage file. I basically changed
the length and the start address.
There are a few more things, but that is the idea.

1. Why is the length in the ELF header wrong?
Well, it represents the code that we tack on the front of the
compressed kernel, not the contents of the image itself.  It is just
the result of the way we use the tools. "Wrong" depends upon your
point of view.  It works fine for some boards, including the Motorola
PPCBug boot roms.  However, the header doesn't really represent the
image.
2. Why is the start address set to 0x400000 and not to 0x900000?
Because the code is written to execute at 0x400000, but it must be
loaded somewhere above that.  The first thing the code does is discover
where it is loaded, move itself to the liked address, allocate some
memory for BSS and buffers, then starts working.  You can't load it
at the 0x400000 address because it allocates the BSS and buffers, the
will write over the attched zImage.


	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help