aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/lasat
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2013-08-30 11:42:41 -0400
committerRalf Baechle <ralf@linux-mips.org>2013-09-03 11:58:37 -0400
commit3185557d1acf8cc0c937b1343de83e2483bde28b (patch)
treed7b64e678000c35870ab4a00f27f01f456550d79 /arch/mips/lasat
parent38d2d649be17b291a965a2e1370d119ee319caf2 (diff)
MIPS: Refactor load/entry address calculations
The vmlinux load address and entry address is calculated in multiple places: - arch/mips/Makefile defines load-y from CONFIG_PHYSICAL_START (or defined by the platform) and passes it to arch/mips/boot/compressed/Makefile. - arch/mips/boot/compressed/Makefile calculates kernel entry using nm. - arch/mips/lasat/image/Makefile calculates both load and entry address using nm. Lets combine these in the main Makefile and then pass them as Make parameters to each of the three boot image Makefiles (in boot/, boot/compressed, lasat/image/). The boot/ Makefile doesn't currently use them, but will soon need to for U-Boot image targets. The existing load-y definition is used in preference to calculating the load address using nm. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/5794/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/lasat')
-rw-r--r--arch/mips/lasat/image/Makefile6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/mips/lasat/image/Makefile b/arch/mips/lasat/image/Makefile
index dfb509d21d8e..fd32075679c6 100644
--- a/arch/mips/lasat/image/Makefile
+++ b/arch/mips/lasat/image/Makefile
@@ -13,13 +13,11 @@ endif
13MKLASATIMG = mklasatimg 13MKLASATIMG = mklasatimg
14MKLASATIMG_ARCH = mq2,mqpro,sp100,sp200 14MKLASATIMG_ARCH = mq2,mqpro,sp100,sp200
15KERNEL_IMAGE = vmlinux 15KERNEL_IMAGE = vmlinux
16KERNEL_START = $(shell $(NM) $(KERNEL_IMAGE) | grep " _text" | cut -f1 -d\ )
17KERNEL_ENTRY = $(shell $(NM) $(KERNEL_IMAGE) | grep kernel_entry | cut -f1 -d\ )
18 16
19LDSCRIPT= -L$(srctree)/$(src) -Tromscript.normal 17LDSCRIPT= -L$(srctree)/$(src) -Tromscript.normal
20 18
21HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ 19HEAD_DEFINES := -D_kernel_start=$(VMLINUX_LOAD_ADDRESS) \
22 -D_kernel_entry=0x$(KERNEL_ENTRY) \ 20 -D_kernel_entry=$(VMLINUX_ENTRY_ADDRESS) \
23 -D VERSION="\"$(Version)\"" \ 21 -D VERSION="\"$(Version)\"" \
24 -D TIMESTAMP=$(shell date +%s) 22 -D TIMESTAMP=$(shell date +%s)
25 23