Makefile.linux-jag-2_6 (4804B)
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 ifeq (WR_LINUX,$(BUILD_PLATFORM)) 29 ifeq (1.4,$(WRS_LINUX_VERSION)) 30 31 KERNDIR := /projects/ntsw-tools/linux/wrslinux_1.4/broadcom_bcm95836cpci_be/build/linux-2.6.14-small 32 33 ifeq (,$(CROSS_COMPILE)) 34 CROSS_COMPILE := mips-wrs-linux-gnu- 35 endif 36 37 export WIND_LIC_PROXY = /projects/ntsw-tools/wrs/wrs_linux/GPP_LE_1.4_PPR/setup/x86-linux2/bin 38 39 override PATH := /projects/ntsw-tools/wrs/wrs_linux/GPP_LE_1.4_PPR/gnu/3.4.4-wrlinux-1.4/x86-linux2/bin:$(PATH) 40 endif 41 42 ifeq (2.0,$(WRS_LINUX_VERSION)) 43 44 #CROSS_COMPILE = mips-wrs-linux-gnu- 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/jag/glibc_std/build/linux-2.6.21-standard 51 52 endif 53 54 WRLINUX_BASE=/tools/windriver/linux_ed/2.0_GA/Linux 55 56 TOOLCHAIN_BIN_DIR=$(KERNDIR)/../../host-cross/mips-wrs-linux-gnu/bin 57 WIND_LIC_PROXY=$(WRLINUX_BASE)/setup/x86-linux2/bin 58 59 WRLINUX_GNU_PATH=$(WRLINUX_BASE)/gnu/4.1-wrlinux-2.0/x86-linux2/bin 60 61 override PATH:=$(KERNDIR)/../../host-cross/bin:$(KERNDIR)/../../host-cross/mips-wrs-linux-gnu/bin:$(WRLINUX_GNU_PATH):$(PATH) 62 63 WRS_SYSROOT_PATH := $(WRLINUX_GNU_PATH)/../lib/gcc/mips-wrs-linux-gnu/4.1.2/include 64 65 export TOOLCHAIN_BIN_DIR WIND_LIC_PROXY 66 endif 67 68 ifeq (ELDK,$(BUILD_PLATFORM)) 69 ifeq (2.6.21.7, $(KERN_VER)) 70 71 ifeq (,$(CROSS_COMPILE)) 72 CROSS_COMPILE := mips_4KC- 73 endif 74 75 override PATH := /tools/eldk/4.1/usr/bin:$(PATH) 76 KERNDIR ?= /projects/ntsw-tools/linux/eldk/jag-ntswics-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 95 # Default Linux include directory 96 ifeq (,$(LINUX_INCLUDE)) 97 LINUX_INCLUDE := $(KERNDIR)/include 98 endif 99 100 CFGFLAGS += -DSYS_BE_PIO=0 -DSYS_BE_PACKET=1 -DSYS_BE_OTHER=0 101 ENDIAN = BE_HOST=1 102 CFGFLAGS += -D$(ENDIAN) 103 CFGFLAGS += -DBCM_PLATFORM_STRING=\"JAG_BCM4704\" 104 105 ARCH = mips 106 KBUILD_VERBOSE = 1 107 108 export ARCH KBUILD_VERBOSE 109 110 ifeq (ELDK,$(BUILD_PLATFORM)) 111 KFLAG_INCLD = /tools/eldk/4.1/usr/lib/gcc/mips-linux/4.0.0/include/ 112 endif 113 114 ifeq (1.4,$(WRS_LINUX_VERSION)) 115 # From linux/arch/mips/Makefile 116 117 ifeq (,$(KFLAGS)) 118 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 119 endif 120 121 #-Wdeclaration-after-statement -Wstrict-prototypes 122 else 123 124 ifeq (2.0,$(WRS_LINUX_VERSION)) 125 126 ifeq (,$(KFLAGS)) 127 KFLAGS := -D__KERNEL__ -nostdinc -isystem $(WRS_SYSROOT_PATH) -I$(LINUX_INCLUDE) -include $(LINUX_INCLUDE)/linux/autoconf.h -I$(KERNDIR)/arch/mips -I$(KERNDIR)/arch/mips -I$(KERNDIR)/arch/mips/include -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-bcm947xx -Iinclude/asm-mips/mach-generic -fomit-frame-pointer -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -mlong-calls 128 endif 129 130 endif 131 endif 132 133 ifeq (ELDK,$(BUILD_PLATFORM)) 134 135 ifeq (,$(KFLAGS)) 136 KFLAGS := -D__KERNEL__ -nostdinc -isystem $(KFLAG_INCLD) -I$(LINUX_INCLUDE) -include $(LINUX_INCLUDE)/linux/autoconf.h -I$(KERNDIR)/arch/mips -I$(KERNDIR)/arch/mips -I$(KERNDIR)/arch/mips/include -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-bcm947xx -Iinclude/asm-mips/mach-generic -fomit-frame-pointer -g -Wdeclaration-after-statement -mlong-calls 137 endif 138 139 endif 140 141 ifneq ($(targetplat),user) 142 include ${SDK}/make/Makefile.linux-kernel-2_6 143 endif 144 145 ifneq (,$(findstring TCL,$(FEATURE_LIST))) 146 LINK_STATIC=0 147 export LINK_STATIC 148 endif 149 150 151 152