Re: PATCH: Linux high in the sky

Albert Cahalan (albert@ccs.neu.edu)
Wed, 21 Feb 1996 10:36:47 -0500 (EST)


> > Wouldn't it be nice if the file(1) utility knew about the kernel
> > types ("old zImage", "new bzImage")? Does anyone have a patch for that?
> > Also, do we still have the old "make zImage" target for simple boot
> > floppies?
>
> We did not come yet to update the data base for the file(1) utility,
> (can any one help with this?) but yes, this should be done.

It would be great if you could put a 32-bit magic number
right at the beggining of the image. Something like what
I've included here adds only 4 bytes, or 8 if you include
kernel version data. It would be great if file could print
"Linux 1.3.70 i386 kernel image data, ELF/bzImage/experimental"

Note that the magic number is code to save space.

--- oldbootsect.S Sun Nov 26 21:53:26 1995
+++ linux/arch/i386/boot/bootsect.S Sun Nov 26 22:06:32 1995
@@ -53,6 +53,10 @@
! ld86 requires an entry symbol. This may as well be the usual one.
.globl _main
_main:
+ nop ! avoid DOS .com file in /etc/magic
+ jmp over_magic
+ .byte 0xF0 ! Magic number is '90 eb 01 f0'
+over_magic:
#if 0 /* hook for debugger, harmless unless BIOS is fussy (old HP) */
int 3
#endif