04b9ce8e32
Manual verification on switch (TH3 device) admin@str2-xxxxx-01:~$ bcmcmd bsv bsv BRCM SAI ver: [6.0.0.10], OCP SAI ver: [1.9.1], SDK ver: [sdk-6.5.23] drivshell> admin@str2-xxxxx-01:~$ bcmcmd version version Broadcom Command Monitor: Copyright (c) 1998-2021 Broadcom Release: sdk-6.5.23 built 20211020 (Wed Oct 20 06:52:58 2021) From root@fedbbfdbee81:/__w/2/s/output/x86-xgsall-deb/hsdk Platform: X86 OS: Unix (Posix) Chips: BCM56640_A0, BCM56850_A0, BCM56340_A0, BCM56960_A0, BCM56860_A0, BCM56970_A0, BCM56870_A0, BCM56980_A0, BCM56980_B0, BCM56370_A0, BCM56275_A0, BCM56770_A0, Chips: BCM56780_A0, BCM56782_A0, BCM56784_A0, BCM56785_A0, BCM56786_A0, BCM56787_A0, BCM56788_A0, BCM56789_A0, BCM56880_A0, BCM56880_B0, BCM56881_A0, BCM56881_B0, BCM56883_A0, BCM56883_B0, BCM56990_A0, BCM56990_B0, BCM56991_B0, BCM56992_B0, BCM56996_A0, BCM56996_B0, BCM56997_A0, BCM56997_B0 Variant drivers: BCM56780_A0_CNA_1_2_10, BCM56780_A0_DNA_2_7_6_0, BCM56880_A0_CNA_1_2_9, BCM56880_A0_DNA_4_9_5_0 PHYs: BCM5400, BCM54182, BCM54185, BCM54180, BCM54140, BCM54192, BCM54195, BCM54190, BCM54194, BCM54210, BCM54220, BCM54280, BCM54282, BCM54240, BCM54285, BCM5428X, BCM54290, BCM54292, BCM54294, BCM54295, BCM54296, BCM56160-GPHY, BCM53540-GPHY, BCM56275-GPHY, BCM8750, BCM8752, BCM8754, BCM84740, BCM84164, BCM84758, BCM84780, BCM84784, BCM84318, BCM84328, Sesto, BCM82780, copper sfp drivshell>
165 lines
4.5 KiB
Makefile
165 lines
4.5 KiB
Makefile
#
|
|
# Copyright 2007-2020 Broadcom Inc. All rights reserved.
|
|
#
|
|
# Permission is granted to use, copy, modify and/or distribute this
|
|
# software under either one of the licenses below.
|
|
#
|
|
# License Option 1: GPL
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License, version 2, as
|
|
# published by the Free Software Foundation (the "GPL").
|
|
#
|
|
# This program is distributed in the hope that it will be useful, but
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
# General Public License version 2 (GPLv2) for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# version 2 (GPLv2) along with this source code.
|
|
#
|
|
#
|
|
# License Option 2: Broadcom Open Network Switch APIs (OpenNSA) license
|
|
#
|
|
# This software is governed by the Broadcom Open Network Switch APIs license:
|
|
# https://www.broadcom.com/products/ethernet-connectivity/software/opennsa
|
|
#
|
|
# $Id: Makefile.linux-kernel-2_6,v 1.40 Broadcom SDK $
|
|
# $Copyright: (c) 2005 Broadcom Corp.
|
|
# All Rights Reserved.$
|
|
|
|
# Configuration Flags
|
|
|
|
# Filter out features that cannot or should not be supported in kernel mode
|
|
|
|
_FEATURE_EXCLUDE_LIST += EDITLINE TCL OOB_RCPU CINT APIMODE DUNE_UI C_UNIT
|
|
FEATURE_EXCLUDE_LIST = $(sort $(_FEATURE_EXCLUDE_LIST))
|
|
|
|
# Tools
|
|
|
|
# Conditionally Replaces DEFAULT var
|
|
ifeq ($(origin CC),default)
|
|
CC = $(LSRUN) $(CROSS_COMPILE)gcc
|
|
else
|
|
# If using CLANG then revert the CC to default gcc tool
|
|
ifeq ($(USE_CLANG),1)
|
|
CC = $(LSRUN) $(CROSS_COMPILE)gcc
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(origin CXX),default)
|
|
CXX = $(CROSS_COMPILE)g++
|
|
endif
|
|
|
|
ifeq ($(origin LD),default)
|
|
LD = $(CROSS_COMPILE)ld
|
|
endif
|
|
|
|
ifeq ($(origin AR),default)
|
|
AR = $(CROSS_COMPILE)ar
|
|
endif
|
|
|
|
ifeq ($(origin AS),default)
|
|
AS = $(CROSS_COMPILE)as
|
|
endif
|
|
|
|
ifeq ($(origin ARFLAGS),default)
|
|
ARFLAGS = -rc
|
|
endif
|
|
|
|
STRIP = $(CROSS_COMPILE)strip
|
|
RANLIB = $(CROSS_COMPILE)ranlib
|
|
OBJCOPY = $(CROSS_COMPILE)objcopy
|
|
NM = $(CROSS_COMPILE)nm
|
|
|
|
# Handle differences between gcc 2.x and gcc 3.x
|
|
gcc-tune-flag = $(shell if ${CC} -dumpspecs | grep mcpu >/dev/null; then echo cpu; else echo tune; fi)
|
|
|
|
# Configuration Variables
|
|
|
|
# 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 = LINUX
|
|
|
|
#
|
|
# ORIGIN is used to Optionally select different CFLAGS. It is used to import
|
|
# source from other vendors. If SOURCE=Broadcom, then the BCM_ flags are added
|
|
# to those passed to the compiler. If SOURCE != Broadcom, BCM_ flags are NOT
|
|
# added.
|
|
#
|
|
# Default specifies Broadcom
|
|
#
|
|
ifndef ORIGIN
|
|
ORIGIN = Broadcom
|
|
endif
|
|
|
|
#
|
|
# 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.
|
|
#
|
|
|
|
ifdef IPROC_BUILD
|
|
CFGFLAGS += -I$(SDK)/systems/linux/kernel/modules/include \
|
|
-I$(SDK)/systems/bde/linux/include \
|
|
-I$(LINUX_INCLUDE) \
|
|
-I$(KERNDIR)/arch/$(ARCH)
|
|
else
|
|
CFGFLAGS += -I$(SDK)/systems/linux/kernel/modules/include \
|
|
-I$(SDK)/systems/bde/linux/include \
|
|
-I$(LINUX_INCLUDE) \
|
|
-I$(LINUX_INCLUDE)/asm/gcc \
|
|
-I$(LINUX_INCLUDE)/asm/mach-generic \
|
|
-I$(KERNDIR)/arch/$(ARCH)
|
|
endif
|
|
|
|
CFGFLAGS += -DNO_FILEIO -DNO_CTRL_C -DNO_MEMTUNE
|
|
|
|
CFGFLAGS += -D$(OSTYPE)
|
|
|
|
# No user sal for the linux kernel
|
|
# NO_SAL_APPL=1
|
|
|
|
STD_CFLAGS = $(KFLAGS) $(CFGFLAGS)
|
|
|
|
|
|
STD_CPPFLAGS = ${STD_CFLAGS}
|
|
STD_CXXFLAGS = ${STD_CFLAGS}
|
|
|
|
ifndef BCM_CFLAGS
|
|
BCM_CFLAGS = -Wall -Werror
|
|
endif
|
|
|
|
BCM_CPPFLAGS = ${BCM_CFLAGS}
|
|
BCM_CXXFLAGS = ${BCM_CFLAGS}
|
|
|
|
ifeq (${ORIGIN}, Broadcom)
|
|
CFLAGS += ${STD_CFLAGS} ${BCM_CFLAGS} ${OPT_CFLAGS}
|
|
CPPFLAGS += ${STD_CPPFLAGS} ${BCM_CPPFLAGS} ${OPT_CPPFLAGS}
|
|
CXXFLAGS += ${STD_CXXFLAGS} ${BCM_CXXFLAGS} ${OPT_CXXFLAGS}
|
|
else
|
|
CFLAGS += ${STD_CFLAGS} ${OPT_CFLAGS}
|
|
CPPFLAGS += ${STD_CPPFLAGS} ${OPT_CPPFLAGS}
|
|
CXXFLAGS += ${STD_CXXFLAGS} ${OPT_CXXFLAGS}
|
|
endif
|
|
|
|
#
|
|
# Ignore pedantic flag for kernel modules
|
|
#
|
|
ifdef DEBUG_PEDANTIC
|
|
DEBUG_PEDANTIC = FALSE
|
|
endif
|
|
|
|
#
|
|
# DEPEND is used as a command to generate the list of dependencies.
|
|
# The format of the output must be
|
|
# "file.o : file.c a/b/c.h d/e/f.h ...",
|
|
# if it is on multiple lines, each line must end in a backslash.
|
|
# The output MUST be on standard out.
|
|
#
|
|
DEPEND = ${CC} -M $(CFLAGS) $<
|