blob: 86d576eec7ca61d56bf43f6b56bc2e925e15f942 [file] [log] [blame]
#CPU=mips
OS=linux
ifeq ($(KVER),$(filter 3.14%,$(KVER)))
OS_VER=3_14
endif
ifeq ($(KVER),$(filter 4.4%,$(KVER)))
OS_VER=4_4
endif
ifeq ($(KVER), 3.4.0)
OS_VER=3_4
endif
ifeq ($(KVER), 3.18)
OS_VER=3_18
endif
ifeq ($(KVER), 3.18.21)
OS_VER=3_18
endif
ifeq ($(KVER), 3.4.103)
OS_VER=3_4
endif
ifeq ($(KVER), 3.3.8)
OS_VER=3_2
endif
ifeq ($(ARCH), arm)
BOARD=ipq806x
endif
ifeq ($(ARCH), mips)
BOARD=ar71xx
endif
ifeq ($(BOARD), ar71xx)
BOARD_NAME=BOARD_AR71XX
endif
ifeq ($(BOARD), ipq806x)
BOARD_NAME=BOARD_IPQ806X
endif
OS_SUB=31
ifndef OS_VER
OS_VER=2_6
endif
# OS subversion, 2.6.31 for WASP (db120)
#OS_SUB=31
# GCC version, 3 or 4
#GCC_VER=4
#For MIPS Linux2.6
#pb45
#TOOL_PATH=/disk/pb45/sw/build/gcc-3.4.4-2.16.1/build_mips_nofpu/bin
#SYS_PATH=/disk/pb45/sw/linux/kernels/mips-linux-2.6.15
#ap81
# compatiable with OpenWRT
ifndef TOOL_PATH
TOOL_PATH=/disk/ap81fus/sw/build/gcc-3.4.4-2.16.1/build_mips/bin
endif
ifndef SYS_PATH
SYS_PATH=/disk/ap81fus/sw/linux/kernels/mips-linux-2.6.15
endif
ifeq ($(ARCH), mips)
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)
endif
#db120
ifeq ($(BOARD_TYPE),db12x)
OS_SUB=31
GCC_VER=4
TOOL_PATH=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/usr/bin
SYS_PATH=$(TOPDIR)/linux/kernels/mips-linux-2.6.31
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
endif
ifeq ($(ARCH), arm)
ifeq ($(KVER), 3.4.0)
CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME)
endif
ifeq ($(KVER), 3.4.103)
CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME)
endif
ifeq ($(KVER), 3.18.21)
CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME)
endif
ifeq ($(KVER),$(filter 4.4%,$(KVER)))
CPU_CFLAG=-D__LINUX_ARM_ARCH__=7 -DMODULE -fno-common -DCONFIG_MMU -D$(BOARD_NAME)
endif
ifeq ($(KVER),$(filter 3.14%,$(KVER)))
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)"
endif
ifeq ($(KVER),$(filter 4.4%,$(KVER)))
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)"
endif
ifeq ($(KVER),$(filter 3.18%,$(KVER)))
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)"
endif
endif
ifeq ($(ARCH), arm64)
ifeq ($(KVER),$(filter 4.4%,$(KVER)))
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
endif
endif
ifeq ($(BOARD_TYPE), ap136)
OS_SUB=31
GCC_VER=4
TOOL_PATH=$(TOPDIR)/build/gcc-4.3.3/build_mips/staging_dir/usr/bin
SYS_PATH=$(TOPDIR)/linux/kernels/mips-linux-2.6.31
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
endif
#For MIPS Linux2.4
#TOOL_PATH=/home/perforce/kernel2.4/5.3.1.20/tools/gcc-3.3.3-2.4.25/toolchain_mips/bin
#SYS_PATH=/home/perforce/kernel2.4/5.3.1.20/src/kernels/mips-linux-2.4.25
#TOOLPREFIX=$(CPU)-$(OS)-
#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
KERNEL_MODE=TRUE
#compatiable with OpenWRT
ifeq ($(SWITCH_SSDK_MODE),user)
KERNEL_MODE=FLASE
endif
#FAL=FALSE or not define FAL, FAL will not be included in SSDK
FAL=TRUE
#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)
CHIP_TYPE=ALL_CHIP
#UK_IF=FALSE or not define UK_IF, UK_IF will not be included in SSDK
#when UK_IF=TRUE one of UK_NETLINK,UK_IOCTL must be defined as TRUE
UK_IF=TRUE
#UK_IOCTL=TRUE define user-kernel space communication based on ioctl
UK_IOCTL=TRUE
UK_MINOR_DEV=254
#API_LOCK=FALSE or not define API_LOCK, API_LOCK will not be included in SSDK
API_LOCK=FALSE
#REG_ACCESS_SPEEDUP=FALSE or not define REG_ACCESS_SPEEDUP, REG_ACCESS_SPEEDUP will not be enabled, now only ISIS supports
REG_ACCESS_SPEEDUP=FALSE
#ALL supported features:
#ACL FDB IGMP LEAKY LED MIB MIRROR MISC PORTCONTROL PORTVLAN QOS RATE STP VLAN
#IN_X=FALSE or not define IN_X, X will not be included in SSDK
IN_ACL=TRUE
IN_FDB=TRUE
IN_FDB_MINI=FALSE
IN_IGMP=TRUE
IN_LEAKY=TRUE
IN_LED=TRUE
IN_MIB=TRUE
IN_MIRROR=TRUE
IN_MISC=TRUE
IN_MISC_MINI=FALSE
IN_PORTCONTROL=TRUE
IN_PORTCONTROL_MINI=FALSE
IN_PORTVLAN=TRUE
IN_PORTVLAN_MINI=FALSE
IN_QOS=TRUE
IN_QOS_MINI=FALSE
IN_RATE=TRUE
IN_STP=TRUE
IN_VLAN=TRUE
IN_VLAN_MINI=FALSE
IN_REDUCED_ACL=FALSE
IN_COSMAP=TRUE
IN_COSMAP_MINI=FALSE
IN_IP=TRUE
IN_NAT=TRUE
IN_FLOW=TRUE
IN_TRUNK=TRUE
IN_RSS_HASH=TRUE
IN_SEC=TRUE
IN_QM=TRUE
IN_PPPOE=TRUE
ifeq ($(HNAT_FEATURE), enable)
IN_NAT_HELPER=TRUE
else
IN_NAT_HELPER=FALSE
endif
ifeq ($(RFS_FEATURE), enable)
IN_RFS=TRUE
else
IN_RFS=FALSE
endif
IN_INTERFACECONTROL=TRUE
IN_MACBLOCK=FALSE
IN_MALIBU_PHY=TRUE
ifeq ($(SFE_FEATURE), enable)
IN_SFE=TRUE
else
IN_SFE=FALSE
endif
IN_VSI=TRUE
IN_CTRLPKT=TRUE
IN_SERVCODE=TRUE
IN_BM=TRUE
IN_SHAPER=TRUE
IN_POLICER=TRUE
IN_UNIPHY=TRUE
ifneq ($(HK_CHIP), enable)
CHIP_TYPE=NONHK_CHIP
endif