[bzimage] Support old (pre-2.00 bootloader) Linux kernel formats

This allows gPXE to load memtest86, which is packaged as an old kernel.

Split all code that directly touches the kernel headers out into
bzimage_parse_header() and bzimage_update_header(), to reduce code
size and offset the cost of supporting older kernels.

Total cost of this feature: 11 bytes (uncompressed).
This commit is contained in:
Michael Brown
2009-03-30 11:32:28 +01:00
parent a436dc4014
commit abc13af070
2 changed files with 236 additions and 250 deletions

View File

@@ -75,6 +75,9 @@ struct bzimage_header {
/** Offset of bzImage header within kernel image */
#define BZI_HDR_OFFSET 0x1f1
/** bzImage boot flag value */
#define BZI_BOOT_FLAG 0xaa55
/** bzImage magic signature value */
#define BZI_SIGNATURE 0x53726448