-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[saiserver]: add saiserver for broadcom, mellanox, cavium
- Loading branch information
Showing
28 changed files
with
178 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# docker image for brcm saiserver | ||
|
||
DOCKER_SAISERVER_BRCM = docker-saiserver-brcm.gz | ||
$(DOCKER_SAISERVER_BRCM)_PATH = $(PLATFORM_PATH)/docker-saiserver-brcm | ||
$(DOCKER_SAISERVER_BRCM)_FILES += $(SAISERVER) $(DSSERVE) $(BCMCMD) | ||
$(DOCKER_SAISERVER_BRCM)_LOAD_DOCKERS += $(DOCKER_BASE) | ||
SONIC_DOCKER_IMAGES += $(DOCKER_SAISERVER_BRCM) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
FROM docker-base | ||
|
||
## Make apt-get non-interactive | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update | ||
|
||
{% if docker_saiserver_brcm_debs.strip() -%} | ||
COPY \ | ||
{% for deb in docker_saiserver_brcm_debs.split(' ') -%} | ||
debs/{{ deb }}{{' '}} | ||
{%- endfor -%} | ||
debs/ | ||
|
||
RUN dpkg -i \ | ||
{% for deb in docker_saiserver_brcm_debs.split(' ') -%} | ||
debs/{{ deb }}{{' '}} | ||
{%- endfor %} || apt-get -y install -f | ||
{% endif %} | ||
|
||
## TODO: add kmod into Depends | ||
RUN apt-get install -f kmod | ||
|
||
COPY ["debs/saiserver", "debs/dsserve", "debs/bcmcmd", "start.sh", "/usr/bin/"] | ||
RUN chmod +x /usr/bin/dsserve /usr/bin/bcmcmd | ||
|
||
COPY ["profile.ini", "portmap.ini", "/etc/sai/"] | ||
|
||
## Clean up | ||
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y | ||
RUN rm -rf /debs | ||
|
||
ENTRYPOINT ["/bin/bash"] | ||
CMD ["/usr/bin/start.sh"] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# docker image for cavm saiserver | ||
|
||
DOCKER_SAISERVER_CAVM = docker-saiserver-cavm.gz | ||
$(DOCKER_SAISERVER_CAVM)_PATH = $(PLATFORM_PATH)/docker-saiserver-cavm | ||
$(DOCKER_SAISERVER_CAVM)_FILES += $(SAISERVER) | ||
$(DOCKER_SAISERVER_CAVM)_LOAD_DOCKERS += $(DOCKER_BASE) | ||
SONIC_DOCKER_IMAGES += $(DOCKER_SAISERVER_CAVM) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM docker-base | ||
|
||
## Make apt-get non-interactive | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y libsensors4-dev | ||
|
||
{% if docker_saiserver_cavm_debs.strip() -%} | ||
COPY \ | ||
{% for deb in docker_saiserver_cavm_debs.split(' ') -%} | ||
debs/{{ deb }}{{' '}} | ||
{%- endfor -%} | ||
debs/ | ||
|
||
RUN dpkg -i \ | ||
{% for deb in docker_saiserver_cavm_debs.split(' ') -%} | ||
debs/{{ deb }}{{' '}} | ||
{%- endfor %} || apt-get -y install -f | ||
{% endif %} | ||
|
||
## TODO: add kmod into Depends | ||
RUN apt-get install -f kmod | ||
|
||
COPY ["debs/saiserver", "start.sh", "/usr/bin/"] | ||
RUN chmod +x /usr/bin/saiserver | ||
|
||
COPY ["profile.ini", "portmap.ini", "/etc/sai/"] | ||
|
||
## Clean up | ||
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y | ||
RUN rm -rf /debs | ||
|
||
ENTRYPOINT ["/bin/bash"] | ||
CMD ["/usr/bin/start.sh"] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
include $(PLATFORM_PATH)/cavm-sai.mk | ||
include $(PLATFORM_PATH)/docker-syncd-cavm.mk | ||
include $(PLATFORM_PATH)/docker-orchagent-cavm.mk | ||
include $(PLATFORM_PATH)/docker-saiserver-cavm.mk | ||
include $(PLATFORM_PATH)/cavm_platform_modules.mk | ||
include $(PLATFORM_PATH)/one-image.mk | ||
|
||
SONIC_ALL += $(SONIC_ONE_IMAGE) \ | ||
$(DOCKER_FPM_GOBGP) | ||
$(DOCKER_FPM_GOBGP) \ | ||
$(DOCKER_SAISERVER_CAVM) | ||
|
||
# Inject cavium sai into sairedis | ||
$(LIBSAIREDIS)_DEPENDS += $(CAVM_SAI) $(CAVM_LIBSAI) | ||
$(SAISERVER)_DEPENDS += $(CAVM_SAI) $(CAVM_LIBSAI) | ||
|
||
# Runtime dependency on cavium sai is set only for syncd | ||
$(SYNCD)_RDEPENDS += $(CAVM_SAI) | ||
$(SAISERVER)_RDEPENDS += $(CAVM_SAI) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# docker image for mlnx saiserver | ||
|
||
DOCKER_SAISERVER_MLNX = docker-saiserver-mlnx.gz | ||
$(DOCKER_SAISERVER_MLNX)_PATH = $(PLATFORM_PATH)/docker-saiserver-mlnx | ||
$(DOCKER_SAISERVER_MLNX)_FILES += $(SAISERVER) | ||
$(DOCKER_SAISERVER_MLNX)_LOAD_DOCKERS += $(DOCKER_BASE) | ||
SONIC_DOCKER_IMAGES += $(DOCKER_SAISERVER_MLNX) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM docker-base | ||
|
||
## Make apt-get non-interactive | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update | ||
|
||
{% if docker_saiserver_mlnx_debs.strip() -%} | ||
COPY \ | ||
{% for deb in docker_saiserver_mlnx_debs.split(' ') -%} | ||
debs/{{ deb }}{{' '}} | ||
{%- endfor -%} | ||
debs/ | ||
|
||
RUN dpkg -i \ | ||
{% for deb in docker_saiserver_mlnx_debs.split(' ') -%} | ||
debs/{{ deb }}{{' '}} | ||
{%- endfor %} || apt-get -y install -f | ||
{% endif %} | ||
|
||
## TODO: add kmod into Depends | ||
RUN apt-get install -f kmod | ||
|
||
COPY ["debs/saiserver", "start.sh", "/usr/bin/"] | ||
RUN chmod +x /usr/bin/saiserver | ||
|
||
COPY ["profile.ini", "portmap.ini", "/etc/sai/"] | ||
|
||
COPY ["sai_2700.xml", "/usr/share/"] | ||
|
||
## Clean up | ||
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y | ||
RUN rm -rf /debs | ||
|
||
ENTRYPOINT ["/bin/bash"] | ||
CMD ["/usr/bin/start.sh"] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# saiserver | ||
|
||
SAISERVER = saiserver | ||
$(SAISERVER)_DEPENDS += $(THRIFT_COMPILER) $(LIBTHRIFT_DEV) | ||
$(SAISERVER)_RDEPENDS += $(LIBTHRIFT) | ||
$(SAISERVER)_SRC_PATH = $(SRC_PATH)/saiserver | ||
SONIC_MAKE_DEBS += $(SAISERVER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.ONESHELL: | ||
SHELL = /bin/bash | ||
.SHELLFLAGS += -e | ||
|
||
MAIN_TARGET = saiserver | ||
|
||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : | ||
|
||
rm -rf SAI | ||
git clone https://github.com/opencomputeproject/SAI | ||
pushd SAI | ||
git checkout origin/v0.9.4 -b v0.9.4 | ||
|
||
# Build the package | ||
pushd test/saithrift | ||
|
||
make | ||
|
||
popd | ||
popd | ||
|
||
mv ./SAI/test/saithrift/$* $(DEST)/ |