From 627601b252decc89d12ea4ad0a1591a8de9a26b3 Mon Sep 17 00:00:00 2001 From: Denys Haryachyy Date: Mon, 22 Aug 2016 14:58:08 +0000 Subject: [PATCH 01/33] Makefile: Added Cavium platform --- Makefile | 32 +++++++++++++++++++++++++++++++- src/Makefile | 14 ++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 743cb4e7689d..4e0ff8ebb222 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ SHELL := /bin/bash ## Capture all the files in SDK directories MLNX-SDK-DEBS=$(notdir $(wildcard src/mlnx-sdk/*.deb)) BRCM-SDK-DEBS=$(notdir $(wildcard src/brcm-sdk/*.deb)) +CAVM-SDK-DEBS=$(notdir $(wildcard src/cavm-sdk/*.deb)) ## Function: build_docker, image_name save_file ## build a docker image and save to a file @@ -20,7 +21,7 @@ define build_docker endef ## Rules -.phony : brcm-all mlnx-all +.phony : brcm-all mlnx-all cavm-all src/%: $(MAKE) -C src $(subst src/,,$@) @@ -42,30 +43,48 @@ dockers/docker-orchagent/deps/%.deb: src/%.deb dockers/docker-orchagent/deps/%: src/brcm/% mkdir -p `dirname $@` && cp $< $@ + +dockers/docker-orchagent-cavm/deps/%.deb: src/%.deb + mkdir -p `dirname $@` && cp $< $@ + +dockers/docker-orchagent-cavm/deps/%: src/cavm/% + mkdir -p `dirname $@` && cp $< $@ dockers/docker-%-mlnx/deps/syncd_1.0.0_amd64.deb: src/mlnx/syncd_1.0.0_amd64.deb mkdir -p `dirname $@` && cp $< $@ dockers/docker-%/deps/syncd_1.0.0_amd64.deb: src/brcm/syncd_1.0.0_amd64.deb mkdir -p `dirname $@` && cp $< $@ + +dockers/docker-%-cavm/deps/syncd_1.0.0_amd64.deb: src/cavm/syncd_1.0.0_amd64.deb + mkdir -p `dirname $@` && cp $< $@ dockers/docker-%-mlnx/deps/libsairedis_1.0.0_amd64.deb: src/mlnx/syncd_1.0.0_amd64.deb mkdir -p `dirname $@` && cp $< $@ dockers/docker-%/deps/libsairedis_1.0.0_amd64.deb: src/brcm/syncd_1.0.0_amd64.deb mkdir -p `dirname $@` && cp $< $@ + +dockers/docker-%-cavm/deps/libsairedis_1.0.0_amd64.deb: src/cavm/syncd_1.0.0_amd64.deb + mkdir -p `dirname $@` && cp $< $@ $(addprefix dockers/docker-syncd-mlnx/deps/,$(MLNX-SDK-DEBS)) : dockers/docker-syncd-mlnx/deps/%.deb : src/mlnx-sdk/%.deb mkdir -p `dirname $@` && cp $< $@ $(addprefix dockers/docker-syncd/deps/,$(BRCM-SDK-DEBS)) : dockers/docker-syncd/deps/%.deb : src/brcm-sdk/%.deb mkdir -p `dirname $@` && cp $< $@ + +$(addprefix dockers/docker-syncd-cavm/deps/,$(CAVM-SDK-DEBS)) : dockers/docker-syncd-cavm/deps/%.deb : src/cavm-sdk/%.deb + mkdir -p `dirname $@` && cp $< $@ dockers/docker-syncd-mlnx/deps/%.deb: src/%.deb mkdir -p `dirname $@` && cp $< $@ dockers/docker-syncd/deps/%.deb: src/%.deb mkdir -p `dirname $@` && cp $< $@ + +dockers/docker-syncd-cavm/deps/%.deb: src/%.deb + mkdir -p `dirname $@` && cp $< $@ deps/linux-image-3.16.0-4-amd64_%.deb: src/sonic-linux-kernel/linux-image-3.16.0-4-amd64_%.deb mkdir -p `dirname $@` && cp $< $@ @@ -85,6 +104,10 @@ target/docker-syncd.gz: target/docker-base.gz $(addprefix dockers/docker-syncd/d target/docker-syncd-mlnx.gz: target/docker-base.gz $(addprefix dockers/docker-syncd-mlnx/deps/,$(MLNX-SDK-DEBS) applibs_1.mlnx.4.2.2100_amd64.deb libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb) docker load < $< $(call build_docker,$(patsubst target/%.gz,%,$@),$@) + +target/docker-syncd-cavm.gz: target/docker-base.gz $(addprefix dockers/docker-syncd-cavm/deps/,$(CAVM-SDK-DEBS) libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb) + docker load < $< + $(call build_docker,$(patsubst target/%.gz,%,$@),$@) target/docker-orchagent.gz: target/docker-base.gz $(addprefix dockers/docker-orchagent/deps/,libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb orchagent swssconfig portsyncd intfsyncd neighsyncd) docker load < $< @@ -93,6 +116,10 @@ target/docker-orchagent.gz: target/docker-base.gz $(addprefix dockers/docker-orc target/docker-orchagent-mlnx.gz: target/docker-base.gz $(addprefix dockers/docker-orchagent-mlnx/deps/,libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb orchagent swssconfig portsyncd intfsyncd neighsyncd) docker load < $< $(call build_docker,$(patsubst target/%.gz,%,$@),$@) + +target/docker-orchagent-cavm.gz: target/docker-base.gz $(addprefix dockers/docker-orchagent-cavm/deps/,libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb orchagent swssconfig portsyncd intfsyncd neighsyncd) + docker load < $< + $(call build_docker,$(patsubst target/%.gz,%,$@),$@) target/docker-fpm.gz: target/docker-base.gz $(addprefix dockers/docker-fpm/deps/,libswsscommon_1.0.0_amd64.deb libhiredis0.13_0.13.3-2_amd64.deb quagga_0.99.24.1-2_amd64.deb fpmsyncd) docker load < $< @@ -109,3 +136,6 @@ brcm-all: target/acs-generic.bin $(addprefix target/,docker-syncd.gz docker-orch ## Note: docker-fpm.gz must be the last to build the implicit dependency fpmsyncd mlnx-all: target/acs-generic.bin $(addprefix target/,docker-syncd-mlnx.gz docker-orchagent-mlnx.gz docker-fpm.gz) + +## Note: docker-fpm.gz must be the last to build the implicit dependency fpmsyncd +cavm-all: $(addprefix target/,docker-syncd-cavm.gz docker-orchagent-cavm.gz docker-fpm.gz) diff --git a/src/Makefile b/src/Makefile index 09e1152dec48..14171bb52e76 100644 --- a/src/Makefile +++ b/src/Makefile @@ -43,6 +43,12 @@ mlnx/syncd_1.0.0_amd64.deb mlnx/libsairedis_1.0.0_amd64.deb mlnx/libsairedis-dev $(call build_project, sonic-sairedis) mkdir -p mlnx cp syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb libsairedis-dev_1.0.0_amd64.deb mlnx/ + +cavm/syncd_1.0.0_amd64.deb cavm/libsairedis_1.0.0_amd64.deb cavm/libsairedis-dev_1.0.0_amd64.deb: libswsscommon_1.0.0_amd64.deb libswsscommon-dev_1.0.0_amd64.deb cavm-sdk/*.deb + $(foreach dep, $^, $(call install_deb, $(dep))) + $(call build_project, sonic-sairedis) + mkdir -p cavm + cp syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb libsairedis-dev_1.0.0_amd64.deb cavm/ ## Note: fpmsyncd is one implicit target brcm/swss_1.0.0_amd64.deb brcm/intfsyncd brcm/neighsyncd brcm/orchagent brcm/portsyncd brcm/routeresync brcm/swssconfig: brcm/syncd_1.0.0_amd64.deb brcm/libsairedis_1.0.0_amd64.deb brcm/libsairedis-dev_1.0.0_amd64.deb @@ -59,6 +65,14 @@ mlnx/swss_1.0.0_amd64.deb mlnx/intfsyncd mlnx/neighsyncd mlnx/orchagent mlnx/por cp swss_1.0.0_amd64.deb mlnx/ cp sonic-swss/debian/swss/usr/bin/* mlnx/ cp sonic-swss/debian/swss/usr/bin/fpmsyncd . + +## Note: fpmsyncd is one implicit target +cavm/swss_1.0.0_amd64.deb cavm/intfsyncd cavm/neighsyncd cavm/orchagent cavm/portsyncd cavm/routeresync cavm/swssconfig: cavm/syncd_1.0.0_amd64.deb cavm/libsairedis_1.0.0_amd64.deb cavm/libsairedis-dev_1.0.0_amd64.deb + $(foreach dep, $^, $(call install_deb, $(dep))) + $(call build_project, sonic-swss) + cp swss_1.0.0_amd64.deb cavm/ + cp sonic-swss/debian/swss/usr/bin/* cavm/ + cp sonic-swss/debian/swss/usr/bin/fpmsyncd . $(addprefix sonic-linux-kernel/,linux-headers-3.16.0-4-amd64_3.16.7-ckt11-2+acs8u2_amd64.deb linux-headers-3.16.0-4-common_3.16.7-ckt11-2+acs8u2_amd64.deb linux-image-3.16.0-4-amd64-dbg_3.16.7-ckt11-2+acs8u2_amd64.deb linux-image-3.16.0-4-amd64_3.16.7-ckt11-2+acs8u2_amd64.deb xen-linux-system-3.16.0-4-amd64_3.16.7-ckt11-2+acs8u2_amd64.deb): pushd sonic-linux-kernel; sudo ./build.sh; popd From a2e539268ece559dc7d6e79a009cb707773d8b60 Mon Sep 17 00:00:00 2001 From: Denys Haryachyy Date: Tue, 23 Aug 2016 12:13:47 +0000 Subject: [PATCH 02/33] dockers : Added containers skeletons --- dockers/docker-orchagent-cavm/Dockerfile | 23 ++++++++++++++++++++++ dockers/docker-orchagent-cavm/start.sh | 25 ++++++++++++++++++++++++ dockers/docker-syncd-cavm/Dockerfile | 24 +++++++++++++++++++++++ dockers/docker-syncd-cavm/start.sh | 4 ++++ src/Makefile | 2 +- 5 files changed, 77 insertions(+), 1 deletion(-) create mode 100755 dockers/docker-orchagent-cavm/Dockerfile create mode 100755 dockers/docker-orchagent-cavm/start.sh create mode 100755 dockers/docker-syncd-cavm/Dockerfile create mode 100755 dockers/docker-syncd-cavm/start.sh diff --git a/dockers/docker-orchagent-cavm/Dockerfile b/dockers/docker-orchagent-cavm/Dockerfile new file mode 100755 index 000000000000..17fbfe9e7274 --- /dev/null +++ b/dockers/docker-orchagent-cavm/Dockerfile @@ -0,0 +1,23 @@ +FROM docker-base + +RUN apt-get update + +COPY ["deps/libhiredis0.13*.deb", "deps/libswsscommon_*.deb", "deps/libsairedis_*.deb", "/deps/"] + +RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/libhiredis0.13*.deb +RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/libswsscommon_*.deb +RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/libsairedis_*.deb + +RUN apt-get install -f -y ifupdown bridge-utils + +## Copy executable binaries +COPY ["deps/orchagent","deps/swssconfig","deps/portsyncd","deps/intfsyncd","deps/neighsyncd","/usr/local/bin/"] + +COPY start.sh /usr/bin/start.sh + +## Clean up +RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y +RUN rm -rf /deps + +ENTRYPOINT /usr/bin/start.sh \ + && /bin/bash diff --git a/dockers/docker-orchagent-cavm/start.sh b/dockers/docker-orchagent-cavm/start.sh new file mode 100755 index 000000000000..5eca68ed4e5b --- /dev/null +++ b/dockers/docker-orchagent-cavm/start.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +. /host/machine.conf + +MAC_ADDRESS=`ip link show eth0 | grep ether | awk '{print $2}'` + +ORCHAGENT_ARGS="" + +PORTSYNCD_ARGS="" + +if [ "$onie_platform" == "x86_64-dell_s6000_s1220-r0" ]; then + ORCHAGENT_ARGS+="-m $MAC_ADDRESS" + PORTSYNCD_ARGS+="-p /etc/ssw/ACS-S6000/port_config.ini" +elif [ "$onie_platform" == "x86_64-mlnx_x86-r5.0.1400" ]; then + PORTSYNCD_ARGS+="-p /etc/ssw/ACS-MSN2700/port_config.ini" +fi + +service rsyslog start +orchagent $ORCHAGENT_ARGS & +sleep 5 +portsyncd $PORTSYNCD_ARGS & +sleep 5 +intfsyncd & +sleep 5 +neighsyncd & diff --git a/dockers/docker-syncd-cavm/Dockerfile b/dockers/docker-syncd-cavm/Dockerfile new file mode 100755 index 000000000000..5b574a24ab19 --- /dev/null +++ b/dockers/docker-syncd-cavm/Dockerfile @@ -0,0 +1,24 @@ +FROM docker-base + +RUN apt-get update + +COPY ["deps/libhiredis0.13*.deb", "deps/libswsscommon_*.deb", "deps/libsairedis_*.deb", "deps/syncd_*.deb", "/deps/"] + +RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \ + dpkg_apt /deps/libhiredis0.13*.deb \ + && dpkg_apt /deps/libswsscommon_*.deb \ +# && dpkg_apt /deps/libsaicavm_*.deb \ + && dpkg_apt /deps/libsairedis_*.deb \ + && dpkg_apt /deps/syncd_*.deb + +## TODO: add kmod into Depends +RUN apt-get install -f kmod + +COPY ["start.sh", "/usr/bin/"] + +## Clean up +RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y +RUN rm -rf /deps + +ENTRYPOINT /usr/bin/start.sh \ + && /bin/bash diff --git a/dockers/docker-syncd-cavm/start.sh b/dockers/docker-syncd-cavm/start.sh new file mode 100755 index 000000000000..346936ff2f59 --- /dev/null +++ b/dockers/docker-syncd-cavm/start.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +service rsyslog start +service syncd start diff --git a/src/Makefile b/src/Makefile index 14171bb52e76..2cd3fc1e1fff 100644 --- a/src/Makefile +++ b/src/Makefile @@ -44,7 +44,7 @@ mlnx/syncd_1.0.0_amd64.deb mlnx/libsairedis_1.0.0_amd64.deb mlnx/libsairedis-dev mkdir -p mlnx cp syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb libsairedis-dev_1.0.0_amd64.deb mlnx/ -cavm/syncd_1.0.0_amd64.deb cavm/libsairedis_1.0.0_amd64.deb cavm/libsairedis-dev_1.0.0_amd64.deb: libswsscommon_1.0.0_amd64.deb libswsscommon-dev_1.0.0_amd64.deb cavm-sdk/*.deb +cavm/syncd_1.0.0_amd64.deb cavm/libsairedis_1.0.0_amd64.deb cavm/libsairedis-dev_1.0.0_amd64.deb: libswsscommon_1.0.0_amd64.deb libswsscommon-dev_1.0.0_amd64.deb $(foreach dep, $^, $(call install_deb, $(dep))) $(call build_project, sonic-sairedis) mkdir -p cavm From 812386cf395c65a18abd3624b3f5deecf8e9a998 Mon Sep 17 00:00:00 2001 From: Denys Haryachyy Date: Thu, 25 Aug 2016 12:37:14 +0000 Subject: [PATCH 03/33] Makefile, dockers : Introduced Cavium SDK packages --- Makefile | 5 ++++- dockers/docker-orchagent-cavm/start.sh | 7 ------- dockers/docker-syncd-cavm/Dockerfile | 8 ++++---- src/Makefile | 2 +- src/cavm-sdk/filelist.txt | 5 +++++ 5 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 src/cavm-sdk/filelist.txt diff --git a/Makefile b/Makefile index 4e0ff8ebb222..49cff64ffe00 100644 --- a/Makefile +++ b/Makefile @@ -95,6 +95,9 @@ deps/initramfs-tools_%.deb: src/initramfs-tools/initramfs-tools_%.deb target/docker-base.gz: $(call build_docker,$(patsubst target/%.gz,%,$@),$@) +target/docker-database.gz: + $(call build_docker,$(patsubst target/%.gz,%,$@),$@) + target/docker-syncd.gz: target/docker-base.gz $(addprefix dockers/docker-syncd/deps/,$(BRCM-SDK-DEBS) libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb syncd_1.0.0_amd64.deb) ## TODO: remove placeholders for the dependencies touch dockers/docker-syncd/deps/{dsserve,bcmcmd} @@ -117,7 +120,7 @@ target/docker-orchagent-mlnx.gz: target/docker-base.gz $(addprefix dockers/docke docker load < $< $(call build_docker,$(patsubst target/%.gz,%,$@),$@) -target/docker-orchagent-cavm.gz: target/docker-base.gz $(addprefix dockers/docker-orchagent-cavm/deps/,libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb orchagent swssconfig portsyncd intfsyncd neighsyncd) +target/docker-orchagent-cavm.gz: target/docker-base.gz target/docker-database.gz $(addprefix dockers/docker-orchagent-cavm/deps/,libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb orchagent swssconfig portsyncd intfsyncd neighsyncd) docker load < $< $(call build_docker,$(patsubst target/%.gz,%,$@),$@) diff --git a/dockers/docker-orchagent-cavm/start.sh b/dockers/docker-orchagent-cavm/start.sh index 5eca68ed4e5b..ea040cac58a2 100755 --- a/dockers/docker-orchagent-cavm/start.sh +++ b/dockers/docker-orchagent-cavm/start.sh @@ -8,13 +8,6 @@ ORCHAGENT_ARGS="" PORTSYNCD_ARGS="" -if [ "$onie_platform" == "x86_64-dell_s6000_s1220-r0" ]; then - ORCHAGENT_ARGS+="-m $MAC_ADDRESS" - PORTSYNCD_ARGS+="-p /etc/ssw/ACS-S6000/port_config.ini" -elif [ "$onie_platform" == "x86_64-mlnx_x86-r5.0.1400" ]; then - PORTSYNCD_ARGS+="-p /etc/ssw/ACS-MSN2700/port_config.ini" -fi - service rsyslog start orchagent $ORCHAGENT_ARGS & sleep 5 diff --git a/dockers/docker-syncd-cavm/Dockerfile b/dockers/docker-syncd-cavm/Dockerfile index 5b574a24ab19..41441761c6c3 100755 --- a/dockers/docker-syncd-cavm/Dockerfile +++ b/dockers/docker-syncd-cavm/Dockerfile @@ -2,17 +2,17 @@ FROM docker-base RUN apt-get update -COPY ["deps/libhiredis0.13*.deb", "deps/libswsscommon_*.deb", "deps/libsairedis_*.deb", "deps/syncd_*.deb", "/deps/"] +COPY ["deps/libhiredis0.13*.deb", "deps/libswsscommon_*.deb", "deps/libsairedis_*.deb", "deps/syncd_*.deb", "deps/libsai*.deb", "deps/libaapl*.deb", "/deps/"] RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \ dpkg_apt /deps/libhiredis0.13*.deb \ && dpkg_apt /deps/libswsscommon_*.deb \ -# && dpkg_apt /deps/libsaicavm_*.deb \ + && dpkg_apt /deps/libsai*.deb \ + && dpkg_apt /deps/libaapl*.deb \ && dpkg_apt /deps/libsairedis_*.deb \ && dpkg_apt /deps/syncd_*.deb -## TODO: add kmod into Depends -RUN apt-get install -f kmod +RUN apt-get -y install libpcap-dev libxml2-dev python-dev swig libsensors4-dev COPY ["start.sh", "/usr/bin/"] diff --git a/src/Makefile b/src/Makefile index 2cd3fc1e1fff..29143e4e6748 100644 --- a/src/Makefile +++ b/src/Makefile @@ -44,7 +44,7 @@ mlnx/syncd_1.0.0_amd64.deb mlnx/libsairedis_1.0.0_amd64.deb mlnx/libsairedis-dev mkdir -p mlnx cp syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb libsairedis-dev_1.0.0_amd64.deb mlnx/ -cavm/syncd_1.0.0_amd64.deb cavm/libsairedis_1.0.0_amd64.deb cavm/libsairedis-dev_1.0.0_amd64.deb: libswsscommon_1.0.0_amd64.deb libswsscommon-dev_1.0.0_amd64.deb +cavm/syncd_1.0.0_amd64.deb cavm/libsairedis_1.0.0_amd64.deb cavm/libsairedis-dev_1.0.0_amd64.deb: libswsscommon_1.0.0_amd64.deb libswsscommon-dev_1.0.0_amd64.deb cavm-sdk/libsai.deb cavm-sdk/libaapl.deb $(foreach dep, $^, $(call install_deb, $(dep))) $(call build_project, sonic-sairedis) mkdir -p cavm diff --git a/src/cavm-sdk/filelist.txt b/src/cavm-sdk/filelist.txt new file mode 100644 index 000000000000..29a76c4bab7b --- /dev/null +++ b/src/cavm-sdk/filelist.txt @@ -0,0 +1,5 @@ +## Get vendor SAI SDK +## https://github.com/Azure/sonic-buildimage/blob/master/README.md#3-get-vendor-sai-sdk + +libsai.deb +libaapl.deb From c57914803b738786ee42f18b3bd00864d9da26be Mon Sep 17 00:00:00 2001 From: root Date: Fri, 26 Aug 2016 11:16:08 +0000 Subject: [PATCH 04/33] dockers : Introduced SAI headers package Updated sairedis to the latest version Introduced port config file --- dockers/docker-orchagent-cavm/Dockerfile | 1 + dockers/docker-orchagent-cavm/port_config_cavm.ini | 5 +++++ dockers/docker-orchagent-cavm/start.sh | 2 +- dockers/docker-syncd-cavm/Dockerfile | 3 ++- src/sonic-sairedis | 2 +- 5 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 dockers/docker-orchagent-cavm/port_config_cavm.ini diff --git a/dockers/docker-orchagent-cavm/Dockerfile b/dockers/docker-orchagent-cavm/Dockerfile index 17fbfe9e7274..581d5405b176 100755 --- a/dockers/docker-orchagent-cavm/Dockerfile +++ b/dockers/docker-orchagent-cavm/Dockerfile @@ -14,6 +14,7 @@ RUN apt-get install -f -y ifupdown bridge-utils COPY ["deps/orchagent","deps/swssconfig","deps/portsyncd","deps/intfsyncd","deps/neighsyncd","/usr/local/bin/"] COPY start.sh /usr/bin/start.sh +COPY port_config_cavm.ini /usr/local/bin/ ## Clean up RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y diff --git a/dockers/docker-orchagent-cavm/port_config_cavm.ini b/dockers/docker-orchagent-cavm/port_config_cavm.ini new file mode 100644 index 000000000000..999483eb1653 --- /dev/null +++ b/dockers/docker-orchagent-cavm/port_config_cavm.ini @@ -0,0 +1,5 @@ +# alias lanes +Ethernet0 0 +Ethernet4 4 +Ethernet12 12 +Ethernet36 36 diff --git a/dockers/docker-orchagent-cavm/start.sh b/dockers/docker-orchagent-cavm/start.sh index ea040cac58a2..563e2bad11dd 100755 --- a/dockers/docker-orchagent-cavm/start.sh +++ b/dockers/docker-orchagent-cavm/start.sh @@ -6,7 +6,7 @@ MAC_ADDRESS=`ip link show eth0 | grep ether | awk '{print $2}'` ORCHAGENT_ARGS="" -PORTSYNCD_ARGS="" +PORTSYNCD_ARGS="-p port_config_cavm.ini" service rsyslog start orchagent $ORCHAGENT_ARGS & diff --git a/dockers/docker-syncd-cavm/Dockerfile b/dockers/docker-syncd-cavm/Dockerfile index 41441761c6c3..bf05cbbe105a 100755 --- a/dockers/docker-syncd-cavm/Dockerfile +++ b/dockers/docker-syncd-cavm/Dockerfile @@ -2,11 +2,12 @@ FROM docker-base RUN apt-get update -COPY ["deps/libhiredis0.13*.deb", "deps/libswsscommon_*.deb", "deps/libsairedis_*.deb", "deps/syncd_*.deb", "deps/libsai*.deb", "deps/libaapl*.deb", "/deps/"] +COPY ["deps/libhiredis0.13*.deb", "deps/libswsscommon_*.deb", "deps/libsairedis_*.deb", "deps/syncd_*.deb", "deps/sai*.deb", "deps/libsai*.deb", "deps/libaapl*.deb", "/deps/"] RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \ dpkg_apt /deps/libhiredis0.13*.deb \ && dpkg_apt /deps/libswsscommon_*.deb \ + && dpkg_apt /deps/sai*.deb \ && dpkg_apt /deps/libsai*.deb \ && dpkg_apt /deps/libaapl*.deb \ && dpkg_apt /deps/libsairedis_*.deb \ diff --git a/src/sonic-sairedis b/src/sonic-sairedis index 68b0a9b914c3..74fa427ab6a7 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit 68b0a9b914c3a3816c809d7951de70136d09dc27 +Subproject commit 74fa427ab6a70f293c0d487904bc06db3339fa84 From 3696be4b6e1088907ff14a46762b1405d1fca31b Mon Sep 17 00:00:00 2001 From: root Date: Fri, 26 Aug 2016 14:47:39 +0000 Subject: [PATCH 05/33] docker : Introduce profile config file for syncd --- dockers/docker-syncd-cavm/Dockerfile | 1 + dockers/docker-syncd-cavm/profile.ini | 1 + dockers/docker-syncd-cavm/start.sh | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 dockers/docker-syncd-cavm/profile.ini diff --git a/dockers/docker-syncd-cavm/Dockerfile b/dockers/docker-syncd-cavm/Dockerfile index bf05cbbe105a..41c3f05e7531 100755 --- a/dockers/docker-syncd-cavm/Dockerfile +++ b/dockers/docker-syncd-cavm/Dockerfile @@ -16,6 +16,7 @@ RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return RUN apt-get -y install libpcap-dev libxml2-dev python-dev swig libsensors4-dev COPY ["start.sh", "/usr/bin/"] +COPY ["profile.ini", "/usr/bin/"] ## Clean up RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y diff --git a/dockers/docker-syncd-cavm/profile.ini b/dockers/docker-syncd-cavm/profile.ini new file mode 100644 index 000000000000..d9e332a78979 --- /dev/null +++ b/dockers/docker-syncd-cavm/profile.ini @@ -0,0 +1 @@ +mode=0 diff --git a/dockers/docker-syncd-cavm/start.sh b/dockers/docker-syncd-cavm/start.sh index 346936ff2f59..37eabdcd975c 100755 --- a/dockers/docker-syncd-cavm/start.sh +++ b/dockers/docker-syncd-cavm/start.sh @@ -1,4 +1,4 @@ #!/bin/bash service rsyslog start -service syncd start +syncd -p profile.ini -N From 3758f4a25ae71026ea390d1ae4c9be2cbf40a1b3 Mon Sep 17 00:00:00 2001 From: Rostyslav Spolyak Date: Mon, 29 Aug 2016 15:23:49 +0300 Subject: [PATCH 06/33] introduced target for Cavium platform --- Makefile | 2 ++ installer/x86_64/install.sh | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 743cb4e7689d..fc653d8f3b79 100644 --- a/Makefile +++ b/Makefile @@ -109,3 +109,5 @@ brcm-all: target/acs-generic.bin $(addprefix target/,docker-syncd.gz docker-orch ## Note: docker-fpm.gz must be the last to build the implicit dependency fpmsyncd mlnx-all: target/acs-generic.bin $(addprefix target/,docker-syncd-mlnx.gz docker-orchagent-mlnx.gz docker-fpm.gz) + +cavm-all: target/acs-generic.bin diff --git a/installer/x86_64/install.sh b/installer/x86_64/install.sh index 58243be24283..6db5527933cc 100755 --- a/installer/x86_64/install.sh +++ b/installer/x86_64/install.sh @@ -59,6 +59,10 @@ elif [ "$onie_platform" == "x86_64-mlnx_x86-r5.0.1400" ]; then elif [ "$onie_platform" == "x86_64-dell_s6100_c2538-r0" ]; then CONSOLE_PORT=0x2f8 CONSOLE_DEV=1 +elif [ "$onie_platform" == "x86_64-accton_as7512_32x-r0" ]; then + CONSOLE_PORT=0x2f8 + CONSOLE_DEV=1 + CONSOLE_SPEED=115200 fi # Install demo on same block device as ONIE From 4d253042b0f621374a7ecdead1b63acc44ed09ee Mon Sep 17 00:00:00 2001 From: root Date: Mon, 29 Aug 2016 12:31:38 +0000 Subject: [PATCH 07/33] Fixed port config path. Introduced platform name into profile config. --- dockers/docker-orchagent-cavm/start.sh | 2 +- dockers/docker-syncd-cavm/profile.ini | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dockers/docker-orchagent-cavm/start.sh b/dockers/docker-orchagent-cavm/start.sh index 563e2bad11dd..203704ccab45 100755 --- a/dockers/docker-orchagent-cavm/start.sh +++ b/dockers/docker-orchagent-cavm/start.sh @@ -6,7 +6,7 @@ MAC_ADDRESS=`ip link show eth0 | grep ether | awk '{print $2}'` ORCHAGENT_ARGS="" -PORTSYNCD_ARGS="-p port_config_cavm.ini" +PORTSYNCD_ARGS="-p /usr/local/bin/port_config_cavm.ini" service rsyslog start orchagent $ORCHAGENT_ARGS & diff --git a/dockers/docker-syncd-cavm/profile.ini b/dockers/docker-syncd-cavm/profile.ini index d9e332a78979..471c4395758f 100644 --- a/dockers/docker-syncd-cavm/profile.ini +++ b/dockers/docker-syncd-cavm/profile.ini @@ -1 +1,2 @@ mode=0 +hwId=as7512 From 0d206ce16f2fb7df749d0c00089b2fcdcd555c9d Mon Sep 17 00:00:00 2001 From: Rostyslav Spolyak Date: Mon, 29 Aug 2016 16:58:51 +0300 Subject: [PATCH 08/33] temporary remove 'git status' check from build_image.sh --- build_image.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build_image.sh b/build_image.sh index 887d63ae049f..110878eecd02 100755 --- a/build_image.sh +++ b/build_image.sh @@ -13,10 +13,10 @@ } ## Retrieval short version of Git revision hash for partition metadata -[ -z "$(git status --untracked-files=no -s)" ] || { - echo "Error: There is local changes not committed to git repo. Cannot get a revision hash for partition metadata." - exit 1 -} +#[ -z "$(git status --untracked-files=no -s)" ] || { +# echo "Error: There is local changes not committed to git repo. Cannot get a revision hash for partition metadata." +# exit 1 +#} GIT_REVISION=$(git rev-parse --short HEAD) mkdir -p `dirname $OUTPUT_ONIE_IMAGE` From 9cf983a0aa2d6f4c65657f19c6162aa99d7e76a6 Mon Sep 17 00:00:00 2001 From: Rostyslav Spolyak Date: Tue, 30 Aug 2016 14:55:31 +0300 Subject: [PATCH 09/33] change linux kernel repository --- .gitmodules | 2 +- src/sonic-linux-kernel | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 88123322f032..e72b798c4f32 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,7 +6,7 @@ url = https://github.com/Azure/sonic-swss-common [submodule "sonic-linux-kernel"] path = src/sonic-linux-kernel - url = https://github.com/Azure/sonic-linux-kernel + url = https://github.com/rspolyak/sonic-linux-kernel [submodule "sonic-sairedis"] path = src/sonic-sairedis url = https://github.com/Azure/sonic-sairedis diff --git a/src/sonic-linux-kernel b/src/sonic-linux-kernel index 9794d29a08a4..6864429bbf22 160000 --- a/src/sonic-linux-kernel +++ b/src/sonic-linux-kernel @@ -1 +1 @@ -Subproject commit 9794d29a08a4f81fbcd900e03072561f42b81074 +Subproject commit 6864429bbf22ed4e963f2ecbd0173879db4b2408 From 2ecc8851b1ac321628d631c2bc2809905faedf66 Mon Sep 17 00:00:00 2001 From: Denys Haryachyy Date: Wed, 31 Aug 2016 15:08:50 +0000 Subject: [PATCH 10/33] orchagent : Provide MAC address in command line --- dockers/docker-orchagent-cavm/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/docker-orchagent-cavm/start.sh b/dockers/docker-orchagent-cavm/start.sh index 203704ccab45..62d91f6e84f8 100755 --- a/dockers/docker-orchagent-cavm/start.sh +++ b/dockers/docker-orchagent-cavm/start.sh @@ -4,7 +4,7 @@ MAC_ADDRESS=`ip link show eth0 | grep ether | awk '{print $2}'` -ORCHAGENT_ARGS="" +ORCHAGENT_ARGS="-m $MAC_ADDRESS" PORTSYNCD_ARGS="-p /usr/local/bin/port_config_cavm.ini" From 91ece10bb10aab81116c59fdc8a43e5bfa8ca457 Mon Sep 17 00:00:00 2001 From: Denys Haryachyy Date: Wed, 31 Aug 2016 15:11:38 +0000 Subject: [PATCH 11/33] sonic-swss : Updated to the latest and greatest --- src/sonic-swss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-swss b/src/sonic-swss index b56c9cc507cd..60b0fb279551 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit b56c9cc507cdfc473d6d0d1159f134dfd83a96df +Subproject commit 60b0fb279551ad3447b802ec602e28902245b4f2 From a8f5de74fed147546641aed76793fbaaa035f4f3 Mon Sep 17 00:00:00 2001 From: Denys Haryachyy Date: Wed, 31 Aug 2016 15:12:52 +0000 Subject: [PATCH 12/33] sonic-swss-common : Updated to the latest and greatest --- src/sonic-swss-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-swss-common b/src/sonic-swss-common index 38b461a168a6..efd594d51da6 160000 --- a/src/sonic-swss-common +++ b/src/sonic-swss-common @@ -1 +1 @@ -Subproject commit 38b461a168a6154aad978d3a97f08c2c933e943a +Subproject commit efd594d51da6d2dcc8a494bf43d3aadf3bdd71d2 From 3bcf0a1e277708405794f57e1a0e3ce4cae40f58 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 31 Aug 2016 18:22:55 +0000 Subject: [PATCH 13/33] Added localhost entry into /etc/hosts --- build_debian.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build_debian.sh b/build_debian.sh index 5ad7c7d46676..bba2aabed55b 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -69,6 +69,7 @@ sudo debootstrap --variant=minbase --arch amd64 jessie $FILESYSTEM_ROOT http://f ## Config hostname and hosts, otherwise 'sudo ...' will complain 'sudo: unable to resolve host ...' sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '$HOSTNAME' > /etc/hostname" sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '127.0.0.1 $HOSTNAME' >> /etc/hosts" +sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '127.0.0.1 localhost' >> /etc/hosts" ## Config basic fstab sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c 'echo "proc /proc proc defaults 0 0" >> /etc/fstab' From c41491fc023d87f7deafe272f5239243394f2012 Mon Sep 17 00:00:00 2001 From: Denys Haryachyy Date: Wed, 31 Aug 2016 23:14:54 +0300 Subject: [PATCH 14/33] Introduced BGP docker target --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 49cff64ffe00..87d1edf23c6c 100644 --- a/Makefile +++ b/Makefile @@ -98,6 +98,9 @@ target/docker-base.gz: target/docker-database.gz: $(call build_docker,$(patsubst target/%.gz,%,$@),$@) +target/docker-bgp.gz: + $(call build_docker,$(patsubst target/%.gz,%,$@),$@) + target/docker-syncd.gz: target/docker-base.gz $(addprefix dockers/docker-syncd/deps/,$(BRCM-SDK-DEBS) libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb syncd_1.0.0_amd64.deb) ## TODO: remove placeholders for the dependencies touch dockers/docker-syncd/deps/{dsserve,bcmcmd} @@ -120,7 +123,7 @@ target/docker-orchagent-mlnx.gz: target/docker-base.gz $(addprefix dockers/docke docker load < $< $(call build_docker,$(patsubst target/%.gz,%,$@),$@) -target/docker-orchagent-cavm.gz: target/docker-base.gz target/docker-database.gz $(addprefix dockers/docker-orchagent-cavm/deps/,libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb orchagent swssconfig portsyncd intfsyncd neighsyncd) +target/docker-orchagent-cavm.gz: target/docker-base.gz target/docker-database.gz target/docker-bgp.gz $(addprefix dockers/docker-orchagent-cavm/deps/,libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb orchagent swssconfig portsyncd intfsyncd neighsyncd) docker load < $< $(call build_docker,$(patsubst target/%.gz,%,$@),$@) From 25343a03190adc20c020301324396034683ec1ae Mon Sep 17 00:00:00 2001 From: Denys Date: Thu, 1 Sep 2016 07:47:39 +0000 Subject: [PATCH 15/33] Revert "Introduced BGP docker target" This reverts commit c41491fc023d87f7deafe272f5239243394f2012. --- Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 87d1edf23c6c..49cff64ffe00 100644 --- a/Makefile +++ b/Makefile @@ -98,9 +98,6 @@ target/docker-base.gz: target/docker-database.gz: $(call build_docker,$(patsubst target/%.gz,%,$@),$@) -target/docker-bgp.gz: - $(call build_docker,$(patsubst target/%.gz,%,$@),$@) - target/docker-syncd.gz: target/docker-base.gz $(addprefix dockers/docker-syncd/deps/,$(BRCM-SDK-DEBS) libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb syncd_1.0.0_amd64.deb) ## TODO: remove placeholders for the dependencies touch dockers/docker-syncd/deps/{dsserve,bcmcmd} @@ -123,7 +120,7 @@ target/docker-orchagent-mlnx.gz: target/docker-base.gz $(addprefix dockers/docke docker load < $< $(call build_docker,$(patsubst target/%.gz,%,$@),$@) -target/docker-orchagent-cavm.gz: target/docker-base.gz target/docker-database.gz target/docker-bgp.gz $(addprefix dockers/docker-orchagent-cavm/deps/,libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb orchagent swssconfig portsyncd intfsyncd neighsyncd) +target/docker-orchagent-cavm.gz: target/docker-base.gz target/docker-database.gz $(addprefix dockers/docker-orchagent-cavm/deps/,libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb orchagent swssconfig portsyncd intfsyncd neighsyncd) docker load < $< $(call build_docker,$(patsubst target/%.gz,%,$@),$@) From cdb4d87951cd0a016ae345a073285fb7f3eb972d Mon Sep 17 00:00:00 2001 From: Denys Date: Thu, 1 Sep 2016 11:16:12 +0000 Subject: [PATCH 16/33] Introduced copp config file --- dockers/docker-orchagent-cavm/Dockerfile | 1 + dockers/docker-orchagent-cavm/copp.json | 9 +++++++++ dockers/docker-orchagent-cavm/start.sh | 1 + dockers/docker-syncd-cavm/start.sh | 2 +- 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 dockers/docker-orchagent-cavm/copp.json diff --git a/dockers/docker-orchagent-cavm/Dockerfile b/dockers/docker-orchagent-cavm/Dockerfile index 581d5405b176..b51eeacb36e9 100755 --- a/dockers/docker-orchagent-cavm/Dockerfile +++ b/dockers/docker-orchagent-cavm/Dockerfile @@ -15,6 +15,7 @@ COPY ["deps/orchagent","deps/swssconfig","deps/portsyncd","deps/intfsyncd","deps COPY start.sh /usr/bin/start.sh COPY port_config_cavm.ini /usr/local/bin/ +COPY copp.json /usr/local/bin/ ## Clean up RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y diff --git a/dockers/docker-orchagent-cavm/copp.json b/dockers/docker-orchagent-cavm/copp.json new file mode 100644 index 000000000000..615edd9ca401 --- /dev/null +++ b/dockers/docker-orchagent-cavm/copp.json @@ -0,0 +1,9 @@ +[ + { + "COPP_TABLE:Group.P1": { + "trap_ids": "stp,arp_req,arp_resp,ttl_error,lacp,lldp,ip2me", + "trap_action": "trap" + }, + "OP": "SET" + } + ] diff --git a/dockers/docker-orchagent-cavm/start.sh b/dockers/docker-orchagent-cavm/start.sh index 62d91f6e84f8..aefbbdcff52b 100755 --- a/dockers/docker-orchagent-cavm/start.sh +++ b/dockers/docker-orchagent-cavm/start.sh @@ -9,6 +9,7 @@ ORCHAGENT_ARGS="-m $MAC_ADDRESS" PORTSYNCD_ARGS="-p /usr/local/bin/port_config_cavm.ini" service rsyslog start +swssconfig /usr/local/bin/copp.json orchagent $ORCHAGENT_ARGS & sleep 5 portsyncd $PORTSYNCD_ARGS & diff --git a/dockers/docker-syncd-cavm/start.sh b/dockers/docker-syncd-cavm/start.sh index 37eabdcd975c..b2fb45651ba7 100755 --- a/dockers/docker-syncd-cavm/start.sh +++ b/dockers/docker-syncd-cavm/start.sh @@ -1,4 +1,4 @@ #!/bin/bash service rsyslog start -syncd -p profile.ini -N +syncd -p /usr/bin/profile.ini -N From f204471dfb684b7f58fb329bc8285988405c29cc Mon Sep 17 00:00:00 2001 From: Denys Date: Thu, 1 Sep 2016 12:02:44 +0000 Subject: [PATCH 17/33] Introduced quagga config files --- dockers/docker-fpm/Dockerfile | 3 +++ dockers/docker-fpm/bgpd.conf | 6 ++++++ dockers/docker-fpm/daemons | 31 +++++++++++++++++++++++++++++++ dockers/docker-fpm/zebra.conf | 4 ++++ 4 files changed, 44 insertions(+) create mode 100644 dockers/docker-fpm/bgpd.conf create mode 100644 dockers/docker-fpm/daemons create mode 100644 dockers/docker-fpm/zebra.conf diff --git a/dockers/docker-fpm/Dockerfile b/dockers/docker-fpm/Dockerfile index d877c408baab..5011c34e8b22 100755 --- a/dockers/docker-fpm/Dockerfile +++ b/dockers/docker-fpm/Dockerfile @@ -12,6 +12,9 @@ COPY deps/fpmsyncd /usr/local/bin/ ## Get Quagga RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/quagga_*.deb +COPY daemons /etc/quagga +COPY zebra.conf /etc/quagga +COPY bgpd.conf /etc/quagga COPY start.sh /usr/bin/start.sh ## Clean up diff --git a/dockers/docker-fpm/bgpd.conf b/dockers/docker-fpm/bgpd.conf new file mode 100644 index 000000000000..3be753dc97d0 --- /dev/null +++ b/dockers/docker-fpm/bgpd.conf @@ -0,0 +1,6 @@ +hostname acs +password zebra +router bgp 100 +neighbor 10.10.0.11 remote-as 200 +network 30.30.0.0/24 +log stdout diff --git a/dockers/docker-fpm/daemons b/dockers/docker-fpm/daemons new file mode 100644 index 000000000000..cb7c2322c9fb --- /dev/null +++ b/dockers/docker-fpm/daemons @@ -0,0 +1,31 @@ +# This file tells the quagga package which daemons to start. +# +# Entries are in the format: =(yes|no|priority) +# 0, "no" = disabled +# 1, "yes" = highest priority +# 2 .. 10 = lower priorities +# Read /usr/share/doc/quagga/README.Debian for details. +# +# Sample configurations for these daemons can be found in +# /usr/share/doc/quagga/examples/. +# +# ATTENTION: +# +# When activation a daemon at the first time, a config file, even if it is +# empty, has to be present *and* be owned by the user and group "quagga", else +# the daemon will not be started by /etc/init.d/quagga. The permissions should +# be u=rw,g=r,o=. +# When using "vtysh" such a config file is also needed. It should be owned by +# group "quaggavty" and set to ug=rw,o= though. Check /etc/pam.d/quagga, too. +# +# The watchquagga daemon is always started. Per default in monitoring-only but +# that can be changed via /etc/quagga/debian.conf. +# +zebra=yes +bgpd=yes +ospfd=no +ospf6d=no +ripd=no +ripngd=no +isisd=no +babeld=no diff --git a/dockers/docker-fpm/zebra.conf b/dockers/docker-fpm/zebra.conf new file mode 100644 index 000000000000..ecc41fe586eb --- /dev/null +++ b/dockers/docker-fpm/zebra.conf @@ -0,0 +1,4 @@ +hostname acs +password zebra +enable password zebra +log stdout From c902f7f13c1752c4542ce6bb4926b49d03f49a3a Mon Sep 17 00:00:00 2001 From: Denys Date: Fri, 2 Sep 2016 13:07:15 +0000 Subject: [PATCH 18/33] Rearranged custom debian packages --- dockers/docker-syncd-cavm/Dockerfile | 11 ++++++----- dockers/docker-syncd-cavm/profile.ini | 2 +- dockers/docker-syncd-cavm/start.sh | 2 ++ src/Makefile | 2 +- src/cavm-sdk/filelist.txt | 4 +++- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/dockers/docker-syncd-cavm/Dockerfile b/dockers/docker-syncd-cavm/Dockerfile index 41c3f05e7531..55c94c70172e 100755 --- a/dockers/docker-syncd-cavm/Dockerfile +++ b/dockers/docker-syncd-cavm/Dockerfile @@ -2,18 +2,19 @@ FROM docker-base RUN apt-get update -COPY ["deps/libhiredis0.13*.deb", "deps/libswsscommon_*.deb", "deps/libsairedis_*.deb", "deps/syncd_*.deb", "deps/sai*.deb", "deps/libsai*.deb", "deps/libaapl*.deb", "/deps/"] +COPY ["deps/libhiredis0.13*.deb", "deps/libswsscommon_*.deb", "deps/libsairedis_*.deb", "deps/syncd_*.deb", "deps/sai*.deb", "deps/libsai*.deb", "deps/xp-tools*.deb", "deps/xpshell*.deb", "/deps/"] RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \ dpkg_apt /deps/libhiredis0.13*.deb \ && dpkg_apt /deps/libswsscommon_*.deb \ - && dpkg_apt /deps/sai*.deb \ - && dpkg_apt /deps/libsai*.deb \ - && dpkg_apt /deps/libaapl*.deb \ + && dpkg_apt /deps/sai*.deb \ + && dpkg_apt /deps/libsai*.deb \ + && dpkg_apt /deps/xp-tools*.deb \ + && dpkg_apt /deps/xpshell*.deb \ && dpkg_apt /deps/libsairedis_*.deb \ && dpkg_apt /deps/syncd_*.deb -RUN apt-get -y install libpcap-dev libxml2-dev python-dev swig libsensors4-dev +RUN apt-get -y install libpcap-dev libxml2-dev python-dev swig libsensors4-dev COPY ["start.sh", "/usr/bin/"] COPY ["profile.ini", "/usr/bin/"] diff --git a/dockers/docker-syncd-cavm/profile.ini b/dockers/docker-syncd-cavm/profile.ini index 471c4395758f..017996f7d7cc 100644 --- a/dockers/docker-syncd-cavm/profile.ini +++ b/dockers/docker-syncd-cavm/profile.ini @@ -1,2 +1,2 @@ -mode=0 +mode=1 hwId=as7512 diff --git a/dockers/docker-syncd-cavm/start.sh b/dockers/docker-syncd-cavm/start.sh index b2fb45651ba7..b743a3c39150 100755 --- a/dockers/docker-syncd-cavm/start.sh +++ b/dockers/docker-syncd-cavm/start.sh @@ -1,4 +1,6 @@ #!/bin/bash +export XP_ROOT=usr/bin/cli/ + service rsyslog start syncd -p /usr/bin/profile.ini -N diff --git a/src/Makefile b/src/Makefile index 29143e4e6748..d310f069d438 100644 --- a/src/Makefile +++ b/src/Makefile @@ -44,7 +44,7 @@ mlnx/syncd_1.0.0_amd64.deb mlnx/libsairedis_1.0.0_amd64.deb mlnx/libsairedis-dev mkdir -p mlnx cp syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb libsairedis-dev_1.0.0_amd64.deb mlnx/ -cavm/syncd_1.0.0_amd64.deb cavm/libsairedis_1.0.0_amd64.deb cavm/libsairedis-dev_1.0.0_amd64.deb: libswsscommon_1.0.0_amd64.deb libswsscommon-dev_1.0.0_amd64.deb cavm-sdk/libsai.deb cavm-sdk/libaapl.deb +cavm/syncd_1.0.0_amd64.deb cavm/libsairedis_1.0.0_amd64.deb cavm/libsairedis-dev_1.0.0_amd64.deb: libswsscommon_1.0.0_amd64.deb libswsscommon-dev_1.0.0_amd64.deb cavm-sdk/libsai.deb cavm-sdk/xp-tools.deb cavm-sdk/xpshell.deb $(foreach dep, $^, $(call install_deb, $(dep))) $(call build_project, sonic-sairedis) mkdir -p cavm diff --git a/src/cavm-sdk/filelist.txt b/src/cavm-sdk/filelist.txt index 29a76c4bab7b..bc40295dfbdc 100644 --- a/src/cavm-sdk/filelist.txt +++ b/src/cavm-sdk/filelist.txt @@ -2,4 +2,6 @@ ## https://github.com/Azure/sonic-buildimage/blob/master/README.md#3-get-vendor-sai-sdk libsai.deb -libaapl.deb +sai.deb +xp-tools.deb +xpshell.deb From 0f950425f7b34e8d2e4d33d4c98654c54045e277 Mon Sep 17 00:00:00 2001 From: Denys Date: Wed, 7 Sep 2016 10:32:01 +0000 Subject: [PATCH 19/33] Modified port config file to support 40G --- .../port_config_cavm.ini | 38 ++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/dockers/docker-orchagent-cavm/port_config_cavm.ini b/dockers/docker-orchagent-cavm/port_config_cavm.ini index 999483eb1653..874a74effba9 100644 --- a/dockers/docker-orchagent-cavm/port_config_cavm.ini +++ b/dockers/docker-orchagent-cavm/port_config_cavm.ini @@ -1,5 +1,33 @@ -# alias lanes -Ethernet0 0 -Ethernet4 4 -Ethernet12 12 -Ethernet36 36 +# alias lanes +Ethernet1 0,1,2,3 +Ethernet2 4,5,6,7 +Ethernet3 8,9,10,11 +Ethernet4 12,13,14,15 +Ethernet5 16,17,18,19 +Ethernet6 20,21,22,23 +Ethernet7 24,25,26,27 +Ethernet8 28,29,30,31 +Ethernet9 32,33,34,35 +Ethernet10 36,37,38,39 +Ethernet11 40,41,42,43 +Ethernet12 44,45,46,47 +Ethernet13 48,49,50,51 +Ethernet14 52,53,54,55 +Ethernet15 56,57,58,59 +Ethernet16 60,61,62,63 +Ethernet17 64,65,66,67 +Ethernet18 68,69,70,71 +Ethernet19 72,73,74,75 +Ethernet20 76,77,78,79 +Ethernet21 80,81,82,83 +Ethernet22 84,85,86,87 +Ethernet23 88,89,90,91 +Ethernet24 92,93,94,95 +Ethernet25 96,97,98,99 +Ethernet26 100,101,102,103 +Ethernet27 104,105,106,107 +Ethernet28 108,109,110,111 +Ethernet29 112,113,114,115 +Ethernet30 116,117,118,119 +Ethernet31 120,121,122,123 +Ethernet32 124,125,126,127 From 4628780d890321a86956738d780d9c1f41e9b301 Mon Sep 17 00:00:00 2001 From: Denys Date: Wed, 7 Sep 2016 14:54:46 +0000 Subject: [PATCH 20/33] Changed XP_ROOT variable for xpShell support --- dockers/docker-syncd-cavm/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/docker-syncd-cavm/start.sh b/dockers/docker-syncd-cavm/start.sh index b743a3c39150..a5cbb904a536 100755 --- a/dockers/docker-syncd-cavm/start.sh +++ b/dockers/docker-syncd-cavm/start.sh @@ -1,6 +1,6 @@ #!/bin/bash -export XP_ROOT=usr/bin/cli/ +export XP_ROOT=usr/bin/ service rsyslog start syncd -p /usr/bin/profile.ini -N From aacc3310cf686b00e50e4260ece3ab20d6a64348 Mon Sep 17 00:00:00 2001 From: Denys Date: Fri, 9 Sep 2016 14:16:16 +0000 Subject: [PATCH 21/33] Modified XP_ROOT var --- dockers/docker-syncd-cavm/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/docker-syncd-cavm/start.sh b/dockers/docker-syncd-cavm/start.sh index a5cbb904a536..b6e5df5f3438 100755 --- a/dockers/docker-syncd-cavm/start.sh +++ b/dockers/docker-syncd-cavm/start.sh @@ -1,6 +1,6 @@ #!/bin/bash -export XP_ROOT=usr/bin/ +export XP_ROOT=/usr/bin/ service rsyslog start syncd -p /usr/bin/profile.ini -N From 2b4447bad0c3401b81ea06c6d46979ad51134fa0 Mon Sep 17 00:00:00 2001 From: Denys Date: Fri, 9 Sep 2016 14:19:14 +0000 Subject: [PATCH 22/33] Changed ports default mode to 100G --- dockers/docker-syncd-cavm/profile.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/docker-syncd-cavm/profile.ini b/dockers/docker-syncd-cavm/profile.ini index 017996f7d7cc..457c339c58ab 100644 --- a/dockers/docker-syncd-cavm/profile.ini +++ b/dockers/docker-syncd-cavm/profile.ini @@ -1,2 +1,2 @@ -mode=1 +mode=3 hwId=as7512 From 1b845947dee74f12ffe39dea8515f9c280362c9f Mon Sep 17 00:00:00 2001 From: Denys Date: Fri, 9 Sep 2016 14:33:37 +0000 Subject: [PATCH 23/33] Modified BGP configuration --- dockers/docker-fpm/bgpd.conf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dockers/docker-fpm/bgpd.conf b/dockers/docker-fpm/bgpd.conf index 3be753dc97d0..d7bb51a0b13e 100644 --- a/dockers/docker-fpm/bgpd.conf +++ b/dockers/docker-fpm/bgpd.conf @@ -1,6 +1,11 @@ hostname acs password zebra router bgp 100 + neighbor 10.10.0.11 remote-as 200 -network 30.30.0.0/24 +network 60.60.60.0/24 + +neighbor 60.60.60.1 remote-as 300 +network 10.10.0.0/24 + log stdout From d755335afdafc57c1b9e9fdbafa84e993d9c0210 Mon Sep 17 00:00:00 2001 From: Denys Haryachyy Date: Wed, 14 Sep 2016 14:52:50 +0300 Subject: [PATCH 24/33] Revert "change linux kernel repository" This reverts commit 9cf983a0aa2d6f4c65657f19c6162aa99d7e76a6. --- .gitmodules | 2 +- src/sonic-linux-kernel | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index e72b798c4f32..88123322f032 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,7 +6,7 @@ url = https://github.com/Azure/sonic-swss-common [submodule "sonic-linux-kernel"] path = src/sonic-linux-kernel - url = https://github.com/rspolyak/sonic-linux-kernel + url = https://github.com/Azure/sonic-linux-kernel [submodule "sonic-sairedis"] path = src/sonic-sairedis url = https://github.com/Azure/sonic-sairedis diff --git a/src/sonic-linux-kernel b/src/sonic-linux-kernel index 6864429bbf22..9794d29a08a4 160000 --- a/src/sonic-linux-kernel +++ b/src/sonic-linux-kernel @@ -1 +1 @@ -Subproject commit 6864429bbf22ed4e963f2ecbd0173879db4b2408 +Subproject commit 9794d29a08a4f81fbcd900e03072561f42b81074 From 2159d36dca5435af729fbcfbb19c7ecbbb302765 Mon Sep 17 00:00:00 2001 From: Denys Haryachyy Date: Wed, 14 Sep 2016 14:53:22 +0300 Subject: [PATCH 25/33] Revert "temporary remove 'git status' check from build_image.sh" This reverts commit 0d206ce16f2fb7df749d0c00089b2fcdcd555c9d. --- build_image.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build_image.sh b/build_image.sh index 110878eecd02..887d63ae049f 100755 --- a/build_image.sh +++ b/build_image.sh @@ -13,10 +13,10 @@ } ## Retrieval short version of Git revision hash for partition metadata -#[ -z "$(git status --untracked-files=no -s)" ] || { -# echo "Error: There is local changes not committed to git repo. Cannot get a revision hash for partition metadata." -# exit 1 -#} +[ -z "$(git status --untracked-files=no -s)" ] || { + echo "Error: There is local changes not committed to git repo. Cannot get a revision hash for partition metadata." + exit 1 +} GIT_REVISION=$(git rev-parse --short HEAD) mkdir -p `dirname $OUTPUT_ONIE_IMAGE` From f14be7e5e4a169d161e5cdf79a38c6e373a5c0b4 Mon Sep 17 00:00:00 2001 From: Denys Haryachyy Date: Wed, 14 Sep 2016 15:25:07 +0300 Subject: [PATCH 26/33] Revert "introduced target for Cavium platform" This reverts commit 3758f4a25ae71026ea390d1ae4c9be2cbf40a1b3. Conflicts: Makefile --- Makefile | 2 +- installer/x86_64/install.sh | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 6dd4dccc56de..dc0c41fb9976 100644 --- a/Makefile +++ b/Makefile @@ -141,4 +141,4 @@ brcm-all: target/acs-generic.bin $(addprefix target/,docker-syncd.gz docker-orch mlnx-all: target/acs-generic.bin $(addprefix target/,docker-syncd-mlnx.gz docker-orchagent-mlnx.gz docker-fpm.gz) ## Note: docker-fpm.gz must be the last to build the implicit dependency fpmsyncd -cavm-all: target/acs-generic.bin $(addprefix target/,docker-syncd-cavm.gz docker-orchagent-cavm.gz docker-fpm.gz) +cavm-all: target/acs-generic.bin $(addprefix target/,docker-syncd-cavm.gz docker-orchagent-cavm.gz docker-fpm.gz) \ No newline at end of file diff --git a/installer/x86_64/install.sh b/installer/x86_64/install.sh index 6db5527933cc..58243be24283 100755 --- a/installer/x86_64/install.sh +++ b/installer/x86_64/install.sh @@ -59,10 +59,6 @@ elif [ "$onie_platform" == "x86_64-mlnx_x86-r5.0.1400" ]; then elif [ "$onie_platform" == "x86_64-dell_s6100_c2538-r0" ]; then CONSOLE_PORT=0x2f8 CONSOLE_DEV=1 -elif [ "$onie_platform" == "x86_64-accton_as7512_32x-r0" ]; then - CONSOLE_PORT=0x2f8 - CONSOLE_DEV=1 - CONSOLE_SPEED=115200 fi # Install demo on same block device as ONIE From 01b2b8abe7bcaa0cc63bae243b96ef3e8428e58a Mon Sep 17 00:00:00 2001 From: Denys Date: Wed, 14 Sep 2016 14:41:32 +0000 Subject: [PATCH 27/33] Makefile: fixed conflicts with master branch Removed Linux target as far as it will be merged later --- Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 54e95cad4623..faf11d358f1b 100644 --- a/Makefile +++ b/Makefile @@ -95,9 +95,6 @@ deps/initramfs-tools_%.deb: src/initramfs-tools/initramfs-tools_%.deb target/docker-base.gz: $(call build_docker,$(patsubst target/%.gz,%,$@),$@) -target/docker-database.gz: - $(call build_docker,$(patsubst target/%.gz,%,$@),$@) - target/docker-syncd.gz: target/docker-base.gz $(addprefix dockers/docker-syncd/deps/,$(BRCM-SDK-DEBS) libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb syncd_1.0.0_amd64.deb) ## TODO: remove placeholders for the dependencies touch dockers/docker-syncd/deps/{dsserve,bcmcmd} @@ -120,7 +117,7 @@ target/docker-orchagent-mlnx.gz: target/docker-base.gz $(addprefix dockers/docke docker load < $< $(call build_docker,$(patsubst target/%.gz,%,$@),$@) -target/docker-orchagent-cavm.gz: target/docker-base.gz target/docker-database.gz $(addprefix dockers/docker-orchagent-cavm/deps/,libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb orchagent swssconfig portsyncd intfsyncd neighsyncd) +target/docker-orchagent-cavm.gz: target/docker-base.gz $(addprefix dockers/docker-orchagent-cavm/deps/,libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb orchagent swssconfig portsyncd intfsyncd neighsyncd) docker load < $< $(call build_docker,$(patsubst target/%.gz,%,$@),$@) @@ -145,4 +142,4 @@ brcm-all: target/sonic-generic.bin $(addprefix target/,docker-syncd.gz docker-or mlnx-all: target/sonic-generic.bin $(addprefix target/,docker-syncd-mlnx.gz docker-orchagent-mlnx.gz docker-fpm.gz docker-database.gz) ## Note: docker-fpm.gz must be the last to build the implicit dependency fpmsyncd -cavm-all: target/acs-generic.bin $(addprefix target/,docker-syncd-cavm.gz docker-orchagent-cavm.gz docker-fpm.gz) \ No newline at end of file +cavm-all: $(addprefix target/,docker-syncd-cavm.gz docker-orchagent-cavm.gz docker-fpm.gz docker-database.gz) From 5c894bd8b09ea04ebf7aa8124c1cb8394b901318 Mon Sep 17 00:00:00 2001 From: Denys Date: Thu, 15 Sep 2016 09:08:19 +0000 Subject: [PATCH 28/33] docker-fpm : Removed Quagga config files --- dockers/docker-fpm/Dockerfile | 3 --- dockers/docker-fpm/bgpd.conf | 11 ----------- dockers/docker-fpm/daemons | 31 ------------------------------- dockers/docker-fpm/zebra.conf | 4 ---- 4 files changed, 49 deletions(-) delete mode 100644 dockers/docker-fpm/bgpd.conf delete mode 100644 dockers/docker-fpm/daemons delete mode 100644 dockers/docker-fpm/zebra.conf diff --git a/dockers/docker-fpm/Dockerfile b/dockers/docker-fpm/Dockerfile index 5011c34e8b22..d877c408baab 100755 --- a/dockers/docker-fpm/Dockerfile +++ b/dockers/docker-fpm/Dockerfile @@ -12,9 +12,6 @@ COPY deps/fpmsyncd /usr/local/bin/ ## Get Quagga RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/quagga_*.deb -COPY daemons /etc/quagga -COPY zebra.conf /etc/quagga -COPY bgpd.conf /etc/quagga COPY start.sh /usr/bin/start.sh ## Clean up diff --git a/dockers/docker-fpm/bgpd.conf b/dockers/docker-fpm/bgpd.conf deleted file mode 100644 index d7bb51a0b13e..000000000000 --- a/dockers/docker-fpm/bgpd.conf +++ /dev/null @@ -1,11 +0,0 @@ -hostname acs -password zebra -router bgp 100 - -neighbor 10.10.0.11 remote-as 200 -network 60.60.60.0/24 - -neighbor 60.60.60.1 remote-as 300 -network 10.10.0.0/24 - -log stdout diff --git a/dockers/docker-fpm/daemons b/dockers/docker-fpm/daemons deleted file mode 100644 index cb7c2322c9fb..000000000000 --- a/dockers/docker-fpm/daemons +++ /dev/null @@ -1,31 +0,0 @@ -# This file tells the quagga package which daemons to start. -# -# Entries are in the format: =(yes|no|priority) -# 0, "no" = disabled -# 1, "yes" = highest priority -# 2 .. 10 = lower priorities -# Read /usr/share/doc/quagga/README.Debian for details. -# -# Sample configurations for these daemons can be found in -# /usr/share/doc/quagga/examples/. -# -# ATTENTION: -# -# When activation a daemon at the first time, a config file, even if it is -# empty, has to be present *and* be owned by the user and group "quagga", else -# the daemon will not be started by /etc/init.d/quagga. The permissions should -# be u=rw,g=r,o=. -# When using "vtysh" such a config file is also needed. It should be owned by -# group "quaggavty" and set to ug=rw,o= though. Check /etc/pam.d/quagga, too. -# -# The watchquagga daemon is always started. Per default in monitoring-only but -# that can be changed via /etc/quagga/debian.conf. -# -zebra=yes -bgpd=yes -ospfd=no -ospf6d=no -ripd=no -ripngd=no -isisd=no -babeld=no diff --git a/dockers/docker-fpm/zebra.conf b/dockers/docker-fpm/zebra.conf deleted file mode 100644 index ecc41fe586eb..000000000000 --- a/dockers/docker-fpm/zebra.conf +++ /dev/null @@ -1,4 +0,0 @@ -hostname acs -password zebra -enable password zebra -log stdout From d3f1ffbc0533cafd28ea3a0376d2ca791d6a112d Mon Sep 17 00:00:00 2001 From: Denys Date: Thu, 15 Sep 2016 09:13:43 +0000 Subject: [PATCH 29/33] docker-syncd-cavm : Use 40G port speed for all ports by default --- dockers/docker-syncd-cavm/profile.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/docker-syncd-cavm/profile.ini b/dockers/docker-syncd-cavm/profile.ini index 457c339c58ab..017996f7d7cc 100644 --- a/dockers/docker-syncd-cavm/profile.ini +++ b/dockers/docker-syncd-cavm/profile.ini @@ -1,2 +1,2 @@ -mode=3 +mode=1 hwId=as7512 From 4d07d62f10b3db38c79705e477b44aeffef9d867 Mon Sep 17 00:00:00 2001 From: Denys Date: Fri, 16 Sep 2016 07:26:31 +0000 Subject: [PATCH 30/33] Moved to 40G speed --- dockers/docker-syncd-cavm/profile.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/docker-syncd-cavm/profile.ini b/dockers/docker-syncd-cavm/profile.ini index 457c339c58ab..017996f7d7cc 100644 --- a/dockers/docker-syncd-cavm/profile.ini +++ b/dockers/docker-syncd-cavm/profile.ini @@ -1,2 +1,2 @@ -mode=3 +mode=1 hwId=as7512 From 8c56068e460b175b1fd25865e243659ce313b61c Mon Sep 17 00:00:00 2001 From: Denys Haryachyy Date: Wed, 21 Sep 2016 23:08:52 +0300 Subject: [PATCH 31/33] orchagent-cavm : Removed custom docker container --- dockers/docker-orchagent-cavm | 1 + dockers/docker-orchagent-cavm/Dockerfile | 25 -------------- dockers/docker-orchagent-cavm/copp.json | 9 ----- .../port_config_cavm.ini | 33 ------------------- dockers/docker-orchagent-cavm/start.sh | 19 ----------- dockers/docker-orchagent/start.sh | 8 +++++ 6 files changed, 9 insertions(+), 86 deletions(-) create mode 120000 dockers/docker-orchagent-cavm delete mode 100755 dockers/docker-orchagent-cavm/Dockerfile delete mode 100644 dockers/docker-orchagent-cavm/copp.json delete mode 100644 dockers/docker-orchagent-cavm/port_config_cavm.ini delete mode 100755 dockers/docker-orchagent-cavm/start.sh diff --git a/dockers/docker-orchagent-cavm b/dockers/docker-orchagent-cavm new file mode 120000 index 000000000000..8d52609c56e5 --- /dev/null +++ b/dockers/docker-orchagent-cavm @@ -0,0 +1 @@ +docker-orchagent \ No newline at end of file diff --git a/dockers/docker-orchagent-cavm/Dockerfile b/dockers/docker-orchagent-cavm/Dockerfile deleted file mode 100755 index b51eeacb36e9..000000000000 --- a/dockers/docker-orchagent-cavm/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM docker-base - -RUN apt-get update - -COPY ["deps/libhiredis0.13*.deb", "deps/libswsscommon_*.deb", "deps/libsairedis_*.deb", "/deps/"] - -RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/libhiredis0.13*.deb -RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/libswsscommon_*.deb -RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/libsairedis_*.deb - -RUN apt-get install -f -y ifupdown bridge-utils - -## Copy executable binaries -COPY ["deps/orchagent","deps/swssconfig","deps/portsyncd","deps/intfsyncd","deps/neighsyncd","/usr/local/bin/"] - -COPY start.sh /usr/bin/start.sh -COPY port_config_cavm.ini /usr/local/bin/ -COPY copp.json /usr/local/bin/ - -## Clean up -RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y -RUN rm -rf /deps - -ENTRYPOINT /usr/bin/start.sh \ - && /bin/bash diff --git a/dockers/docker-orchagent-cavm/copp.json b/dockers/docker-orchagent-cavm/copp.json deleted file mode 100644 index 615edd9ca401..000000000000 --- a/dockers/docker-orchagent-cavm/copp.json +++ /dev/null @@ -1,9 +0,0 @@ -[ - { - "COPP_TABLE:Group.P1": { - "trap_ids": "stp,arp_req,arp_resp,ttl_error,lacp,lldp,ip2me", - "trap_action": "trap" - }, - "OP": "SET" - } - ] diff --git a/dockers/docker-orchagent-cavm/port_config_cavm.ini b/dockers/docker-orchagent-cavm/port_config_cavm.ini deleted file mode 100644 index 874a74effba9..000000000000 --- a/dockers/docker-orchagent-cavm/port_config_cavm.ini +++ /dev/null @@ -1,33 +0,0 @@ -# alias lanes -Ethernet1 0,1,2,3 -Ethernet2 4,5,6,7 -Ethernet3 8,9,10,11 -Ethernet4 12,13,14,15 -Ethernet5 16,17,18,19 -Ethernet6 20,21,22,23 -Ethernet7 24,25,26,27 -Ethernet8 28,29,30,31 -Ethernet9 32,33,34,35 -Ethernet10 36,37,38,39 -Ethernet11 40,41,42,43 -Ethernet12 44,45,46,47 -Ethernet13 48,49,50,51 -Ethernet14 52,53,54,55 -Ethernet15 56,57,58,59 -Ethernet16 60,61,62,63 -Ethernet17 64,65,66,67 -Ethernet18 68,69,70,71 -Ethernet19 72,73,74,75 -Ethernet20 76,77,78,79 -Ethernet21 80,81,82,83 -Ethernet22 84,85,86,87 -Ethernet23 88,89,90,91 -Ethernet24 92,93,94,95 -Ethernet25 96,97,98,99 -Ethernet26 100,101,102,103 -Ethernet27 104,105,106,107 -Ethernet28 108,109,110,111 -Ethernet29 112,113,114,115 -Ethernet30 116,117,118,119 -Ethernet31 120,121,122,123 -Ethernet32 124,125,126,127 diff --git a/dockers/docker-orchagent-cavm/start.sh b/dockers/docker-orchagent-cavm/start.sh deleted file mode 100755 index aefbbdcff52b..000000000000 --- a/dockers/docker-orchagent-cavm/start.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -. /host/machine.conf - -MAC_ADDRESS=`ip link show eth0 | grep ether | awk '{print $2}'` - -ORCHAGENT_ARGS="-m $MAC_ADDRESS" - -PORTSYNCD_ARGS="-p /usr/local/bin/port_config_cavm.ini" - -service rsyslog start -swssconfig /usr/local/bin/copp.json -orchagent $ORCHAGENT_ARGS & -sleep 5 -portsyncd $PORTSYNCD_ARGS & -sleep 5 -intfsyncd & -sleep 5 -neighsyncd & diff --git a/dockers/docker-orchagent/start.sh b/dockers/docker-orchagent/start.sh index 2f29e98abdd1..edeebf692cd8 100755 --- a/dockers/docker-orchagent/start.sh +++ b/dockers/docker-orchagent/start.sh @@ -24,9 +24,17 @@ if [ "$onie_platform" == "x86_64-dell_s6000_s1220-r0" ]; then PORTSYNCD_ARGS+="-p /etc/ssw/ACS-S6000/port_config.ini" elif [ "$onie_platform" == "x86_64-mlnx_x86-r5.0.1400" ]; then PORTSYNCD_ARGS+="-p /etc/ssw/ACS-MSN2700/port_config.ini" +elif [ "$onie_platform" == "x86_64-accton_as7512_32x-r0" ]; then + ORCHAGENT_ARGS+="-m $MAC_ADDRESS" + PORTSYNCD_ARGS+="-p /etc/ssw/AS7512/port_config.ini" fi service rsyslog start + +if [ "$onie_platform" == "x86_64-accton_as7512_32x-r0" ]; then + swssconfig /etc/ssw/AS7512/copp.json +fi + orchagent $ORCHAGENT_ARGS & ORCHAGENT_PID=$! sleep 5 From 6f0dd415a42367007a3b53ad07a1ef91ab175802 Mon Sep 17 00:00:00 2001 From: Denys Haryachyy Date: Wed, 21 Sep 2016 23:14:01 +0300 Subject: [PATCH 32/33] docker-syncd-cavm : Removed profile config file from docker --- dockers/docker-syncd-cavm/Dockerfile | 1 - dockers/docker-syncd-cavm/profile.ini | 2 -- dockers/docker-syncd-cavm/start.sh | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 dockers/docker-syncd-cavm/profile.ini diff --git a/dockers/docker-syncd-cavm/Dockerfile b/dockers/docker-syncd-cavm/Dockerfile index 55c94c70172e..bbb5195901b7 100755 --- a/dockers/docker-syncd-cavm/Dockerfile +++ b/dockers/docker-syncd-cavm/Dockerfile @@ -17,7 +17,6 @@ RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return RUN apt-get -y install libpcap-dev libxml2-dev python-dev swig libsensors4-dev COPY ["start.sh", "/usr/bin/"] -COPY ["profile.ini", "/usr/bin/"] ## Clean up RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y diff --git a/dockers/docker-syncd-cavm/profile.ini b/dockers/docker-syncd-cavm/profile.ini deleted file mode 100644 index 017996f7d7cc..000000000000 --- a/dockers/docker-syncd-cavm/profile.ini +++ /dev/null @@ -1,2 +0,0 @@ -mode=1 -hwId=as7512 diff --git a/dockers/docker-syncd-cavm/start.sh b/dockers/docker-syncd-cavm/start.sh index b6e5df5f3438..04c5a3a1835f 100755 --- a/dockers/docker-syncd-cavm/start.sh +++ b/dockers/docker-syncd-cavm/start.sh @@ -3,4 +3,4 @@ export XP_ROOT=/usr/bin/ service rsyslog start -syncd -p /usr/bin/profile.ini -N +syncd -p /etc/ssw/AS7512/profile.ini -N From 958ce61812fe6a7fc869046f77cecbdff1ab6784 Mon Sep 17 00:00:00 2001 From: Denys Haryachyy Date: Sun, 25 Sep 2016 20:28:22 +0300 Subject: [PATCH 33/33] Makefile : Fixed libsairedis step --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index faf11d358f1b..d66e198ec0e6 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,7 @@ dockers/docker-%-mlnx/deps/libsairedis_1.0.0_amd64.deb: src/mlnx/syncd_1.0.0_amd dockers/docker-%/deps/libsairedis_1.0.0_amd64.deb: src/brcm/syncd_1.0.0_amd64.deb mkdir -p `dirname $@` && cp $< $@ -dockers/docker-%-cavm/deps/libsairedis_1.0.0_amd64.deb: src/cavm/syncd_1.0.0_amd64.deb +dockers/docker-%-cavm/deps/libsairedis_1.0.0_amd64.deb: src/cavm/libsairedis_1.0.0_amd64.deb mkdir -p `dirname $@` && cp $< $@ $(addprefix dockers/docker-syncd-mlnx/deps/,$(MLNX-SDK-DEBS)) : dockers/docker-syncd-mlnx/deps/%.deb : src/mlnx-sdk/%.deb