blob: 6dcabbc156cd605466577cdb0908e9018560daab [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
Yue Lunf564a1f2014-01-07 15:54:34 +08009ifeq ($(KVER), 3.4.0)
Yue Lundd6e3d92013-10-25 13:03:31 +080010OS_VER=3_4
Yue Lunf564a1f2014-01-07 15:54:34 +080011endif
12
Ram Chandra Jangir88dfc382015-09-04 11:50:17 +053013ifeq ($(KVER), 3.18)
14OS_VER=3_18
15endif
16
Ram Chandra Jangir511c9a42015-09-25 19:25:57 +053017ifeq ($(KVER), 3.18.21)
Ram Chandra Jangir88dfc382015-09-04 11:50:17 +053018OS_VER=3_18
19endif
20
Yili Zhaob8db20b2014-10-17 18:29:06 -070021ifeq ($(KVER), 3.4.103)
22OS_VER=3_4
23endif
24
Yue Lunf564a1f2014-01-07 15:54:34 +080025ifeq ($(KVER), 3.3.8)
26OS_VER=3_2
27endif
28
29ifeq ($(ARCH), arm)
30BOARD=ipq806x
31endif
32
33ifeq ($(ARCH), mips)
34BOARD=ar71xx
35endif
36
37ifeq ($(BOARD), ar71xx)
38BOARD_NAME=BOARD_AR71XX
39endif
40
41ifeq ($(BOARD), ipq806x)
42BOARD_NAME=BOARD_IPQ806X
43endif
44
Yue Lundd6e3d92013-10-25 13:03:31 +080045OS_SUB=31
Yue Lundd6e3d92013-10-25 13:03:31 +080046
Yue Lun03a82d92013-10-21 10:15:02 +080047ifndef OS_VER
48OS_VER=2_6
49endif
50# OS subversion, 2.6.31 for WASP (db120)
51#OS_SUB=31
52# GCC version, 3 or 4
53#GCC_VER=4
54
55#For MIPS Linux2.6
56 #pb45
57 #TOOL_PATH=/disk/pb45/sw/build/gcc-3.4.4-2.16.1/build_mips_nofpu/bin
58 #SYS_PATH=/disk/pb45/sw/linux/kernels/mips-linux-2.6.15
59
60 #ap81
61# compatiable with OpenWRT
62ifndef TOOL_PATH
63TOOL_PATH=/disk/ap81fus/sw/build/gcc-3.4.4-2.16.1/build_mips/bin
64endif
65ifndef SYS_PATH
66SYS_PATH=/disk/ap81fus/sw/linux/kernels/mips-linux-2.6.15
67endif
68ifeq ($(ARCH), mips)
Zou Shunxiang0b4f1422014-04-17 13:59:28 +080069 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 +080070endif
71
72
73#db120
74ifeq ($(BOARD_TYPE),db12x)
75OS_SUB=31
76GCC_VER=4
77TOOL_PATH=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/usr/bin
78SYS_PATH=$(TOPDIR)/linux/kernels/mips-linux-2.6.31
79CPU_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
80endif
81
82ifeq ($(ARCH), arm)
lunyd975a202014-05-15 22:17:17 +080083ifeq ($(KVER), 3.4.0)
Yue Lunf564a1f2014-01-07 15:54:34 +080084 CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME)
Yue Lun03a82d92013-10-21 10:15:02 +080085endif
Yili Zhaob8db20b2014-10-17 18:29:06 -070086ifeq ($(KVER), 3.4.103)
87 CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME)
88endif
Ram Chandra Jangir511c9a42015-09-25 19:25:57 +053089ifeq ($(KVER), 3.18.21)
Ram Chandra Jangir88dfc382015-09-04 11:50:17 +053090 CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME)
91endif
92
Vasudevan Murugesanf5fe7492015-06-10 19:45:37 +053093ifeq ($(KVER),$(filter 3.14%,$(KVER)))
lunyd975a202014-05-15 22:17:17 +080094 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)"
95endif
Ram Chandra Jangir88dfc382015-09-04 11:50:17 +053096
97ifeq ($(KVER),$(filter 3.18%,$(KVER)))
98 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)"
99endif
lunyd975a202014-05-15 22:17:17 +0800100endif
Yue Lun03a82d92013-10-21 10:15:02 +0800101
102ifeq ($(BOARD_TYPE), ap136)
103OS_SUB=31
104GCC_VER=4
105TOOL_PATH=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/usr/bin
106SYS_PATH=$(TOPDIR)/linux/kernels/mips-linux-2.6.31
107CPU_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
108endif
109
110#For MIPS Linux2.4
111 #TOOL_PATH=/home/perforce/kernel2.4/5.3.1.20/tools/gcc-3.3.3-2.4.25/toolchain_mips/bin
112 #SYS_PATH=/home/perforce/kernel2.4/5.3.1.20/src/kernels/mips-linux-2.4.25
113
114 #TOOLPREFIX=$(CPU)-$(OS)-
115 #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
116
117
118KERNEL_MODE=TRUE
119#compatiable with OpenWRT
120ifeq ($(SWITCH_SSDK_MODE),user)
121KERNEL_MODE=FLASE
122endif
123
124#FAL=FALSE or not define FAL, FAL will not be included in SSDK
Yue Lundd6e3d92013-10-25 13:03:31 +0800125FAL=TRUE
Yue Lun03a82d92013-10-21 10:15:02 +0800126
linchend4b91d02014-11-28 23:04:44 +0800127#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 +0800128CHIP_TYPE=ALL_CHIP
Yue Lun03a82d92013-10-21 10:15:02 +0800129
130#UK_IF=FALSE or not define UK_IF, UK_IF will not be included in SSDK
131#when UK_IF=TRUE one of UK_NETLINK,UK_IOCTL must be defined as TRUE
132UK_IF=TRUE
133#UK_IOCTL=TRUE define user-kernel space communication based on ioctl
134UK_IOCTL=TRUE
135UK_MINOR_DEV=254
136
137#API_LOCK=FALSE or not define API_LOCK, API_LOCK will not be included in SSDK
138API_LOCK=FALSE
139
140#REG_ACCESS_SPEEDUP=FALSE or not define REG_ACCESS_SPEEDUP, REG_ACCESS_SPEEDUP will not be enabled, now only ISIS supports
141REG_ACCESS_SPEEDUP=FALSE
142
143#ALL supported features:
144#ACL FDB IGMP LEAKY LED MIB MIRROR MISC PORTCONTROL PORTVLAN QOS RATE STP VLAN
145#IN_X=FALSE or not define IN_X, X will not be included in SSDK
146IN_ACL=TRUE
147IN_FDB=TRUE
148IN_IGMP=TRUE
149IN_LEAKY=TRUE
150IN_LED=TRUE
151IN_MIB=TRUE
152IN_MIRROR=TRUE
153IN_MISC=TRUE
154IN_PORTCONTROL=TRUE
155IN_PORTVLAN=TRUE
156IN_QOS=TRUE
157IN_RATE=TRUE
158IN_STP=TRUE
159IN_VLAN=TRUE
160IN_REDUCED_ACL=FALSE
161IN_COSMAP=TRUE
162IN_IP=TRUE
163IN_NAT=TRUE
164IN_TRUNK=TRUE
165IN_SEC=TRUE
Yue Lunf564a1f2014-01-07 15:54:34 +0800166ifeq ($(HNAT_FEATURE), enable)
167IN_NAT_HELPER=TRUE
168else
Yue Lun03a82d92013-10-21 10:15:02 +0800169IN_NAT_HELPER=FALSE
Yue Lunf564a1f2014-01-07 15:54:34 +0800170endif
xiaofeisad0eef02015-02-09 16:14:32 +0800171ifeq ($(RFS_FEATURE), enable)
172IN_RFS=TRUE
173else
174IN_RFS=FALSE
175endif
Yue Lun03a82d92013-10-21 10:15:02 +0800176IN_INTERFACECONTROL=TRUE
177IN_MACBLOCK=FALSE