blob: 085aa178eddd5f8f75ef4677b1ba6607e7305f31 [file] [log] [blame]
Yue Lunf564a1f2014-01-07 15:54:34 +08001#CPU=mips
Yue Lun03a82d92013-10-21 10:15:02 +08002
3OS=linux
4
Vasudevan Murugesanf5fe7492015-06-10 19:45:37 +05305ifeq ($(KVER),$(filter 3.14%,$(KVER)))
lunyd975a202014-05-15 22:17:17 +08006OS_VER=3_14
7endif
8
Liu Zhongjianf8134e92016-09-21 14:42:01 +08009ifeq ($(KVER),$(filter 4.4%,$(KVER)))
10OS_VER=4_4
11endif
Yue Lunf564a1f2014-01-07 15:54:34 +080012ifeq ($(KVER), 3.4.0)
Yue Lundd6e3d92013-10-25 13:03:31 +080013OS_VER=3_4
Yue Lunf564a1f2014-01-07 15:54:34 +080014endif
15
Ram Chandra Jangir88dfc382015-09-04 11:50:17 +053016ifeq ($(KVER), 3.18)
17OS_VER=3_18
18endif
19
Ram Chandra Jangir511c9a42015-09-25 19:25:57 +053020ifeq ($(KVER), 3.18.21)
Ram Chandra Jangir88dfc382015-09-04 11:50:17 +053021OS_VER=3_18
22endif
23
Yili Zhaob8db20b2014-10-17 18:29:06 -070024ifeq ($(KVER), 3.4.103)
25OS_VER=3_4
26endif
27
Yue Lunf564a1f2014-01-07 15:54:34 +080028ifeq ($(KVER), 3.3.8)
29OS_VER=3_2
30endif
31
32ifeq ($(ARCH), arm)
33BOARD=ipq806x
34endif
35
36ifeq ($(ARCH), mips)
37BOARD=ar71xx
38endif
39
40ifeq ($(BOARD), ar71xx)
41BOARD_NAME=BOARD_AR71XX
42endif
43
44ifeq ($(BOARD), ipq806x)
45BOARD_NAME=BOARD_IPQ806X
46endif
47
Yue Lundd6e3d92013-10-25 13:03:31 +080048OS_SUB=31
Yue Lundd6e3d92013-10-25 13:03:31 +080049
Yue Lun03a82d92013-10-21 10:15:02 +080050ifndef OS_VER
51OS_VER=2_6
52endif
53# OS subversion, 2.6.31 for WASP (db120)
54#OS_SUB=31
55# GCC version, 3 or 4
56#GCC_VER=4
57
58#For MIPS Linux2.6
59 #pb45
60 #TOOL_PATH=/disk/pb45/sw/build/gcc-3.4.4-2.16.1/build_mips_nofpu/bin
61 #SYS_PATH=/disk/pb45/sw/linux/kernels/mips-linux-2.6.15
Ram Chandra Jangir963e4d22015-12-21 20:53:40 +053062
Yue Lun03a82d92013-10-21 10:15:02 +080063 #ap81
64# compatiable with OpenWRT
Ram Chandra Jangir963e4d22015-12-21 20:53:40 +053065ifndef TOOL_PATH
Yue Lun03a82d92013-10-21 10:15:02 +080066TOOL_PATH=/disk/ap81fus/sw/build/gcc-3.4.4-2.16.1/build_mips/bin
67endif
Ram Chandra Jangir963e4d22015-12-21 20:53:40 +053068ifndef SYS_PATH
Yue Lun03a82d92013-10-21 10:15:02 +080069SYS_PATH=/disk/ap81fus/sw/linux/kernels/mips-linux-2.6.15
70endif
71ifeq ($(ARCH), mips)
Zou Shunxiang0b4f1422014-04-17 13:59:28 +080072 CPU_CFLAG=-Wstrict-prototypes -fomit-frame-pointer -G 0 -mno-abicalls -fno-common -fno-strict-aliasing -O2 -fno-pic -pipe -mabi=32 -march=mips32r2 -DMODULE -mlong-calls -DEXPORT_SYMTAB -D$(BOARD_NAME)
Yue Lun03a82d92013-10-21 10:15:02 +080073endif
74
75
76#db120
77ifeq ($(BOARD_TYPE),db12x)
78OS_SUB=31
79GCC_VER=4
80TOOL_PATH=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/usr/bin
81SYS_PATH=$(TOPDIR)/linux/kernels/mips-linux-2.6.31
82CPU_CFLAG=-Wstrict-prototypes -fomit-frame-pointer -G 0 -mno-abicalls -fno-strict-aliasing -O2 -fno-pic -pipe -mabi=32 -march=mips32r2 -DMODULE -mlong-calls -DEXPORT_SYMTAB
83endif
84
85ifeq ($(ARCH), arm)
lunyd975a202014-05-15 22:17:17 +080086ifeq ($(KVER), 3.4.0)
Yue Lunf564a1f2014-01-07 15:54:34 +080087 CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME)
Yue Lun03a82d92013-10-21 10:15:02 +080088endif
Yili Zhaob8db20b2014-10-17 18:29:06 -070089ifeq ($(KVER), 3.4.103)
90 CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME)
91endif
Ram Chandra Jangir511c9a42015-09-25 19:25:57 +053092ifeq ($(KVER), 3.18.21)
Ram Chandra Jangir88dfc382015-09-04 11:50:17 +053093 CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME)
94endif
Liu Zhongjianf8134e92016-09-21 14:42:01 +080095ifeq ($(KVER),$(filter 4.4%,$(KVER)))
96 CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME)
97endif
Ram Chandra Jangir88dfc382015-09-04 11:50:17 +053098
Vasudevan Murugesanf5fe7492015-06-10 19:45:37 +053099ifeq ($(KVER),$(filter 3.14%,$(KVER)))
xiaofeisccdee9c2016-03-07 21:01:03 +0800100 CPU_CFLAG= -DMODULE -nostdinc -D$(BOARD_NAME) -mlittle-endian -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror -fno-strict-aliasing -fno-common -Wno-format-security -fno-delete-null-pointer-checks -O2 -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp -funwind-tables -marm -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(mem)"
lunyd975a202014-05-15 22:17:17 +0800101endif
Ram Chandra Jangir88dfc382015-09-04 11:50:17 +0530102
Liu Zhongjianf8134e92016-09-21 14:42:01 +0800103ifeq ($(KVER),$(filter 4.4%,$(KVER)))
mingxinh5451c452017-04-06 14:21:35 +0800104 CPU_CFLAG= -DMODULE -nostdinc -D$(BOARD_NAME) -mlittle-endian -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror -fno-strict-aliasing -fno-common -Wno-format-security -fno-delete-null-pointer-checks -O2 -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp -funwind-tables -marm -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(mem)"
Liu Zhongjianf8134e92016-09-21 14:42:01 +0800105endif
106
Ram Chandra Jangir88dfc382015-09-04 11:50:17 +0530107ifeq ($(KVER),$(filter 3.18%,$(KVER)))
xiaofeis9ebb3ff2016-02-29 16:49:31 +0800108 CPU_CFLAG= -DMODULE -nostdinc -D$(BOARD_NAME) -mlittle-endian -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Wno-format-security -fno-delete-null-pointer-checks -O2 -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp -funwind-tables -marm -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(mem)"
Ram Chandra Jangir88dfc382015-09-04 11:50:17 +0530109endif
lunyd975a202014-05-15 22:17:17 +0800110endif
Yue Lun03a82d92013-10-21 10:15:02 +0800111
mingxinh7458b242017-02-21 18:30:24 +0800112ifeq ($(ARCH), arm64)
113ifeq ($(KVER),$(filter 4.4%,$(KVER)))
114 CPU_CFLAG= -DMODULE -Os -pipe -march=armv8-a -mcpu=cortex-a53+crypto -fno-caller-saves -fhonour-copts -fno-common -Wno-error=unused-but-set-variable -Wno-error=unused-result -mcmodel=large
115endif
116endif
117
Yue Lun03a82d92013-10-21 10:15:02 +0800118ifeq ($(BOARD_TYPE), ap136)
119OS_SUB=31
120GCC_VER=4
121TOOL_PATH=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/usr/bin
122SYS_PATH=$(TOPDIR)/linux/kernels/mips-linux-2.6.31
123CPU_CFLAG=-Wstrict-prototypes -fomit-frame-pointer -G 0 -mno-abicalls -fno-strict-aliasing -O2 -fno-pic -pipe -mabi=32 -march=mips32r2 -DMODULE -mlong-calls -DEXPORT_SYMTAB
124endif
125
126#For MIPS Linux2.4
127 #TOOL_PATH=/home/perforce/kernel2.4/5.3.1.20/tools/gcc-3.3.3-2.4.25/toolchain_mips/bin
128 #SYS_PATH=/home/perforce/kernel2.4/5.3.1.20/src/kernels/mips-linux-2.4.25
129
130 #TOOLPREFIX=$(CPU)-$(OS)-
131 #CPU_CFLAG=-Wstrict-prototypes -Wundef -fomit-frame-pointer -G 0 -mno-abicalls -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fno-pic -pipe -mabi=32 -march=r4600 -Wa,-32 -Wa,-march=r4600 -Wa,--trap -DMODULE -mlong-calls -DEXPORT_SYMTAB
132
133
134KERNEL_MODE=TRUE
135#compatiable with OpenWRT
136ifeq ($(SWITCH_SSDK_MODE),user)
137KERNEL_MODE=FLASE
138endif
139
140#FAL=FALSE or not define FAL, FAL will not be included in SSDK
Yue Lundd6e3d92013-10-25 13:03:31 +0800141FAL=TRUE
Yue Lun03a82d92013-10-21 10:15:02 +0800142
mingxinh7458b242017-02-21 18:30:24 +0800143#CHIP_TYPE can be defined as ATHENA, GARUDA, SHIVA, HORUS, ISIS, ISISC, DESS, HPPE and ALL_CHIP(ALL_CHIP means GARUDA, SHIVA, HORUS, ISIS, ISISC, DESS and HPPE)
Zou Shunxiang0b4f1422014-04-17 13:59:28 +0800144CHIP_TYPE=ALL_CHIP
Yue Lun03a82d92013-10-21 10:15:02 +0800145
146#UK_IF=FALSE or not define UK_IF, UK_IF will not be included in SSDK
147#when UK_IF=TRUE one of UK_NETLINK,UK_IOCTL must be defined as TRUE
148UK_IF=TRUE
149#UK_IOCTL=TRUE define user-kernel space communication based on ioctl
150UK_IOCTL=TRUE
151UK_MINOR_DEV=254
152
153#API_LOCK=FALSE or not define API_LOCK, API_LOCK will not be included in SSDK
154API_LOCK=FALSE
155
156#REG_ACCESS_SPEEDUP=FALSE or not define REG_ACCESS_SPEEDUP, REG_ACCESS_SPEEDUP will not be enabled, now only ISIS supports
157REG_ACCESS_SPEEDUP=FALSE
158
159#ALL supported features:
160#ACL FDB IGMP LEAKY LED MIB MIRROR MISC PORTCONTROL PORTVLAN QOS RATE STP VLAN
161#IN_X=FALSE or not define IN_X, X will not be included in SSDK
162IN_ACL=TRUE
163IN_FDB=TRUE
xiaofeis3237f352015-10-30 15:38:20 +0800164IN_FDB_MINI=FALSE
Yue Lun03a82d92013-10-21 10:15:02 +0800165IN_IGMP=TRUE
166IN_LEAKY=TRUE
167IN_LED=TRUE
168IN_MIB=TRUE
169IN_MIRROR=TRUE
170IN_MISC=TRUE
xiaofeis3237f352015-10-30 15:38:20 +0800171IN_MISC_MINI=FALSE
Yue Lun03a82d92013-10-21 10:15:02 +0800172IN_PORTCONTROL=TRUE
xiaofeis3237f352015-10-30 15:38:20 +0800173IN_PORTCONTROL_MINI=FALSE
Yue Lun03a82d92013-10-21 10:15:02 +0800174IN_PORTVLAN=TRUE
xiaofeis3237f352015-10-30 15:38:20 +0800175IN_PORTVLAN_MINI=FALSE
Yue Lun03a82d92013-10-21 10:15:02 +0800176IN_QOS=TRUE
xiaofeis3237f352015-10-30 15:38:20 +0800177IN_QOS_MINI=FALSE
Yue Lun03a82d92013-10-21 10:15:02 +0800178IN_RATE=TRUE
179IN_STP=TRUE
180IN_VLAN=TRUE
xiaofeis3237f352015-10-30 15:38:20 +0800181IN_VLAN_MINI=FALSE
Yue Lun03a82d92013-10-21 10:15:02 +0800182IN_REDUCED_ACL=FALSE
183IN_COSMAP=TRUE
xiaofeis3237f352015-10-30 15:38:20 +0800184IN_COSMAP_MINI=FALSE
Yue Lun03a82d92013-10-21 10:15:02 +0800185IN_IP=TRUE
186IN_NAT=TRUE
mingxinh7458b242017-02-21 18:30:24 +0800187IN_FLOW=TRUE
Yue Lun03a82d92013-10-21 10:15:02 +0800188IN_TRUNK=TRUE
mingxinh3b69f732017-04-06 18:33:36 +0800189IN_RSS_HASH=TRUE
Yue Lun03a82d92013-10-21 10:15:02 +0800190IN_SEC=TRUE
mingxinh7458b242017-02-21 18:30:24 +0800191IN_QM=TRUE
192IN_PPPOE=TRUE
Yue Lunf564a1f2014-01-07 15:54:34 +0800193ifeq ($(HNAT_FEATURE), enable)
194IN_NAT_HELPER=TRUE
195else
Yue Lun03a82d92013-10-21 10:15:02 +0800196IN_NAT_HELPER=FALSE
Yue Lunf564a1f2014-01-07 15:54:34 +0800197endif
xiaofeisad0eef02015-02-09 16:14:32 +0800198ifeq ($(RFS_FEATURE), enable)
199IN_RFS=TRUE
200else
201IN_RFS=FALSE
202endif
Yue Lun03a82d92013-10-21 10:15:02 +0800203IN_INTERFACECONTROL=TRUE
204IN_MACBLOCK=FALSE
xiaofeis3237f352015-10-30 15:38:20 +0800205IN_MALIBU_PHY=TRUE
Liu Zhongjianc6834c02017-04-28 15:43:29 +0800206IN_AQUANTIA_PHY=TRUE
Ram Chandra Jangir963e4d22015-12-21 20:53:40 +0530207ifeq ($(SFE_FEATURE), enable)
208IN_SFE=TRUE
209else
210IN_SFE=FALSE
211endif
mingxinh7458b242017-02-21 18:30:24 +0800212IN_VSI=TRUE
213IN_CTRLPKT=TRUE
214IN_SERVCODE=TRUE
215IN_BM=TRUE
216IN_SHAPER=TRUE
217IN_POLICER=TRUE
esonga1689652017-03-30 18:07:37 +0800218IN_UNIPHY=TRUE
mingxinh2066f352017-03-07 19:52:30 +0800219ifneq ($(HK_CHIP), enable)
220CHIP_TYPE=NONHK_CHIP
221endif