aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2009-03-27 09:25:51 -0400
committerMichal Simek <monstr@monstr.eu>2009-03-27 09:25:51 -0400
commit5f8ffb5f6649a261372547a5841285c23409ab68 (patch)
treee1f1e840e06e7d6e67730934a061aa96089e76e6 /arch
parent575ca2883ed7652aba09d7b77332004e45d56f69 (diff)
microblaze_v8: Makefiles for Microblaze cpu
Reviewed-by: Ingo Molnar <mingo@elte.hu> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: John Linn <john.linn@xilinx.com> Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: John Williams <john.williams@petalogix.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch')
-rw-r--r--arch/microblaze/Makefile69
-rw-r--r--arch/microblaze/boot/Makefile17
-rw-r--r--arch/microblaze/kernel/Makefile19
-rw-r--r--arch/microblaze/kernel/cpu/Makefile8
-rw-r--r--arch/microblaze/lib/Makefile13
-rw-r--r--arch/microblaze/mm/Makefile5
-rw-r--r--arch/microblaze/platform/Makefile6
-rw-r--r--arch/microblaze/platform/generic/Makefile3
8 files changed, 140 insertions, 0 deletions
diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile
new file mode 100644
index 000000000000..0dcbb9832974
--- /dev/null
+++ b/arch/microblaze/Makefile
@@ -0,0 +1,69 @@
1UTS_SYSNAME = -DUTS_SYSNAME=\"uClinux\"
2
3# What CPU vesion are we building for, and crack it open
4# as major.minor.rev
5CPU_VER=$(subst ",,$(CONFIG_XILINX_MICROBLAZE0_HW_VER) )
6CPU_MAJOR=$(shell echo $(CPU_VER) | cut -d '.' -f 1)
7CPU_MINOR=$(shell echo $(CPU_VER) | cut -d '.' -f 2)
8CPU_REV=$(shell echo $(CPU_VER) | cut -d '.' -f 3)
9
10export CPU_VER CPU_MAJOR CPU_MINOR CPU_REV
11
12# Use cpu-related CONFIG_ vars to set compile options.
13
14# Work out HW multipler support. This is icky.
15# 1. Spartan2 has no HW multiplers.
16# 2. MicroBlaze v3.x always uses them, except in Spartan 2
17# 3. All other FPGa/CPU ver combos, we can trust the CONFIG_ settings
18ifeq (,$(findstring spartan2,$(CONFIG_XILINX_MICROBLAZE0_FAMILY)))
19 ifeq ($(CPU_MAJOR),3)
20 CPUFLAGS-1 += -mno-xl-soft-mul
21 else
22 # USE_HW_MUL can be 0, 1, or 2, defining a heirarchy of HW Mul support.
23 CPUFLAGS-$(subst 1,,$(CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL)) += -mxl-multiply-high
24 CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL) += -mno-xl-soft-mul
25 endif
26endif
27CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_DIV) += -mno-xl-soft-div
28CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_BARREL) += -mxl-barrel-shift
29CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP) += -mxl-pattern-compare
30
31CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER))
32
33# The various CONFIG_XILINX cpu features options are integers 0/1/2...
34# rather than bools y/n
35CFLAGS += $(CPUFLAGS-1)
36CFLAGS += $(CPUFLAGS-2)
37
38# r31 holds current when in kernel mode
39CFLAGS += -ffixed-r31
40
41LDFLAGS_BLOB := --format binary --oformat elf32-microblaze
42
43LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
44
45head-y := arch/microblaze/kernel/head.o
46libs-y += arch/microblaze/lib/ $(LIBGCC)
47core-y += arch/microblaze/kernel/ arch/microblaze/mm/ \
48 arch/microblaze/platform/
49
50boot := arch/$(ARCH)/boot
51
52# defines filename extension depending memory management type
53ifeq ($(CONFIG_MMU),)
54MMUEXT := -nommu
55endif
56export MMUEXT
57
58all: linux.bin
59
60archclean:
61 $(Q)$(MAKE) $(clean)=$(boot)
62
63linux.bin linux.bin.gz: vmlinux
64 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
65
66define archhelp
67 echo '* linux.bin - Create raw binary'
68 echo ' linux.bin.gz - Create compressed raw binary'
69endef
diff --git a/arch/microblaze/boot/Makefile b/arch/microblaze/boot/Makefile
new file mode 100644
index 000000000000..844edf406d34
--- /dev/null
+++ b/arch/microblaze/boot/Makefile
@@ -0,0 +1,17 @@
1#
2# arch/microblaze/boot/Makefile
3#
4
5targets := linux.bin linux.bin.gz
6
7OBJCOPYFLAGS_linux.bin := -O binary
8
9$(obj)/linux.bin: vmlinux FORCE
10 $(call if_changed,objcopy)
11 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
12
13$(obj)/linux.bin.gz: $(obj)/linux.bin FORCE
14 $(call if_changed,gzip)
15 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
16
17clean-kernel += linux.bin linux.bin.gz
diff --git a/arch/microblaze/kernel/Makefile b/arch/microblaze/kernel/Makefile
new file mode 100644
index 000000000000..da94bec4ecba
--- /dev/null
+++ b/arch/microblaze/kernel/Makefile
@@ -0,0 +1,19 @@
1#
2# Makefile
3#
4
5extra-y := head.o vmlinux.lds
6
7obj-y += exceptions.o \
8 hw_exception_handler.o init_task.o intc.o irq.o of_device.o \
9 of_platform.o process.o prom.o prom_parse.o ptrace.o \
10 setup.o signal.o sys_microblaze.o timer.o traps.o
11
12obj-y += cpu/
13
14obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
15obj-$(CONFIG_SELFMOD) += selfmod.o
16obj-$(CONFIG_HEART_BEAT) += heartbeat.o
17obj-$(CONFIG_MODULES) += microblaze_ksyms.o module.o
18
19obj-y += entry$(MMUEXT).o
diff --git a/arch/microblaze/kernel/cpu/Makefile b/arch/microblaze/kernel/cpu/Makefile
new file mode 100644
index 000000000000..20646e549271
--- /dev/null
+++ b/arch/microblaze/kernel/cpu/Makefile
@@ -0,0 +1,8 @@
1#
2# Build the appropriate CPU version support
3#
4
5EXTRA_CFLAGS += -DCPU_MAJOR=$(CPU_MAJOR) -DCPU_MINOR=$(CPU_MINOR) \
6 -DCPU_REV=$(CPU_REV)
7
8obj-y += cache.o cpuinfo.o cpuinfo-pvr-full.o cpuinfo-static.o mb.o pvr.o
diff --git a/arch/microblaze/lib/Makefile b/arch/microblaze/lib/Makefile
new file mode 100644
index 000000000000..d27126bf306a
--- /dev/null
+++ b/arch/microblaze/lib/Makefile
@@ -0,0 +1,13 @@
1#
2# Makefile
3#
4
5lib-y := memset.o checksum.o
6
7ifeq ($(CONFIG_OPT_LIB_ASM),y)
8lib-y += fastcopy.o
9else
10lib-y += memcpy.o memmove.o
11endif
12
13lib-y += uaccess.o
diff --git a/arch/microblaze/mm/Makefile b/arch/microblaze/mm/Makefile
new file mode 100644
index 000000000000..bf9e4479a1fd
--- /dev/null
+++ b/arch/microblaze/mm/Makefile
@@ -0,0 +1,5 @@
1#
2# Makefile
3#
4
5obj-y := init.o
diff --git a/arch/microblaze/platform/Makefile b/arch/microblaze/platform/Makefile
new file mode 100644
index 000000000000..ea1b75cc5775
--- /dev/null
+++ b/arch/microblaze/platform/Makefile
@@ -0,0 +1,6 @@
1#
2# Makefile for arch/microblaze/platform directory
3#
4#obj-$(CONFIG_PLATFORM_GENERIC) += generic/
5
6obj-y += platform.o
diff --git a/arch/microblaze/platform/generic/Makefile b/arch/microblaze/platform/generic/Makefile
new file mode 100644
index 000000000000..9a8b1bd3fa6d
--- /dev/null
+++ b/arch/microblaze/platform/generic/Makefile
@@ -0,0 +1,3 @@
1#
2# Empty Makefile to keep make clean happy
3#