Makefile.linux-raptor-2_6 (4853B)
1 # 2 # This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 3 # 4 # Copyright 2007-2019 Broadcom Inc. All rights reserved. 5 6 7 # User must select one platform from below.By default WR_LINUX is selected. . 8 ifeq (,$(BUILD_PLATFORM)) 9 #BUILD_PLATFORM=ELDK 10 BUILD_PLATFORM=WR_LINUX 11 endif 12 13 14 # Specify the KERNEL VERSION you want to use for building SDK. 15 ifeq (ELDK,$(BUILD_PLATFORM)) 16 ifeq (,$(KERN_VER)) 17 KERN_VER=2.6.21.7 18 endif 19 endif 20 21 # Specify the Windriver Linux version here.For example '2.0' as shown below. 22 ifeq (WR_LINUX,$(BUILD_PLATFORM)) 23 ifeq (,$(WRS_LINUX_VERSION)) 24 WRS_LINUX_VERSION=2.0 25 endif 26 endif 27 28 29 # Default Linux Kernel directory 30 ifeq (WR_LINUX,$(BUILD_PLATFORM)) 31 ifeq (1.4,$(WRS_LINUX_VERSION)) 32 33 KERNDIR ?= /projects/ntsw-tools/linux/wrslinux_1.4/broadcom_bcm95621x_be/build/linux-2.6.14-small 34 35 ifeq (,$(CROSS_COMPILE)) 36 CROSS_COMPILE := mips-wrs-linux-gnu- 37 endif 38 39 export WIND_LIC_PROXY = /projects/ntsw-tools/wrs/wrs_linux/GPP_LE_1.4_PPR/setup/x86-linux2/bin 40 41 override PATH := /projects/ntsw-tools/wrs/wrs_linux/GPP_LE_1.4_PPR/gnu/3.4.4-wrlinux-1.4/x86-linux2/bin:$(PATH) 42 endif 43 44 ifeq (2.0,$(WRS_LINUX_VERSION)) 45 46 ifeq (,$(CROSS_COMPILE)) 47 CROSS_COMPILE := mips-wrs-linux-gnu-mips_softfp-glibc_std- 48 endif 49 50 KERNDIR ?= /projects/ntsw-tools/linux/wrslinux_2.0/ntswics/glibc_std/build/linux-2.6.21-standard 51 override PATH:=$(KERNDIR)/../../host-cross/bin:$(KERNDIR)/../../host-cross/mips-wrs-linux-gnu/bin:$(WRLINUX_GNU_PATH):$(PATH) 52 53 endif 54 55 WRLINUX_BASE=/tools/windriver/linux_ed/2.0_GA/Linux 56 57 TOOLCHAIN_BIN_DIR=$(KERNDIR)/../../host-cross/mips-wrs-linux-gnu/bin 58 WIND_LIC_PROXY=$(WRLINUX_BASE)/setup/x86-linux2/bin 59 60 WRLINUX_GNU_PATH=$(WRLINUX_BASE)/gnu/4.1-wrlinux-2.0/x86-linux2/bin 61 62 override PATH:=$(KERNDIR)/../../host-cross/bin:$(KERNDIR)/../../host-cross/mips-wrs-linux-gnu/bin:$(WRLINUX_GNU_PATH):$(PATH) 63 64 WRS_SYSROOT_PATH := $(WRLINUX_GNU_PATH)/../lib/gcc/mips-wrs-linux-gnu/4.1.2/include 65 66 export TOOLCHAIN_BIN_DIR WIND_LIC_PROXY 67 68 endif 69 70 ifeq (ELDK,$(BUILD_PLATFORM)) 71 ifeq (2.6.21.7, $(KERN_VER)) 72 ifeq (,$(CROSS_COMPILE)) 73 CROSS_COMPILE := mips_4KC- 74 endif 75 override PATH := /tools/eldk/4.1/usr/bin:$(PATH) 76 KERNDIR ?= /projects/ntsw-tools/linux/eldk/raptor_eldk/linux-2.6.21.7 77 endif 78 endif 79 80 81 82 comma = , 83 basetarget = $(basename $(notdir $@)) 84 modname = $(basetarget) 85 86 # Extra variables. 87 EXTRA_CFLAGS = -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags) 88 89 name-fix = $(subst $(comma),_,$(subst -,_,$1)) 90 basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))" 91 modname_flags = $(if $(filter 1,$(words $(modname))),\ 92 -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))") 93 94 # Default Linux include directory 95 ifeq (,$(LINUX_INCLUDE)) 96 LINUX_INCLUDE := $(KERNDIR)/include 97 endif 98 99 CFGFLAGS += -DSYS_BE_PIO=0 -DSYS_BE_PACKET=1 -DSYS_BE_OTHER=0 -DBCM_ICS 100 ENDIAN = BE_HOST=1 101 CFGFLAGS += -D$(ENDIAN) -DRAPTOR 102 CFGFLAGS += -DBCM_PLATFORM_STRING=\"Raptor_BCM56218\" 103 104 105 ARCH = mips 106 KBUILD_VERBOSE = 1 107 108 export ARCH KBUILD_VERBOSE 109 110 111 ifeq (ELDK,$(BUILD_PLATFORM)) 112 KFLAG_INCLD = /tools/eldk/4.1/usr/lib/gcc/mips-linux/4.0.0/include 113 endif 114 115 116 # From linux/arch/mips/Makefile 117 ifeq (WR_LINUX,$(BUILD_PLATFORM)) 118 ifeq (1.4,$(WRS_LINUX_VERSION)) 119 120 ifeq (,$(KFLAGS)) 121 KFLAGS := -D__KERNEL__ -Wall -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -g -G 0 -mno-abicalls -fno-pic -pipe -march=mips32 -Wa,-mips32 -Wa,--trap -funit-at-a-time -mlong-calls -Wundef -finline-limit=100000 -mabi=32 122 endif 123 124 endif 125 126 ifeq (2.0,$(WRS_LINUX_VERSION)) 127 128 ifeq (,$(KFLAGS)) 129 KFLAGS := -D__KERNEL__ -nostdinc -isystem $(WRS_SYSROOT_PATH) -I$(LINUX_INCLUDE) -include $(LINUX_INCLUDE)/linux/autoconf.h -I$(KERNDIR)/arch/mips/mach-bcm56218 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -mabi=32 -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -ffreestanding -march=mips32 -Wa,-mips32 -Wa,--trap -Iinclude/asm-mips/mach-bcm56218 -Iinclude/asm-mips/mach-generic -fomit-frame-pointer -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -mlong-calls 130 endif 131 132 endif 133 endif 134 135 ifeq (ELDK,$(BUILD_PLATFORM)) 136 137 ifeq (,$(KFLAGS)) 138 KFLAGS := -D__KERNEL__ -nostdinc -isystem $(KFLAG_INCLD) -I$(LINUX_INCLUDE) -include $(LINUX_INCLUDE)/linux/autoconf.h -I$(KERNDIR)/arch/mips/mach-bcm56218 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -mabi=32 -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -ffreestanding -march=mips32 -Wa,-mips32 -Wa,--trap -Iinclude/asm-mips/mach-bcm56218 -Iinclude/asm-mips/mach-generic -fomit-frame-pointer -g -Wdeclaration-after-statement -mlong-calls 139 endif 140 141 142 endif 143 144 145 146 ifneq ($(targetplat),user) 147 include ${SDK}/make/Makefile.linux-kernel-2_6 148 endif 149 150 ifneq (,$(findstring TCL,$(FEATURE_LIST))) 151 LINK_STATIC=0 152 export LINK_STATIC 153 endif 154 155 156 157 158