blob: a99f7cd2d87ad98a71313dd21be139e5c564c6f0 [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)))
104 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)" -D"KBUILD_MODNAME=KBUILD_STR(mem)"
105endif
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
112ifeq ($(BOARD_TYPE), ap136)
113OS_SUB=31
114GCC_VER=4
115TOOL_PATH=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/usr/bin
116SYS_PATH=$(TOPDIR)/linux/kernels/mips-linux-2.6.31
117CPU_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
118endif
119
120#For MIPS Linux2.4
121 #TOOL_PATH=/home/perforce/kernel2.4/5.3.1.20/tools/gcc-3.3.3-2.4.25/toolchain_mips/bin
122 #SYS_PATH=/home/perforce/kernel2.4/5.3.1.20/src/kernels/mips-linux-2.4.25
123
124 #TOOLPREFIX=$(CPU)-$(OS)-
125 #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
126
127
128KERNEL_MODE=TRUE
129#compatiable with OpenWRT
130ifeq ($(SWITCH_SSDK_MODE),user)
131KERNEL_MODE=FLASE
132endif
133
134#FAL=FALSE or not define FAL, FAL will not be included in SSDK
Yue Lundd6e3d92013-10-25 13:03:31 +0800135FAL=TRUE
Yue Lun03a82d92013-10-21 10:15:02 +0800136
linchend4b91d02014-11-28 23:04:44 +0800137#CHIP_TYPE can be defined as ATHENA, GARUDA, SHIVA, HORUS, ISIS, ISISC, DESS and ALL_CHIP(ALL_CHIP means GARUDA, SHIVA, HORUS, ISIS, ISISC and DESS)
Zou Shunxiang0b4f1422014-04-17 13:59:28 +0800138CHIP_TYPE=ALL_CHIP
Yue Lun03a82d92013-10-21 10:15:02 +0800139
140#UK_IF=FALSE or not define UK_IF, UK_IF will not be included in SSDK
141#when UK_IF=TRUE one of UK_NETLINK,UK_IOCTL must be defined as TRUE
142UK_IF=TRUE
143#UK_IOCTL=TRUE define user-kernel space communication based on ioctl
144UK_IOCTL=TRUE
145UK_MINOR_DEV=254
146
147#API_LOCK=FALSE or not define API_LOCK, API_LOCK will not be included in SSDK
148API_LOCK=FALSE
149
150#REG_ACCESS_SPEEDUP=FALSE or not define REG_ACCESS_SPEEDUP, REG_ACCESS_SPEEDUP will not be enabled, now only ISIS supports
151REG_ACCESS_SPEEDUP=FALSE
152
153#ALL supported features:
154#ACL FDB IGMP LEAKY LED MIB MIRROR MISC PORTCONTROL PORTVLAN QOS RATE STP VLAN
155#IN_X=FALSE or not define IN_X, X will not be included in SSDK
156IN_ACL=TRUE
157IN_FDB=TRUE
xiaofeis3237f352015-10-30 15:38:20 +0800158IN_FDB_MINI=FALSE
Yue Lun03a82d92013-10-21 10:15:02 +0800159IN_IGMP=TRUE
160IN_LEAKY=TRUE
161IN_LED=TRUE
162IN_MIB=TRUE
163IN_MIRROR=TRUE
164IN_MISC=TRUE
xiaofeis3237f352015-10-30 15:38:20 +0800165IN_MISC_MINI=FALSE
Yue Lun03a82d92013-10-21 10:15:02 +0800166IN_PORTCONTROL=TRUE
xiaofeis3237f352015-10-30 15:38:20 +0800167IN_PORTCONTROL_MINI=FALSE
Yue Lun03a82d92013-10-21 10:15:02 +0800168IN_PORTVLAN=TRUE
xiaofeis3237f352015-10-30 15:38:20 +0800169IN_PORTVLAN_MINI=FALSE
Yue Lun03a82d92013-10-21 10:15:02 +0800170IN_QOS=TRUE
xiaofeis3237f352015-10-30 15:38:20 +0800171IN_QOS_MINI=FALSE
Yue Lun03a82d92013-10-21 10:15:02 +0800172IN_RATE=TRUE
173IN_STP=TRUE
174IN_VLAN=TRUE
xiaofeis3237f352015-10-30 15:38:20 +0800175IN_VLAN_MINI=FALSE
Yue Lun03a82d92013-10-21 10:15:02 +0800176IN_REDUCED_ACL=FALSE
177IN_COSMAP=TRUE
xiaofeis3237f352015-10-30 15:38:20 +0800178IN_COSMAP_MINI=FALSE
Yue Lun03a82d92013-10-21 10:15:02 +0800179IN_IP=TRUE
180IN_NAT=TRUE
181IN_TRUNK=TRUE
182IN_SEC=TRUE
Yue Lunf564a1f2014-01-07 15:54:34 +0800183ifeq ($(HNAT_FEATURE), enable)
184IN_NAT_HELPER=TRUE
185else
Yue Lun03a82d92013-10-21 10:15:02 +0800186IN_NAT_HELPER=FALSE
Yue Lunf564a1f2014-01-07 15:54:34 +0800187endif
xiaofeisad0eef02015-02-09 16:14:32 +0800188ifeq ($(RFS_FEATURE), enable)
189IN_RFS=TRUE
190else
191IN_RFS=FALSE
192endif
Yue Lun03a82d92013-10-21 10:15:02 +0800193IN_INTERFACECONTROL=TRUE
194IN_MACBLOCK=FALSE
xiaofeis3237f352015-10-30 15:38:20 +0800195IN_MALIBU_PHY=TRUE
Ram Chandra Jangir963e4d22015-12-21 20:53:40 +0530196ifeq ($(SFE_FEATURE), enable)
197IN_SFE=TRUE
198else
199IN_SFE=FALSE
200endif