Skip to content

Commit

Permalink
[PATCH] m68knommu: remove fixed ROM region setups from linker script
Browse files Browse the repository at this point in the history
Remove the hard coded ROM region setups. Use Kconfig options to specify
these in a generic way for platorms that want them.

This builds on top of the other recent m68knommu linker script changes
to completely remove fixed board configurations.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Greg Ungerer authored and Linus Torvalds committed Jun 28, 2006
1 parent c750a01 commit 1c952af
Showing 1 changed file with 6 additions and 60 deletions.
66 changes: 6 additions & 60 deletions arch/m68knommu/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -3,63 +3,13 @@
*
* (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com>
*
* This ends up looking compilcated, because of the number of
* address variations for ram and rom/flash layouts. The real
* work of the linker script is all at the end, and reasonably
* strait forward.
* This linker script is equiped to build either ROM loaded or RAM
* run kernels.
*/

#include <linux/config.h>
#include <asm-generic/vmlinux.lds.h>

/*
* Original Palm pilot (same for Xcopilot).
* There is really only a rom target for this.
*/
#ifdef CONFIG_PILOT3
#define ROMVEC_START 0x10c00000
#define ROMVEC_LENGTH 0x10400
#define ROM_START 0x10c10400
#define ROM_LENGTH 0xfec00
#define ROM_END 0x10d00000
#define DATA_ADDR CONFIG_KERNELBASE
#endif

/*
* Same setup on both the uCsimm and uCdimm.
*/
#if defined(CONFIG_UCSIMM) || defined(CONFIG_UCDIMM)
#ifdef CONFIG_RAMKERNEL
#define ROMVEC_START 0x10c10000
#define ROMVEC_LENGTH 0x400
#define ROM_START 0x10c10400
#define ROM_LENGTH 0x1efc00
#define ROM_END 0x10e00000
#endif
#ifdef CONFIG_ROMKERNEL
#define ROMVEC_START 0x10c10000
#define ROMVEC_LENGTH 0x400
#define ROM_START 0x10c10400
#define ROM_LENGTH 0x1efc00
#define ROM_END 0x10e00000
#endif
#ifdef CONFIG_HIMEMKERNEL
#define ROMVEC_START 0x00600000
#define ROMVEC_LENGTH 0x400
#define ROM_START 0x00600400
#define ROM_LENGTH 0x1efc00
#define ROM_END 0x007f0000
#endif
#endif

#ifdef CONFIG_UCQUICC
#define ROMVEC_START 0x00000000
#define ROMVEC_LENGTH 0x404
#define ROM_START 0x00000404
#define ROM_LENGTH 0x1ff6fc
#define ROM_END 0x00200000
#endif

#if defined(CONFIG_RAMKERNEL)
#define RAM_START CONFIG_KERNELBASE
#define RAM_LENGTH (CONFIG_RAMBASE + CONFIG_RAMSIZE - CONFIG_KERNELBASE)
Expand All @@ -71,6 +21,10 @@
#if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL)
#define RAM_START CONFIG_RAMBASE
#define RAM_LENGTH CONFIG_RAMSIZE
#define ROMVEC_START CONFIG_ROMVEC
#define ROMVEC_LENGTH CONFIG_ROMVECSIZE
#define ROM_START CONFIG_ROMSTART
#define ROM_LENGTH CONFIG_ROMSIZE
#define TEXT rom
#define DATA ram
#define INIT ram
Expand All @@ -90,7 +44,6 @@ MEMORY {
#ifdef ROM_START
romvec : ORIGIN = ROMVEC_START, LENGTH = ROMVEC_LENGTH
rom : ORIGIN = ROM_START, LENGTH = ROM_LENGTH
erom : ORIGIN = ROM_END, LENGTH = 0
#endif
}

Expand Down Expand Up @@ -167,13 +120,6 @@ SECTIONS {
_etext = . ;
} > TEXT

#ifdef ROM_END
. = ROM_END ;
.erom : {
__rom_end = . ;
} > erom
#endif

.data DATA_ADDR : {
. = ALIGN(4);
_sdata = . ;
Expand Down

0 comments on commit 1c952af

Please sign in to comment.