diff options
author | Michal Simek <monstr@monstr.eu> | 2009-03-27 09:25:51 -0400 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2009-03-27 09:25:51 -0400 |
commit | 5f8ffb5f6649a261372547a5841285c23409ab68 (patch) | |
tree | e1f1e840e06e7d6e67730934a061aa96089e76e6 | |
parent | 575ca2883ed7652aba09d7b77332004e45d56f69 (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>
-rw-r--r-- | arch/microblaze/Makefile | 69 | ||||
-rw-r--r-- | arch/microblaze/boot/Makefile | 17 | ||||
-rw-r--r-- | arch/microblaze/kernel/Makefile | 19 | ||||
-rw-r--r-- | arch/microblaze/kernel/cpu/Makefile | 8 | ||||
-rw-r--r-- | arch/microblaze/lib/Makefile | 13 | ||||
-rw-r--r-- | arch/microblaze/mm/Makefile | 5 | ||||
-rw-r--r-- | arch/microblaze/platform/Makefile | 6 | ||||
-rw-r--r-- | arch/microblaze/platform/generic/Makefile | 3 |
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 @@ | |||
1 | UTS_SYSNAME = -DUTS_SYSNAME=\"uClinux\" | ||
2 | |||
3 | # What CPU vesion are we building for, and crack it open | ||
4 | # as major.minor.rev | ||
5 | CPU_VER=$(subst ",,$(CONFIG_XILINX_MICROBLAZE0_HW_VER) ) | ||
6 | CPU_MAJOR=$(shell echo $(CPU_VER) | cut -d '.' -f 1) | ||
7 | CPU_MINOR=$(shell echo $(CPU_VER) | cut -d '.' -f 2) | ||
8 | CPU_REV=$(shell echo $(CPU_VER) | cut -d '.' -f 3) | ||
9 | |||
10 | export 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 | ||
18 | ifeq (,$(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 | ||
26 | endif | ||
27 | CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_DIV) += -mno-xl-soft-div | ||
28 | CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_BARREL) += -mxl-barrel-shift | ||
29 | CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP) += -mxl-pattern-compare | ||
30 | |||
31 | CPUFLAGS-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 | ||
35 | CFLAGS += $(CPUFLAGS-1) | ||
36 | CFLAGS += $(CPUFLAGS-2) | ||
37 | |||
38 | # r31 holds current when in kernel mode | ||
39 | CFLAGS += -ffixed-r31 | ||
40 | |||
41 | LDFLAGS_BLOB := --format binary --oformat elf32-microblaze | ||
42 | |||
43 | LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) | ||
44 | |||
45 | head-y := arch/microblaze/kernel/head.o | ||
46 | libs-y += arch/microblaze/lib/ $(LIBGCC) | ||
47 | core-y += arch/microblaze/kernel/ arch/microblaze/mm/ \ | ||
48 | arch/microblaze/platform/ | ||
49 | |||
50 | boot := arch/$(ARCH)/boot | ||
51 | |||
52 | # defines filename extension depending memory management type | ||
53 | ifeq ($(CONFIG_MMU),) | ||
54 | MMUEXT := -nommu | ||
55 | endif | ||
56 | export MMUEXT | ||
57 | |||
58 | all: linux.bin | ||
59 | |||
60 | archclean: | ||
61 | $(Q)$(MAKE) $(clean)=$(boot) | ||
62 | |||
63 | linux.bin linux.bin.gz: vmlinux | ||
64 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | ||
65 | |||
66 | define archhelp | ||
67 | echo '* linux.bin - Create raw binary' | ||
68 | echo ' linux.bin.gz - Create compressed raw binary' | ||
69 | endef | ||
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 | |||
5 | targets := linux.bin linux.bin.gz | ||
6 | |||
7 | OBJCOPYFLAGS_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 | |||
17 | clean-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 | |||
5 | extra-y := head.o vmlinux.lds | ||
6 | |||
7 | obj-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 | |||
12 | obj-y += cpu/ | ||
13 | |||
14 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o | ||
15 | obj-$(CONFIG_SELFMOD) += selfmod.o | ||
16 | obj-$(CONFIG_HEART_BEAT) += heartbeat.o | ||
17 | obj-$(CONFIG_MODULES) += microblaze_ksyms.o module.o | ||
18 | |||
19 | obj-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 | |||
5 | EXTRA_CFLAGS += -DCPU_MAJOR=$(CPU_MAJOR) -DCPU_MINOR=$(CPU_MINOR) \ | ||
6 | -DCPU_REV=$(CPU_REV) | ||
7 | |||
8 | obj-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 | |||
5 | lib-y := memset.o checksum.o | ||
6 | |||
7 | ifeq ($(CONFIG_OPT_LIB_ASM),y) | ||
8 | lib-y += fastcopy.o | ||
9 | else | ||
10 | lib-y += memcpy.o memmove.o | ||
11 | endif | ||
12 | |||
13 | lib-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 | |||
5 | obj-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 | |||
6 | obj-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 | # | ||