ELF boot and Multiboot

Eric W. Biederman ebiederman at lnxi.com
Thu Jun 12 01:15:00 CEST 2003


SONE Takeshi <ts1 at cma.co.jp> writes:

> Eric,
> In the source of mkelfImage, linux-i386/convert_params.c,
> there is some code to retrieve information like memory map
> from Multiboot information structure.
> However, ELF images created by mkelfImage does not have
> Multiboot header, according to 'mbchk' of GRUB boot loader.
> In what situation is this code supposed to run (and tested)?

The partial multiboot support in etherboot, is where it was used.

> If one added a (trivial) Multiboot header in the head.S,
> the resulting kernel could be loaded from GRUB, while it could also
> be loaded by ELF boot of LinuxBIOS and Etherboot?

It probably could.  And I would not have a problem with something
like that in theory.  The multiboot spec is quite poorly done,
so I am not a major fan.  I think I would prefer to just add a
dummy elf segment at the start of the file with that information
in it.  From mkelfImage 2.5 that would probably be the easiest thing
to do.

I would almost rather fix GRUB to use something sensible and portable
like ELF notes.  The multiboot data structure is  a disaster in terms
of both future expansion, and of expansion by multiple groups.

What I will not support is GRUB hack at dynamic linking, via the
multiboot spec.  With respect to a.out the multiboot stuff was not
bad.  With respect to ELF there are much better ways to do just about
everything it attempts.

My apologies for ranting.  GRUB is not a bootloader I admire.

Eric




More information about the coreboot mailing list