csky: remove builtin-dtb Kbuild
[linux/fpc-iii.git] / arch / csky / Makefile
blob91f72224f4b998e57e270ff71301dffe56f44431
1 OBJCOPYFLAGS :=-O binary
2 GZFLAGS :=-9
3 KBUILD_DEFCONFIG := defconfig
5 ifdef CONFIG_CPU_HAS_FPU
6 FPUEXT = f
7 endif
9 ifdef CONFIG_CPU_HAS_VDSP
10 VDSPEXT = v
11 endif
13 ifdef CONFIG_CPU_HAS_TEE
14 TEEEXT = t
15 endif
17 ifdef CONFIG_CPU_CK610
18 CPUTYPE = ck610
19 CSKYABI = abiv1
20 endif
22 ifdef CONFIG_CPU_CK810
23 CPUTYPE = ck810
24 CSKYABI = abiv2
25 endif
27 ifdef CONFIG_CPU_CK807
28 CPUTYPE = ck807
29 CSKYABI = abiv2
30 endif
32 ifdef CONFIG_CPU_CK860
33 CPUTYPE = ck860
34 CSKYABI = abiv2
35 endif
37 ifneq ($(CSKYABI),)
38 MCPU_STR = $(CPUTYPE)$(FPUEXT)$(VDSPEXT)$(TEEEXT)
39 KBUILD_CFLAGS += -mcpu=$(MCPU_STR)
40 KBUILD_CFLAGS += -DCSKYCPU_DEF_NAME=\"$(MCPU_STR)\"
41 KBUILD_CFLAGS += -msoft-float -mdiv
42 KBUILD_CFLAGS += -fno-tree-vectorize
43 endif
45 KBUILD_CFLAGS += -pipe
46 ifeq ($(CSKYABI),abiv2)
47 KBUILD_CFLAGS += -mno-stack-size
48 endif
50 abidirs := $(patsubst %,arch/csky/%/,$(CSKYABI))
51 KBUILD_CFLAGS += $(patsubst %,-I$(srctree)/%inc,$(abidirs))
53 KBUILD_CPPFLAGS += -mlittle-endian
54 LDFLAGS += -EL
56 KBUILD_AFLAGS += $(KBUILD_CFLAGS)
58 head-y := arch/csky/kernel/head.o
60 core-y += arch/csky/kernel/
61 core-y += arch/csky/mm/
62 core-y += arch/csky/$(CSKYABI)/
64 libs-y += arch/csky/lib/ \
65 $(shell $(CC) $(KBUILD_CFLAGS) $(KCFLAGS) -print-libgcc-file-name)
67 boot := arch/csky/boot
68 core-y += $(boot)/dts/
70 all: zImage
73 dtbs: scripts
74 $(Q)$(MAKE) $(build)=$(boot)/dts
76 %.dtb %.dtb.S %.dtb.o: scripts
77 $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
79 zImage Image uImage: vmlinux dtbs
80 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
82 archclean:
83 $(Q)$(MAKE) $(clean)=$(boot)
84 $(Q)$(MAKE) $(clean)=$(boot)/dts
85 rm -rf arch/csky/include/generated
87 define archhelp
88 echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
89 echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
90 echo ' uImage - U-Boot wrapped zImage'
91 endef