New sonic-buildimage images for Broadcom DNX ASIC family. (#7598)
Introduce new sonic-buildimage images for Broadcom DNX ASIC family. sonic-broadcom-dnx.bin sonic-aboot-broadcom-dnx.swi How I did it NO CHANGE to existing make commands make init; make configure PLATFORM=broadcom; make target/sonic-aboot-broadcom.swi; make target/sonic-broadcom.bin The difference now is that it will result in new broadcom images for DNX asic family as well. sonic-broadcom.bin, sonic-broadcom-dnx.bin sonic-aboot-broadcom.swi, sonic-aboot-broadcom-dnx.swi Note: This PR also adds support for Broadcom SAI 5.0 (based on 1.8 SAI ) for DNX based platform + changes in platform x86_64-arista_7280cr3_32p4 bcm config files and platform_env.conf files
This commit is contained in:
parent
8b3fabe1e5
commit
3ad830eb49
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -88,3 +88,7 @@
|
||||
[submodule "src/wpasupplicant/sonic-wpa-supplicant"]
|
||||
path = src/wpasupplicant/sonic-wpa-supplicant
|
||||
url = https://github.com/Azure/sonic-wpa-supplicant.git
|
||||
[submodule "platform/broadcom/saibcm-modules-dnx"]
|
||||
path = platform/broadcom/saibcm-modules-dnx
|
||||
url = https://github.com/Azure/saibcm-modules.git
|
||||
branch = sdk-6.5.22-gpl-dnx
|
||||
|
@ -273,10 +273,10 @@ tdma_timeout_usec.BCM8869X=1000000
|
||||
tslam_timeout_usec.BCM8869X=1000000
|
||||
|
||||
appl_enable_intr_init.BCM8869X=1
|
||||
polled_irq_mode.BCM8869X=1
|
||||
polled_irq_mode.BCM8869X=0
|
||||
polled_irq_delay.BCM8869X=1000
|
||||
|
||||
bcm_stat_interval.BCM8869X=1000
|
||||
bcm_stat_interval.BCM8869X=1000000
|
||||
|
||||
mem_cache_enable_ecc.BCM8869X=1
|
||||
mem_cache_enable_parity.BCM8869X=1
|
||||
@ -750,7 +750,8 @@ ucode_port_38=CGE23:core_1.38
|
||||
ucode_port_39=CGE20:core_1.39
|
||||
ucode_port_40=CGE21:core_1.40
|
||||
|
||||
rif_id_max=0x4000
|
||||
rif_id_max=0x6000
|
||||
dpp_db_path=/usr/share/bcm/db
|
||||
|
||||
dma_desc_aggregator_chain_length_max.BCM8869X=1000
|
||||
dma_desc_aggregator_buff_size_kb.BCM8869X=100
|
||||
|
@ -0,0 +1 @@
|
||||
usemsi=1
|
@ -285,6 +285,14 @@ sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/sonic-ztp_*.deb || \
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
|
||||
{% endif %}
|
||||
|
||||
{% for machine_debs in lazy_build_installer_debs.strip().split() -%}
|
||||
{% set machine, pkgname = machine_debs.split('|') %}
|
||||
if [[ -z "{{machine}}" || -n "{{machine}}" && $TARGET_MACHINE == "{{machine}}" ]]; then
|
||||
sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/{{pkgname}} || \
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
|
||||
fi
|
||||
{% endfor %}
|
||||
|
||||
# Install SONiC Device Data (and its dependencies via 'apt-get -y install -f')
|
||||
sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/sonic-device-data_*.deb || \
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
|
||||
@ -653,10 +661,11 @@ sudo mount --bind target $FILESYSTEM_ROOT/target
|
||||
sudo chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS info
|
||||
|
||||
{% for docker_installation_target in installer_images.strip().split() -%}
|
||||
{% set pkgname, docker_build_path, image = docker_installation_target.split('|') %}
|
||||
{% set pkgname, docker_build_path, machine, image = docker_installation_target.split('|') %}
|
||||
{% set imagefilepath = image.split(':')|first -%}
|
||||
{% set imagefilename = imagefilepath.split('/')|last -%}
|
||||
{% set imagename = imagefilename.split('.')|first -%}
|
||||
if [[ -z "{{machine}}" || -n "{{machine}}" && $TARGET_MACHINE == "{{machine}}" ]]; then
|
||||
sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS load -i {{imagefilepath}}
|
||||
sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagename}}:"${SONIC_IMAGE_VERSION}"
|
||||
# Check if manifest exists for {{imagename}} and it is a valid JSON
|
||||
@ -671,6 +680,7 @@ jq -e . /tmp/manifest.json || {
|
||||
sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagebasename}}:"${SONIC_IMAGE_VERSION}"
|
||||
sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagebasename}}:latest
|
||||
{% endif %}
|
||||
fi
|
||||
{% endfor %}
|
||||
|
||||
SONIC_PACKAGE_MANAGER_FOLDER="/var/lib/sonic-package-manager/"
|
||||
@ -714,7 +724,11 @@ sudo bash -c "echo { > $FILESYSTEM_ROOT_USR_SHARE_SONIC_TEMPLATES/ctr_image_name
|
||||
sudo bash -c "echo } >> $FILESYSTEM_ROOT_USR_SHARE_SONIC_TEMPLATES/ctr_image_names.json"
|
||||
|
||||
{% for script in installer_start_scripts.split(' ') -%}
|
||||
sudo cp {{script}} $FILESYSTEM_ROOT/usr/bin/
|
||||
if [ -f $TARGET_MACHINE"_{{script}}" ]; then
|
||||
sudo cp $TARGET_MACHINE"_{{script}}" $FILESYSTEM_ROOT/usr/bin/{{script}}
|
||||
else
|
||||
sudo cp {{script}} $FILESYSTEM_ROOT/usr/bin/
|
||||
fi
|
||||
{% endfor %}
|
||||
{% for service in installer_services.split(' ') -%}
|
||||
if [ -f {{service}} ]; then
|
||||
|
@ -12,6 +12,9 @@
|
||||
|
||||
ONIEIMAGE_VERSION=r0
|
||||
|
||||
## Filesystem root
|
||||
FILESYSTEM_ROOT=./fsroot-${TARGET_MACHINE}
|
||||
|
||||
## Filename for squashfs file system
|
||||
FILESYSTEM_SQUASHFS=fs.squashfs
|
||||
|
||||
|
@ -12,6 +12,9 @@
|
||||
|
||||
ONIEIMAGE_VERSION=r0
|
||||
|
||||
## Filesystem root
|
||||
FILESYSTEM_ROOT=./fsroot-${TARGET_MACHINE}
|
||||
|
||||
## Filename for squashfs file system
|
||||
FILESYSTEM_SQUASHFS=fs.squashfs
|
||||
|
||||
|
@ -12,6 +12,9 @@
|
||||
|
||||
ONIEIMAGE_VERSION=r0
|
||||
|
||||
## Filesystem root
|
||||
FILESYSTEM_ROOT=./fsroot-${TARGET_MACHINE}
|
||||
|
||||
## Filename for squashfs file system
|
||||
FILESYSTEM_SQUASHFS=fs.squashfs
|
||||
|
||||
|
@ -40,8 +40,7 @@ fi
|
||||
}
|
||||
|
||||
[ -r "$platform_conf" ] || {
|
||||
echo "Error: Unable to read installer platform configuration file: $platform_conf"
|
||||
exit 1
|
||||
echo "Warning: Unable to read installer platform configuration file: $platform_conf"
|
||||
}
|
||||
|
||||
[ $# -gt 0 ] || {
|
||||
@ -98,7 +97,9 @@ sed -i -e "s/%%DEMO_TYPE%%/$demo_type/g" \
|
||||
echo -n "."
|
||||
cp -r $* $tmp_installdir || clean_up 1
|
||||
echo -n "."
|
||||
cp $platform_conf $tmp_installdir || clean_up 1
|
||||
[ -r "$platform_conf" ] && {
|
||||
cp $platform_conf $tmp_installdir || clean_up 1
|
||||
}
|
||||
echo "machine=$machine" > $tmp_installdir/machine.conf
|
||||
echo "platform=$platform" >> $tmp_installdir/machine.conf
|
||||
echo -n "."
|
||||
|
10
platform/broadcom/docker-syncd-brcm-dnx-rpc.dep
Normal file
10
platform/broadcom/docker-syncd-brcm-dnx-rpc.dep
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
DPATH := $($(DOCKER_SYNCD_BRCM_DNX_RPC)_PATH)
|
||||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/docker-syncd-brcm-dnx-rpc.mk $(PLATFORM_PATH)/docker-syncd-brcm-dnx-rpc.dep
|
||||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
||||
DEP_FILES += $(shell git ls-files $(DPATH))
|
||||
|
||||
$(DOCKER_SYNCD_BRCM_DNX_RPC)_CACHE_MODE := GIT_CONTENT_SHA
|
||||
$(DOCKER_SYNCD_BRCM_DNX_RPC)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
|
||||
$(DOCKER_SYNCD_BRCM_DNX_RPC)_DEP_FILES := $(DEP_FILES)
|
||||
|
31
platform/broadcom/docker-syncd-brcm-dnx-rpc.mk
Normal file
31
platform/broadcom/docker-syncd-brcm-dnx-rpc.mk
Normal file
@ -0,0 +1,31 @@
|
||||
# docker image for brcm syncd with rpc
|
||||
|
||||
DOCKER_SYNCD_BRCM_DNX_RPC = docker-syncd-brcm-dnx-rpc.gz
|
||||
DOCKER_SYNCD_DNX_BASE = docker-syncd-brcm-dnx.gz
|
||||
$(DOCKER_SYNCD_BRCM_DNX_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-brcm-dnx-rpc
|
||||
$(DOCKER_SYNCD_BRCM_DNX_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT) $(PTF)
|
||||
ifeq ($(INSTALL_DEBUG_TOOLS), y)
|
||||
$(DOCKER_SYNCD_BRCM_DNX_RPC)_DEPENDS += $(SYNCD_RPC_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIMETADATA_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
endif
|
||||
$(DOCKER_SYNCD_BRCM_DNX_RPC)_FILES += $(DSSERVE) $(BCMCMD) $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
|
||||
$(DOCKER_SYNCD_BRCM_DNX_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_DNX_BASE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM_DNX_RPC)
|
||||
ifeq ($(ENABLE_SYNCD_RPC),y)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM_DNX_RPC)
|
||||
endif
|
||||
|
||||
$(DOCKER_SYNCD_BRCM_DNX_RPC)_CONTAINER_NAME = syncd
|
||||
$(DOCKER_SYNCD_BRCM_DNX_RPC)_VERSION = 1.0.0-rpc
|
||||
$(DOCKER_SYNCD_BRCM_DNX_RPC)_PACKAGE_NAME = syncd-dnx
|
||||
$(DOCKER_SYNCD_BRCM_DNX_RPC)_RUN_OPT += --privileged -t
|
||||
$(DOCKER_SYNCD_BRCM_DNX_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||
$(DOCKER_SYNCD_BRCM_DNX_RPC)_RUN_OPT += -v /host/warmboot:/var/warmboot
|
||||
$(DOCKER_SYNCD_BRCM_DNX_RPC)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd
|
||||
$(DOCKER_SYNCD_BRCM_DNX_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
|
||||
$(DOCKER_SYNCD_BRCM_DNX_RPC)_BASE_IMAGE_FILES += bcmcmd:/usr/bin/bcmcmd
|
||||
$(DOCKER_SYNCD_BRCM_DNX_RPC)_BASE_IMAGE_FILES += bcmsh:/usr/bin/bcmsh
|
||||
$(DOCKER_SYNCD_BRCM_DNX_RPC)_MACHINE = broadcom-dnx
|
57
platform/broadcom/docker-syncd-brcm-dnx-rpc/Dockerfile.j2
Normal file
57
platform/broadcom/docker-syncd-brcm-dnx-rpc/Dockerfile.j2
Normal file
@ -0,0 +1,57 @@
|
||||
FROM docker-syncd-brcm-dnx
|
||||
|
||||
## Make apt-get non-interactive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
COPY \
|
||||
{% for deb in docker_syncd_brcm_dnx_rpc_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
RUN apt-get purge -y syncd
|
||||
|
||||
## Pre-install the fundamental packages
|
||||
RUN apt-get update \
|
||||
&& apt-get -y install \
|
||||
net-tools \
|
||||
python-pip \
|
||||
python-setuptools \
|
||||
build-essential \
|
||||
libssl-dev \
|
||||
libffi-dev \
|
||||
python-dev \
|
||||
wget \
|
||||
cmake \
|
||||
libqt5core5a \
|
||||
libqt5network5 \
|
||||
libboost-atomic1.71.0
|
||||
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
|
||||
{% for deb in docker_syncd_brcm_dnx_rpc_debs.split(' ') -%}
|
||||
dpkg_apt debs/{{ deb }}{{'; '}}
|
||||
{%- endfor %}
|
||||
|
||||
RUN wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \
|
||||
&& tar xvfz 1.0.0.tar.gz \
|
||||
&& cd nanomsg-1.0.0 \
|
||||
&& mkdir -p build \
|
||||
&& cmake . \
|
||||
&& make install \
|
||||
&& ldconfig \
|
||||
&& cd .. \
|
||||
&& rm -fr nanomsg-1.0.0 \
|
||||
&& rm -f 1.0.0.tar.gz \
|
||||
&& pip2 install cffi==1.7.0 \
|
||||
&& pip2 install --upgrade cffi==1.7.0 \
|
||||
&& pip2 install wheel \
|
||||
&& pip2 install nnpy \
|
||||
&& mkdir -p /opt \
|
||||
&& cd /opt \
|
||||
&& wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \
|
||||
&& apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \
|
||||
&& rm -rf /root/deps
|
||||
|
||||
COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/supervisord"]
|
3
platform/broadcom/docker-syncd-brcm-dnx-rpc/base_image_files/bcmcmd
Executable file
3
platform/broadcom/docker-syncd-brcm-dnx-rpc/base_image_files/bcmcmd
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker exec -i syncd bcmcmd "$@"
|
3
platform/broadcom/docker-syncd-brcm-dnx-rpc/base_image_files/bcmsh
Executable file
3
platform/broadcom/docker-syncd-brcm-dnx-rpc/base_image_files/bcmsh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker exec -it syncd bcmsh "$@"
|
@ -0,0 +1,10 @@
|
||||
[program:ptf_nn_agent]
|
||||
command=/usr/bin/python /opt/ptf_nn_agent.py --device-socket 1@tcp://0.0.0.0:10900 -i 1-3@Ethernet12 --set-iface-rcv-buffer=109430400
|
||||
process_name=ptf_nn_agent
|
||||
stdout_logfile=/tmp/ptf_nn_agent.out.log
|
||||
stderr_logfile=/tmp/ptf_nn_agent.err.log
|
||||
redirect_stderr=false
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startsecs=1
|
||||
numprocs=1
|
13
platform/broadcom/docker-syncd-brcm-dnx.dep
Normal file
13
platform/broadcom/docker-syncd-brcm-dnx.dep
Normal file
@ -0,0 +1,13 @@
|
||||
#DPKG FRK
|
||||
DOCKER_SYNCD_DNX_BASE = docker-syncd-brcm-dnx.gz
|
||||
DOCKER_SYNCD_DNX_BASE_DBG = docker-syncd-brcm-dnx-$(DBG_IMAGE_MARK).gz
|
||||
DPATH := $($(DOCKER_SYNCD_DNX_BASE)_PATH)
|
||||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/docker-syncd-brcm-dnx.mk platform/broadcom/docker-syncd-brcm-dnx.dep platform/broadcom/sai.mk
|
||||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
||||
DEP_FILES += $(shell git ls-files $(DPATH))
|
||||
|
||||
$(DOCKER_SYNCD_DNX_BASE)_CACHE_MODE := GIT_CONTENT_SHA
|
||||
$(DOCKER_SYNCD_DNX_BASE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
|
||||
$(DOCKER_SYNCD_DNX_BASE)_DEP_FILES := $(DEP_FILES)
|
||||
|
||||
$(eval $(call add_dbg_docker,$(DOCKER_SYNCD_DNX_BASE),$(DOCKER_SYNCD_DNX_BASE_DBG)))
|
49
platform/broadcom/docker-syncd-brcm-dnx.mk
Normal file
49
platform/broadcom/docker-syncd-brcm-dnx.mk
Normal file
@ -0,0 +1,49 @@
|
||||
# docker image for brcm-dnx syncd
|
||||
|
||||
DOCKER_SYNCD_DNX_BASE = docker-syncd-brcm-dnx.gz
|
||||
DOCKER_SYNCD_DNX_BASE_DBG = docker-syncd-brcm-dnx-$(DBG_IMAGE_MARK).gz
|
||||
DOCKER_SYNCD_DNX_PLATFORM_CODE = brcm-dnx
|
||||
|
||||
$(DOCKER_SYNCD_DNX_BASE)_PATH = $(PLATFORM_PATH)/docker-syncd-$(DOCKER_SYNCD_DNX_PLATFORM_CODE)
|
||||
$(DOCKER_SYNCD_DNX_BASE)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
|
||||
|
||||
$(DOCKER_SYNCD_DNX_BASE)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER)
|
||||
$(DOCKER_SYNCD_DNX_BASE)_DBG_DEPENDS += $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS)
|
||||
$(DOCKER_SYNCD_DNX_BASE)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES)
|
||||
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_DNX_BASE)
|
||||
ifneq ($(ENABLE_SYNCD_RPC),y)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_DNX_BASE)
|
||||
endif
|
||||
|
||||
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_SYNCD_DNX_BASE_DBG)
|
||||
ifneq ($(ENABLE_SYNCD_RPC),y)
|
||||
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_SYNCD_DNX_BASE_DBG)
|
||||
endif
|
||||
|
||||
|
||||
$(DOCKER_SYNCD_DNX_BASE)_DEPENDS += $(SYNCD)
|
||||
$(DOCKER_SYNCD_DNX_BASE)_DEPENDS += $(BRCM_DNX_SAI)
|
||||
$(DOCKER_SYNCD_DNX_BASE)_FILES += $(DSSERVE) $(BCMCMD)
|
||||
|
||||
ifeq ($(INSTALL_DEBUG_TOOLS), y)
|
||||
$(DOCKER_SYNCD_DNX_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIMETADATA_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
endif
|
||||
|
||||
$(DOCKER_SYNCD_DNX_BASE)_VERSION = 1.0.0
|
||||
$(DOCKER_SYNCD_DNX_BASE)_PACKAGE_NAME = syncd-dnx
|
||||
$(DOCKER_SYNCD_DNX_BASE)_MACHINE = broadcom-dnx
|
||||
$(DOCKER_SYNCD_DNX_BASE)_AFTER = $(DOCKER_SYNCD_BASE)
|
||||
$(DOCKER_SYNCD_DNX_BASE)_CONTAINER_NAME = syncd
|
||||
$(DOCKER_SYNCD_DNX_BASE)_RUN_OPT += --privileged -t
|
||||
$(DOCKER_SYNCD_DNX_BASE)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||
$(DOCKER_SYNCD_DNX_BASE)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
$(DOCKER_SYNCD_DNX_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot
|
||||
|
||||
$(DOCKER_SYNCD_DNX_BASE)_BASE_IMAGE_FILES += bcmcmd:/usr/bin/bcmcmd
|
||||
$(DOCKER_SYNCD_DNX_BASE)_BASE_IMAGE_FILES += bcmsh:/usr/bin/bcmsh
|
||||
$(DOCKER_SYNCD_DNX_BASE)_BASE_IMAGE_FILES += bcm_common:/usr/bin/bcm_common
|
||||
$(DOCKER_SYNCD_DNX_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d
|
39
platform/broadcom/docker-syncd-brcm-dnx/Dockerfile.j2
Executable file
39
platform/broadcom/docker-syncd-brcm-dnx/Dockerfile.j2
Executable file
@ -0,0 +1,39 @@
|
||||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages %}
|
||||
FROM docker-config-engine-buster
|
||||
|
||||
ARG docker_container_name
|
||||
|
||||
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
||||
|
||||
## Make apt-get non-interactive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
COPY \
|
||||
{% for deb in docker_syncd_brcm_dnx_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
# Install locally-built Debian packages and implicitly install their dependencies
|
||||
{{ install_debian_packages(docker_syncd_brcm_dnx_debs.split(' ')) }}
|
||||
|
||||
## TODO: add kmod into Depends
|
||||
RUN apt-get install -yf kmod
|
||||
|
||||
## BRCM uses ethtool to set host interface speed
|
||||
RUN apt-get install -y ethtool
|
||||
|
||||
COPY ["files/dsserve", "files/bcmcmd", "start.sh", "start_led.sh", "bcmsh", "/usr/bin/"]
|
||||
RUN chmod +x /usr/bin/dsserve /usr/bin/bcmcmd
|
||||
|
||||
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
||||
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
|
||||
COPY ["critical_processes", "/etc/supervisor/"]
|
||||
|
||||
## Clean up
|
||||
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
||||
RUN rm -rf /debs
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/supervisord"]
|
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
function help()
|
||||
{
|
||||
echo "Usage: $0 -n [0 to $(($NUM_ASIC-1))]" 1>&2; exit 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
DEV=""
|
||||
|
||||
PLATFORM=`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`
|
||||
|
||||
# Parse the device specific asic conf file, if it exists
|
||||
|
||||
ASIC_CONF=/usr/share/sonic/device/$PLATFORM/asic.conf
|
||||
if [ -f "$ASIC_CONF" ]; then
|
||||
source $ASIC_CONF
|
||||
fi
|
||||
|
||||
|
||||
if [[ ($NUM_ASIC -gt 1) ]]; then
|
||||
OPTIND=1
|
||||
|
||||
while getopts ":n:h:" opt; do
|
||||
case "${opt}" in
|
||||
h) help
|
||||
exit 0
|
||||
;;
|
||||
n) DEV=${OPTARG}
|
||||
[ $DEV -lt $NUM_ASIC -a $DEV -ge 0 ] || help
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift "$((OPTIND-1))"
|
||||
|
||||
if [ -z "${DEV}" ]; then
|
||||
help
|
||||
fi
|
||||
fi
|
8
platform/broadcom/docker-syncd-brcm-dnx/base_image_files/bcmcmd
Executable file
8
platform/broadcom/docker-syncd-brcm-dnx/base_image_files/bcmcmd
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
BCM_COMMON=/usr/bin/bcm_common
|
||||
if [ -f "$BCM_COMMON" ]; then
|
||||
source $BCM_COMMON
|
||||
fi
|
||||
docker exec -i syncd$DEV bcmcmd "$@"
|
||||
|
8
platform/broadcom/docker-syncd-brcm-dnx/base_image_files/bcmsh
Executable file
8
platform/broadcom/docker-syncd-brcm-dnx/base_image_files/bcmsh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
BCM_COMMON=/usr/bin/bcm_common
|
||||
if [ -f "$BCM_COMMON" ]; then
|
||||
source $BCM_COMMON
|
||||
fi
|
||||
|
||||
docker exec -it syncd$DEV bcmsh "$@"
|
@ -0,0 +1,11 @@
|
||||
###############################################################################
|
||||
## Monit configuration for syncd container
|
||||
## process list:
|
||||
## syncd
|
||||
## dsserve
|
||||
###############################################################################
|
||||
check program syncd|syncd with path "/usr/bin/process_checker syncd /usr/bin/syncd"
|
||||
if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles
|
||||
|
||||
check program syncd|dsserve with path "/usr/bin/process_checker syncd /usr/bin/dsserve /usr/bin/syncd"
|
||||
if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles
|
40
platform/broadcom/docker-syncd-brcm-dnx/bcmsh
Executable file
40
platform/broadcom/docker-syncd-brcm-dnx/bcmsh
Executable file
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
usage="$(basename "$0") [-h] [-q] [-t timeout] -- interactive shell for bcm service
|
||||
|
||||
where:
|
||||
-h show this help text
|
||||
-t inactivity timeout in seconds (default 300 seconds, 0 for no timeout)
|
||||
-q quite, no banner (default: verbose)"
|
||||
|
||||
banner="Press Enter to show prompt.
|
||||
Press Ctrl+C to exit.
|
||||
NOTICE: Only one bcmsh or bcmcmd can connect to the shell at same time.
|
||||
"
|
||||
|
||||
# Default verbose
|
||||
quiet=false
|
||||
timeout=300
|
||||
|
||||
while getopts 'hqt:' option; do
|
||||
case "$option" in
|
||||
h) echo "$usage"
|
||||
exit
|
||||
;;
|
||||
q) quiet=true
|
||||
;;
|
||||
t) timeout=$OPTARG
|
||||
;;
|
||||
\?) printf "illegal option: -%s\n" "$OPTARG" >&2
|
||||
echo "$usage" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
if [ "$quiet" = false ]; then
|
||||
echo "$banner"
|
||||
fi
|
||||
|
||||
/usr/bin/socat -T$timeout readline UNIX-CONNECT:/var/run/sswsyncd/sswsyncd.socket
|
||||
|
@ -0,0 +1,2 @@
|
||||
program:dsserve
|
||||
program:syncd
|
31
platform/broadcom/docker-syncd-brcm-dnx/start.sh
Executable file
31
platform/broadcom/docker-syncd-brcm-dnx/start.sh
Executable file
@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
HWSKU_DIR=/usr/share/sonic/hwsku
|
||||
|
||||
SYNCD_SOCKET_FILE=/var/run/sswsyncd/sswsyncd.socket
|
||||
|
||||
# Remove stale files if they exist
|
||||
rm -f ${SYNCD_SOCKET_FILE}
|
||||
|
||||
mkdir -p /etc/sai.d/
|
||||
|
||||
# There are two ways to specify the contents of the SAI_INIT_CONFIG_FILE and they are mutually exclusive
|
||||
# via current method (sai.profile.j2) or new method (config.bcm.j2)
|
||||
# If delta is large, use sai.profile.j2 which basically require the user to select which config file to use
|
||||
# If delta is small, use config.bcm.j2 where additional SAI INIT config properties are added
|
||||
# based on specific device metadata requirement
|
||||
# in this case sai.profile should have been modified to use the path /etc/sai.d/config.bcm
|
||||
# There is also a possibility that both sai.profile.j2 and config.bcm.j2 are absent. in that cacse just copy
|
||||
# sai.profile to the new /etc/said directory.
|
||||
|
||||
# Create/Copy the sai.profile to /etc/sai.d/sai.profile
|
||||
if [ -f $HWSKU_DIR/sai.profile.j2 ]; then
|
||||
sonic-cfggen -d -t $HWSKU_DIR/sai.profile.j2 > /etc/sai.d/sai.profile
|
||||
else
|
||||
if [ -f $HWSKU_DIR/config.bcm.j2 ]; then
|
||||
sonic-cfggen -d -t $HWSKU_DIR/config.bcm.j2 > /etc/sai.d/config.bcm
|
||||
fi
|
||||
if [ -f $HWSKU_DIR/sai.profile ]; then
|
||||
cp $HWSKU_DIR/sai.profile /etc/sai.d/sai.profile
|
||||
fi
|
||||
fi
|
38
platform/broadcom/docker-syncd-brcm-dnx/start_led.sh
Executable file
38
platform/broadcom/docker-syncd-brcm-dnx/start_led.sh
Executable file
@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PLATFORM_DIR=/usr/share/sonic/platform
|
||||
SYNCD_SOCKET_FILE=/var/run/sswsyncd/sswsyncd.socket
|
||||
LED_PROC_INIT_SOC=${PLATFORM_DIR}/led_proc_init.soc
|
||||
|
||||
# Function: wait until syncd has created the socket for bcmcmd to connect to
|
||||
wait_syncd() {
|
||||
while true; do
|
||||
if [ -e ${SYNCD_SOCKET_FILE} ]; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# wait until bcm sdk is ready to get a request
|
||||
counter=0
|
||||
while true; do
|
||||
/usr/bin/bcmcmd -t 1 "show unit" | grep BCM >/dev/null 2>&1
|
||||
rv=$?
|
||||
if [ $rv -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
counter=$((counter+1))
|
||||
if [ $counter -ge 60 ]; then
|
||||
echo "syncd is not ready to take commands after $counter re-tries; Exiting!"
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
# If this platform has an initialization file for the Broadcom LED microprocessor, load it
|
||||
if [[ -r "$LED_PROC_INIT_SOC" && ! -f /var/warmboot/warm-starting ]]; then
|
||||
wait_syncd
|
||||
/usr/bin/bcmcmd -t 60 "rcload $LED_PROC_INIT_SOC"
|
||||
fi
|
||||
|
61
platform/broadcom/docker-syncd-brcm-dnx/supervisord.conf
Normal file
61
platform/broadcom/docker-syncd-brcm-dnx/supervisord.conf
Normal file
@ -0,0 +1,61 @@
|
||||
[supervisord]
|
||||
logfile_maxbytes=1MB
|
||||
logfile_backups=2
|
||||
nodaemon=true
|
||||
|
||||
[eventlistener:dependent-startup]
|
||||
command=python3 -m supervisord_dependent_startup
|
||||
autostart=true
|
||||
autorestart=unexpected
|
||||
startretries=0
|
||||
exitcodes=0,3
|
||||
events=PROCESS_STATE
|
||||
buffer_size=1024
|
||||
|
||||
[eventlistener:supervisor-proc-exit-listener]
|
||||
command=/usr/bin/supervisor-proc-exit-listener --container-name syncd
|
||||
events=PROCESS_STATE_EXITED,PROCESS_STATE_RUNNING
|
||||
autostart=true
|
||||
autorestart=unexpected
|
||||
buffer_size=1024
|
||||
|
||||
[program:rsyslogd]
|
||||
command=/usr/sbin/rsyslogd -n -iNONE
|
||||
priority=1
|
||||
autostart=false
|
||||
autorestart=unexpected
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
dependent_startup=true
|
||||
|
||||
[program:start]
|
||||
command=/usr/bin/start.sh
|
||||
priority=2
|
||||
autostart=false
|
||||
autorestart=false
|
||||
startsecs=0
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
dependent_startup=true
|
||||
dependent_startup_wait_for=rsyslogd:running
|
||||
|
||||
[program:syncd]
|
||||
command=/usr/bin/syncd_start.sh
|
||||
priority=3
|
||||
autostart=false
|
||||
autorestart=false
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
dependent_startup=true
|
||||
dependent_startup_wait_for=start:exited
|
||||
|
||||
[program:ledinit]
|
||||
command=/usr/bin/start_led.sh
|
||||
priority=4
|
||||
autostart=false
|
||||
autorestart=false
|
||||
startsecs=0
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
dependent_startup=true
|
||||
dependent_startup_wait_for=syncd:running
|
@ -27,4 +27,4 @@ $(DOCKER_SYNCD_BRCM_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
|
||||
$(DOCKER_SYNCD_BRCM_RPC)_BASE_IMAGE_FILES += bcmcmd:/usr/bin/bcmcmd
|
||||
$(DOCKER_SYNCD_BRCM_RPC)_BASE_IMAGE_FILES += bcmsh:/usr/bin/bcmsh
|
||||
|
||||
$(DOCKER_SYNCD_BRCM_RPC)_MACHINE = broadcom
|
||||
|
@ -4,6 +4,7 @@ DOCKER_SYNCD_PLATFORM_CODE = brcm
|
||||
include $(PLATFORM_PATH)/../template/docker-syncd-base.mk
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD)
|
||||
$(DOCKER_SYNCD_BASE)_DEPENDS += $(BRCM_SAI)
|
||||
$(DOCKER_SYNCD_BASE)_FILES += $(DSSERVE) $(BCMCMD)
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \
|
||||
@ -13,6 +14,7 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0
|
||||
$(DOCKER_SYNCD_BASE)_PACKAGE_NAME = syncd
|
||||
$(DOCKER_SYNCD_BASE)_MACHINE = broadcom
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot
|
||||
$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /usr/share/sonic/device/x86_64-broadcom_common:/usr/share/sonic/device/x86_64-broadcom_common:ro
|
||||
|
@ -2,10 +2,12 @@
|
||||
|
||||
SONIC_ONE_ABOOT_IMAGE = sonic-aboot-broadcom.swi
|
||||
$(SONIC_ONE_ABOOT_IMAGE)_MACHINE = broadcom
|
||||
$(SONIC_ONE_ABOOT_IMAGE)_DEPENDENT_MACHINE = broadcom-dnx
|
||||
$(SONIC_ONE_ABOOT_IMAGE)_IMAGE_TYPE = aboot
|
||||
$(SONIC_ONE_ABOOT_IMAGE)_INSTALLS += $(BRCM_OPENNSL_KERNEL) $(ARISTA_PLATFORM_MODULE_DRIVERS) $(ARISTA_PLATFORM_MODULE_PYTHON2) $(ARISTA_PLATFORM_MODULE_PYTHON3) $(ARISTA_PLATFORM_MODULE)
|
||||
$(SONIC_ONE_ABOOT_IMAGE)_INSTALLS += $(ARISTA_PLATFORM_MODULE_DRIVERS) $(ARISTA_PLATFORM_MODULE_PYTHON2) $(ARISTA_PLATFORM_MODULE_PYTHON3) $(ARISTA_PLATFORM_MODULE)
|
||||
$(SONIC_ONE_ABOOT_IMAGE)_INSTALLS += $(PHY_CREDO)
|
||||
$(SONIC_ONE_ABOOT_IMAGE)_INSTALLS += $(SYSTEMD_SONIC_GENERATOR)
|
||||
$(SONIC_ONE_ABOOT_IMAGE)_LAZY_BUILD_INSTALLS = $(BRCM_OPENNSL_KERNEL) $(BRCM_DNX_OPENNSL_KERNEL)
|
||||
ifeq ($(INSTALL_DEBUG_TOOLS),y)
|
||||
$(SONIC_ONE_ABOOT_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_DBG_IMAGES)
|
||||
$(SONIC_ONE_ABOOT_IMAGE)_DOCKERS += $(filter-out $(patsubst %-$(DBG_IMAGE_MARK).gz,%.gz, $(SONIC_INSTALL_DOCKER_DBG_IMAGES)), $(SONIC_INSTALL_DOCKER_IMAGES))
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
SONIC_ONE_IMAGE = sonic-broadcom.bin
|
||||
$(SONIC_ONE_IMAGE)_MACHINE = broadcom
|
||||
$(SONIC_ONE_IMAGE)_DEPENDENT_MACHINE = broadcom-dnx
|
||||
$(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie
|
||||
$(SONIC_ONE_IMAGE)_INSTALLS += $(BRCM_OPENNSL_KERNEL)
|
||||
$(SONIC_ONE_IMAGE)_INSTALLS += $(PDDF_PLATFORM_MODULE)
|
||||
$(SONIC_ONE_IMAGE)_INSTALLS += $(SYSTEMD_SONIC_GENERATOR)
|
||||
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(DELL_S6000_PLATFORM_MODULE) \
|
||||
@ -69,6 +69,7 @@ $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(DELL_S6000_PLATFORM_MODULE) \
|
||||
$(DELTA_AGC032_PLATFORM_MODULE) \
|
||||
$(RUIJIE_B6510_48VS8CQ_PLATFORM_MODULE) \
|
||||
$(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE)
|
||||
$(SONIC_ONE_IMAGE)_LAZY_BUILD_INSTALLS = $(BRCM_OPENNSL_KERNEL) $(BRCM_DNX_OPENNSL_KERNEL)
|
||||
ifeq ($(INSTALL_DEBUG_TOOLS),y)
|
||||
$(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_DBG_IMAGES)
|
||||
$(SONIC_ONE_IMAGE)_DOCKERS += $(filter-out $(patsubst %-$(DBG_IMAGE_MARK).gz,%.gz, $(SONIC_INSTALL_DOCKER_DBG_IMAGES)), $(SONIC_INSTALL_DOCKER_IMAGES))
|
||||
|
@ -22,3 +22,5 @@ include $(PLATFORM_PATH)/one-pde-image.dep
|
||||
include $(PLATFORM_PATH)/raw-image.dep
|
||||
include $(PLATFORM_PATH)/one-aboot.dep
|
||||
include $(PLATFORM_PATH)/libsaithrift-dev.dep
|
||||
include $(PLATFORM_PATH)/docker-syncd-brcm-dnx.dep
|
||||
include $(PLATFORM_PATH)/docker-syncd-brcm-dnx-rpc.dep
|
||||
|
@ -21,6 +21,8 @@ include $(PLATFORM_PATH)/one-image.mk
|
||||
include $(PLATFORM_PATH)/raw-image.mk
|
||||
include $(PLATFORM_PATH)/one-aboot.mk
|
||||
include $(PLATFORM_PATH)/libsaithrift-dev.mk
|
||||
include $(PLATFORM_PATH)/docker-syncd-brcm-dnx.mk
|
||||
include $(PLATFORM_PATH)/docker-syncd-brcm-dnx-rpc.mk
|
||||
|
||||
BCMCMD = bcmcmd
|
||||
$(BCMCMD)_URL = "https://sonicstorage.blob.core.windows.net/packages/20190307/bcmcmd?sv=2015-04-05&sr=b&sig=sUdbU7oVbh5exbXXHVL5TDFBTWDDBASHeJ8Cp0B0TIc%3D&se=2038-05-06T22%3A34%3A19Z&sp=r"
|
||||
@ -35,11 +37,8 @@ SONIC_ALL += $(SONIC_ONE_IMAGE) $(SONIC_ONE_ABOOT_IMAGE) \
|
||||
|
||||
# Inject brcm sai into syncd
|
||||
$(SYNCD)_DEPENDS += $(BRCM_SAI) $(BRCM_SAI_DEV)
|
||||
$(SYNCD)_UNINSTALLS += $(BRCM_SAI_DEV)
|
||||
$(SYNCD)_UNINSTALLS += $(BRCM_SAI_DEV) $(BRCM_SAI)
|
||||
|
||||
ifeq ($(ENABLE_SYNCD_RPC),y)
|
||||
$(SYNCD)_DEPENDS += $(LIBSAITHRIFT_DEV)
|
||||
endif
|
||||
|
||||
# Runtime dependency on brcm sai is set only for syncd
|
||||
$(SYNCD)_RDEPENDS += $(BRCM_SAI)
|
||||
|
@ -5,4 +5,17 @@ BRCM_OPENNSL_KERNEL_VERSION = 5.0.0.1
|
||||
BRCM_OPENNSL_KERNEL = opennsl-modules_$(BRCM_OPENNSL_KERNEL_VERSION)_amd64.deb
|
||||
$(BRCM_OPENNSL_KERNEL)_SRC_PATH = $(PLATFORM_PATH)/saibcm-modules
|
||||
$(BRCM_OPENNSL_KERNEL)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
|
||||
$(BRCM_OPENNSL_KERNEL)_BUILD_ENV += PKG_NAME=$(BRCM_OPENNSL_KERNEL)
|
||||
$(BRCM_OPENNSL_KERNEL)_MACHINE = broadcom
|
||||
SONIC_DPKG_DEBS += $(BRCM_OPENNSL_KERNEL)
|
||||
|
||||
# SAI bcm modules for DNX family ASIC
|
||||
BRCM_DNX_OPENNSL_KERNEL_VERSION = 5.0.0.1
|
||||
|
||||
BRCM_DNX_OPENNSL_KERNEL = opennsl-modules-dnx_$(BRCM_DNX_OPENNSL_KERNEL_VERSION)_amd64.deb
|
||||
$(BRCM_DNX_OPENNSL_KERNEL)_SRC_PATH = $(PLATFORM_PATH)/saibcm-modules-dnx
|
||||
$(BRCM_DNX_OPENNSL_KERNEL)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
|
||||
$(BRCM_DNX_OPENNSL_KERNEL)_BUILD_ENV += PKG_NAME=$(BRCM_DNX_OPENNSL_KERNEL)
|
||||
$(BRCM_DNX_OPENNSL_KERNEL)_MACHINE = broadcom-dnx
|
||||
$(BRCM_DNX_OPENNSL_KERNEL)_AFTER = $(BRCM_OPENNSL_KERNEL)
|
||||
SONIC_DPKG_DEBS += $(BRCM_DNX_OPENNSL_KERNEL)
|
||||
|
@ -16,3 +16,7 @@ $(BRCM_SAI_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
||||
$(BRCM_SAI_DEV)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) $(SAI_FLAGS)
|
||||
$(BRCM_SAI_DEV)_DEP_FILES := $(DEP_FILES)
|
||||
|
||||
# Dependencies for SAI DNX ASIC family
|
||||
$(BRCM_DNX_SAI)_CACHE_MODE := GIT_CONTENT_SHA
|
||||
$(BRCM_DNX_SAI)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) $(SAI_FLAGS)
|
||||
$(BRCM_DNX_SAI)_DEP_FILES := $(DEP_FILES)
|
||||
|
@ -4,6 +4,11 @@ BRCM_SAI_DEV = libsaibcm-dev_5.0.0.1_amd64.deb
|
||||
$(eval $(call add_derived_package,$(BRCM_SAI),$(BRCM_SAI_DEV)))
|
||||
$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/5.0/master/libsaibcm-dev_5.0.0.1_amd64.deb?sv=2015-04-05&sr=b&sig=C48%2BIViiA5KAq4ubDkXSehylTQgiIc7ZD47eo4roBYI%3D&se=2029-08-15T01%3A21%3A14Z&sp=r"
|
||||
|
||||
# SAI module for DNX Asic family
|
||||
BRCM_DNX_SAI = libsaibcm_dnx_5.0.0.1_amd64.deb
|
||||
$(BRCM_DNX_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/5.0/master/libsaibcm_dnx_5.0.0.1_amd64.deb?sv=2015-04-05&sr=b&sig=iUW4ZSz43oeOSe21%2BFaNTG1phTr6qgAfeeEN2mCXBWU%3D&se=2035-01-17T05%3A15%3A51Z&sp=r"
|
||||
|
||||
SONIC_ONLINE_DEBS += $(BRCM_SAI)
|
||||
SONIC_ONLINE_DEBS += $(BRCM_DNX_SAI)
|
||||
$(BRCM_SAI_DEV)_DEPENDS += $(BRCM_SAI)
|
||||
$(eval $(call add_conflict_package,$(BRCM_SAI_DEV),$(LIBSAIVS_DEV)))
|
||||
|
1
platform/broadcom/saibcm-modules-dnx
Submodule
1
platform/broadcom/saibcm-modules-dnx
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 569123865209da9d12ef8f2828a3118b00dc5e88
|
@ -178,7 +178,7 @@ binary-indep: build install
|
||||
dh_shlibdeps -i
|
||||
dh_gencontrol -i
|
||||
dh_md5sums -i
|
||||
dh_builddeb -i
|
||||
dh_builddeb -i --filename $(PKG_NAME)
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install
|
||||
@ -209,9 +209,9 @@ binary-arch: build install
|
||||
dh_installdeb -s
|
||||
# dh_perl -s
|
||||
dh_shlibdeps -s
|
||||
dh_gencontrol -s
|
||||
dh_gencontrol -s -- -n"$(PKG_NAME)"
|
||||
dh_md5sums -s
|
||||
dh_builddeb -s
|
||||
dh_builddeb -s --filename $(PKG_NAME)
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary install configure binary-modules kdist kdist_configure kdist_image kdist_clean
|
||||
|
@ -21,10 +21,12 @@ $(SYNCD)_DEPENDS += $(LIBSWSSCOMMON_DEV) $(LIBTHRIFT_DEV)
|
||||
$(SYNCD)_DPKG_TARGET = binary-syncd-rpc
|
||||
endif
|
||||
|
||||
ifeq ($(INSTALL_DEBUG_TOOLS), y)
|
||||
SYNCD_DBG = syncd-dbg_1.0.0_$(CONFIGURED_ARCH).deb
|
||||
$(SYNCD_DBG)_DEPENDS += $(SYNCD)
|
||||
$(SYNCD_DBG)_RDEPENDS += $(SYNCD)
|
||||
$(eval $(call add_derived_package,$(SYNCD),$(SYNCD_DBG)))
|
||||
endif
|
||||
|
||||
ifeq ($(ENABLE_SYNCD_RPC),y)
|
||||
SYNCD_RPC_DBG = syncd-rpc-dbg_1.0.0_$(CONFIGURED_ARCH).deb
|
||||
|
68
slave.mk
68
slave.mk
@ -717,6 +717,7 @@ $(foreach IMAGE,$(DOCKER_DBG_IMAGES), $(eval $(IMAGE)_FILES_PATH := $(FILES_PATH
|
||||
# Targets for building docker images
|
||||
$(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform docker-start \
|
||||
$$(addprefix $$($$*.gz_DEBS_PATH)/,$$($$*.gz_DEPENDS)) \
|
||||
$$(addprefix $(TARGET_PATH)/,$$($$*.gz_AFTER)) \
|
||||
$$(addprefix $$($$*.gz_FILES_PATH)/,$$($$*.gz_FILES)) \
|
||||
$$(addprefix $(PYTHON_DEBS_PATH)/,$$($$*.gz_PYTHON_DEBS)) \
|
||||
$$(addprefix $(PYTHON_WHEELS_PATH)/,$$($$*.gz_PYTHON_WHEELS)) \
|
||||
@ -789,6 +790,7 @@ SONIC_TARGET_LIST += $(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES))
|
||||
|
||||
# Targets for building docker images
|
||||
$(addprefix $(TARGET_PATH)/, $(DOCKER_DBG_IMAGES)) : $(TARGET_PATH)/%-$(DBG_IMAGE_MARK).gz : .platform docker-start \
|
||||
$$(addprefix $(TARGET_PATH)/,$$($$*.gz_AFTER)) \
|
||||
$$(addprefix $$($$*.gz_DEBS_PATH)/,$$($$*.gz_DBG_DEPENDS)) \
|
||||
$$(addsuffix -load,$$(addprefix $(TARGET_PATH)/,$$*.gz)) \
|
||||
$(call dpkg_depend,$(TARGET_PATH)/%-$(DBG_IMAGE_MARK).gz.dep)
|
||||
@ -862,6 +864,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
|
||||
$$(addsuffix -install,$$(addprefix $(IMAGE_DISTRO_DEBS_PATH)/,$$($$*_DEPENDS))) \
|
||||
$$(addprefix $(IMAGE_DISTRO_DEBS_PATH)/,$$($$*_INSTALLS)) \
|
||||
$$(addprefix $(IMAGE_DISTRO_DEBS_PATH)/,$$($$*_LAZY_INSTALLS)) \
|
||||
$$(addprefix $(IMAGE_DISTRO_DEBS_PATH)/,$$($$*_LAZY_BUILD_INSTALLS)) \
|
||||
$(addprefix $(IMAGE_DISTRO_DEBS_PATH)/,$(INITRAMFS_TOOLS) \
|
||||
$(LINUX_KERNEL) \
|
||||
$(SONIC_DEVICE_DATA) \
|
||||
@ -927,10 +930,12 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
|
||||
export enable_pfcwd_on_start="$(ENABLE_PFCWD_ON_START)"
|
||||
export installer_debs="$(addprefix $(IMAGE_DISTRO_DEBS_PATH)/,$($*_INSTALLS))"
|
||||
export lazy_installer_debs="$(foreach deb, $($*_LAZY_INSTALLS),$(foreach device, $($(deb)_PLATFORM),$(addprefix $(device)@, $(IMAGE_DISTRO_DEBS_PATH)/$(deb))))"
|
||||
export lazy_build_installer_debs="$(foreach deb, $($*_LAZY_BUILD_INSTALLS), $(addprefix $($(deb)_MACHINE)|,$(deb)))"
|
||||
export installer_images="$(foreach docker, $($*_DOCKERS),\
|
||||
$(addprefix $($(docker)_PACKAGE_NAME)|,\
|
||||
$(addprefix $($(docker)_PATH)|,\
|
||||
$(addprefix $(TARGET_PATH)/,$(addsuffix :$($(docker)_VERSION),$(docker))))))"
|
||||
$(addprefix $($(docker)_MACHINE)|,\
|
||||
$(addprefix $(TARGET_PATH)/,$(addsuffix :$($(docker)_VERSION),$(docker)))))))"
|
||||
export sonic_py_common_py2_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PY_COMMON_PY2))"
|
||||
export sonic_py_common_py3_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PY_COMMON_PY3))"
|
||||
export config_engine_py2_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE_PY2))"
|
||||
@ -990,8 +995,13 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
|
||||
|
||||
j2 files/build_templates/docker_image_ctl.j2 > $($(docker:-dbg.gz=.gz)_CONTAINER_NAME).sh
|
||||
chmod +x $($(docker:-dbg.gz=.gz)_CONTAINER_NAME).sh
|
||||
|
||||
$(if $($(docker:-dbg.gz=.gz)_MACHINE),\
|
||||
mv $($(docker:-dbg.gz=.gz)_CONTAINER_NAME).sh $($(docker:-dbg.gz=.gz)_MACHINE)_$($(docker:-dbg.gz=.gz)_CONTAINER_NAME).sh
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
# Exported variables are used by sonic_debian_extension.sh
|
||||
export installer_start_scripts="$(foreach docker, $($*_DOCKERS),$(addsuffix .sh, $($(docker:-dbg.gz=.gz)_CONTAINER_NAME)))"
|
||||
export feature_vs_image_names="$(foreach docker, $($*_DOCKERS), $(addsuffix :, $($(docker:-dbg.gz=.gz)_CONTAINER_NAME):$(docker:-dbg.gz=.gz)))"
|
||||
@ -1023,36 +1033,40 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
|
||||
chmod +x sonic_debian_extension.sh,
|
||||
)
|
||||
|
||||
DEBUG_IMG="$(INSTALL_DEBUG_TOOLS)" \
|
||||
DEBUG_SRC_ARCHIVE_DIRS="$(DBG_SRC_ARCHIVE)" \
|
||||
DEBUG_SRC_ARCHIVE_FILE="$(DBG_SRC_ARCHIVE_FILE)" \
|
||||
scripts/dbg_files.sh
|
||||
# Build images for the MACHINE, DEPENDENT_MACHINE defined.
|
||||
$(foreach dep_machine, $($*_MACHINE) $($*_DEPENDENT_MACHINE), \
|
||||
DEBUG_IMG="$(INSTALL_DEBUG_TOOLS)" \
|
||||
DEBUG_SRC_ARCHIVE_DIRS="$(DBG_SRC_ARCHIVE)" \
|
||||
DEBUG_SRC_ARCHIVE_FILE="$(DBG_SRC_ARCHIVE_FILE)" \
|
||||
scripts/dbg_files.sh
|
||||
|
||||
DEBUG_IMG="$(INSTALL_DEBUG_TOOLS)" \
|
||||
DEBUG_SRC_ARCHIVE_FILE="$(DBG_SRC_ARCHIVE_FILE)" \
|
||||
USERNAME="$(USERNAME)" \
|
||||
PASSWORD="$(PASSWORD)" \
|
||||
IMAGE_TYPE=$($*_IMAGE_TYPE) \
|
||||
TARGET_PATH=$(TARGET_PATH) \
|
||||
SONIC_ENFORCE_VERSIONS=$(SONIC_ENFORCE_VERSIONS) \
|
||||
TRUSTED_GPG_URLS=$(TRUSTED_GPG_URLS) \
|
||||
PACKAGE_URL_PREFIX=$(PACKAGE_URL_PREFIX) \
|
||||
MULTIARCH_QEMU_ENVIRON=$(MULTIARCH_QEMU_ENVIRON) \
|
||||
./build_debian.sh $(LOG)
|
||||
DEBUG_IMG="$(INSTALL_DEBUG_TOOLS)" \
|
||||
DEBUG_SRC_ARCHIVE_FILE="$(DBG_SRC_ARCHIVE_FILE)" \
|
||||
USERNAME="$(USERNAME)" \
|
||||
PASSWORD="$(PASSWORD)" \
|
||||
TARGET_MACHINE=$(dep_machine) \
|
||||
IMAGE_TYPE=$($*_IMAGE_TYPE) \
|
||||
TARGET_PATH=$(TARGET_PATH) \
|
||||
SONIC_ENFORCE_VERSIONS=$(SONIC_ENFORCE_VERSIONS) \
|
||||
TRUSTED_GPG_URLS=$(TRUSTED_GPG_URLS) \
|
||||
PACKAGE_URL_PREFIX=$(PACKAGE_URL_PREFIX) \
|
||||
MULTIARCH_QEMU_ENVIRON=$(MULTIARCH_QEMU_ENVIRON) \
|
||||
./build_debian.sh $(LOG)
|
||||
|
||||
USERNAME="$(USERNAME)" \
|
||||
PASSWORD="$(PASSWORD)" \
|
||||
TARGET_MACHINE=$($*_MACHINE) \
|
||||
IMAGE_TYPE=$($*_IMAGE_TYPE) \
|
||||
SONIC_ENABLE_IMAGE_SIGNATURE="$(SONIC_ENABLE_IMAGE_SIGNATURE)" \
|
||||
SIGNING_KEY="$(SIGNING_KEY)" \
|
||||
SIGNING_CERT="$(SIGNING_CERT)" \
|
||||
CA_CERT="$(CA_CERT)" \
|
||||
TARGET_PATH="$(TARGET_PATH)" \
|
||||
./build_image.sh $(LOG)
|
||||
USERNAME="$(USERNAME)" \
|
||||
PASSWORD="$(PASSWORD)" \
|
||||
TARGET_MACHINE=$(dep_machine) \
|
||||
IMAGE_TYPE=$($*_IMAGE_TYPE) \
|
||||
SONIC_ENABLE_IMAGE_SIGNATURE="$(SONIC_ENABLE_IMAGE_SIGNATURE)" \
|
||||
SIGNING_KEY="$(SIGNING_KEY)" \
|
||||
SIGNING_CERT="$(SIGNING_CERT)" \
|
||||
CA_CERT="$(CA_CERT)" \
|
||||
TARGET_PATH="$(TARGET_PATH)" \
|
||||
./build_image.sh $(LOG)
|
||||
)
|
||||
|
||||
$(foreach docker, $($*_DOCKERS), \
|
||||
rm -f $($(docker:-dbg.gz=.gz)_CONTAINER_NAME).sh
|
||||
rm -f *$($(docker:-dbg.gz=.gz)_CONTAINER_NAME).sh
|
||||
rm -f $($(docker:-dbg.gz=.gz)_CONTAINER_NAME).service
|
||||
rm -f $($(docker:-dbg.gz=.gz)_CONTAINER_NAME)@.service
|
||||
)
|
||||
|
@ -247,3 +247,4 @@ sai_optimized_mmu
|
||||
buf.map.egress_pool0.ingress_pool
|
||||
buf.map.egress_pool1.ingress_pool
|
||||
buf.map.egress_pool2.ingress_pool
|
||||
dpp_db_path
|
||||
|
Loading…
Reference in New Issue
Block a user