Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 1 | #CPU=mips |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 2 | |
| 3 | OS=linux |
| 4 | |
luny | d975a20 | 2014-05-15 22:17:17 +0800 | [diff] [blame] | 5 | ifeq ($(KVER), 3.14) |
| 6 | OS_VER=3_14 |
| 7 | endif |
| 8 | |
Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 9 | ifeq ($(KVER), 3.4.0) |
Yue Lun | dd6e3d9 | 2013-10-25 13:03:31 +0800 | [diff] [blame] | 10 | OS_VER=3_4 |
Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 11 | endif |
| 12 | |
Yili Zhao | b8db20b | 2014-10-17 18:29:06 -0700 | [diff] [blame] | 13 | ifeq ($(KVER), 3.4.103) |
| 14 | OS_VER=3_4 |
| 15 | endif |
| 16 | |
Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 17 | ifeq ($(KVER), 3.3.8) |
| 18 | OS_VER=3_2 |
| 19 | endif |
| 20 | |
| 21 | ifeq ($(ARCH), arm) |
| 22 | BOARD=ipq806x |
| 23 | endif |
| 24 | |
| 25 | ifeq ($(ARCH), mips) |
| 26 | BOARD=ar71xx |
| 27 | endif |
| 28 | |
| 29 | ifeq ($(BOARD), ar71xx) |
| 30 | BOARD_NAME=BOARD_AR71XX |
| 31 | endif |
| 32 | |
| 33 | ifeq ($(BOARD), ipq806x) |
| 34 | BOARD_NAME=BOARD_IPQ806X |
| 35 | endif |
| 36 | |
Yue Lun | dd6e3d9 | 2013-10-25 13:03:31 +0800 | [diff] [blame] | 37 | OS_SUB=31 |
Yue Lun | dd6e3d9 | 2013-10-25 13:03:31 +0800 | [diff] [blame] | 38 | |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 39 | ifndef OS_VER |
| 40 | OS_VER=2_6 |
| 41 | endif |
| 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 |
| 54 | ifndef TOOL_PATH |
| 55 | TOOL_PATH=/disk/ap81fus/sw/build/gcc-3.4.4-2.16.1/build_mips/bin |
| 56 | endif |
| 57 | ifndef SYS_PATH |
| 58 | SYS_PATH=/disk/ap81fus/sw/linux/kernels/mips-linux-2.6.15 |
| 59 | endif |
| 60 | ifeq ($(ARCH), mips) |
Zou Shunxiang | 0b4f142 | 2014-04-17 13:59:28 +0800 | [diff] [blame] | 61 | 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 Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 62 | endif |
| 63 | |
| 64 | |
| 65 | #db120 |
| 66 | ifeq ($(BOARD_TYPE),db12x) |
| 67 | OS_SUB=31 |
| 68 | GCC_VER=4 |
| 69 | TOOL_PATH=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/usr/bin |
| 70 | SYS_PATH=$(TOPDIR)/linux/kernels/mips-linux-2.6.31 |
| 71 | CPU_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 |
| 72 | endif |
| 73 | |
| 74 | ifeq ($(ARCH), arm) |
luny | d975a20 | 2014-05-15 22:17:17 +0800 | [diff] [blame] | 75 | ifeq ($(KVER), 3.4.0) |
Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 76 | CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME) |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 77 | endif |
Yili Zhao | b8db20b | 2014-10-17 18:29:06 -0700 | [diff] [blame] | 78 | ifeq ($(KVER), 3.4.103) |
| 79 | CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME) |
| 80 | endif |
luny | d975a20 | 2014-05-15 22:17:17 +0800 | [diff] [blame] | 81 | ifeq ($(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)" |
| 83 | endif |
| 84 | endif |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 85 | |
| 86 | ifeq ($(BOARD_TYPE), ap136) |
| 87 | OS_SUB=31 |
| 88 | GCC_VER=4 |
| 89 | TOOL_PATH=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/usr/bin |
| 90 | SYS_PATH=$(TOPDIR)/linux/kernels/mips-linux-2.6.31 |
| 91 | CPU_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 |
| 92 | endif |
| 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 | |
| 102 | KERNEL_MODE=TRUE |
| 103 | #compatiable with OpenWRT |
| 104 | ifeq ($(SWITCH_SSDK_MODE),user) |
| 105 | KERNEL_MODE=FLASE |
| 106 | endif |
| 107 | |
| 108 | #FAL=FALSE or not define FAL, FAL will not be included in SSDK |
Yue Lun | dd6e3d9 | 2013-10-25 13:03:31 +0800 | [diff] [blame] | 109 | FAL=TRUE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 110 | |
linchen | d4b91d0 | 2014-11-28 23:04:44 +0800 | [diff] [blame^] | 111 | #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 Shunxiang | 0b4f142 | 2014-04-17 13:59:28 +0800 | [diff] [blame] | 112 | CHIP_TYPE=ALL_CHIP |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 113 | |
| 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 |
| 116 | UK_IF=TRUE |
| 117 | #UK_IOCTL=TRUE define user-kernel space communication based on ioctl |
| 118 | UK_IOCTL=TRUE |
| 119 | UK_MINOR_DEV=254 |
| 120 | |
| 121 | #API_LOCK=FALSE or not define API_LOCK, API_LOCK will not be included in SSDK |
| 122 | API_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 |
| 125 | REG_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 |
| 130 | IN_ACL=TRUE |
| 131 | IN_FDB=TRUE |
| 132 | IN_IGMP=TRUE |
| 133 | IN_LEAKY=TRUE |
| 134 | IN_LED=TRUE |
| 135 | IN_MIB=TRUE |
| 136 | IN_MIRROR=TRUE |
| 137 | IN_MISC=TRUE |
| 138 | IN_PORTCONTROL=TRUE |
| 139 | IN_PORTVLAN=TRUE |
| 140 | IN_QOS=TRUE |
| 141 | IN_RATE=TRUE |
| 142 | IN_STP=TRUE |
| 143 | IN_VLAN=TRUE |
| 144 | IN_REDUCED_ACL=FALSE |
| 145 | IN_COSMAP=TRUE |
| 146 | IN_IP=TRUE |
| 147 | IN_NAT=TRUE |
| 148 | IN_TRUNK=TRUE |
| 149 | IN_SEC=TRUE |
Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 150 | ifeq ($(HNAT_FEATURE), enable) |
| 151 | IN_NAT_HELPER=TRUE |
| 152 | else |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 153 | IN_NAT_HELPER=FALSE |
Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 154 | endif |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 155 | IN_INTERFACECONTROL=TRUE |
| 156 | IN_MACBLOCK=FALSE |