Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nephos] support SAI 1.5.0 and fix docker syncd related makefile error #3684

Merged
merged 2 commits into from
Oct 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion platform/nephos/docker-syncd-nephos-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ $(DOCKER_SYNCD_NEPHOS_RPC)_DEPENDS += $(SYNCD_RPC_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_NEPHOS_RPC)_FILES += $(DSSERVE) $(NPX_DIAG)
$(DOCKER_SYNCD_NEPHOS_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_NEPHOS)
$(DOCKER_SYNCD_NEPHOS_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_BASE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_NEPHOS_RPC)
SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_NEPHOS_RPC)
ifeq ($(ENABLE_SYNCD_RPC),y)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_NEPHOS_RPC)
endif

$(DOCKER_SYNCD_NEPHOS_RPC)_CONTAINER_NAME = syncd
$(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += --net=host --privileged -t
$(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
$(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += -v /host/warmboot:/var/warmboot
$(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd
$(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
7 changes: 6 additions & 1 deletion platform/nephos/docker-syncd-nephos.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
DOCKER_SYNCD_PLATFORM_CODE = nephos
include $(PLATFORM_PATH)/../template/docker-syncd-base.mk

$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD) $(PYTHON_SDK_API)
$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD)
$(DOCKER_SYNCD_BASE)_FILES += $(DSSERVE) $(NPX_DIAG)

$(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)

$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot
$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd

$(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += npx_diag:/usr/bin/npx_diag

4 changes: 3 additions & 1 deletion platform/nephos/docker-syncd-nephos/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ debs/{{ deb }}{{' '}}
##debs/{{ deb }}{{' '}}
##{%- endfor %}

COPY ["start.sh", "/usr/bin/"]
COPY ["files/dsserve", "files/npx_diag", "start.sh", "/usr/bin/"]
RUN chmod +x /usr/bin/npx_diag /usr/bin/dsserve

COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]

## Clean up
Expand Down
16 changes: 16 additions & 0 deletions platform/nephos/nephos-modules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,25 @@

VERSION = 1.0.0

ifneq ($(NEPHOS_SAI_DEB_LOCAL_URL), )
SDK_FROM_LOCAL = y
else
SDK_FROM_LOCAL = n
endif

SDK_VERSION = 3.0.0
LINUX_VER = 4.9.0-9-2
SDK_COMMIT_ID = 529202

ifeq ($(SAI_FROM_LOCAL), y)
NEPHOS_MODULE = nps-modules-$(LINUX_VER)_$(SDK_VERSION)_$(SDK_COMMIT_ID)_amd64.deb
$(NEPHOS_MODULE)_PATH = $(NEPHOS_SAI_DEB_LOCAL_URL)
SONIC_COPY_DEBS += $(NEPHOS_MODULE)
else
NEPHOS_MODULE = nephos-modules_$(VERSION)_amd64.deb
$(NEPHOS_MODULE)_SRC_PATH = $(PLATFORM_PATH)/nephos-modules
$(NEPHOS_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
SONIC_DPKG_DEBS += $(NEPHOS_MODULE)
endif

SONIC_STRETCH_DEBS += $(NEPHOS_MODULE)
3 changes: 2 additions & 1 deletion platform/nephos/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ $(NPX_DIAG)_URL = "https://github.com/NephosInc/SONiC/raw/master/sdk/npx_diag"

WARM_VERIFIER = warm-verifier
$(WARM_VERIFIER)_URL = "https://github.com/NephosInc/SONiC/raw/master/sai/warm-verifier"

DSSERVE = dsserve
$(DSSERVE)_URL = "https://sonicstorage.blob.core.windows.net/packages/20170518/dsserve?sv=2015-04-05&sr=b&sig=gyNbgSL%2FvpMXDdpboVkIJcTKMRdGgEaOR9OukHhEsu8%3D&se=2030-03-31T23%3A06%3A35Z&sp=r"
$(DSSERVE)_URL = "https://sonicstorage.blob.core.windows.net/packages/20190307/dsserve?sv=2015-04-05&sr=b&sig=lk7BH3DtW%2F5ehc0Rkqfga%2BUCABI0UzQmDamBsZH9K6w%3D&se=2038-05-06T22%3A34%3A45Z&sp=r"

SONIC_ONLINE_FILES += $(NPX_DIAG) $(WARM_VERIFIER) $(DSSERVE)

Expand Down
29 changes: 26 additions & 3 deletions platform/nephos/sai.mk
Original file line number Diff line number Diff line change
@@ -1,12 +1,35 @@
SDK_VERSION = 2.0.8
SAI_VERSION = 1.4.1
SAI_COMMIT_ID = cbb99f
SDK_VERSION = 3.0.0
SAI_VERSION = 1.5.0
SAI_COMMIT_ID = 426624

# Place here URL where SAI deb exist
NEPHOS_SAI_DEB_LOCAL_URL =
export NEPHOS_SAI_DEB_LOCAL_URL
#
ifneq ($(NEPHOS_SAI_DEB_LOCAL_URL), )
SAI_FROM_LOCAL = y
else
SAI_FROM_LOCAL = n
endif

NEPHOS_SAI = libsainps_$(SDK_VERSION)_sai_$(SAI_VERSION)_$(SAI_COMMIT_ID)_amd64.deb
ifeq ($(SAI_FROM_LOCAL), y)
$(NEPHOS_SAI)_PATH = $(NEPHOS_SAI_DEB_LOCAL_URL)
else
$(NEPHOS_SAI)_URL = "https://github.com/NephosInc/SONiC/raw/master/sai/libsainps_$(SDK_VERSION)_sai_$(SAI_VERSION)_$(SAI_COMMIT_ID)_amd64.deb"
endif

NEPHOS_SAI_DEV = libsainps-dev_$(SDK_VERSION)_sai_$(SAI_VERSION)_$(SAI_COMMIT_ID)_amd64.deb
$(eval $(call add_derived_package,$(NEPHOS_SAI),$(NEPHOS_SAI_DEV)))
ifeq ($(SAI_FROM_LOCAL), y)
$(NEPHOS_SAI_DEV)_PATH = $(NEPHOS_SAI_DEB_LOCAL_URL)
else
$(NEPHOS_SAI_DEV)_URL = "https://github.com/NephosInc/SONiC/raw/master/sai/libsainps-dev_$(SDK_VERSION)_sai_$(SAI_VERSION)_$(SAI_COMMIT_ID)_amd64.deb"
endif

ifeq ($(SAI_FROM_LOCAL), y)
SONIC_COPY_DEBS += $(NEPHOS_SAI) $(NEPHOS_SAI_DEV)
else
SONIC_ONLINE_DEBS += $(NEPHOS_SAI) $(NEPHOS_SAI_DEV)
endif
$(NEPHOS_SAI_DEV)_DEPENDS += $(NEPHOS_SAI)