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 | |
Liu Zhongjian | f8134e9 | 2016-09-21 14:42:01 +0800 | [diff] [blame] | 9 | ifeq ($(KVER),$(filter 4.4%,$(KVER))) |
| 10 | OS_VER=4_4 |
| 11 | endif |
Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 12 | ifeq ($(KVER), 3.4.0) |
Yue Lun | dd6e3d9 | 2013-10-25 13:03:31 +0800 | [diff] [blame] | 13 | OS_VER=3_4 |
Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 14 | endif |
| 15 | |
Ram Chandra Jangir | 88dfc38 | 2015-09-04 11:50:17 +0530 | [diff] [blame] | 16 | ifeq ($(KVER), 3.18) |
| 17 | OS_VER=3_18 |
| 18 | endif |
| 19 | |
Ram Chandra Jangir | 511c9a4 | 2015-09-25 19:25:57 +0530 | [diff] [blame] | 20 | ifeq ($(KVER), 3.18.21) |
Ram Chandra Jangir | 88dfc38 | 2015-09-04 11:50:17 +0530 | [diff] [blame] | 21 | OS_VER=3_18 |
| 22 | endif |
| 23 | |
Yili Zhao | b8db20b | 2014-10-17 18:29:06 -0700 | [diff] [blame] | 24 | ifeq ($(KVER), 3.4.103) |
| 25 | OS_VER=3_4 |
| 26 | endif |
| 27 | |
Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 28 | ifeq ($(KVER), 3.3.8) |
| 29 | OS_VER=3_2 |
| 30 | endif |
| 31 | |
| 32 | ifeq ($(ARCH), arm) |
| 33 | BOARD=ipq806x |
| 34 | endif |
| 35 | |
| 36 | ifeq ($(ARCH), mips) |
| 37 | BOARD=ar71xx |
| 38 | endif |
| 39 | |
| 40 | ifeq ($(BOARD), ar71xx) |
| 41 | BOARD_NAME=BOARD_AR71XX |
| 42 | endif |
| 43 | |
| 44 | ifeq ($(BOARD), ipq806x) |
| 45 | BOARD_NAME=BOARD_IPQ806X |
| 46 | endif |
| 47 | |
Yue Lun | dd6e3d9 | 2013-10-25 13:03:31 +0800 | [diff] [blame] | 48 | OS_SUB=31 |
Yue Lun | dd6e3d9 | 2013-10-25 13:03:31 +0800 | [diff] [blame] | 49 | |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 50 | ifndef OS_VER |
| 51 | OS_VER=2_6 |
| 52 | endif |
| 53 | # OS subversion, 2.6.31 for WASP (db120) |
| 54 | #OS_SUB=31 |
| 55 | # GCC version, 3 or 4 |
| 56 | #GCC_VER=4 |
| 57 | |
| 58 | #For MIPS Linux2.6 |
| 59 | #pb45 |
| 60 | #TOOL_PATH=/disk/pb45/sw/build/gcc-3.4.4-2.16.1/build_mips_nofpu/bin |
| 61 | #SYS_PATH=/disk/pb45/sw/linux/kernels/mips-linux-2.6.15 |
Ram Chandra Jangir | 963e4d2 | 2015-12-21 20:53:40 +0530 | [diff] [blame] | 62 | |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 63 | #ap81 |
| 64 | # compatiable with OpenWRT |
Ram Chandra Jangir | 963e4d2 | 2015-12-21 20:53:40 +0530 | [diff] [blame] | 65 | ifndef TOOL_PATH |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 66 | TOOL_PATH=/disk/ap81fus/sw/build/gcc-3.4.4-2.16.1/build_mips/bin |
| 67 | endif |
Ram Chandra Jangir | 963e4d2 | 2015-12-21 20:53:40 +0530 | [diff] [blame] | 68 | ifndef SYS_PATH |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 69 | SYS_PATH=/disk/ap81fus/sw/linux/kernels/mips-linux-2.6.15 |
| 70 | endif |
| 71 | ifeq ($(ARCH), mips) |
Zou Shunxiang | 0b4f142 | 2014-04-17 13:59:28 +0800 | [diff] [blame] | 72 | 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] | 73 | endif |
| 74 | |
| 75 | |
| 76 | #db120 |
| 77 | ifeq ($(BOARD_TYPE),db12x) |
| 78 | OS_SUB=31 |
| 79 | GCC_VER=4 |
| 80 | TOOL_PATH=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/usr/bin |
| 81 | SYS_PATH=$(TOPDIR)/linux/kernels/mips-linux-2.6.31 |
| 82 | 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 |
| 83 | endif |
| 84 | |
| 85 | ifeq ($(ARCH), arm) |
luny | d975a20 | 2014-05-15 22:17:17 +0800 | [diff] [blame] | 86 | ifeq ($(KVER), 3.4.0) |
Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 87 | 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] | 88 | endif |
Yili Zhao | b8db20b | 2014-10-17 18:29:06 -0700 | [diff] [blame] | 89 | ifeq ($(KVER), 3.4.103) |
| 90 | CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME) |
| 91 | endif |
Ram Chandra Jangir | 511c9a4 | 2015-09-25 19:25:57 +0530 | [diff] [blame] | 92 | ifeq ($(KVER), 3.18.21) |
Ram Chandra Jangir | 88dfc38 | 2015-09-04 11:50:17 +0530 | [diff] [blame] | 93 | CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME) |
| 94 | endif |
Liu Zhongjian | f8134e9 | 2016-09-21 14:42:01 +0800 | [diff] [blame] | 95 | ifeq ($(KVER),$(filter 4.4%,$(KVER))) |
| 96 | CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME) |
| 97 | endif |
Ram Chandra Jangir | 88dfc38 | 2015-09-04 11:50:17 +0530 | [diff] [blame] | 98 | |
Vasudevan Murugesan | f5fe749 | 2015-06-10 19:45:37 +0530 | [diff] [blame] | 99 | ifeq ($(KVER),$(filter 3.14%,$(KVER))) |
xiaofeis | ccdee9c | 2016-03-07 21:01:03 +0800 | [diff] [blame] | 100 | CPU_CFLAG= -DMODULE -nostdinc -D$(BOARD_NAME) -mlittle-endian -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror -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)" |
luny | d975a20 | 2014-05-15 22:17:17 +0800 | [diff] [blame] | 101 | endif |
Ram Chandra Jangir | 88dfc38 | 2015-09-04 11:50:17 +0530 | [diff] [blame] | 102 | |
Liu Zhongjian | f8134e9 | 2016-09-21 14:42:01 +0800 | [diff] [blame] | 103 | ifeq ($(KVER),$(filter 4.4%,$(KVER))) |
mingxinh | 5451c45 | 2017-04-06 14:21:35 +0800 | [diff] [blame] | 104 | CPU_CFLAG= -DMODULE -nostdinc -D$(BOARD_NAME) -mlittle-endian -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror -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)" |
Liu Zhongjian | f8134e9 | 2016-09-21 14:42:01 +0800 | [diff] [blame] | 105 | endif |
| 106 | |
Ram Chandra Jangir | 88dfc38 | 2015-09-04 11:50:17 +0530 | [diff] [blame] | 107 | ifeq ($(KVER),$(filter 3.18%,$(KVER))) |
xiaofeis | 9ebb3ff | 2016-02-29 16:49:31 +0800 | [diff] [blame] | 108 | 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)" |
Ram Chandra Jangir | 88dfc38 | 2015-09-04 11:50:17 +0530 | [diff] [blame] | 109 | endif |
luny | d975a20 | 2014-05-15 22:17:17 +0800 | [diff] [blame] | 110 | endif |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 111 | |
mingxinh | 7458b24 | 2017-02-21 18:30:24 +0800 | [diff] [blame] | 112 | ifeq ($(ARCH), arm64) |
| 113 | ifeq ($(KVER),$(filter 4.4%,$(KVER))) |
| 114 | CPU_CFLAG= -DMODULE -Os -pipe -march=armv8-a -mcpu=cortex-a53+crypto -fno-caller-saves -fhonour-copts -fno-common -Wno-error=unused-but-set-variable -Wno-error=unused-result -mcmodel=large |
| 115 | endif |
| 116 | endif |
| 117 | |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 118 | ifeq ($(BOARD_TYPE), ap136) |
| 119 | OS_SUB=31 |
| 120 | GCC_VER=4 |
| 121 | TOOL_PATH=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/usr/bin |
| 122 | SYS_PATH=$(TOPDIR)/linux/kernels/mips-linux-2.6.31 |
| 123 | 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 |
| 124 | endif |
| 125 | |
| 126 | #For MIPS Linux2.4 |
| 127 | #TOOL_PATH=/home/perforce/kernel2.4/5.3.1.20/tools/gcc-3.3.3-2.4.25/toolchain_mips/bin |
| 128 | #SYS_PATH=/home/perforce/kernel2.4/5.3.1.20/src/kernels/mips-linux-2.4.25 |
| 129 | |
| 130 | #TOOLPREFIX=$(CPU)-$(OS)- |
| 131 | #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 |
| 132 | |
| 133 | |
| 134 | KERNEL_MODE=TRUE |
| 135 | #compatiable with OpenWRT |
| 136 | ifeq ($(SWITCH_SSDK_MODE),user) |
| 137 | KERNEL_MODE=FLASE |
| 138 | endif |
| 139 | |
| 140 | #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] | 141 | FAL=TRUE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 142 | |
mingxinh | 7458b24 | 2017-02-21 18:30:24 +0800 | [diff] [blame] | 143 | #CHIP_TYPE can be defined as ATHENA, GARUDA, SHIVA, HORUS, ISIS, ISISC, DESS, HPPE and ALL_CHIP(ALL_CHIP means GARUDA, SHIVA, HORUS, ISIS, ISISC, DESS and HPPE) |
Zou Shunxiang | 0b4f142 | 2014-04-17 13:59:28 +0800 | [diff] [blame] | 144 | CHIP_TYPE=ALL_CHIP |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 145 | |
| 146 | #UK_IF=FALSE or not define UK_IF, UK_IF will not be included in SSDK |
| 147 | #when UK_IF=TRUE one of UK_NETLINK,UK_IOCTL must be defined as TRUE |
| 148 | UK_IF=TRUE |
| 149 | #UK_IOCTL=TRUE define user-kernel space communication based on ioctl |
| 150 | UK_IOCTL=TRUE |
| 151 | UK_MINOR_DEV=254 |
| 152 | |
| 153 | #API_LOCK=FALSE or not define API_LOCK, API_LOCK will not be included in SSDK |
| 154 | API_LOCK=FALSE |
| 155 | |
| 156 | #REG_ACCESS_SPEEDUP=FALSE or not define REG_ACCESS_SPEEDUP, REG_ACCESS_SPEEDUP will not be enabled, now only ISIS supports |
| 157 | REG_ACCESS_SPEEDUP=FALSE |
| 158 | |
| 159 | #ALL supported features: |
| 160 | #ACL FDB IGMP LEAKY LED MIB MIRROR MISC PORTCONTROL PORTVLAN QOS RATE STP VLAN |
| 161 | #IN_X=FALSE or not define IN_X, X will not be included in SSDK |
| 162 | IN_ACL=TRUE |
| 163 | IN_FDB=TRUE |
xiaofeis | 3237f35 | 2015-10-30 15:38:20 +0800 | [diff] [blame] | 164 | IN_FDB_MINI=FALSE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 165 | IN_IGMP=TRUE |
| 166 | IN_LEAKY=TRUE |
| 167 | IN_LED=TRUE |
| 168 | IN_MIB=TRUE |
| 169 | IN_MIRROR=TRUE |
| 170 | IN_MISC=TRUE |
xiaofeis | 3237f35 | 2015-10-30 15:38:20 +0800 | [diff] [blame] | 171 | IN_MISC_MINI=FALSE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 172 | IN_PORTCONTROL=TRUE |
xiaofeis | 3237f35 | 2015-10-30 15:38:20 +0800 | [diff] [blame] | 173 | IN_PORTCONTROL_MINI=FALSE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 174 | IN_PORTVLAN=TRUE |
xiaofeis | 3237f35 | 2015-10-30 15:38:20 +0800 | [diff] [blame] | 175 | IN_PORTVLAN_MINI=FALSE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 176 | IN_QOS=TRUE |
xiaofeis | 3237f35 | 2015-10-30 15:38:20 +0800 | [diff] [blame] | 177 | IN_QOS_MINI=FALSE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 178 | IN_RATE=TRUE |
| 179 | IN_STP=TRUE |
| 180 | IN_VLAN=TRUE |
xiaofeis | 3237f35 | 2015-10-30 15:38:20 +0800 | [diff] [blame] | 181 | IN_VLAN_MINI=FALSE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 182 | IN_REDUCED_ACL=FALSE |
| 183 | IN_COSMAP=TRUE |
xiaofeis | 3237f35 | 2015-10-30 15:38:20 +0800 | [diff] [blame] | 184 | IN_COSMAP_MINI=FALSE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 185 | IN_IP=TRUE |
| 186 | IN_NAT=TRUE |
mingxinh | 7458b24 | 2017-02-21 18:30:24 +0800 | [diff] [blame] | 187 | IN_FLOW=TRUE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 188 | IN_TRUNK=TRUE |
mingxinh | 3b69f73 | 2017-04-06 18:33:36 +0800 | [diff] [blame] | 189 | IN_RSS_HASH=TRUE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 190 | IN_SEC=TRUE |
mingxinh | 7458b24 | 2017-02-21 18:30:24 +0800 | [diff] [blame] | 191 | IN_QM=TRUE |
| 192 | IN_PPPOE=TRUE |
Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 193 | ifeq ($(HNAT_FEATURE), enable) |
| 194 | IN_NAT_HELPER=TRUE |
| 195 | else |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 196 | IN_NAT_HELPER=FALSE |
Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 197 | endif |
xiaofeis | ad0eef0 | 2015-02-09 16:14:32 +0800 | [diff] [blame] | 198 | ifeq ($(RFS_FEATURE), enable) |
| 199 | IN_RFS=TRUE |
| 200 | else |
| 201 | IN_RFS=FALSE |
| 202 | endif |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 203 | IN_INTERFACECONTROL=TRUE |
| 204 | IN_MACBLOCK=FALSE |
xiaofeis | 3237f35 | 2015-10-30 15:38:20 +0800 | [diff] [blame] | 205 | IN_MALIBU_PHY=TRUE |
Liu Zhongjian | c6834c0 | 2017-04-28 15:43:29 +0800 | [diff] [blame^] | 206 | IN_AQUANTIA_PHY=TRUE |
Ram Chandra Jangir | 963e4d2 | 2015-12-21 20:53:40 +0530 | [diff] [blame] | 207 | ifeq ($(SFE_FEATURE), enable) |
| 208 | IN_SFE=TRUE |
| 209 | else |
| 210 | IN_SFE=FALSE |
| 211 | endif |
mingxinh | 7458b24 | 2017-02-21 18:30:24 +0800 | [diff] [blame] | 212 | IN_VSI=TRUE |
| 213 | IN_CTRLPKT=TRUE |
| 214 | IN_SERVCODE=TRUE |
| 215 | IN_BM=TRUE |
| 216 | IN_SHAPER=TRUE |
| 217 | IN_POLICER=TRUE |
esong | a168965 | 2017-03-30 18:07:37 +0800 | [diff] [blame] | 218 | IN_UNIPHY=TRUE |
mingxinh | 2066f35 | 2017-03-07 19:52:30 +0800 | [diff] [blame] | 219 | ifneq ($(HK_CHIP), enable) |
| 220 | CHIP_TYPE=NONHK_CHIP |
| 221 | endif |