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>
172 lines
5.3 KiB
Makefile
172 lines
5.3 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-slk-3_14,v 1.2 Broadcom SDK $
|
|
# $Copyright: (c) 2013 Broadcom Corp.
|
|
# All Rights Reserved.$
|
|
# Makefile for SLK(BCM957812)
|
|
|
|
# User must select one platform from below.By default ARM_LINUX is selected. .
|
|
ifeq (,$(BUILD_PLATFORM))
|
|
BUILD_PLATFORM=ARM_LINUX
|
|
endif
|
|
|
|
# Toolchain base directory for NS2 XMC card
|
|
ifeq (BE,$(ENDIAN_MODE))
|
|
TOOLCHAIN_BASE_DIR ?= /projects/ntsw-tools/toolchains/slk/linaro-be
|
|
TARGET_ARCHITECTURE:=aarch64_be-linux-gnu
|
|
# Target machine for EDK-Host defconfig
|
|
TARGET_MACHINE ?= slk_be
|
|
KERNDIR ?= /projects/ntsw-tools/linux/iproc_ldks/slk-be/poky/brcm-released-source/git
|
|
else
|
|
TOOLCHAIN_BASE_DIR ?= /projects/ntsw-tools/toolchains/slk/linaro-le
|
|
# Compiler for target architecture
|
|
TARGET_ARCHITECTURE:= aarch64-linux-gnu
|
|
# Target machine for EDK-Host defconfig
|
|
TARGET_MACHINE ?= slk_le
|
|
# Kernel directory
|
|
KERNDIR ?= /projects/ntsw-tools/linux/iproc_ldks/slk/poky/brcm-released-source/git
|
|
endif
|
|
|
|
ifeq (,$(CROSS_COMPILE))
|
|
CROSS_COMPILE:= $(TARGET_ARCHITECTURE)-
|
|
endif
|
|
|
|
# armtools
|
|
TOOLCHAIN_BIN_DIR=$(TOOLCHAIN_BASE_DIR)/bin
|
|
override PATH:=$(TOOLCHAIN_BIN_DIR):$(PATH)
|
|
LD_LIBRARY_PATH=$(TOOLCHAIN_BASE_DIR)/lib
|
|
|
|
export TOOLCHAIN_BIN_DIR LD_LIBRARY_PATH
|
|
|
|
# Default Linux include directory
|
|
ifeq (,$(LINUX_INCLUDE))
|
|
LINUX_INCLUDE := $(KERNDIR)/include
|
|
endif
|
|
|
|
ifeq (BE,$(ENDIAN_MODE))
|
|
CFGFLAGS += -DSYS_BE_PIO=1 -DSYS_BE_PACKET=0 -DSYS_BE_OTHER=1
|
|
ENDIAN = BE_HOST=1
|
|
else
|
|
CFGFLAGS += -DSYS_BE_PIO=0 -DSYS_BE_PACKET=0 -DSYS_BE_OTHER=0
|
|
ENDIAN = LE_HOST=1
|
|
endif
|
|
|
|
CFGFLAGS += -D$(ENDIAN) -DBCM958525
|
|
CFGFLAGS += -DBCM_PLATFORM_STRING=\"SLK_BCM957812\"
|
|
CFGFLAGS += -DSAL_BDE_DMA_MEM_DEFAULT=32
|
|
ifeq (1,$(SLK_32BIT))
|
|
CFGFLAGS += -DSAL_BDE_32BIT_USER_64BIT_KERNEL
|
|
else
|
|
CFGFLAGS += -DPTRS_ARE_64BITS -DLONGS_ARE_64BITS
|
|
endif
|
|
CFGFLAGS += -DPHYS_ADDRS_ARE_64BITS
|
|
|
|
CFLAGS += -Wno-unused-value -Wno-unused-but-set-variable -Wno-sizeof-pointer-memaccess -fno-aggressive-loop-optimizations
|
|
|
|
ifdef DPP_CHIPS
|
|
CFLAGS += -DDUNE_BCM -D__DUNE_LINUX_BCM_CPU_PCP_DMA__
|
|
CFGFLAGS += -DSOC_CM_FUNCTION
|
|
endif
|
|
|
|
ifdef DFE_CHIPS
|
|
CFLAGS += -DDUNE_BCM
|
|
CFGFLAGS += -DSOC_CM_FUNCTION
|
|
endif
|
|
|
|
ifdef SAND_CHIPS
|
|
CFLAGS += -D__DUNE_SLK_BCM_CPU__ -D__DUNE_LINUX_BCM_CPU_PCIE__
|
|
endif
|
|
|
|
# Enable cached DMA memory by default
|
|
ifeq (,$(SAL_BDE_USE_CACHED_DMA_MEM))
|
|
SAL_BDE_USE_CACHED_DMA_MEM = 1
|
|
endif
|
|
ifeq ($(SAL_BDE_USE_CACHED_DMA_MEM),1)
|
|
CFGFLAGS += -DSAL_BDE_CACHE_DMA_MEM
|
|
endif
|
|
|
|
ifeq (1,$(SLK_32BIT))
|
|
ARCH = arm
|
|
else
|
|
ARCH = arm64
|
|
endif
|
|
|
|
KBUILD_VERBOSE = 1
|
|
|
|
export ARCH KBUILD_VERBOSE
|
|
|
|
comma = ,
|
|
basetarget = $(basename $(notdir $@))
|
|
modname = $(basetarget)
|
|
|
|
# Extra variables.
|
|
EXTRA_CFLAGS = -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags)
|
|
|
|
name-fix = $(subst $(comma),_,$(subst -,_,$1))
|
|
basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))"
|
|
modname_flags = $(if $(filter 1,$(words $(modname))),\
|
|
-D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))")
|
|
|
|
CROSS_GCC_VER ?= $(shell $(TOOLCHAIN_BIN_DIR)/$(CROSS_COMPILE)gcc -dumpversion)
|
|
|
|
KFLAG_INCLD = $(TOOLCHAIN_BASE_DIR)/lib/gcc/$(TARGET_ARCHITECTURE)/$(CROSS_GCC_VER)/include
|
|
|
|
ifeq (,$(KFLAGS))
|
|
KFLAGS := -D__LINUX_ARM_ARCH__=8 -D__KERNEL__ -DPTRS_ARE_64BITS -DLONGS_ARE_64BITS -nostdinc -isystem $(KFLAG_INCLD) -I$(LINUX_INCLUDE) -include $(LINUX_INCLUDE)/generated/autoconf.h -I$(KERNDIR)/arch/arm64/include -I$(KERNDIR)/arch/arm64/include/generated -I$(KERNDIR)/arch/arm64/include/generated/asm -I$(KERNDIR)/include/uapi -I$(KERNDIR)/include/generated/uapi -I$(KERNDIR)/arch/arm64/include/uapi -Wall -Wstrict-prototypes -Wno-trigraphs -Os -fno-strict-aliasing -fno-common -fno-pic -pipe -ffreestanding -fomit-frame-pointer -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign
|
|
endif
|
|
|
|
ifdef LTSW_CHIPS
|
|
# Default open source target build
|
|
ifeq (BE,$(ENDIAN_MODE))
|
|
OPENSRC_BUILD ?= linaro_arm64_be
|
|
else
|
|
OPENSRC_BUILD ?= linaro_arm64_le
|
|
endif
|
|
|
|
# Hardware interface (see $SDKLT/bcma/sys/probe directory)
|
|
SYSTEM_INTERFACE ?= ngbde
|
|
|
|
# Turn on direct register access if running on real hardware.
|
|
ifeq (ngbde,$(SYSTEM_INTERFACE))
|
|
LTSW_ADD_CPPFLAGS += -DBCMDRD_CONFIG_MEMMAP_DIRECT=1
|
|
endif
|
|
|
|
export SYSTEM_INTERFACE
|
|
endif
|
|
|
|
ifneq (, $(EDKHOST))
|
|
ifeq (BE,$(ENDIAN_MODE))
|
|
OPENSRC_BUILD ?= linaro_arm64_be
|
|
else
|
|
OPENSRC_BUILD ?= linaro_arm64_le
|
|
endif
|
|
endif
|
|
|
|
ifneq ($(targetplat),user)
|
|
include ${SDK}/make/Makefile.linux-kernel-3_6
|
|
endif
|