diff options
author | Nicolas Pitre <nico@cam.org> | 2005-10-29 16:44:56 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-10-29 16:44:56 -0400 |
commit | 37d07b72ef58f2d5ec7701ab75084fbeee0e503e (patch) | |
tree | da42fbad5b8ac6c79a258a46aff5f5d338ac138f /arch/arm/Makefile | |
parent | f09b99799991c7c3ba441162406247f5df077322 (diff) |
[ARM] 3061/1: cleanup the XIP link address mess
Patch from Nicolas Pitre
Since vmlinux.lds.S is preprocessed, we can use the defines already
present in asm/memory.h (allowed by patch #3060) for the XIP kernel link
address instead of relying on a duplicated Makefile hardcoded value, and
also get rid of its dependency on awk to handle it at the same time.
While at it let's clean XIP stuff even further and make things clearer
in head.S with a nice code reduction.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/Makefile')
-rw-r--r-- | arch/arm/Makefile | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 299bc0468702..64cf480b0b02 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -8,7 +8,7 @@ | |||
8 | # Copyright (C) 1995-2001 by Russell King | 8 | # Copyright (C) 1995-2001 by Russell King |
9 | 9 | ||
10 | LDFLAGS_vmlinux :=-p --no-undefined -X | 10 | LDFLAGS_vmlinux :=-p --no-undefined -X |
11 | CPPFLAGS_vmlinux.lds = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR) | 11 | CPPFLAGS_vmlinux.lds = -DKERNEL_RAM_ADDR=$(TEXTADDR) |
12 | OBJCOPYFLAGS :=-O binary -R .note -R .comment -S | 12 | OBJCOPYFLAGS :=-O binary -R .note -R .comment -S |
13 | GZFLAGS :=-9 | 13 | GZFLAGS :=-9 |
14 | #CFLAGS +=-pipe | 14 | #CFLAGS +=-pipe |
@@ -108,27 +108,19 @@ export CFLAGS_3c589_cs.o | |||
108 | endif | 108 | endif |
109 | 109 | ||
110 | TEXTADDR := $(textaddr-y) | 110 | TEXTADDR := $(textaddr-y) |
111 | ifeq ($(CONFIG_XIP_KERNEL),y) | ||
112 | DATAADDR := $(TEXTADDR) | ||
113 | xipaddr-$(CONFIG_ARCH_CO285) := 0x5f000000 | ||
114 | xipaddr-y ?= 0xbf000000 | ||
115 | # Replace phys addr with virt addr while keeping offset from base. | ||
116 | TEXTADDR := $(shell echo $(CONFIG_XIP_PHYS_ADDR) $(xipaddr-y) | \ | ||
117 | awk --non-decimal-data '/[:xdigit:]/ \ | ||
118 | { printf("0x%x\n", and($$1, 0x000fffff) + $$2) }' ) | ||
119 | endif | ||
120 | 111 | ||
121 | ifeq ($(incdir-y),) | 112 | ifeq ($(incdir-y),) |
122 | incdir-y := $(machine-y) | 113 | incdir-y := $(machine-y) |
123 | endif | 114 | endif |
124 | INCDIR := arch-$(incdir-y) | 115 | INCDIR := arch-$(incdir-y) |
116 | |||
125 | ifneq ($(machine-y),) | 117 | ifneq ($(machine-y),) |
126 | MACHINE := arch/arm/mach-$(machine-y)/ | 118 | MACHINE := arch/arm/mach-$(machine-y)/ |
127 | else | 119 | else |
128 | MACHINE := | 120 | MACHINE := |
129 | endif | 121 | endif |
130 | 122 | ||
131 | export TEXTADDR DATAADDR GZFLAGS | 123 | export TEXTADDR GZFLAGS |
132 | 124 | ||
133 | # Do we have FASTFPE? | 125 | # Do we have FASTFPE? |
134 | FASTFPE :=arch/arm/fastfpe | 126 | FASTFPE :=arch/arm/fastfpe |