[coyotos-dev] Looking for ideas - image loading
Charles Landau
clandau at macslab.com
Tue Jan 29 13:14:59 EST 2008
At 10:07 AM -0500 1/29/08, Jonathan S. Shapiro wrote:
>But on immature embedded systems we often don't have any way to load
>more than one file. This is also an issue with some netboot
>implementations.
>
>I am therefore wondering whether there is some simple way to merge the
>kernel and the mkimage file.
>
>Does anyone know of a cleaner/better way to do this that is ready to
>hand?
On CapROS for ARM, we cat together:
1. the kernel binary (not ELF) image
2. the numeric length of the mkimage file (the output of sysgen)
3. a Grub configuration file
4. the mkimage file (not ELF)
That all gets loaded and started. Boot code finds #2 after _edata,
and #2 and #3 are fixed-length. Using these, it sets up a Multiboot
info structure the way Grub would.
See
http://capros.cvs.sourceforge.net/capros/eros/src/build/make/sys.arm.mk?revision=1.7&view=markup,
target hd, and
http://capros.cvs.sourceforge.net/capros/eros/src/sys/arch/arm/kernel/GrubEmul.c?revision=1.4&view=markup.
At 11:14 AM -0500 1/29/08, Jonathan S. Shapiro wrote:
>Unfortunately, the multiboot and lilo loaders all assume that they are
>loading a[n ELF] binary image. They don't simply copy the file blindly.
On CapROS for PC, Grub loads an ELF executable kernel and a binary
(not ELF) mkimage file. The Grub module command does not assume ELF.
On ARM, the download utility we sometimes use to write the system to
flash does not understand ELF. Redboot can do either format.
At 11:17 AM -0500 1/29/08, Jonathan S. Shapiro wrote:
>I decided to add an ELF segment.
Gee, you can't blink if you want to contribute to these discussions.
More information about the coyotos-dev
mailing list