blob: 9ffacae1377e392d1a0370d938920cbde47f660a [file] [log] [blame]
Yue Lunf564a1f2014-01-07 15:54:34 +08001#CPU=mips
Yue Lun03a82d92013-10-21 10:15:02 +08002
3OS=linux
4
lunyd975a202014-05-15 22:17:17 +08005ifeq ($(KVER), 3.14)
6OS_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
Yili Zhaob8db20b2014-10-17 18:29:06 -070013ifeq ($(KVER), 3.4.103)
14OS_VER=3_4
15endif
16
Yue Lunf564a1f2014-01-07 15:54:34 +080017ifeq ($(KVER), 3.3.8)
18OS_VER=3_2
19endif
20
21ifeq ($(ARCH), arm)
22BOARD=ipq806x
23endif
24
25ifeq ($(ARCH), mips)
26BOARD=ar71xx
27endif
28
29ifeq ($(BOARD), ar71xx)
30BOARD_NAME=BOARD_AR71XX
31endif
32
33ifeq ($(BOARD), ipq806x)
34BOARD_NAME=BOARD_IPQ806X
35endif
36
Yue Lundd6e3d92013-10-25 13:03:31 +080037OS_SUB=31
Yue Lundd6e3d92013-10-25 13:03:31 +080038
Yue Lun03a82d92013-10-21 10:15:02 +080039ifndef OS_VER
40OS_VER=2_6
41endif
42# OS subversion, 2.6.31 for WASP (db120)
43#OS_SUB=31
44# GCC version, 3 or 4
45#GCC_VER=4
46
47#For MIPS Linux2.6
48 #pb45
49 #TOOL_PATH=/disk/pb45/sw/build/gcc-3.4.4-2.16.1/build_mips_nofpu/bin
50 #SYS_PATH=/disk/pb45/sw/linux/kernels/mips-linux-2.6.15
51
52 #ap81
53# compatiable with OpenWRT
54ifndef TOOL_PATH
55TOOL_PATH=/disk/ap81fus/sw/build/gcc-3.4.4-2.16.1/build_mips/bin
56endif
57ifndef SYS_PATH
58SYS_PATH=/disk/ap81fus/sw/linux/kernels/mips-linux-2.6.15
59endif
60ifeq ($(ARCH), mips)
Zou Shunxiang0b4f1422014-04-17 13:59:28 +080061 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 +080062endif
63
64
65#db120
66ifeq ($(BOARD_TYPE),db12x)
67OS_SUB=31
68GCC_VER=4
69TOOL_PATH=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/usr/bin
70SYS_PATH=$(TOPDIR)/linux/kernels/mips-linux-2.6.31
71CPU_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
72endif
73
74ifeq ($(ARCH), arm)
lunyd975a202014-05-15 22:17:17 +080075ifeq ($(KVER), 3.4.0)
Yue Lunf564a1f2014-01-07 15:54:34 +080076 CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME)
Yue Lun03a82d92013-10-21 10:15:02 +080077endif
Yili Zhaob8db20b2014-10-17 18:29:06 -070078ifeq ($(KVER), 3.4.103)
79 CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME)
80endif
lunyd975a202014-05-15 22:17:17 +080081ifeq ($(KVER), 3.14)
82 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)"
83endif
84endif
Yue Lun03a82d92013-10-21 10:15:02 +080085
86ifeq ($(BOARD_TYPE), ap136)
87OS_SUB=31
88GCC_VER=4
89TOOL_PATH=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/usr/bin
90SYS_PATH=$(TOPDIR)/linux/kernels/mips-linux-2.6.31
91CPU_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
92endif
93
94#For MIPS Linux2.4
95 #TOOL_PATH=/home/perforce/kernel2.4/5.3.1.20/tools/gcc-3.3.3-2.4.25/toolchain_mips/bin
96 #SYS_PATH=/home/perforce/kernel2.4/5.3.1.20/src/kernels/mips-linux-2.4.25
97
98 #TOOLPREFIX=$(CPU)-$(OS)-
99 #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
100
101
102KERNEL_MODE=TRUE
103#compatiable with OpenWRT
104ifeq ($(SWITCH_SSDK_MODE),user)
105KERNEL_MODE=FLASE
106endif
107
108#FAL=FALSE or not define FAL, FAL will not be included in SSDK
Yue Lundd6e3d92013-10-25 13:03:31 +0800109FAL=TRUE
Yue Lun03a82d92013-10-21 10:15:02 +0800110
linchend4b91d02014-11-28 23:04:44 +0800111#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 +0800112CHIP_TYPE=ALL_CHIP
Yue Lun03a82d92013-10-21 10:15:02 +0800113
114#UK_IF=FALSE or not define UK_IF, UK_IF will not be included in SSDK
115#when UK_IF=TRUE one of UK_NETLINK,UK_IOCTL must be defined as TRUE
116UK_IF=TRUE
117#UK_IOCTL=TRUE define user-kernel space communication based on ioctl
118UK_IOCTL=TRUE
119UK_MINOR_DEV=254
120
121#API_LOCK=FALSE or not define API_LOCK, API_LOCK will not be included in SSDK
122API_LOCK=FALSE
123
124#REG_ACCESS_SPEEDUP=FALSE or not define REG_ACCESS_SPEEDUP, REG_ACCESS_SPEEDUP will not be enabled, now only ISIS supports
125REG_ACCESS_SPEEDUP=FALSE
126
127#ALL supported features:
128#ACL FDB IGMP LEAKY LED MIB MIRROR MISC PORTCONTROL PORTVLAN QOS RATE STP VLAN
129#IN_X=FALSE or not define IN_X, X will not be included in SSDK
130IN_ACL=TRUE
131IN_FDB=TRUE
132IN_IGMP=TRUE
133IN_LEAKY=TRUE
134IN_LED=TRUE
135IN_MIB=TRUE
136IN_MIRROR=TRUE
137IN_MISC=TRUE
138IN_PORTCONTROL=TRUE
139IN_PORTVLAN=TRUE
140IN_QOS=TRUE
141IN_RATE=TRUE
142IN_STP=TRUE
143IN_VLAN=TRUE
144IN_REDUCED_ACL=FALSE
145IN_COSMAP=TRUE
146IN_IP=TRUE
147IN_NAT=TRUE
148IN_TRUNK=TRUE
149IN_SEC=TRUE
Yue Lunf564a1f2014-01-07 15:54:34 +0800150ifeq ($(HNAT_FEATURE), enable)
151IN_NAT_HELPER=TRUE
152else
Yue Lun03a82d92013-10-21 10:15:02 +0800153IN_NAT_HELPER=FALSE
Yue Lunf564a1f2014-01-07 15:54:34 +0800154endif
xiaofeisad0eef02015-02-09 16:14:32 +0800155ifeq ($(RFS_FEATURE), enable)
156IN_RFS=TRUE
157else
158IN_RFS=FALSE
159endif
Yue Lun03a82d92013-10-21 10:15:02 +0800160IN_INTERFACECONTROL=TRUE
161IN_MACBLOCK=FALSE