blob: 01430d78dc7131cafb08ebf3dda5ea58a963376e [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
13ifeq ($(KVER), 3.3.8)
14OS_VER=3_2
15endif
16
17ifeq ($(ARCH), arm)
18BOARD=ipq806x
19endif
20
21ifeq ($(ARCH), mips)
22BOARD=ar71xx
23endif
24
25ifeq ($(BOARD), ar71xx)
26BOARD_NAME=BOARD_AR71XX
27endif
28
29ifeq ($(BOARD), ipq806x)
30BOARD_NAME=BOARD_IPQ806X
31endif
32
Yue Lundd6e3d92013-10-25 13:03:31 +080033OS_SUB=31
Yue Lundd6e3d92013-10-25 13:03:31 +080034
Yue Lun03a82d92013-10-21 10:15:02 +080035ifndef OS_VER
36OS_VER=2_6
37endif
38# OS subversion, 2.6.31 for WASP (db120)
39#OS_SUB=31
40# GCC version, 3 or 4
41#GCC_VER=4
42
43#For MIPS Linux2.6
44 #pb45
45 #TOOL_PATH=/disk/pb45/sw/build/gcc-3.4.4-2.16.1/build_mips_nofpu/bin
46 #SYS_PATH=/disk/pb45/sw/linux/kernels/mips-linux-2.6.15
47
48 #ap81
49# compatiable with OpenWRT
50ifndef TOOL_PATH
51TOOL_PATH=/disk/ap81fus/sw/build/gcc-3.4.4-2.16.1/build_mips/bin
52endif
53ifndef SYS_PATH
54SYS_PATH=/disk/ap81fus/sw/linux/kernels/mips-linux-2.6.15
55endif
56ifeq ($(ARCH), mips)
Zou Shunxiang0b4f1422014-04-17 13:59:28 +080057 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 +080058endif
59
60
61#db120
62ifeq ($(BOARD_TYPE),db12x)
63OS_SUB=31
64GCC_VER=4
65TOOL_PATH=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/usr/bin
66SYS_PATH=$(TOPDIR)/linux/kernels/mips-linux-2.6.31
67CPU_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
68endif
69
70ifeq ($(ARCH), arm)
lunyd975a202014-05-15 22:17:17 +080071ifeq ($(KVER), 3.4.0)
Yue Lunf564a1f2014-01-07 15:54:34 +080072 CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME)
Yue Lun03a82d92013-10-21 10:15:02 +080073endif
lunyd975a202014-05-15 22:17:17 +080074ifeq ($(KVER), 3.14)
75 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)"
76endif
77endif
Yue Lun03a82d92013-10-21 10:15:02 +080078
79ifeq ($(BOARD_TYPE), ap136)
80OS_SUB=31
81GCC_VER=4
82TOOL_PATH=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/usr/bin
83SYS_PATH=$(TOPDIR)/linux/kernels/mips-linux-2.6.31
84CPU_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
85endif
86
87#For MIPS Linux2.4
88 #TOOL_PATH=/home/perforce/kernel2.4/5.3.1.20/tools/gcc-3.3.3-2.4.25/toolchain_mips/bin
89 #SYS_PATH=/home/perforce/kernel2.4/5.3.1.20/src/kernels/mips-linux-2.4.25
90
91 #TOOLPREFIX=$(CPU)-$(OS)-
92 #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
93
94
95KERNEL_MODE=TRUE
96#compatiable with OpenWRT
97ifeq ($(SWITCH_SSDK_MODE),user)
98KERNEL_MODE=FLASE
99endif
100
101#FAL=FALSE or not define FAL, FAL will not be included in SSDK
Yue Lundd6e3d92013-10-25 13:03:31 +0800102FAL=TRUE
Yue Lun03a82d92013-10-21 10:15:02 +0800103
104#CHIP_TYPE can be defined as ATHENA, GARUDA, SHIVA, HORUS, ISIS, ISISC and ALL_CHIP(ALL_CHIP means GARUDA, SHIVA, HORUS and ISIS)
Zou Shunxiang0b4f1422014-04-17 13:59:28 +0800105CHIP_TYPE=ALL_CHIP
Yue Lun03a82d92013-10-21 10:15:02 +0800106
107#UK_IF=FALSE or not define UK_IF, UK_IF will not be included in SSDK
108#when UK_IF=TRUE one of UK_NETLINK,UK_IOCTL must be defined as TRUE
109UK_IF=TRUE
110#UK_IOCTL=TRUE define user-kernel space communication based on ioctl
111UK_IOCTL=TRUE
112UK_MINOR_DEV=254
113
114#API_LOCK=FALSE or not define API_LOCK, API_LOCK will not be included in SSDK
115API_LOCK=FALSE
116
117#REG_ACCESS_SPEEDUP=FALSE or not define REG_ACCESS_SPEEDUP, REG_ACCESS_SPEEDUP will not be enabled, now only ISIS supports
118REG_ACCESS_SPEEDUP=FALSE
119
120#ALL supported features:
121#ACL FDB IGMP LEAKY LED MIB MIRROR MISC PORTCONTROL PORTVLAN QOS RATE STP VLAN
122#IN_X=FALSE or not define IN_X, X will not be included in SSDK
123IN_ACL=TRUE
124IN_FDB=TRUE
125IN_IGMP=TRUE
126IN_LEAKY=TRUE
127IN_LED=TRUE
128IN_MIB=TRUE
129IN_MIRROR=TRUE
130IN_MISC=TRUE
131IN_PORTCONTROL=TRUE
132IN_PORTVLAN=TRUE
133IN_QOS=TRUE
134IN_RATE=TRUE
135IN_STP=TRUE
136IN_VLAN=TRUE
137IN_REDUCED_ACL=FALSE
138IN_COSMAP=TRUE
139IN_IP=TRUE
140IN_NAT=TRUE
141IN_TRUNK=TRUE
142IN_SEC=TRUE
Yue Lunf564a1f2014-01-07 15:54:34 +0800143ifeq ($(HNAT_FEATURE), enable)
144IN_NAT_HELPER=TRUE
145else
Yue Lun03a82d92013-10-21 10:15:02 +0800146IN_NAT_HELPER=FALSE
Yue Lunf564a1f2014-01-07 15:54:34 +0800147endif
Yue Lun03a82d92013-10-21 10:15:02 +0800148IN_INTERFACECONTROL=TRUE
149IN_MACBLOCK=FALSE