]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
sh: Provide a BITS definition, use it in the arch/sh/boot/ Makefiles.
authorPaul Mundt <lethal@linux-sh.org>
Sat, 9 May 2009 15:55:45 +0000 (00:55 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Sat, 9 May 2009 15:55:45 +0000 (00:55 +0900)
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>
arch/sh/Makefile
arch/sh/boot/Makefile
arch/sh/boot/compressed/Makefile
arch/sh/boot/compressed/Makefile_32

index b941dc9b20f41f06139415936b292d69a4c5ddae..c1bbae1f65e37b24563542dedad69744b5c50ea4 100644 (file)
@@ -91,9 +91,11 @@ KBUILD_IMAGE         := $(defaultimage-y)
 #
 ifdef CONFIG_SUPERH32
 UTS_MACHINE    := sh
+BITS           := 32
 LDFLAGS_vmlinux        += -e _stext
 else
 UTS_MACHINE    := sh64
+BITS           := 64
 LDFLAGS_vmlinux        += --defsym phys_stext=_stext-$(CONFIG_PAGE_OFFSET) \
                   --defsym phys_stext_shmedia=phys_stext+1 \
                   -e phys_stext_shmedia
@@ -109,11 +111,9 @@ LDFLAGS_vmlinux            += --defsym 'jiffies=jiffies_64+4' --oformat $(ld-bfd)
 LDFLAGS                        += -EB
 endif
 
-export ld-bfd
+export ld-bfd BITS
 
-head-y                 := arch/sh/kernel/init_task.o
-head-$(CONFIG_SUPERH32)        += arch/sh/kernel/head_32.o
-head-$(CONFIG_SUPERH64)        += arch/sh/kernel/head_64.o
+head-y := arch/sh/kernel/init_task.o arch/sh/kernel/head_$(BITS).o
 
 core-y                         += arch/sh/kernel/ arch/sh/mm/ arch/sh/boards/
 core-$(CONFIG_SH_FPU_EMU)      += arch/sh/math-emu/
index 95483d16125882d69d24620f9f8d5a8c7e736c98..78efb04c28f3dfb2362e6610318491a99e08ce54 100644 (file)
@@ -20,9 +20,6 @@ CONFIG_BOOT_LINK_OFFSET       ?= 0x00800000
 CONFIG_ZERO_PAGE_OFFSET        ?= 0x00001000
 CONFIG_ENTRY_OFFSET    ?= 0x00001000
 
-export CONFIG_PAGE_OFFSET CONFIG_MEMORY_START CONFIG_BOOT_LINK_OFFSET \
-       CONFIG_ZERO_PAGE_OFFSET CONFIG_ENTRY_OFFSET
-
 targets := zImage vmlinux.srec uImage uImage.srec
 subdir- := compressed
 
@@ -43,6 +40,9 @@ KERNEL_MEMORY := $(shell /bin/bash -c 'printf "0x%08x" \
                     $$[$(CONFIG_MEMORY_START)]')
 endif
 
+export CONFIG_PAGE_OFFSET CONFIG_MEMORY_START CONFIG_BOOT_LINK_OFFSET \
+       CONFIG_ZERO_PAGE_OFFSET CONFIG_ENTRY_OFFSET KERNEL_MEMORY
+
 KERNEL_LOAD    := $(shell /bin/bash -c 'printf "0x%08x" \
                     $$[$(CONFIG_PAGE_OFFSET)  + \
                        $(KERNEL_MEMORY) + \
index efb01dc3c8c3aaa35ece6e2e21a428e1d1c0aa40..f0a71df26096c8fc391d3b981368880887bbb680 100644 (file)
@@ -1,5 +1 @@
-ifeq ($(CONFIG_SUPERH32),y)
 include ${srctree}/arch/sh/boot/compressed/Makefile_32
-else
-include ${srctree}/arch/sh/boot/compressed/Makefile_64
-endif
index 249255729d7c051dea564e05ba9e57f7ae71af1c..9531bf1b7c2f878b632f154f5e9a4bd06717758b 100644 (file)
@@ -5,9 +5,9 @@
 #
 
 targets                := vmlinux vmlinux.bin vmlinux.bin.gz \
-                  head_32.o misc_32.o piggy.o
+                  head_$(BITS).o misc_$(BITS).o piggy.o
 
-OBJECTS = $(obj)/head_32.o $(obj)/misc_32.o
+OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc_$(BITS).o $(obj)/cache.o
 
 ifdef CONFIG_SH_STANDARD_BIOS
 OBJECTS += $(obj)/../../kernel/sh_bios.o
@@ -18,7 +18,7 @@ endif
 #
 IMAGE_OFFSET   := $(shell /bin/bash -c 'printf "0x%08x" \
                     $$[$(CONFIG_PAGE_OFFSET)  + \
-                       $(CONFIG_MEMORY_START) + \
+                       $(KERNEL_MEMORY) + \
                        $(CONFIG_BOOT_LINK_OFFSET)]')
 
 LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)