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 | |
Vasudevan Murugesan | f5fe749 | 2015-06-10 19:45:37 +0530 | [diff] [blame] | 5 | ifeq ($(KVER),$(filter 3.14%,$(KVER))) |
luny | d975a20 | 2014-05-15 22:17:17 +0800 | [diff] [blame] | 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 | |
Ram Chandra Jangir | 88dfc38 | 2015-09-04 11:50:17 +0530 | [diff] [blame] | 13 | ifeq ($(KVER), 3.18) |
| 14 | OS_VER=3_18 |
| 15 | endif |
| 16 | |
Ram Chandra Jangir | 511c9a4 | 2015-09-25 19:25:57 +0530 | [diff] [blame] | 17 | ifeq ($(KVER), 3.18.21) |
Ram Chandra Jangir | 88dfc38 | 2015-09-04 11:50:17 +0530 | [diff] [blame] | 18 | OS_VER=3_18 |
| 19 | endif |
| 20 | |
Yili Zhao | b8db20b | 2014-10-17 18:29:06 -0700 | [diff] [blame] | 21 | ifeq ($(KVER), 3.4.103) |
| 22 | OS_VER=3_4 |
| 23 | endif |
| 24 | |
Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 25 | ifeq ($(KVER), 3.3.8) |
| 26 | OS_VER=3_2 |
| 27 | endif |
| 28 | |
| 29 | ifeq ($(ARCH), arm) |
| 30 | BOARD=ipq806x |
| 31 | endif |
| 32 | |
| 33 | ifeq ($(ARCH), mips) |
| 34 | BOARD=ar71xx |
| 35 | endif |
| 36 | |
| 37 | ifeq ($(BOARD), ar71xx) |
| 38 | BOARD_NAME=BOARD_AR71XX |
| 39 | endif |
| 40 | |
| 41 | ifeq ($(BOARD), ipq806x) |
| 42 | BOARD_NAME=BOARD_IPQ806X |
| 43 | endif |
| 44 | |
Yue Lun | dd6e3d9 | 2013-10-25 13:03:31 +0800 | [diff] [blame] | 45 | OS_SUB=31 |
Yue Lun | dd6e3d9 | 2013-10-25 13:03:31 +0800 | [diff] [blame] | 46 | |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 47 | ifndef OS_VER |
| 48 | OS_VER=2_6 |
| 49 | endif |
| 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 |
| 62 | ifndef TOOL_PATH |
| 63 | TOOL_PATH=/disk/ap81fus/sw/build/gcc-3.4.4-2.16.1/build_mips/bin |
| 64 | endif |
| 65 | ifndef SYS_PATH |
| 66 | SYS_PATH=/disk/ap81fus/sw/linux/kernels/mips-linux-2.6.15 |
| 67 | endif |
| 68 | ifeq ($(ARCH), mips) |
Zou Shunxiang | 0b4f142 | 2014-04-17 13:59:28 +0800 | [diff] [blame] | 69 | 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] | 70 | endif |
| 71 | |
| 72 | |
| 73 | #db120 |
| 74 | ifeq ($(BOARD_TYPE),db12x) |
| 75 | OS_SUB=31 |
| 76 | GCC_VER=4 |
| 77 | TOOL_PATH=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/usr/bin |
| 78 | SYS_PATH=$(TOPDIR)/linux/kernels/mips-linux-2.6.31 |
| 79 | 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 |
| 80 | endif |
| 81 | |
| 82 | ifeq ($(ARCH), arm) |
luny | d975a20 | 2014-05-15 22:17:17 +0800 | [diff] [blame] | 83 | ifeq ($(KVER), 3.4.0) |
Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 84 | 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] | 85 | endif |
Yili Zhao | b8db20b | 2014-10-17 18:29:06 -0700 | [diff] [blame] | 86 | ifeq ($(KVER), 3.4.103) |
| 87 | CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME) |
| 88 | endif |
Ram Chandra Jangir | 511c9a4 | 2015-09-25 19:25:57 +0530 | [diff] [blame] | 89 | ifeq ($(KVER), 3.18.21) |
Ram Chandra Jangir | 88dfc38 | 2015-09-04 11:50:17 +0530 | [diff] [blame] | 90 | CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME) |
| 91 | endif |
| 92 | |
Vasudevan Murugesan | f5fe749 | 2015-06-10 19:45:37 +0530 | [diff] [blame] | 93 | ifeq ($(KVER),$(filter 3.14%,$(KVER))) |
luny | d975a20 | 2014-05-15 22:17:17 +0800 | [diff] [blame] | 94 | 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)" |
| 95 | endif |
Ram Chandra Jangir | 88dfc38 | 2015-09-04 11:50:17 +0530 | [diff] [blame] | 96 | |
| 97 | ifeq ($(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)" |
| 99 | endif |
luny | d975a20 | 2014-05-15 22:17:17 +0800 | [diff] [blame] | 100 | endif |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 101 | |
| 102 | ifeq ($(BOARD_TYPE), ap136) |
| 103 | OS_SUB=31 |
| 104 | GCC_VER=4 |
| 105 | TOOL_PATH=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/usr/bin |
| 106 | SYS_PATH=$(TOPDIR)/linux/kernels/mips-linux-2.6.31 |
| 107 | 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 |
| 108 | endif |
| 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 | |
| 118 | KERNEL_MODE=TRUE |
| 119 | #compatiable with OpenWRT |
| 120 | ifeq ($(SWITCH_SSDK_MODE),user) |
| 121 | KERNEL_MODE=FLASE |
| 122 | endif |
| 123 | |
| 124 | #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] | 125 | FAL=TRUE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 126 | |
linchen | d4b91d0 | 2014-11-28 23:04:44 +0800 | [diff] [blame] | 127 | #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] | 128 | CHIP_TYPE=ALL_CHIP |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 129 | |
| 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 |
| 132 | UK_IF=TRUE |
| 133 | #UK_IOCTL=TRUE define user-kernel space communication based on ioctl |
| 134 | UK_IOCTL=TRUE |
| 135 | UK_MINOR_DEV=254 |
| 136 | |
| 137 | #API_LOCK=FALSE or not define API_LOCK, API_LOCK will not be included in SSDK |
| 138 | API_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 |
| 141 | REG_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 |
| 146 | IN_ACL=TRUE |
| 147 | IN_FDB=TRUE |
xiaofeis | 3237f35 | 2015-10-30 15:38:20 +0800 | [diff] [blame^] | 148 | IN_FDB_MINI=FALSE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 149 | IN_IGMP=TRUE |
| 150 | IN_LEAKY=TRUE |
| 151 | IN_LED=TRUE |
| 152 | IN_MIB=TRUE |
| 153 | IN_MIRROR=TRUE |
| 154 | IN_MISC=TRUE |
xiaofeis | 3237f35 | 2015-10-30 15:38:20 +0800 | [diff] [blame^] | 155 | IN_MISC_MINI=FALSE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 156 | IN_PORTCONTROL=TRUE |
xiaofeis | 3237f35 | 2015-10-30 15:38:20 +0800 | [diff] [blame^] | 157 | IN_PORTCONTROL_MINI=FALSE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 158 | IN_PORTVLAN=TRUE |
xiaofeis | 3237f35 | 2015-10-30 15:38:20 +0800 | [diff] [blame^] | 159 | IN_PORTVLAN_MINI=FALSE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 160 | IN_QOS=TRUE |
xiaofeis | 3237f35 | 2015-10-30 15:38:20 +0800 | [diff] [blame^] | 161 | IN_QOS_MINI=FALSE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 162 | IN_RATE=TRUE |
| 163 | IN_STP=TRUE |
| 164 | IN_VLAN=TRUE |
xiaofeis | 3237f35 | 2015-10-30 15:38:20 +0800 | [diff] [blame^] | 165 | IN_VLAN_MINI=FALSE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 166 | IN_REDUCED_ACL=FALSE |
| 167 | IN_COSMAP=TRUE |
xiaofeis | 3237f35 | 2015-10-30 15:38:20 +0800 | [diff] [blame^] | 168 | IN_COSMAP_MINI=FALSE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 169 | IN_IP=TRUE |
| 170 | IN_NAT=TRUE |
| 171 | IN_TRUNK=TRUE |
| 172 | IN_SEC=TRUE |
Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 173 | ifeq ($(HNAT_FEATURE), enable) |
| 174 | IN_NAT_HELPER=TRUE |
| 175 | else |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 176 | IN_NAT_HELPER=FALSE |
Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 177 | endif |
xiaofeis | ad0eef0 | 2015-02-09 16:14:32 +0800 | [diff] [blame] | 178 | ifeq ($(RFS_FEATURE), enable) |
| 179 | IN_RFS=TRUE |
| 180 | else |
| 181 | IN_RFS=FALSE |
| 182 | endif |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 183 | IN_INTERFACECONTROL=TRUE |
| 184 | IN_MACBLOCK=FALSE |
xiaofeis | 3237f35 | 2015-10-30 15:38:20 +0800 | [diff] [blame^] | 185 | IN_MALIBU_PHY=TRUE |