Use decompressors framework on i386-pc. It increases core size

by 46 bytes but improves compatibility and maintainability.

	* grub-core/Makefile.core.def (lzma_decompress): New image.
	(kernel): Add i386_pc_ldflags.
	* grub-core/kern/i386/pc/startup.S: Move intial part to ..
	* grub-core/boot/i386/pc/startup_raw.S: ... here. Pass pointers
	to real_to_prot, prot_to_real and device info.
	* include/grub/offsets.h: Renamed decompressor offsets.
	* util/grub-mkimage.c (grub_compression_t): New cmpression lzma.
	(image_target_desc): Remove raw_size and rename decompressor fields.
	(compress_kernel): Handle lzma.
	(generate_image): Handle decompressors on i386-pc.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-11-12 19:53:25 +01:00
parent e9d3421c05
commit 60240b8bc1
12 changed files with 601 additions and 486 deletions

View file

@ -47,7 +47,7 @@ FUNCTION(grub_bios_interrupt)
movl 24(%edx), %esi
movl 28(%edx), %edx
call prot_to_real
PROT_TO_REAL
.code16
pushf
cli
@ -98,7 +98,7 @@ intno:
movw %ax, LOCAL(bios_register_es)
popf
DATA32 call real_to_prot
REAL_TO_PROT
.code32
popl %eax