MIPS: Cleanup and Fixup of compressed kernel support

o Remove the .initrd section.  The initrd section was already handled
   when vmlinux was linked.
 o Discard .MIPS.options, .options, .pdr, .reginfo, .comment and .note
   sections.  If .MIPS.options is not removed, kernels compiled with gcc
   3.4.6 will not boot.
 o Clean up the file format.
 o Remove several other unneeded sections.

Tested with GCC 3.4.6 and 4.4.1 with and without initrd.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/785/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
Wu Zhangjin
2009-12-10 22:55:13 +08:00
committed by Ralf Baechle
parent abbdc3d88a
commit d4d9a553d7
3 changed files with 59 additions and 155 deletions

View File

@@ -28,8 +28,6 @@ char *zimage_start;
/* The linker tells us where the image is. */
extern unsigned char __image_begin, __image_end;
extern unsigned char __ramdisk_begin, __ramdisk_end;
unsigned long initrd_size;
/* debug interfaces */
extern void puts(const char *s);
@@ -102,14 +100,6 @@ void decompress_kernel(unsigned long boot_heap_start)
puthex((unsigned long)(zimage_size + zimage_start));
puts("\n");
if (initrd_size) {
puts("initrd at: ");
puthex((unsigned long)(&__ramdisk_begin));
puts(" ");
puthex((unsigned long)(&__ramdisk_end));
puts("\n");
}
/* this area are prepared for mallocing when decompressing */
free_mem_ptr = boot_heap_start;
free_mem_end_ptr = boot_heap_start + BOOT_HEAP_SIZE;