Handle the different possible values for the kernel load address in Kconfig instead of in cpp, and make it configurable for MMUless machines. --- arch/m68k/Kconfig | 9 +++++++++ arch/m68k/kernel/vmlinux-std.lds | 4 +++- arch/m68k/kernel/vmlinux-sun3.lds | 4 +++- include/asm-m68k/page_offset.h | 6 +----- 4 files changed, 16 insertions(+), 7 deletions(-) --- linux-m68k-2.6.8.1+uc0/arch/m68k/Kconfig 2004-08-14 15:35:36.000000000 +0200 +++ uClinux-amiga-2.6.8.1/arch/m68k/Kconfig 2004-06-26 17:17:34.000000000 +0200 @@ -303,6 +334,15 @@ config M68KFPU_EMU_ONLY needs to be executed whether a floating-point instruction in the kernel should be executed or not. +config LOADADDR + hex "Kernel load address" if !MMU + default 0x00000000 if MMU_MOTOROLA + default 0x00E00000 if MMU_SUN3 + ---help--- + This is the memory address to load the kernel at. It depends on your + actual hardware configuration. E.g. for an Amiga with Zorro II RAM, + it should be 0x00200000. + config ADVANCED bool "Advanced configuration options" ---help--- --- linux-m68k-2.6.8.1+uc0/arch/m68k/kernel/vmlinux-std.lds 2004-05-24 11:13:22.000000000 +0200 +++ uClinux-amiga-2.6.8.1/arch/m68k/kernel/vmlinux-std.lds 2004-10-08 21:01:07.000000000 +0200 @@ -1,5 +1,7 @@ /* ld script to make m68k Linux kernel */ +#include + #include OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k") @@ -8,7 +10,7 @@ ENTRY(_start) jiffies = jiffies_64 + 4; SECTIONS { - . = 0x1000; + . = CONFIG_LOADADDR + 0x1000; _text = .; /* Text and read-only data */ .text : { *(.text) --- linux-m68k-2.6.8.1+uc0/arch/m68k/kernel/vmlinux-sun3.lds 2004-05-24 11:13:22.000000000 +0200 +++ uClinux-amiga-2.6.8.1/arch/m68k/kernel/vmlinux-sun3.lds 2004-06-26 17:17:37.000000000 +0200 @@ -1,5 +1,7 @@ /* ld script to make m68k Linux kernel */ +#include + #include OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k") @@ -8,7 +10,7 @@ ENTRY(_start) jiffies = jiffies_64 + 4; SECTIONS { - . = 0xE004000; + . = CONFIG_LOAD_ADDR + 0x4000; _text = .; /* Text and read-only data */ .text : { *(.head) --- linux-m68k-2.6.8.1+uc0/include/asm-m68k/page_offset.h 2004-05-24 11:13:53.000000000 +0200 +++ uClinux-amiga-2.6.8.1/include/asm-m68k/page_offset.h 2004-06-26 17:20:24.000000000 +0200 @@ -1,9 +1,5 @@ #include /* This handles the memory map.. */ -#ifndef CONFIG_SUN3 -#define PAGE_OFFSET_RAW 0x00000000 -#else -#define PAGE_OFFSET_RAW 0x0E000000 -#endif +#define PAGE_OFFSET_RAW CONFIG_LOADADDR