Blame view
arch/microblaze/Makefile
3.25 KB
4b2368ffd microblaze_mmu_v2... |
1 2 3 |
ifeq ($(CONFIG_MMU),y) UTS_SYSNAME = -DUTS_SYSNAME=\"Linux\" else |
5f8ffb5f6 microblaze_v8: Ma... |
4 |
UTS_SYSNAME = -DUTS_SYSNAME=\"uClinux\" |
4b2368ffd microblaze_mmu_v2... |
5 |
endif |
5f8ffb5f6 microblaze_v8: Ma... |
6 7 8 |
# What CPU vesion are we building for, and crack it open # as major.minor.rev |
950b260ed microblaze: Makef... |
9 10 11 12 |
CPU_VER := $(shell echo $(CONFIG_XILINX_MICROBLAZE0_HW_VER)) CPU_MAJOR := $(shell echo $(CPU_VER) | cut -d '.' -f 1) CPU_MINOR := $(shell echo $(CPU_VER) | cut -d '.' -f 2) CPU_REV := $(shell echo $(CPU_VER) | cut -d '.' -f 3) |
5f8ffb5f6 microblaze_v8: Ma... |
13 14 15 16 |
export CPU_VER CPU_MAJOR CPU_MINOR CPU_REV # Use cpu-related CONFIG_ vars to set compile options. |
950b260ed microblaze: Makef... |
17 18 |
# The various CONFIG_XILINX cpu features options are integers 0/1/2... # rather than bools y/n |
5f8ffb5f6 microblaze_v8: Ma... |
19 |
|
7f01af04b microblaze: trivi... |
20 |
# Work out HW multipler support. This is tricky. |
25985edce Fix common misspe... |
21 |
# 1. Spartan2 has no HW multipliers. |
5f8ffb5f6 microblaze_v8: Ma... |
22 23 24 25 26 27 |
# 2. MicroBlaze v3.x always uses them, except in Spartan 2 # 3. All other FPGa/CPU ver combos, we can trust the CONFIG_ settings ifeq (,$(findstring spartan2,$(CONFIG_XILINX_MICROBLAZE0_FAMILY))) ifeq ($(CPU_MAJOR),3) CPUFLAGS-1 += -mno-xl-soft-mul else |
732bee7af fix typos concern... |
28 |
# USE_HW_MUL can be 0, 1, or 2, defining a hierarchy of HW Mul support. |
5f8ffb5f6 microblaze_v8: Ma... |
29 30 31 32 33 34 |
CPUFLAGS-$(subst 1,,$(CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL)) += -mxl-multiply-high CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL) += -mno-xl-soft-mul endif endif CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_DIV) += -mno-xl-soft-div CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_BARREL) += -mxl-barrel-shift |
04e3a553e microblaze: Corre... |
35 |
CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare |
5f8ffb5f6 microblaze_v8: Ma... |
36 37 |
CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER)) |
5f8ffb5f6 microblaze_v8: Ma... |
38 |
# r31 holds current when in kernel mode |
e469b0eb3 microblaze: Use c... |
39 |
KBUILD_CFLAGS += -ffixed-r31 $(CPUFLAGS-1) $(CPUFLAGS-2) |
5f8ffb5f6 microblaze_v8: Ma... |
40 |
|
c3055d145 microblaze: clean... |
41 42 |
LDFLAGS := LDFLAGS_vmlinux := |
5f8ffb5f6 microblaze_v8: Ma... |
43 |
|
950b260ed microblaze: Makef... |
44 45 |
head-y := arch/microblaze/kernel/head.o libs-y += arch/microblaze/lib/ |
950b260ed microblaze: Makef... |
46 47 48 |
core-y += arch/microblaze/kernel/ core-y += arch/microblaze/mm/ core-y += arch/microblaze/platform/ |
a6475c132 microblaze: Enabl... |
49 |
core-$(CONFIG_PCI) += arch/microblaze/pci/ |
5f8ffb5f6 microblaze_v8: Ma... |
50 |
|
3540ce823 microblaze: Core ... |
51 |
drivers-$(CONFIG_OPROFILE) += arch/microblaze/oprofile/ |
950b260ed microblaze: Makef... |
52 |
boot := arch/microblaze/boot |
5f8ffb5f6 microblaze_v8: Ma... |
53 |
|
f05131cd7 microblaze: Suppo... |
54 55 56 57 58 59 |
# Are we making a simpleImage.<boardname> target? If so, crack out the boardname DTB:=$(subst simpleImage.,,$(filter simpleImage.%, $(MAKECMDGOALS))) ifneq ($(DTB),) core-y += $(boot)/ endif |
5f8ffb5f6 microblaze_v8: Ma... |
60 61 |
# defines filename extension depending memory management type ifeq ($(CONFIG_MMU),) |
950b260ed microblaze: Makef... |
62 |
MMU := -nommu |
5f8ffb5f6 microblaze_v8: Ma... |
63 |
endif |
950b260ed microblaze: Makef... |
64 |
|
f05131cd7 microblaze: Suppo... |
65 |
export MMU DTB |
5f8ffb5f6 microblaze_v8: Ma... |
66 67 |
all: linux.bin |
b843e4ec0 microblaze: Fix b... |
68 69 70 |
# With make 3.82 we cannot mix normal and wildcard targets BOOT_TARGETS1 = linux.bin linux.bin.gz BOOT_TARGETS2 = simpleImage.% |
f05131cd7 microblaze: Suppo... |
71 |
|
5f8ffb5f6 microblaze_v8: Ma... |
72 73 |
archclean: $(Q)$(MAKE) $(clean)=$(boot) |
b843e4ec0 microblaze: Fix b... |
74 75 76 |
$(BOOT_TARGETS1): vmlinux $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ $(BOOT_TARGETS2): vmlinux |
5f8ffb5f6 microblaze_v8: Ma... |
77 78 79 |
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ define archhelp |
f05131cd7 microblaze: Suppo... |
80 81 82 |
echo '* linux.bin - Create raw binary' echo ' linux.bin.gz - Create compressed raw binary' echo ' simpleImage.<dt> - ELF image with $(arch)/boot/dts/<dt>.dts linked in' |
699d17bc1 microblaze: Add a... |
83 |
echo ' - stripped elf with fdt blob' |
f05131cd7 microblaze: Suppo... |
84 85 86 87 88 89 90 91 |
echo ' simpleImage.<dt>.unstrip - full ELF image with fdt blob' echo ' *_defconfig - Select default config from arch/microblaze/configs' echo '' echo ' Targets with <dt> embed a device tree blob inside the image' echo ' These targets support board with firmware that does not' echo ' support passing a device tree directly. Replace <dt> with the' echo ' name of a dts file from the arch/microblaze/boot/dts/ directory' echo ' (minus the .dts extension).' |
5f8ffb5f6 microblaze_v8: Ma... |
92 |
endef |
8a8804f1a microblaze: Fix M... |
93 94 |
MRPROPER_FILES += $(boot)/simpleImage.* |