diff options
Diffstat (limited to 'arch/microblaze/Makefile')
-rw-r--r-- | arch/microblaze/Makefile | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index d0bcf80a1136..8439598d4655 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile | |||
@@ -6,14 +6,16 @@ endif | |||
6 | 6 | ||
7 | # What CPU vesion are we building for, and crack it open | 7 | # What CPU vesion are we building for, and crack it open |
8 | # as major.minor.rev | 8 | # as major.minor.rev |
9 | CPU_VER=$(subst ",,$(CONFIG_XILINX_MICROBLAZE0_HW_VER) ) | 9 | CPU_VER := $(shell echo $(CONFIG_XILINX_MICROBLAZE0_HW_VER)) |
10 | CPU_MAJOR=$(shell echo $(CPU_VER) | cut -d '.' -f 1) | 10 | CPU_MAJOR := $(shell echo $(CPU_VER) | cut -d '.' -f 1) |
11 | CPU_MINOR=$(shell echo $(CPU_VER) | cut -d '.' -f 2) | 11 | CPU_MINOR := $(shell echo $(CPU_VER) | cut -d '.' -f 2) |
12 | CPU_REV=$(shell echo $(CPU_VER) | cut -d '.' -f 3) | 12 | CPU_REV := $(shell echo $(CPU_VER) | cut -d '.' -f 3) |
13 | 13 | ||
14 | export CPU_VER CPU_MAJOR CPU_MINOR CPU_REV | 14 | export CPU_VER CPU_MAJOR CPU_MINOR CPU_REV |
15 | 15 | ||
16 | # Use cpu-related CONFIG_ vars to set compile options. | 16 | # Use cpu-related CONFIG_ vars to set compile options. |
17 | # The various CONFIG_XILINX cpu features options are integers 0/1/2... | ||
18 | # rather than bools y/n | ||
17 | 19 | ||
18 | # Work out HW multipler support. This is icky. | 20 | # Work out HW multipler support. This is icky. |
19 | # 1. Spartan2 has no HW multiplers. | 21 | # 1. Spartan2 has no HW multiplers. |
@@ -34,30 +36,29 @@ CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare | |||
34 | 36 | ||
35 | CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER)) | 37 | CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER)) |
36 | 38 | ||
37 | # The various CONFIG_XILINX cpu features options are integers 0/1/2... | ||
38 | # rather than bools y/n | ||
39 | |||
40 | # r31 holds current when in kernel mode | 39 | # r31 holds current when in kernel mode |
41 | CFLAGS_KERNEL += -ffixed-r31 $(CPUFLAGS-1) $(CPUFLAGS-2) | 40 | KBUILD_KERNEL += -ffixed-r31 $(CPUFLAGS-1) $(CPUFLAGS-2) |
42 | 41 | ||
43 | LDFLAGS := | 42 | LDFLAGS := |
44 | LDFLAGS_vmlinux := | 43 | LDFLAGS_vmlinux := |
45 | LDFLAGS_BLOB := --format binary --oformat elf32-microblaze | ||
46 | 44 | ||
47 | LIBGCC := $(shell $(CC) $(CFLAGS_KERNEL) -print-libgcc-file-name) | 45 | LIBGCC := $(shell $(CC) $(KBUILD_KERNEL) -print-libgcc-file-name) |
48 | 46 | ||
49 | head-y := arch/microblaze/kernel/head.o | 47 | head-y := arch/microblaze/kernel/head.o |
50 | libs-y += arch/microblaze/lib/ $(LIBGCC) | 48 | libs-y += arch/microblaze/lib/ |
51 | core-y += arch/microblaze/kernel/ arch/microblaze/mm/ \ | 49 | libs-y += $(LIBGCC) |
52 | arch/microblaze/platform/ | 50 | core-y += arch/microblaze/kernel/ |
51 | core-y += arch/microblaze/mm/ | ||
52 | core-y += arch/microblaze/platform/ | ||
53 | 53 | ||
54 | boot := arch/$(ARCH)/boot | 54 | boot := arch/microblaze/boot |
55 | 55 | ||
56 | # defines filename extension depending memory management type | 56 | # defines filename extension depending memory management type |
57 | ifeq ($(CONFIG_MMU),) | 57 | ifeq ($(CONFIG_MMU),) |
58 | MMUEXT := -nommu | 58 | MMU := -nommu |
59 | endif | 59 | endif |
60 | export MMUEXT | 60 | |
61 | export MMU | ||
61 | 62 | ||
62 | all: linux.bin | 63 | all: linux.bin |
63 | 64 | ||