Truly discouraged Re: [Techtalk] Lost my place in kernel space,

Val Henson val at nmt.edu
Tue Jul 30 22:50:20 EST 2002


On Wed, Jul 31, 2002 at 02:06:48PM +1000, Malcolm Tredinnick wrote:

> Note that replacing the 'make bzImage' with just 'make' is not really a
> good idea, since the default target changes from time to time (on the
> version of the kernel source I just looked in, it will build a binary
> called vmlinux -- which is not what you want).

Hm, that's odd, I thought vmlinux had been the default target for a
long while.  At any rate, "vmlinux" ends up being built anyway because
it's sort of the raw material used to produce the "bzImage" or
"zImage" format (or whatever kernel format your architecture prefers
to build).  "vmlinux" is the kernel in ELF format, which is then
stripped, compressed, dissected, or otherwise mangled in order to
produce the image that the bootloader for this architecture requires.
If I recall correctly, yaboot (for PowerPC) will boot the plain old
vmlinux image, but grub needs the bzImage form (which includes some
more bootloader code in addition to the compressed kernel itself).  I
believe the Alpha SRM console can also boot vmlinux, but I could be
remembering that wrong, also.

For another weird tidbit, the PowerPC platform I supported for about a
year would only boot a totally stripped image - the instructions had
to start at the first byte of the binary.  Otherwise, the bootloader
would attempt to start executing the ELF magic number, which doesn't
correspond to any instruction on the PowerPC. :)

Here's a good web page from a 1995 Linux Journal if you're curious
about the ELF format:

http://www.linuxjournal.com/article.php?sid=1060

Note that the readelf utility is probably installed on your machine.

More detail than you wanted to know, but hey, this is Techtalk, after
all!

-VAL



More information about the Techtalk mailing list