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 | |
| 13 | ifeq ($(KVER), 3.3.8) |
| 14 | OS_VER=3_2 |
| 15 | endif |
| 16 | |
| 17 | ifeq ($(ARCH), arm) |
| 18 | BOARD=ipq806x |
| 19 | endif |
| 20 | |
| 21 | ifeq ($(ARCH), mips) |
| 22 | BOARD=ar71xx |
| 23 | endif |
| 24 | |
| 25 | ifeq ($(BOARD), ar71xx) |
| 26 | BOARD_NAME=BOARD_AR71XX |
| 27 | endif |
| 28 | |
| 29 | ifeq ($(BOARD), ipq806x) |
| 30 | BOARD_NAME=BOARD_IPQ806X |
| 31 | endif |
| 32 | |
Yue Lun | dd6e3d9 | 2013-10-25 13:03:31 +0800 | [diff] [blame] | 33 | OS_SUB=31 |
Yue Lun | dd6e3d9 | 2013-10-25 13:03:31 +0800 | [diff] [blame] | 34 | |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 35 | ifndef OS_VER |
| 36 | OS_VER=2_6 |
| 37 | endif |
| 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 |
| 50 | ifndef TOOL_PATH |
| 51 | TOOL_PATH=/disk/ap81fus/sw/build/gcc-3.4.4-2.16.1/build_mips/bin |
| 52 | endif |
| 53 | ifndef SYS_PATH |
| 54 | SYS_PATH=/disk/ap81fus/sw/linux/kernels/mips-linux-2.6.15 |
| 55 | endif |
| 56 | ifeq ($(ARCH), mips) |
Zou Shunxiang | 0b4f142 | 2014-04-17 13:59:28 +0800 | [diff] [blame] | 57 | 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] | 58 | endif |
| 59 | |
| 60 | |
| 61 | #db120 |
| 62 | ifeq ($(BOARD_TYPE),db12x) |
| 63 | OS_SUB=31 |
| 64 | GCC_VER=4 |
| 65 | TOOL_PATH=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/usr/bin |
| 66 | SYS_PATH=$(TOPDIR)/linux/kernels/mips-linux-2.6.31 |
| 67 | 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 |
| 68 | endif |
| 69 | |
| 70 | ifeq ($(ARCH), arm) |
luny | d975a20 | 2014-05-15 22:17:17 +0800 | [diff] [blame^] | 71 | ifeq ($(KVER), 3.4.0) |
Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 72 | 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] | 73 | endif |
luny | d975a20 | 2014-05-15 22:17:17 +0800 | [diff] [blame^] | 74 | ifeq ($(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)" |
| 76 | endif |
| 77 | endif |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 78 | |
| 79 | ifeq ($(BOARD_TYPE), ap136) |
| 80 | OS_SUB=31 |
| 81 | GCC_VER=4 |
| 82 | TOOL_PATH=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/usr/bin |
| 83 | SYS_PATH=$(TOPDIR)/linux/kernels/mips-linux-2.6.31 |
| 84 | 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 |
| 85 | endif |
| 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 | |
| 95 | KERNEL_MODE=TRUE |
| 96 | #compatiable with OpenWRT |
| 97 | ifeq ($(SWITCH_SSDK_MODE),user) |
| 98 | KERNEL_MODE=FLASE |
| 99 | endif |
| 100 | |
| 101 | #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] | 102 | FAL=TRUE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 103 | |
| 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 Shunxiang | 0b4f142 | 2014-04-17 13:59:28 +0800 | [diff] [blame] | 105 | CHIP_TYPE=ALL_CHIP |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 106 | |
| 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 |
| 109 | UK_IF=TRUE |
| 110 | #UK_IOCTL=TRUE define user-kernel space communication based on ioctl |
| 111 | UK_IOCTL=TRUE |
| 112 | UK_MINOR_DEV=254 |
| 113 | |
| 114 | #API_LOCK=FALSE or not define API_LOCK, API_LOCK will not be included in SSDK |
| 115 | API_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 |
| 118 | REG_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 |
| 123 | IN_ACL=TRUE |
| 124 | IN_FDB=TRUE |
| 125 | IN_IGMP=TRUE |
| 126 | IN_LEAKY=TRUE |
| 127 | IN_LED=TRUE |
| 128 | IN_MIB=TRUE |
| 129 | IN_MIRROR=TRUE |
| 130 | IN_MISC=TRUE |
| 131 | IN_PORTCONTROL=TRUE |
| 132 | IN_PORTVLAN=TRUE |
| 133 | IN_QOS=TRUE |
| 134 | IN_RATE=TRUE |
| 135 | IN_STP=TRUE |
| 136 | IN_VLAN=TRUE |
| 137 | IN_REDUCED_ACL=FALSE |
| 138 | IN_COSMAP=TRUE |
| 139 | IN_IP=TRUE |
| 140 | IN_NAT=TRUE |
| 141 | IN_TRUNK=TRUE |
| 142 | IN_SEC=TRUE |
Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 143 | ifeq ($(HNAT_FEATURE), enable) |
| 144 | IN_NAT_HELPER=TRUE |
| 145 | else |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 146 | IN_NAT_HELPER=FALSE |
Yue Lun | f564a1f | 2014-01-07 15:54:34 +0800 | [diff] [blame] | 147 | endif |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 148 | IN_INTERFACECONTROL=TRUE |
| 149 | IN_MACBLOCK=FALSE |