Support saiserver v2 with python3 and thrift 0.13.0 add variables to support the saiserverv2 build different thrift in saithrift depends on saiserver version build differernt versions of saiserver make the saiserver and saiserver docker with version number test done: build two different versions of sasiserver in local build environment add saiserver to buster Co-authored-by: Yang Wang <yangwang1@microsoft.comwq>
This commit is contained in:
parent
66b865a83d
commit
e8edbc21ca
@ -265,6 +265,7 @@ SONIC_BUILD_INSTRUCTION := make \
|
|||||||
SONIC_ENABLE_PFCWD_ON_START=$(ENABLE_PFCWD_ON_START) \
|
SONIC_ENABLE_PFCWD_ON_START=$(ENABLE_PFCWD_ON_START) \
|
||||||
SONIC_ENABLE_SYNCD_RPC=$(ENABLE_SYNCD_RPC) \
|
SONIC_ENABLE_SYNCD_RPC=$(ENABLE_SYNCD_RPC) \
|
||||||
SONIC_INSTALL_DEBUG_TOOLS=$(INSTALL_DEBUG_TOOLS) \
|
SONIC_INSTALL_DEBUG_TOOLS=$(INSTALL_DEBUG_TOOLS) \
|
||||||
|
SONIC_SAITHRIFT_V2=$(SAITHRIFT_V2) \
|
||||||
MDEBUG=$(MDEBUG) \
|
MDEBUG=$(MDEBUG) \
|
||||||
PASSWORD=$(PASSWORD) \
|
PASSWORD=$(PASSWORD) \
|
||||||
USERNAME=$(USERNAME) \
|
USERNAME=$(USERNAME) \
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
# docker image for brcm saiserver
|
# docker image for brcm saiserver
|
||||||
|
|
||||||
DOCKER_SAISERVER_BRCM = docker-saiserver-brcm.gz
|
DOCKER_SAISERVER_BRCM = docker-saiserver$(SAITHRIFT_VER)-brcm.gz
|
||||||
$(DOCKER_SAISERVER_BRCM)_PATH = $(PLATFORM_PATH)/docker-saiserver-brcm
|
$(DOCKER_SAISERVER_BRCM)_PATH = $(PLATFORM_PATH)/docker-saiserver-brcm
|
||||||
$(DOCKER_SAISERVER_BRCM)_DEPENDS += $(SAISERVER)
|
$(DOCKER_SAISERVER_BRCM)_DEPENDS += $(SAISERVER)
|
||||||
$(DOCKER_SAISERVER_BRCM)_FILES += $(DSSERVE) $(BCMCMD)
|
$(DOCKER_SAISERVER_BRCM)_FILES += $(DSSERVE) $(BCMCMD)
|
||||||
$(DOCKER_SAISERVER_BRCM)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER)
|
$(DOCKER_SAISERVER_BRCM)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER)
|
||||||
SONIC_DOCKER_IMAGES += $(DOCKER_SAISERVER_BRCM)
|
SONIC_DOCKER_IMAGES += $(DOCKER_SAISERVER_BRCM)
|
||||||
|
SONIC_BUSTER_DOCKERS += $(DOCKER_SAISERVER_BRCM)
|
||||||
|
|
||||||
|
#Support two versions of saiserver
|
||||||
|
$(DOCKER_SAISERVER_BRCM)_CONTAINER_NAME = saiserver$(SAITHRIFT_VER)
|
||||||
|
|
||||||
$(DOCKER_SAISERVER_BRCM)_CONTAINER_NAME = saiserver
|
|
||||||
$(DOCKER_SAISERVER_BRCM)_RUN_OPT += --privileged -t
|
$(DOCKER_SAISERVER_BRCM)_RUN_OPT += --privileged -t
|
||||||
$(DOCKER_SAISERVER_BRCM)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
$(DOCKER_SAISERVER_BRCM)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||||
$(DOCKER_SAISERVER_BRCM)_RUN_OPT += -v /var/run/docker-saiserver:/var/run/sswsyncd
|
$(DOCKER_SAISERVER_BRCM)_RUN_OPT += -v /var/run/docker-saiserver:/var/run/sswsyncd
|
||||||
|
@ -2,19 +2,28 @@
|
|||||||
|
|
||||||
SAI_VER = 0.9.4
|
SAI_VER = 0.9.4
|
||||||
|
|
||||||
LIBSAITHRIFT_DEV = libsaithrift-dev_$(SAI_VER)_amd64.deb
|
LIBSAITHRIFT_DEV = libsaithrift$(SAITHRIFT_VER)-dev_$(SAI_VER)_amd64.deb
|
||||||
$(LIBSAITHRIFT_DEV)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI
|
$(LIBSAITHRIFT_DEV)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI
|
||||||
$(LIBSAITHRIFT_DEV)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(PYTHON_THRIFT) $(THRIFT_COMPILER) $(BRCM_SAI) $(BRCM_SAI_DEV)
|
#Support two different versions of thrift
|
||||||
$(LIBSAITHRIFT_DEV)_RDEPENDS += $(LIBTHRIFT) $(BRCM_SAI)
|
ifeq ($(SAITHRIFT_V2),y)
|
||||||
|
$(LIBSAITHRIFT_DEV)_DEPENDS += $(LIBTHRIFT_0_13_0) $(LIBTHRIFT_DEV_0_13_0) $(PYTHON3_THRIFT_0_13_0) $(THRIFT_COMPILER_0_13_0)
|
||||||
|
$(LIBSAITHRIFT_DEV)_RDEPENDS += $(LIBTHRIFT_0_13_0)
|
||||||
|
$(LIBSAITHRIFT_DEV)_BUILD_ENV = SAITHRIFTV2=true SAITHRIFT_VER=v2
|
||||||
|
else
|
||||||
|
$(LIBSAITHRIFT_DEV)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(PYTHON_THRIFT) $(THRIFT_COMPILER)
|
||||||
|
$(LIBSAITHRIFT_DEV)_RDEPENDS += $(LIBTHRIFT)
|
||||||
|
endif
|
||||||
|
$(LIBSAITHRIFT_DEV)_DEPENDS += $(BRCM_SAI) $(BRCM_SAI_DEV)
|
||||||
|
$(LIBSAITHRIFT_DEV)_RDEPENDS += $(BRCM_SAI)
|
||||||
SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV)
|
SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV)
|
||||||
|
|
||||||
PYTHON_SAITHRIFT = python-saithrift_$(SAI_VER)_amd64.deb
|
PYTHON_SAITHRIFT = python-saithrift$(SAITHRIFT_VER)_$(SAI_VER)_amd64.deb
|
||||||
$(eval $(call add_extra_package,$(LIBSAITHRIFT_DEV),$(PYTHON_SAITHRIFT)))
|
$(eval $(call add_extra_package,$(LIBSAITHRIFT_DEV),$(PYTHON_SAITHRIFT)))
|
||||||
|
|
||||||
SAISERVER = saiserver_$(SAI_VER)_amd64.deb
|
SAISERVER = saiserver$(SAITHRIFT_VER)_$(SAI_VER)_amd64.deb
|
||||||
$(SAISERVER)_RDEPENDS += $(LIBTHRIFT) $(BRCM_SAI)
|
$(SAISERVER)_RDEPENDS += $(LIBSAITHRIFT_DEV)
|
||||||
$(eval $(call add_extra_package,$(LIBSAITHRIFT_DEV),$(SAISERVER)))
|
$(eval $(call add_extra_package,$(LIBSAITHRIFT_DEV),$(SAISERVER)))
|
||||||
|
|
||||||
SAISERVER_DBG = saiserver-dbg_$(SAI_VER)_amd64.deb
|
SAISERVER_DBG = saiserver$(SAITHRIFT_VER)-dbg_$(SAI_VER)_amd64.deb
|
||||||
$(SAISERVER_DBG)_RDEPENDS += $(SAISERVER)
|
$(SAISERVER_DBG)_RDEPENDS += $(SAISERVER)
|
||||||
$(eval $(call add_extra_package,$(LIBSAITHRIFT_DEV),$(SAISERVER_DBG)))
|
$(eval $(call add_extra_package,$(LIBSAITHRIFT_DEV),$(SAISERVER_DBG)))
|
||||||
|
6
slave.mk
6
slave.mk
@ -151,6 +151,11 @@ ifeq ($(SONIC_INSTALL_DEBUG_TOOLS),y)
|
|||||||
INSTALL_DEBUG_TOOLS = y
|
INSTALL_DEBUG_TOOLS = y
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(SONIC_SAITHRIFT_V2),y)
|
||||||
|
SAITHRIFT_V2 = y
|
||||||
|
SAITHRIFT_VER = v2
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(SONIC_INCLUDE_SFLOW),y)
|
ifeq ($(SONIC_INCLUDE_SFLOW),y)
|
||||||
INCLUDE_SFLOW = y
|
INCLUDE_SFLOW = y
|
||||||
endif
|
endif
|
||||||
@ -281,6 +286,7 @@ $(info "FRR_USER_UID" : "$(FRR_USER_UID)")
|
|||||||
$(info "FRR_USER_GID" : "$(FRR_USER_GID)")
|
$(info "FRR_USER_GID" : "$(FRR_USER_GID)")
|
||||||
endif
|
endif
|
||||||
$(info "ENABLE_SYNCD_RPC" : "$(ENABLE_SYNCD_RPC)")
|
$(info "ENABLE_SYNCD_RPC" : "$(ENABLE_SYNCD_RPC)")
|
||||||
|
$(info "SAITHRIFT_V2" : "$(SAITHRIFT_V2)")
|
||||||
$(info "ENABLE_ORGANIZATION_EXTENSIONS" : "$(ENABLE_ORGANIZATION_EXTENSIONS)")
|
$(info "ENABLE_ORGANIZATION_EXTENSIONS" : "$(ENABLE_ORGANIZATION_EXTENSIONS)")
|
||||||
$(info "HTTP_PROXY" : "$(HTTP_PROXY)")
|
$(info "HTTP_PROXY" : "$(HTTP_PROXY)")
|
||||||
$(info "HTTPS_PROXY" : "$(HTTPS_PROXY)")
|
$(info "HTTPS_PROXY" : "$(HTTPS_PROXY)")
|
||||||
|
@ -110,6 +110,13 @@ RUN apt-get update && apt-get install -y \
|
|||||||
libxml-simple-perl \
|
libxml-simple-perl \
|
||||||
graphviz \
|
graphviz \
|
||||||
aspell \
|
aspell \
|
||||||
|
# For SAI meta rpc build - make rpc
|
||||||
|
libgetopt-long-descriptive-perl \
|
||||||
|
libconst-fast-perl \
|
||||||
|
libtemplate-perl \
|
||||||
|
libnamespace-autoclean-perl \
|
||||||
|
libmoose-perl \
|
||||||
|
libmoosex-aliases-perl \
|
||||||
# For linux build
|
# For linux build
|
||||||
bc \
|
bc \
|
||||||
fakeroot \
|
fakeroot \
|
||||||
|
Loading…
Reference in New Issue
Block a user