From: Alain Knaff <alain@knaff.lu>
This is an updated version of my bzip2/lzma patch
It is based on an idea by Christian Ludwig, includes support for
compressing the kernel with bzip2 or lzma rather than gzip. Both
compressors give smaller sizes than gzip. Lzma's decompresses faster
than bzip2.
It also supports ramdisks and initramfs' compressed using these two
compressors.
The functionality has been successfully used for a couple of years by
the udpcast project
This version applies to "tip" kernel 2.6.27-rc5
Changes since last version:
- Removed #ifdef's in head_32.S and head_64.S at the cost of a 4-byte
increase of LZMA-compressed kernels
Signed-off-by: Alain Knaff <alain@knaff.lu>
---
diff -uNrp -X linux.trees.git.udpcast/Documentation/dontdiff linux.trees.git/arch/x86/boot/compressed/head_32.S linux.trees.git.udpcast/arch/x86/boot/compressed/head_32.S
--- linux.trees.git/arch/x86/boot/compressed/head_32.S 2008-09-07 11:29:12.000000000 +0200
+++ linux.trees.git.udpcast/arch/x86/boot/compressed/head_32.S 2008-09-09 00:41:04.000000000 +0200
@@ -143,7 +143,7 @@ relocated:
pushl %eax # input_len
leal input_data(%ebx), %eax
pushl %eax # input_data
- leal boot_heap(%ebx), %eax
+ leal _end(%ebx), %eax
pushl %eax # heap area
pushl %esi # real mode pointer
call decompress_kernel
@@ -184,8 +184,6 @@ relocated:
.bss
/* Stack and heap for uncompression */
.balign 4
-boot_heap:
- .fill BOOT_HEAP_SIZE, 1, 0
boot_stack:
.fill BOOT_STACK_SIZE, 1, 0
boot_stack_end:
diff -uNrp -X linux.trees.git.udpcast/Documentation/dontdiff linux.trees.git/arch/x86/boot/compressed/head_64.S linux.trees.git.udpcast/arch/x86/boot/compressed/head_64.S
--- linux.trees.git/arch/x86/boot/compressed/head_64.S 2008-09-07 11:29:12.000000000 +0200
+++ linux.trees.git.udpcast/arch/x86/boot/compressed/head_64.S 2008-09-09 00:41:09.000000000 +0200
@@ -287,7 +287,7 @@ relocated:
*/
pushq %rsi # Save the real mode argument
movq %rsi, %rdi # real mode ...