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:
parent
e9d3421c05
commit
60240b8bc1
12 changed files with 601 additions and 486 deletions
|
@ -51,6 +51,14 @@
|
|||
protstack:
|
||||
.long GRUB_MEMORY_MACHINE_PROT_STACK
|
||||
|
||||
.macro PROT_TO_REAL
|
||||
call prot_to_real
|
||||
.endm
|
||||
|
||||
.macro REAL_TO_PROT
|
||||
DATA32 call real_to_prot
|
||||
.endm
|
||||
|
||||
/*
|
||||
* This is the Global Descriptor Table
|
||||
*
|
||||
|
@ -162,6 +170,25 @@ protcseg:
|
|||
|
||||
/* return on the old (or initialized) stack! */
|
||||
ret
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 1999,2000,2001,2002,2003,2005,2006,2007,2009,2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/i386/pc/memory.h>
|
||||
|
||||
prot_to_real:
|
||||
/* just in case, set GDT */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue