1 # SPDX-License-Identifier: GPL-2.0-only
2 OBJCOPYFLAGS :=-O binary
5 ifdef CONFIG_CPU_HAS_FPU
9 ifdef CONFIG_CPU_HAS_VDSP
13 ifdef CONFIG_CPU_HAS_TEE
17 ifdef CONFIG_CPU_CK610
22 ifdef CONFIG_CPU_CK810
27 ifdef CONFIG_CPU_CK807
32 ifdef CONFIG_CPU_CK860
38 MCPU_STR = $(CPUTYPE)$(FPUEXT)$(VDSPEXT)$(TEEEXT)
39 KBUILD_CFLAGS += -mcpu=$(CPUTYPE) -Wa,-mcpu=$(MCPU_STR)
40 KBUILD_CFLAGS += -DCSKYCPU_DEF_NAME=\"$(MCPU_STR)\"
41 KBUILD_CFLAGS += -msoft-float -mdiv
42 KBUILD_CFLAGS += -fno-tree-vectorize
45 KBUILD_CFLAGS += -pipe
46 ifeq ($(CSKYABI),abiv2)
47 KBUILD_CFLAGS += -mno-stack-size
50 ifdef CONFIG_FRAME_POINTER
51 KBUILD_CFLAGS += -mbacktrace
54 abidirs := $(patsubst %,arch/csky/%/,$(CSKYABI))
55 KBUILD_CFLAGS += $(patsubst %,-I$(srctree)/%inc,$(abidirs))
57 KBUILD_CPPFLAGS += -mlittle-endian
60 KBUILD_AFLAGS += $(KBUILD_CFLAGS)
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
71 zImage Image uImage: vmlinux
72 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
75 echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
76 echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
77 echo ' uImage - U-Boot wrapped zImage'