From: Hariprasad Nellitheertha Enables loading i386 kernels from non-default offsets. Signed-off-by: Hariprasad Nellitheertha Signed-off-by: Andrew Morton --- 25-akpm/arch/i386/Kconfig | 10 +++++ 25-akpm/arch/i386/boot/compressed/head.S | 6 +-- 25-akpm/arch/i386/boot/compressed/misc.c | 7 ++- 25-akpm/arch/i386/kernel/vmlinux.lds.S | 56 ++++++++++++++++++------------ 25-akpm/include/asm-generic/vmlinux.lds.h | 2 - 25-akpm/include/asm-i386/segment.h | 2 + 6 files changed, 54 insertions(+), 29 deletions(-) diff -puN arch/i386/boot/compressed/head.S~kexec-loading-kernel-from-non-default-offset arch/i386/boot/compressed/head.S --- 25/arch/i386/boot/compressed/head.S~kexec-loading-kernel-from-non-default-offset 2005-01-10 21:15:10.941790176 -0800 +++ 25-akpm/arch/i386/boot/compressed/head.S 2005-01-10 21:15:10.950788808 -0800 @@ -74,7 +74,7 @@ startup_32: popl %esi # discard address popl %esi # real mode pointer xorl %ebx,%ebx - ljmp $(__BOOT_CS), $0x100000 + ljmp $(__BOOT_CS), $KERN_PHYS_OFFSET /* * We come here, if we were loaded high. @@ -99,7 +99,7 @@ startup_32: popl %ecx # lcount popl %edx # high_buffer_start popl %eax # hcount - movl $0x100000,%edi + movl $KERN_PHYS_OFFSET,%edi cli # make sure we don't get interrupted ljmp $(__BOOT_CS), $0x1000 # and jump to the move routine @@ -124,5 +124,5 @@ move_routine_start: movsl movl %ebx,%esi # Restore setup pointer xorl %ebx,%ebx - ljmp $(__BOOT_CS), $0x100000 + ljmp $(__BOOT_CS), $KERN_PHYS_OFFSET move_routine_end: diff -puN arch/i386/boot/compressed/misc.c~kexec-loading-kernel-from-non-default-offset arch/i386/boot/compressed/misc.c --- 25/arch/i386/boot/compressed/misc.c~kexec-loading-kernel-from-non-default-offset 2005-01-10 21:15:10.942790024 -0800 +++ 25-akpm/arch/i386/boot/compressed/misc.c 2005-01-10 21:15:10.951788656 -0800 @@ -14,6 +14,7 @@ #include #include