diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-05-09 11:55:45 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-05-09 11:55:45 -0400 |
commit | b20883562455060272126c36563a7d8edafc30d3 (patch) | |
tree | 5a5c814322e5ff0bb21c60c96b8d9dc29d6b9e75 | |
parent | a2e76c80d93ec3c59a030b6ca37b9087033565c1 (diff) |
sh: Provide a BITS definition, use it in the arch/sh/boot/ Makefiles.
This introduces a BITS export that can handily be picked up by Makefiles
for cleaner sharing. Reflect its use in arch/sh/boot/compressed/ in
preparation for unifying the Makefiles.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | arch/sh/Makefile | 8 | ||||
-rw-r--r-- | arch/sh/boot/Makefile | 6 | ||||
-rw-r--r-- | arch/sh/boot/compressed/Makefile | 4 | ||||
-rw-r--r-- | arch/sh/boot/compressed/Makefile_32 | 6 |
4 files changed, 10 insertions, 14 deletions
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index b941dc9b20f4..c1bbae1f65e3 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile | |||
@@ -91,9 +91,11 @@ KBUILD_IMAGE := $(defaultimage-y) | |||
91 | # | 91 | # |
92 | ifdef CONFIG_SUPERH32 | 92 | ifdef CONFIG_SUPERH32 |
93 | UTS_MACHINE := sh | 93 | UTS_MACHINE := sh |
94 | BITS := 32 | ||
94 | LDFLAGS_vmlinux += -e _stext | 95 | LDFLAGS_vmlinux += -e _stext |
95 | else | 96 | else |
96 | UTS_MACHINE := sh64 | 97 | UTS_MACHINE := sh64 |
98 | BITS := 64 | ||
97 | LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_PAGE_OFFSET) \ | 99 | LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_PAGE_OFFSET) \ |
98 | --defsym phys_stext_shmedia=phys_stext+1 \ | 100 | --defsym phys_stext_shmedia=phys_stext+1 \ |
99 | -e phys_stext_shmedia | 101 | -e phys_stext_shmedia |
@@ -109,11 +111,9 @@ LDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64+4' --oformat $(ld-bfd) | |||
109 | LDFLAGS += -EB | 111 | LDFLAGS += -EB |
110 | endif | 112 | endif |
111 | 113 | ||
112 | export ld-bfd | 114 | export ld-bfd BITS |
113 | 115 | ||
114 | head-y := arch/sh/kernel/init_task.o | 116 | head-y := arch/sh/kernel/init_task.o arch/sh/kernel/head_$(BITS).o |
115 | head-$(CONFIG_SUPERH32) += arch/sh/kernel/head_32.o | ||
116 | head-$(CONFIG_SUPERH64) += arch/sh/kernel/head_64.o | ||
117 | 117 | ||
118 | core-y += arch/sh/kernel/ arch/sh/mm/ arch/sh/boards/ | 118 | core-y += arch/sh/kernel/ arch/sh/mm/ arch/sh/boards/ |
119 | core-$(CONFIG_SH_FPU_EMU) += arch/sh/math-emu/ | 119 | core-$(CONFIG_SH_FPU_EMU) += arch/sh/math-emu/ |
diff --git a/arch/sh/boot/Makefile b/arch/sh/boot/Makefile index 95483d161258..78efb04c28f3 100644 --- a/arch/sh/boot/Makefile +++ b/arch/sh/boot/Makefile | |||
@@ -20,9 +20,6 @@ CONFIG_BOOT_LINK_OFFSET ?= 0x00800000 | |||
20 | CONFIG_ZERO_PAGE_OFFSET ?= 0x00001000 | 20 | CONFIG_ZERO_PAGE_OFFSET ?= 0x00001000 |
21 | CONFIG_ENTRY_OFFSET ?= 0x00001000 | 21 | CONFIG_ENTRY_OFFSET ?= 0x00001000 |
22 | 22 | ||
23 | export CONFIG_PAGE_OFFSET CONFIG_MEMORY_START CONFIG_BOOT_LINK_OFFSET \ | ||
24 | CONFIG_ZERO_PAGE_OFFSET CONFIG_ENTRY_OFFSET | ||
25 | |||
26 | targets := zImage vmlinux.srec uImage uImage.srec | 23 | targets := zImage vmlinux.srec uImage uImage.srec |
27 | subdir- := compressed | 24 | subdir- := compressed |
28 | 25 | ||
@@ -43,6 +40,9 @@ KERNEL_MEMORY := $(shell /bin/bash -c 'printf "0x%08x" \ | |||
43 | $$[$(CONFIG_MEMORY_START)]') | 40 | $$[$(CONFIG_MEMORY_START)]') |
44 | endif | 41 | endif |
45 | 42 | ||
43 | export CONFIG_PAGE_OFFSET CONFIG_MEMORY_START CONFIG_BOOT_LINK_OFFSET \ | ||
44 | CONFIG_ZERO_PAGE_OFFSET CONFIG_ENTRY_OFFSET KERNEL_MEMORY | ||
45 | |||
46 | KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%08x" \ | 46 | KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%08x" \ |
47 | $$[$(CONFIG_PAGE_OFFSET) + \ | 47 | $$[$(CONFIG_PAGE_OFFSET) + \ |
48 | $(KERNEL_MEMORY) + \ | 48 | $(KERNEL_MEMORY) + \ |
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile index efb01dc3c8c3..f0a71df26096 100644 --- a/arch/sh/boot/compressed/Makefile +++ b/arch/sh/boot/compressed/Makefile | |||
@@ -1,5 +1 @@ | |||
1 | ifeq ($(CONFIG_SUPERH32),y) | ||
2 | include ${srctree}/arch/sh/boot/compressed/Makefile_32 | include ${srctree}/arch/sh/boot/compressed/Makefile_32 | |
3 | else | ||
4 | include ${srctree}/arch/sh/boot/compressed/Makefile_64 | ||
5 | endif | ||
diff --git a/arch/sh/boot/compressed/Makefile_32 b/arch/sh/boot/compressed/Makefile_32 index 249255729d7c..9531bf1b7c2f 100644 --- a/arch/sh/boot/compressed/Makefile_32 +++ b/arch/sh/boot/compressed/Makefile_32 | |||
@@ -5,9 +5,9 @@ | |||
5 | # | 5 | # |
6 | 6 | ||
7 | targets := vmlinux vmlinux.bin vmlinux.bin.gz \ | 7 | targets := vmlinux vmlinux.bin vmlinux.bin.gz \ |
8 | head_32.o misc_32.o piggy.o | 8 | head_$(BITS).o misc_$(BITS).o piggy.o |
9 | 9 | ||
10 | OBJECTS = $(obj)/head_32.o $(obj)/misc_32.o | 10 | OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc_$(BITS).o $(obj)/cache.o |
11 | 11 | ||
12 | ifdef CONFIG_SH_STANDARD_BIOS | 12 | ifdef CONFIG_SH_STANDARD_BIOS |
13 | OBJECTS += $(obj)/../../kernel/sh_bios.o | 13 | OBJECTS += $(obj)/../../kernel/sh_bios.o |
@@ -18,7 +18,7 @@ endif | |||
18 | # | 18 | # |
19 | IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \ | 19 | IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \ |
20 | $$[$(CONFIG_PAGE_OFFSET) + \ | 20 | $$[$(CONFIG_PAGE_OFFSET) + \ |
21 | $(CONFIG_MEMORY_START) + \ | 21 | $(KERNEL_MEMORY) + \ |
22 | $(CONFIG_BOOT_LINK_OFFSET)]') | 22 | $(CONFIG_BOOT_LINK_OFFSET)]') |
23 | 23 | ||
24 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) | 24 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) |