-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile.vxworks-keystone
273 lines (234 loc) · 8.72 KB
/
Makefile.vxworks-keystone
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
# $Id: Makefile.vxworks-keystone 1.12.44.2 Broadcom SDK $
# $Copyright: Copyright 2011 Broadcom Corporation.
# This program is the proprietary software of Broadcom Corporation
# and/or its licensors, and may only be used, duplicated, modified
# or distributed pursuant to the terms and conditions of a separate,
# written license agreement executed between you and Broadcom
# (an "Authorized License"). Except as set forth in an Authorized
# License, Broadcom grants no license (express or implied), right
# to use, or waiver of any kind with respect to the Software, and
# Broadcom expressly reserves all rights in and to the Software
# and all intellectual property rights therein. IF YOU HAVE
# NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS SOFTWARE
# IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE
# ALL USE OF THE SOFTWARE.
#
# Except as expressly set forth in the Authorized License,
#
# 1. This program, including its structure, sequence and organization,
# constitutes the valuable trade secrets of Broadcom, and you shall use
# all reasonable efforts to protect the confidentiality thereof,
# and to use this information only in connection with your use of
# Broadcom integrated circuit products.
#
# 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS
# PROVIDED "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES,
# REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY,
# OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY
# DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY,
# NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES,
# ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
# CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING
# OUT OF USE OR PERFORMANCE OF THE SOFTWARE.
#
# 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL
# BROADCOM OR ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL,
# INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER
# ARISING OUT OF OR IN ANY WAY RELATING TO YOUR USE OF OR INABILITY
# TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF
# THE AMOUNT ACTUALLY PAID FOR THE SOFTWARE ITSELF OR USD 1.00,
# WHICHEVER IS GREATER. THESE LIMITATIONS SHALL APPLY NOTWITHSTANDING
# ANY FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY.$
#
# Makefile for MPC8548 host running VxWorks
include ${SDK}/make/Makefile.vxworks-common
# WIND_BASE and WIND_HOST_TYPE must be modified according to your
# installed location. The environment variables are ignored intentionally.
ifndef VX_VERSION
VX_VERSION = 66
endif
ifeq ($(VX_TARGET_BIG_ENDIAN),1)
TARGET_EFLAGS = -EB -DBE_HOST=1 -DIL_BIGENDIAN=1 -DMIPSEB
TOOL_SUFFIX=
else
TARGET_EFLAGS = -EL -DLE_HOST=1 -DIL_BIGENDIAN=0 -DMIPSEL
TOOL_SUFFIX=le
endif
ifeq ($(HOSTTYPE),Windows2000PC)
WIND_HOST_TYPE = x86-win32
ifeq (${VX_VERSION},66)
WIND_HOME = c:/windriver/
WIND_BASE = c:/windriver/vxworks-6.6/
endif
ifeq (${VX_VERSION},55)
#WIND_HOME = c:/windriver/
WIND_BASE = c:/tornado2.2/
#SHELL := cmd.exe
endif
else
ifeq (${VX_VERSION},66)
WIND_HOST_TYPE = x86-linux2
WIND_HOME = /tools/windriver/vxworks/$(VXWORKS_VERSION)
WIND_BASE = ${WIND_HOME}/vxworks-${VXWORKS_VERSION}
endif
ifeq (${VX_VERSION},55)
WIND_HOST_TYPE = sun4-solaris2
WIND_BASE = /projects/ntsw-tools/wrs/tornado/t2.2.1
endif
endif
ifeq (${VX_VERSION},66)
WORKBENCH_VERSION = workbench-3.0
VXWORKS_VERSION = 6.6
GNU_COMPILER_VERSION = 4.1.2
DIAB_COMPILER_VERSION = 5.6.0.0
WIND_GNU_PATH = ${WIND_HOME}/gnu/${GNU_COMPILER_VERSION}-vxworks-${VXWORKS_VERSION}
WIND_DIAB_PATH = ${WIND_HOME)/diab/${DIAB_COMPILER_VERSION}
CPU = MIPSI32R2
CPU_VARIANT = _mti24kx
endif
ifeq (${VX_VERSION},55)
VXWORKS_VERSION = 5.5
CPU = MIPS32
CPU_VARIANT = _mti4kx
endif
export VXWORKS_VERSION
TOOL=sfgnu$(TOOL_SUFFIX)
#TOOL = sfdiab
VX_SRC = ${SDK}/systems/vxworks/keystone/bcm53000/vxworks-${VXWORKS_VERSION}/
VX_SRC_ALL = ${VX_SRC}/all
#BOOTROM_SWAP=yes
# Extra libraries for this platform
ifeq ($(HOSTTYPE),Windows2000PC)
ifeq (${VX_VERSION},55)
ifeq ($(VX_TARGET_BIG_ENDIAN),1)
COND_LIB_BSP = $(WIND_BASE)/target/lib/mips/$(CPU)/sfcommon$(CPU_VARIANT)/libarch.a
else
COND_LIB_BSP = $(WIND_BASE)/target/lib/mips/$(CPU)/sfcommonle$(CPU_VARIANT)/libarch.a
endif
else
COND_LIB_BSP =
endif
else
COND_LIB_BSP =
endif
# Configuration Flags
#CFGFLAGS += -DINCLUDE_DRIVERS -DMPC8548 -DBCM_PLATFORM_STRING=\"GTO_MPC8548\"
CFGFLAGS += -DOVERRIDE_PCI_MAX_BUS=32 -DBCMDRIVER
ifeq ($(HOSTTYPE),Windows2000PC)
ifeq (${VX_VERSION},66)
CFGFLAGS += -DINCLUDE_DRIVERS -DBCM_PLATFORM_STRING=\"KEYSTONE\"
endif
# Definition of the platform string by escape character can not be
# recoginized by the compiler of Tornado 2.2 of DOS platform.
ifeq (${VX_VERSION},55)
CFGFLAGS += -DINCLUDE_DRIVERS
endif
else
CFGFLAGS += -DINCLUDE_DRIVERS -DBCM_PLATFORM_STRING=\"KEYSTONE\"
endif
#CFLAGS += -D_WRS_KERNEL
# fast pci access
CFGFLAGS+= -DVXWORKS
ifeq (${VX_VERSION},66)
toolbase = $(WIND_GNU_PATH)/$(WIND_HOST_TYPE)/bin/
toolbase_alt = $(WIND_HOME)/$(WORKBENCH_VERSION)/$(WIND_HOST_TYPE)/bin/
CC = $(toolbase)ccmips
CPP = $(toolbase)cppmips
CXX = $(toolbase)g++mips
RANLIB = $(toolbase)ranlibmips
AR = $(toolbase)armips
LD = $(toolbase)ldmips
NM = $(toolbase_alt)nmmips
SIZE = $(toolbase_alt)sizemips
STRIP = $(toolbase_alt)stripmips
OBJCOPY = $(toolbase_alt)objcopymips
export WIND_TOOLS = $(WIND_HOME)/$(WORKBENCH_VERSION)
export WIND_LIC_PROXY = $(WIND_HOME)/setup/$(WIND_HOST_TYPE)/bin/
export WRSD_LICENSE_FILE = $(WIND_HOME)/license/
endif
ifeq (${VX_VERSION},55)
toolbase = $(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin
CC = $(toolbase)/ccmips
CPP = $(toolbase)/cppmips
CXX = $(toolbase)/g++mips
RANLIB = $(toolbase)/ranlibmips
AR = $(toolbase)/armips
LD = $(toolbase)/ldmips
ifeq ($(HOSTTYPE),Windows2000PC)
NM = nmmips
else
NM = $(toolbase)/nmmips
endif
MUNCH = $(toolbase)/munch
SIZE = $(toolbase)/sizemips
STRIP = $(toolbase)/stripmips
OBJCOPY = $(toolbase)objcopymips
endif
ifeq (${VX_VERSION},66)
OPTFLAGS_DEFAULT = -O3
MFLAGS = -G 0 $(OPTFLAGS) $(TARGET_EFLAGS) -mips32r2 -msoft-float -DCPU=$(CPU) -DintUnlock=intUnlockSafe
endif
ifeq (${VX_VERSION},55)
OPTFLAGS_DEFAULT = -O2
MFLAGS = -G 0 $(OPTFLAGS) $(TARGET_EFLAGS) -mips2 -msoft-float -DCPU=$(CPU) -DintUnlock=intUnlockSafe
endif
ARFLAGS = -rc
# TARGETTYPE Defines: This defines the type of system you are compiling
# the driver for; there are several values allowed. New values can be created
# by porting the routines (system.c) to your platform and adding
# the define in this Makefile.
TARGETTYPE = KEYSTONE
# OSType Defines: This defines the type of RTOS or microkernel which you
# are compiling the SAL (and its associated driver) for. New platforms
# can be created by porting the routines (system.c) to your platform and
# adding the define in this Makefile.
OSTYPE = VXWORKS
ifeq (${VX_VERSION},66)
INCS += -I$(VX_SRC) -I${VX_SRC_ALL} -I$(WIND_BASE)/target/h
INCS += -I$(WIND_BASE)/target/h/wrn/coreip
INCS += -I$(WIND_BASE)/target/h/wrn/coreip/net
# Includes path to new network stack component.
INCS += -I$(WIND_HOME)/components/ip_net2-6.6
INCS += -I$(WIND_HOME)/components/ip_net2-6.6/ipnet2/src
INCS += -I$(WIND_HOME)/components/ip_net2-6.6/ipnet2/include
INCS += -I$(WIND_HOME)/components/ip_net2-6.6/ipnet2/config
INCS += -I$(WIND_HOME)/components/ip_net2-6.6/ipcom/port/vxworks/include
INCS += -I$(WIND_HOME)/components/ip_net2-6.6/ipcom/port/vxworks/config
INCS += -I$(WIND_HOME)/components/ip_net2-6.6/ipcom/include
INCS += -I$(WIND_HOME)/components/ip_net2-6.6/ipcom/config
endif
ifeq (${VX_VERSION},55)
INCS += -I$(WIND_BASE)/target/h -I$(VX_SRC) -I${VX_SRC_ALL}
endif
LIBS =
#
# STD_{C|CPP|CXX}FLAGS - Standard flags used by ALL compilations
# BCM_{C|CPP|CXX}FLAGS - Flags used for Broadcom source files
# OPT_{C|CPP|CXX}FLAGS - Defined in local make files BEFORE inclusion of
# this Makefile, to define local "Extra" flags.
#
# We include -DTRUE=1 to fix a Tornado 1 problem where stdarg macros are
# defined incorrectly if TRUE is not defined ahead of including stdarg.h.
# NOTE: Extra -I${INCDIR} puts $SDK/include before system incs, for assert.h
#
ifeq (${VX_VERSION},66)
STD_CFLAGS = -fno-builtin -msoft-float -nostdlib $(MFLAGS) \
-I${INCDIR} ${INCS} -D${TARGETTYPE} -D${OSTYPE} -DBROADCOM_BSP \
-DVX_VERSION=${VX_VERSION} \
${CFGFLAGS} -DTRUE=1 -DVXWORKS_NETWORK_STACK_6_5
BCM_CFLAGS = -DCPU_VARIANT=_mti24kx
endif
ifeq (${VX_VERSION},55)
BCM_CFLAGS = -DCPU_VAR=RC32364
STD_CFLAGS = -fno-builtin $(MFLAGS) \
-I${INCDIR} ${INCS} -D${TARGETTYPE} -D${OSTYPE} \
-DVX_VERSION=${VX_VERSION} -DBROADCOM_BSP \
${CFGFLAGS}
endif
STD_CPPFLAGS = ${STD_CFLAGS}
STD_CXXFLAGS = ${STD_CFLAGS}
#
# Features which should be explicitly excluded from this configuration:
#
#FEATURE_EXCLUDE_LIST = RPC