2019-05-19 15:07:45 +03:00
# SPDX-License-Identifier: GPL-2.0-only
2018-09-05 09:25:06 +03:00
OBJCOPYFLAGS := -O binary
GZFLAGS := -9
i f d e f C O N F I G _ C P U _ H A S _ F P U
FPUEXT = f
e n d i f
i f d e f C O N F I G _ C P U _ H A S _ V D S P
VDSPEXT = v
e n d i f
i f d e f C O N F I G _ C P U _ H A S _ T E E
TEEEXT = t
e n d i f
i f d e f C O N F I G _ C P U _ C K 6 1 0
CPUTYPE = ck610
CSKYABI = abiv1
e n d i f
i f d e f C O N F I G _ C P U _ C K 8 1 0
CPUTYPE = ck810
CSKYABI = abiv2
e n d i f
i f d e f C O N F I G _ C P U _ C K 8 0 7
CPUTYPE = ck807
CSKYABI = abiv2
e n d i f
i f d e f C O N F I G _ C P U _ C K 8 6 0
CPUTYPE = ck860
CSKYABI = abiv2
e n d i f
i f n e q ( $( CSKYABI ) , )
MCPU_STR = $( CPUTYPE) $( FPUEXT) $( VDSPEXT) $( TEEEXT)
2019-02-19 07:32:41 +03:00
KBUILD_CFLAGS += -mcpu= $( CPUTYPE) -Wa,-mcpu= $( MCPU_STR)
2018-09-05 09:25:06 +03:00
KBUILD_CFLAGS += -DCSKYCPU_DEF_NAME= \" $( MCPU_STR) \"
KBUILD_CFLAGS += -msoft-float -mdiv
KBUILD_CFLAGS += -fno-tree-vectorize
e n d i f
KBUILD_CFLAGS += -pipe
i f e q ( $( CSKYABI ) , a b i v 2 )
KBUILD_CFLAGS += -mno-stack-size
e n d i f
2020-05-13 10:15:25 +03:00
i f d e f C O N F I G _ F R A M E _ P O I N T E R
2018-12-09 09:18:05 +03:00
KBUILD_CFLAGS += -mbacktrace
e n d i f
2018-09-05 09:25:06 +03:00
abidirs := $( patsubst %,arch/csky/%/,$( CSKYABI) )
KBUILD_CFLAGS += $( patsubst %,-I$( srctree) /%inc,$( abidirs) )
KBUILD_CPPFLAGS += -mlittle-endian
LDFLAGS += -EL
KBUILD_AFLAGS += $( KBUILD_CFLAGS)
core-y += arch/csky/$( CSKYABI) /
libs-y += arch/csky/lib/ \
$( shell $( CC) $( KBUILD_CFLAGS) $( KCFLAGS) -print-libgcc-file-name)
boot := arch/csky/boot
all : zImage
2018-10-30 13:46:47 +03:00
zImage Image uImage : vmlinux
2018-09-05 09:25:06 +03:00
$( Q) $( MAKE) $( build) = $( boot) $( boot) /$@
d e f i n e a r c h h e l p
echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
echo ' uImage - U-Boot wrapped zImage'
e n d e f