booting zImage.elf
David H. Lynch Jr.
dhlii at dlasys.net
Tue Jun 19 19:37:28 EST 2007
An elf file is not just a collection of bits exactly as they would
be found in memory.
The code in it may get loaded into several distinct regions, it may
include information to allocate additional regions,
the code may be relocatable or have relocation information.
It is unlikely (maybe impossible) that you can create an elf file
that you can just jump into.
There are other file formats that you can build the kernel as that
would more closely correspond to what you are after.
Because I normally build zImage.elf files and my loader handles
them well I am not experienced with creating other formats,
but I think the u-boot documentation should give you some pointers.
You do not convert the zImage.elf, you build the kernel with the
image format that you want.
zImage.elf is actually a very simple elf file, that performs some
rudimentary initialization, and then decompresses what is really the
kernel image into memory
and executes it. The compressed image inside the zImage.elf is
closer to what you are looking for.
Shelley, Mike wrote:
> I've been trying to read up on how elf works and how to boot the linux kernel image with a custom boot loader. I can't seem to find anything about booting an elf image. I'm using a PCI Express XpressFX Board (which has a Virtex4), by PLDA, with DDR2 memory. I've got the kernel image booting using a BDI to load it. Now I need to get it to load without the BDI.
>
> The quick question is, Is it possible to load zImage.elf straight into memory, then jump to the address it was loaded to? If not, how do I convert the elf image into just a bootable image that I can jump to?
>
> I looked at the uboot code to load elf files, and it appears to copy the sections around. Is this necessary?
>
> Pointers on where else to look or how to do this would be greatly appreciated.
>
> Michael
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded at ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
--
Dave Lynch DLA Systems
Software Development: Embedded Linux
717.627.3770 dhlii at dlasys.net http://www.dlasys.net
fax: 1.253.369.9244 Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.
"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Albert Einstein
More information about the Linuxppc-embedded
mailing list