Re: Limon & PowerQUICC II, Booting the kernel

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

Re: Limon & PowerQUICC II, Booting the kernel

From: Neil Russell <hidden>
Date: 2000-09-26 16:12:05

On Tue, Sep 26, 2000 at 01:49:46PM +0100, Ruedi.Hofer@ascom.ch wrote:
Question:

1. Do I have to strip off the elf header from my kernel file?
Yes.  Call me lazy, but I haven't yet written code to handle ELF (but I will).
You need to convert the kernel to a straight binary file with something like:

	objcopy -O binary vmlinux vmlinux.bin

then encode it as you have done with something like:

	mklimon -o vmlinix.limon -k vmlinux.bin

The downloaded kernel can be 4M-1K (0x3ffc00) in size, so I don't bother
with compressing it.

The kernel size limit, load address issues and the lack of handling of ELF
will all go away in the near future (now that I have time to work on limon
again).
2. Does the run command relocate the kernel at addr 0?
mklimon allows several images to be combined.  The kernel get moved to 0,
and initrd gets moved to the top of memory.
3. Some data are transferred from limon to the kernel.
 - Does Limon handle this correctly?
 - Where are these data located?
limon uses an enhanced version of the bootinfo structure (not the same as
bd_info).  It is currently set up at 0x3ffe00 by the run command (this will
change in the next version).
4. Why does it crash?
limon doesn't handle ELF (yet).


Neil.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: Limon & PowerQUICC II, Booting the kernel

From: Dan Malek <hidden>
Date: 2000-09-26 22:27:47

Neil Russell wrote:
The downloaded kernel can be 4M-1K (0x3ffc00) in size, so I don't bother
with compressing it.

Yes, please bother compressing it.  Making zImage is more than just
compressing the file.  The code in arch/ppc/mbxboot will (interactively)
create the command line, properly allocate the initial ram disk, and
most importantly creates the board information structure that is
required
by the kernel.  There is also hardware initialization expected by the
kernel that is often coordinated in the various functions found in
the arch/ppc/mbxboot files.  You can't simply boot vmlinux on an
embedded
system and expect it to work (unless your boot rom is doing exactly
the functions of arch/ppc/mbxboot).

The ELF header of the resulting zImage should be removed by just
using 'dd':
	dd if=zImage bs=64k skip=1 of=zImage.bin

Using objcopy or other generic programs on zImage will likely result
in a mess, because the file isn't really a valid ELF image.
limon uses an enhanced version of the bootinfo structure (not the same as
bd_info).
The kernel expects a board info that matches what it was configured to
use.  Every board is different.  You should modify
arch/ppc/mbxboot/misc.c
to know it was called by limon and properly convert or discover
information
necessary for the kernel version of the structure.


	-- 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