* booting zImage.elf
@ 2007-06-19 0:05 Shelley, Mike
2007-06-19 9:37 ` David H. Lynch Jr.
0 siblings, 1 reply; 2+ messages in thread
From: Shelley, Mike @ 2007-06-19 0:05 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 784 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 1200 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: booting zImage.elf
2007-06-19 0:05 booting zImage.elf Shelley, Mike
@ 2007-06-19 9:37 ` David H. Lynch Jr.
0 siblings, 0 replies; 2+ messages in thread
From: David H. Lynch Jr. @ 2007-06-19 9:37 UTC (permalink / raw)
To: Shelley, Mike; +Cc: linuxppc-embedded
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@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
--
Dave Lynch DLA Systems
Software Development: Embedded Linux
717.627.3770 dhlii@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-19 9:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-19 0:05 booting zImage.elf Shelley, Mike
2007-06-19 9:37 ` David H. Lynch Jr.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).