diff options
Diffstat (limited to 'arch/microblaze/Makefile')
-rw-r--r-- | arch/microblaze/Makefile | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index 8439598d4655..34187354304a 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile | |||
@@ -37,12 +37,12 @@ CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare | |||
37 | CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER)) | 37 | CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER)) |
38 | 38 | ||
39 | # r31 holds current when in kernel mode | 39 | # r31 holds current when in kernel mode |
40 | KBUILD_KERNEL += -ffixed-r31 $(CPUFLAGS-1) $(CPUFLAGS-2) | 40 | KBUILD_CFLAGS += -ffixed-r31 $(CPUFLAGS-1) $(CPUFLAGS-2) |
41 | 41 | ||
42 | LDFLAGS := | 42 | LDFLAGS := |
43 | LDFLAGS_vmlinux := | 43 | LDFLAGS_vmlinux := |
44 | 44 | ||
45 | LIBGCC := $(shell $(CC) $(KBUILD_KERNEL) -print-libgcc-file-name) | 45 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) |
46 | 46 | ||
47 | head-y := arch/microblaze/kernel/head.o | 47 | head-y := arch/microblaze/kernel/head.o |
48 | libs-y += arch/microblaze/lib/ | 48 | libs-y += arch/microblaze/lib/ |
@@ -53,22 +53,41 @@ core-y += arch/microblaze/platform/ | |||
53 | 53 | ||
54 | boot := arch/microblaze/boot | 54 | boot := arch/microblaze/boot |
55 | 55 | ||
56 | # Are we making a simpleImage.<boardname> target? If so, crack out the boardname | ||
57 | DTB:=$(subst simpleImage.,,$(filter simpleImage.%, $(MAKECMDGOALS))) | ||
58 | |||
59 | ifneq ($(DTB),) | ||
60 | core-y += $(boot)/ | ||
61 | endif | ||
62 | |||
56 | # defines filename extension depending memory management type | 63 | # defines filename extension depending memory management type |
57 | ifeq ($(CONFIG_MMU),) | 64 | ifeq ($(CONFIG_MMU),) |
58 | MMU := -nommu | 65 | MMU := -nommu |
59 | endif | 66 | endif |
60 | 67 | ||
61 | export MMU | 68 | export MMU DTB |
62 | 69 | ||
63 | all: linux.bin | 70 | all: linux.bin |
64 | 71 | ||
72 | BOOT_TARGETS = linux.bin linux.bin.gz simpleImage.% | ||
73 | |||
65 | archclean: | 74 | archclean: |
66 | $(Q)$(MAKE) $(clean)=$(boot) | 75 | $(Q)$(MAKE) $(clean)=$(boot) |
67 | 76 | ||
68 | linux.bin linux.bin.gz: vmlinux | 77 | $(BOOT_TARGETS): vmlinux |
69 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | 78 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
70 | 79 | ||
71 | define archhelp | 80 | define archhelp |
72 | echo '* linux.bin - Create raw binary' | 81 | echo '* linux.bin - Create raw binary' |
73 | echo ' linux.bin.gz - Create compressed raw binary' | 82 | echo ' linux.bin.gz - Create compressed raw binary' |
83 | echo ' simpleImage.<dt> - ELF image with $(arch)/boot/dts/<dt>.dts linked in' | ||
84 | echo ' - stripped elf with fdt blob | ||
85 | echo ' simpleImage.<dt>.unstrip - full ELF image with fdt blob' | ||
86 | echo ' *_defconfig - Select default config from arch/microblaze/configs' | ||
87 | echo '' | ||
88 | echo ' Targets with <dt> embed a device tree blob inside the image' | ||
89 | echo ' These targets support board with firmware that does not' | ||
90 | echo ' support passing a device tree directly. Replace <dt> with the' | ||
91 | echo ' name of a dts file from the arch/microblaze/boot/dts/ directory' | ||
92 | echo ' (minus the .dts extension).' | ||
74 | endef | 93 | endef |