[docker-orchagent]: make build depends only on sairedis package (#4880)

make swss build depends only on libsairedis instead of syncd. This allows to build swss without depending
on vendor sai library.

Currently, libsairedis build also buils syncd which requires vendor SAI lib. This makes difficult to build
swss docker in buster while still keeping syncd docker in stretch, as swss requires libsairedis which also
build syncd and requires vendor to provide SAI for buster. As swss docker does not really contain syncd
binary, so it is not necessary to build syncd for swss docker.

* [submodule]: update sonic-sairedis

* ccbb3bc 2020-06-28 | add option to build without syncd (HEAD, origin/master, origin/HEAD) [Guohan Lu]
* 4247481 2020-06-28 | install saidiscovery into syncd package [Guohan Lu]
* 61b8e8e 2020-06-26 | Revert "sonic-sairedis: Add support to sonic-sairedis for gearbox phys (#624)" (#630) [Danny Allen]
* 85e543c 2020-06-26 | add a README to tests directory to describe how to run 'make check' (#629) [Syd Logan]
* 2772f15 2020-06-26 | sonic-sairedis: Add support to sonic-sairedis for gearbox phys (#624) [Syd Logan]

Signed-off-by: Guohan Lu <lguohan@gmail.com>
This commit is contained in:
lguohan 2020-07-02 22:03:50 -07:00 committed by GitHub
parent 5f31842616
commit c4b5b002c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 128 additions and 74 deletions

View File

@ -6,3 +6,4 @@ $(BFN_SAI)_RDEPENDS += $(LIBNL_GENL3)
SONIC_ONLINE_DEBS += $(BFN_SAI) SONIC_ONLINE_DEBS += $(BFN_SAI)
$(BFN_SAI_DEV)_DEPENDS += $(BFN_SAI) $(BFN_SAI_DEV)_DEPENDS += $(BFN_SAI)
$(BFN_SAI_DEV)_CONFLICTS += $(LIBSAIVS_DEV)

View File

@ -19,12 +19,12 @@ include $(PLATFORM_PATH)/bfn-modules.mk
SONIC_ALL += $(SONIC_ONE_IMAGE) $(SONIC_ONE_ABOOT) \ SONIC_ALL += $(SONIC_ONE_IMAGE) $(SONIC_ONE_ABOOT) \
$(DOCKER_FPM) $(DOCKER_FPM)
# Inject sai into sairedis # Inject sai into syncd
#$(LIBSAIREDIS)_DEPENDS += $(BFN_SAI) $(WNC_OSW1800_PLATFORM) $(BFN_INGRASYS_PLATFORM) $(BFN_PLATFORM) #$(SYNCD)_DEPENDS += $(BFN_SAI) $(WNC_OSW1800_PLATFORM) $(BFN_INGRASYS_PLATFORM) $(BFN_PLATFORM)
$(LIBSAIREDIS)_DEPENDS += $(BFN_SAI) $(BFN_INGRASYS_PLATFORM) $(BFN_PLATFORM) $(SYNCD)_DEPENDS += $(BFN_SAI) $(BFN_INGRASYS_PLATFORM) $(BFN_PLATFORM)
ifeq ($(ENABLE_SYNCD_RPC),y) ifeq ($(ENABLE_SYNCD_RPC),y)
$(LIBSAIREDIS)_DEPENDS += $(LIBSAITHRIFT_DEV) $(SYNCD)_DEPENDS += $(LIBSAITHRIFT_DEV)
endif endif
# Runtime dependency on sai is set only for syncd # Runtime dependency on sai is set only for syncd

View File

@ -32,10 +32,10 @@ SONIC_ONLINE_FILES += $(BCMCMD) $(DSSERVE)
SONIC_ALL += $(SONIC_ONE_IMAGE) $(SONIC_ONE_ABOOT_IMAGE) \ SONIC_ALL += $(SONIC_ONE_IMAGE) $(SONIC_ONE_ABOOT_IMAGE) \
$(DOCKER_FPM) $(DOCKER_FPM)
# Inject brcm sai into sairedis # Inject brcm sai into syncd
$(LIBSAIREDIS)_DEPENDS += $(BRCM_SAI) $(BRCM_SAI_DEV) $(SYNCD)_DEPENDS += $(BRCM_SAI) $(BRCM_SAI_DEV)
ifeq ($(ENABLE_SYNCD_RPC),y) ifeq ($(ENABLE_SYNCD_RPC),y)
$(LIBSAIREDIS)_DEPENDS += $(LIBSAITHRIFT_DEV) $(SYNCD)_DEPENDS += $(LIBSAITHRIFT_DEV)
endif endif
# Runtime dependency on brcm sai is set only for syncd # Runtime dependency on brcm sai is set only for syncd

View File

@ -6,3 +6,4 @@ $(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsa
SONIC_ONLINE_DEBS += $(BRCM_SAI) SONIC_ONLINE_DEBS += $(BRCM_SAI)
$(BRCM_SAI_DEV)_DEPENDS += $(BRCM_SAI) $(BRCM_SAI_DEV)_DEPENDS += $(BRCM_SAI)
$(BRCM_SAI_DEV)_CONFLICTS += $(LIBSAIVS_DEV)

View File

@ -12,10 +12,10 @@ SONIC_ALL += $(SONIC_ONE_IMAGE) \
$(DOCKER_PTF_CAVM) \ $(DOCKER_PTF_CAVM) \
$(DOCKER_SYNCD_CAVM_RPC) $(DOCKER_SYNCD_CAVM_RPC)
# Inject cavium sai into sairedis # Inject cavium sai into syncd
$(LIBSAIREDIS)_DEPENDS += $(CAVM_SAI) $(CAVM_LIBSAI) $(SYNCD)_DEPENDS += $(CAVM_SAI) $(CAVM_LIBSAI)
ifeq ($(ENABLE_SYNCD_RPC),y) ifeq ($(ENABLE_SYNCD_RPC),y)
$(LIBSAIREDIS)_DEPENDS += $(LIBSAITHRIFT_DEV_CAVM) $(SYNCD)_DEPENDS += $(LIBSAITHRIFT_DEV_CAVM)
endif endif
# Runtime dependency on cavium sai is set only for syncd # Runtime dependency on cavium sai is set only for syncd

View File

@ -9,10 +9,10 @@ include $(PLATFORM_PATH)/docker-ptf-centec.mk
SONIC_ALL += $(SONIC_ONE_IMAGE) SONIC_ALL += $(SONIC_ONE_IMAGE)
# Inject centec sai into sairedis # Inject centec sai into syncd
$(LIBSAIREDIS)_DEPENDS += $(CENTEC_SAI) $(SYNCD)_DEPENDS += $(CENTEC_SAI)
ifeq ($(ENABLE_SYNCD_RPC),y) ifeq ($(ENABLE_SYNCD_RPC),y)
$(LIBSAIREDIS)_DEPENDS += $(LIBSAITHRIFT_DEV) $(SYNCD)_DEPENDS += $(LIBSAITHRIFT_DEV)
endif endif
# Runtime dependency on centec sai is set only for syncd # Runtime dependency on centec sai is set only for syncd

View File

@ -1,5 +1,6 @@
# Centec SAI # Centec SAI
CENTEC_SAI = libsai_1.6.1_amd64.deb CENTEC_SAI = libsai_1.6.1_amd64.deb
$(CENTEC_SAI)_URL = https://github.com/CentecNetworks/sonic-binaries/raw/master/amd64/libsai_1.6.1-1.0_amd64.deb $(CENTEC_SAI)_URL = https://github.com/CentecNetworks/sonic-binaries/raw/master/amd64/libsai_1.6.1-1.0_amd64.deb
$(CENTEC_SAI)_CONFLICTS += $(LIBSAIVS_DEV)
SONIC_ONLINE_DEBS += $(CENTEC_SAI) SONIC_ONLINE_DEBS += $(CENTEC_SAI)

View File

@ -10,4 +10,6 @@ $(INVM_LIBSAI)_URL = $(INVM_SAI_ONLINE)/$(INVM_LIBSAI)
$(INVM_HSAI)_URL = $(INVM_SAI_ONLINE)/$(INVM_HSAI) $(INVM_HSAI)_URL = $(INVM_SAI_ONLINE)/$(INVM_HSAI)
$(INVM_DRV)_URL = $(INVM_SAI_ONLINE)/$(INVM_DRV) $(INVM_DRV)_URL = $(INVM_SAI_ONLINE)/$(INVM_DRV)
$(INVM_HSAI)_CONFLICTS += $(LIBSAIVS_DEV)
SONIC_ONLINE_DEBS += $(INVM_LIBSAI) $(INVM_HSAI) $(INVM_DRV) SONIC_ONLINE_DEBS += $(INVM_LIBSAI) $(INVM_HSAI) $(INVM_DRV)

View File

@ -13,8 +13,8 @@ SONIC_ALL += $(SONIC_INVM_ONE_IMAGE) \
$(DOCKER_PTF_INVM) \ $(DOCKER_PTF_INVM) \
$(DOCKER_SYNCD_INVM_RPC) $(DOCKER_SYNCD_INVM_RPC)
# Inject invm sai into sairedis # Inject invm sai into syncd
$(LIBSAIREDIS)_DEPENDS += $(INVM_HSAI) $(INVM_LIBSAI) $(LIBSAITHRIFT_DEV_INVM) $(SYNCD)_DEPENDS += $(INVM_HSAI) $(INVM_LIBSAI) $(LIBSAITHRIFT_DEV_INVM)
# Runtime dependency on invm sai is set only for syncd # Runtime dependency on invm sai is set only for syncd
$(SYNCD)_RDEPENDS += $(INVM_HSAI) $(SYNCD)_RDEPENDS += $(INVM_HSAI)

View File

@ -15,10 +15,10 @@ SONIC_ALL += $(SONIC_ONE_IMAGE) \
$(DOCKER_PTF_MRVL) \ $(DOCKER_PTF_MRVL) \
$(DOCKER_SYNCD_MRVL_RPC) $(DOCKER_SYNCD_MRVL_RPC)
# Inject mrvl sai into sairedis # Inject mrvl sai into syncd
$(LIBSAIREDIS)_DEPENDS += $(MRVL_SAI) $(SYNCD)_DEPENDS += $(MRVL_SAI)
ifeq ($(ENABLE_SYNCD_RPC),y) ifeq ($(ENABLE_SYNCD_RPC),y)
$(LIBSAIREDIS)_DEPENDS += $(LIBSAITHRIFT_DEV) $(SYNCD)_DEPENDS += $(LIBSAITHRIFT_DEV)
endif endif
# Runtime dependency on mrvl sai is set only for syncd # Runtime dependency on mrvl sai is set only for syncd

View File

@ -4,4 +4,5 @@ export MRVL_SAI_VERSION = 1.5.1
export MRVL_SAI = mrvllibsai_$(PLATFORM_ARCH)_$(MRVL_SAI_VERSION).deb export MRVL_SAI = mrvllibsai_$(PLATFORM_ARCH)_$(MRVL_SAI_VERSION).deb
$(MRVL_SAI)_SRC_PATH = $(PLATFORM_PATH)/sai $(MRVL_SAI)_SRC_PATH = $(PLATFORM_PATH)/sai
$(MRVL_SAI)_CONFLICTS = $(LIBSAIVS_DEV)
SONIC_MAKE_DEBS += $(MRVL_SAI) SONIC_MAKE_DEBS += $(MRVL_SAI)

View File

@ -16,10 +16,10 @@ SONIC_ALL += $(SONIC_ONE_IMAGE) \
$(DOCKER_FPM) $(DOCKER_FPM)
#$(DOCKER_SYNCD_MRVL_RPC) #$(DOCKER_SYNCD_MRVL_RPC)
# Inject mrvl sai into sairedis # Inject mrvl sai into syncd
$(LIBSAIREDIS)_DEPENDS += $(MRVL_SAI) $(SYNCD)_DEPENDS += $(MRVL_SAI)
ifeq ($(ENABLE_SYNCD_RPC),y) ifeq ($(ENABLE_SYNCD_RPC),y)
$(LIBSAIREDIS)_DEPENDS += $(LIBSAITHRIFT_DEV) $(SYNCD)_DEPENDS += $(LIBSAITHRIFT_DEV)
endif endif
# Runtime dependency on mrvl sai is set only for syncd # Runtime dependency on mrvl sai is set only for syncd

View File

@ -4,4 +4,5 @@ export MRVL_SAI_VERSION = 1.5.1
export MRVL_SAI = mrvllibsai_$(PLATFORM_ARCH)_$(MRVL_SAI_VERSION).deb export MRVL_SAI = mrvllibsai_$(PLATFORM_ARCH)_$(MRVL_SAI_VERSION).deb
$(MRVL_SAI)_SRC_PATH = $(PLATFORM_PATH)/sai $(MRVL_SAI)_SRC_PATH = $(PLATFORM_PATH)/sai
$(MRVL_SAI)_CONFLICTS = $(LIBSAIVS_DEV)
SONIC_MAKE_DEBS += $(MRVL_SAI) SONIC_MAKE_DEBS += $(MRVL_SAI)

View File

@ -8,10 +8,10 @@ SONIC_ALL += $(SONIC_ONE_IMAGE) \
$(DOCKER_FPM) \ $(DOCKER_FPM) \
$(DOCKER_SYNCD_MRVL_RPC) $(DOCKER_SYNCD_MRVL_RPC)
# Inject mrvl sai into sairedis # Inject mrvl sai into syncd
$(LIBSAIREDIS)_DEPENDS += $(MRVL_FPA) $(MRVL_SAI) $(SYNCD)_DEPENDS += $(MRVL_FPA) $(MRVL_SAI)
ifeq ($(ENABLE_SYNCD_RPC),y) ifeq ($(ENABLE_SYNCD_RPC),y)
$(LIBSAIREDIS)_DEPENDS += $(LIBSAITHRIFT_DEV) $(SYNCD)_DEPENDS += $(LIBSAITHRIFT_DEV)
endif endif
# Runtime dependency on mrvl sai is set only for syncd # Runtime dependency on mrvl sai is set only for syncd

View File

@ -4,4 +4,6 @@ export MRVL_SAI_VERSION = 1.5.1
export MRVL_SAI = mrvllibsai_amd64_$(MRVL_SAI_VERSION).deb export MRVL_SAI = mrvllibsai_amd64_$(MRVL_SAI_VERSION).deb
$(MRVL_SAI)_SRC_PATH = $(PLATFORM_PATH)/sai $(MRVL_SAI)_SRC_PATH = $(PLATFORM_PATH)/sai
$(MRVL_SAI)_CONFLICTS = $(LIBSAIVS_DEV)
SONIC_MAKE_DEBS += $(MRVL_SAI) SONIC_MAKE_DEBS += $(MRVL_SAI)

View File

@ -8,6 +8,7 @@ MLNX_SAI = mlnx-sai_1.mlnx.$(MLNX_SAI_VERSION)_amd64.deb
$(MLNX_SAI)_SRC_PATH = $(PLATFORM_PATH)/mlnx-sai $(MLNX_SAI)_SRC_PATH = $(PLATFORM_PATH)/mlnx-sai
$(MLNX_SAI)_DEPENDS += $(MLNX_SDK_DEBS) $(MLNX_SAI)_DEPENDS += $(MLNX_SDK_DEBS)
$(MLNX_SAI)_RDEPENDS += $(MLNX_SDK_RDEBS) $(MLNX_SDK_DEBS) $(MLNX_SAI)_RDEPENDS += $(MLNX_SDK_RDEBS) $(MLNX_SDK_DEBS)
$(MLNX_SAI)_CONFLICTS += $(LIBSAIVS_DEV)
MLNX_SAI_DBGSYM = mlnx-sai-dbgsym_1.mlnx.$(MLNX_SAI_VERSION)_amd64.deb MLNX_SAI_DBGSYM = mlnx-sai-dbgsym_1.mlnx.$(MLNX_SAI_VERSION)_amd64.deb
$(eval $(call add_derived_package,$(MLNX_SAI),$(MLNX_SAI_DBGSYM))) $(eval $(call add_derived_package,$(MLNX_SAI),$(MLNX_SAI_DBGSYM)))
SONIC_MAKE_DEBS += $(MLNX_SAI) SONIC_MAKE_DEBS += $(MLNX_SAI)

View File

@ -18,10 +18,10 @@ include $(PLATFORM_PATH)/mlnx-ssd-fw-update.mk
SONIC_ALL += $(SONIC_ONE_IMAGE) \ SONIC_ALL += $(SONIC_ONE_IMAGE) \
$(DOCKER_FPM) $(DOCKER_FPM)
# Inject mlnx sai into sairedis # Inject mlnx sai into syncd
$(LIBSAIREDIS)_DEPENDS += $(MLNX_SAI) $(SYNCD)_DEPENDS += $(MLNX_SAI)
ifeq ($(ENABLE_SYNCD_RPC),y) ifeq ($(ENABLE_SYNCD_RPC),y)
$(LIBSAIREDIS)_DEPENDS += $(LIBSAITHRIFT_DEV) $(SYNCD)_DEPENDS += $(LIBSAITHRIFT_DEV)
endif endif
# Runtime dependency on mlnx sai is set only for syncd # Runtime dependency on mlnx sai is set only for syncd

View File

@ -22,10 +22,10 @@ SONIC_ONLINE_FILES += $(NPX_DIAG) $(WARM_VERIFIER) $(DSSERVE)
SONIC_ALL += $(SONIC_ONE_IMAGE) $(DOCKER_FPM) SONIC_ALL += $(SONIC_ONE_IMAGE) $(DOCKER_FPM)
# Inject nephos sai into sairedis # Inject nephos sai into syncd
$(LIBSAIREDIS)_DEPENDS += $(NEPHOS_SAI) $(NEPHOS_SAI_DEV) $(SYNCD)_DEPENDS += $(NEPHOS_SAI) $(NEPHOS_SAI_DEV)
ifeq ($(ENABLE_SYNCD_RPC),y) ifeq ($(ENABLE_SYNCD_RPC),y)
$(LIBSAIREDIS)_DEPENDS += $(LIBSAITHRIFT_DEV) $(SYNCD)_DEPENDS += $(LIBSAITHRIFT_DEV)
endif endif
# Runtime dependency on nephos sai is set only for syncd # Runtime dependency on nephos sai is set only for syncd

View File

@ -3,7 +3,7 @@ SAI_VERSION = 1.5.0
SAI_COMMIT_ID = 06a67d SAI_COMMIT_ID = 06a67d
# Place here URL where SAI deb exist # Place here URL where SAI deb exist
NEPHOS_SAI_DEB_LOCAL_URL = NEPHOS_SAI_DEB_LOCAL_URL =
export NEPHOS_SAI_DEB_LOCAL_URL export NEPHOS_SAI_DEB_LOCAL_URL
# #
ifneq ($(NEPHOS_SAI_DEB_LOCAL_URL), ) ifneq ($(NEPHOS_SAI_DEB_LOCAL_URL), )
@ -33,3 +33,4 @@ else
SONIC_ONLINE_DEBS += $(NEPHOS_SAI) $(NEPHOS_SAI_DEV) SONIC_ONLINE_DEBS += $(NEPHOS_SAI) $(NEPHOS_SAI_DEV)
endif endif
$(NEPHOS_SAI_DEV)_DEPENDS += $(NEPHOS_SAI) $(NEPHOS_SAI_DEV)_DEPENDS += $(NEPHOS_SAI)
$(NEPHOS_SAI_DEV)_CONFLICTS += $(LIBSAIVS_DEV)

View File

@ -10,8 +10,8 @@ include $(PLATFORM_PATH)/libsaithrift-dev.mk
SONIC_ALL += $(DOCKER_SONIC_P4) SONIC_ALL += $(DOCKER_SONIC_P4)
$(LIBSAIREDIS)_DEPENDS += $(P4_SWITCH) $(SYNCD)_DEPENDS += $(P4_SWITCH)
ifeq ($(ENABLE_SYNCD_RPC),y) ifeq ($(ENABLE_SYNCD_RPC),y)
$(LIBSAIREDIS)_DEPENDS += $(LIBSAITHRIFT_DEV_P4) $(SYNCD)_DEPENDS += $(LIBSAITHRIFT_DEV_P4)
endif endif
$(LIBSAIREDIS)_RDEPENDS += $(P4_SWITCH) $(SYNCD)_RDEPENDS += $(P4_SWITCH)

View File

@ -1,8 +1,5 @@
$(LIBSAIREDIS)_DPKG_TARGET = binary-syncd-vs $(LIBSAIREDIS)_DPKG_TARGET = binary-syncd-vs
# inject libsaivs and libsaivs_dev to swss build dependency
$(SWSS)_DEPENDS += $(LIBSAIVS) $(LIBSAIVS_DEV)
SYNCD_VS = syncd-vs_1.0.0_amd64.deb SYNCD_VS = syncd-vs_1.0.0_amd64.deb
$(SYNCD_VS)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) $(LIBSAIVS) $(SYNCD_VS)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) $(LIBSAIVS)
$(eval $(call add_derived_package,$(LIBSAIREDIS),$(SYNCD_VS))) $(eval $(call add_derived_package,$(LIBSAIREDIS),$(SYNCD_VS)))

View File

@ -1,16 +1,10 @@
# sairedis package # sairedis package
LIBSAIREDIS = libsairedis_1.0.0_$(CONFIGURED_ARCH).deb LIBSAIREDIS = libsairedis_1.0.0_$(CONFIGURED_ARCH).deb
$(LIBSAIREDIS)_DPKG_TARGET = binary-sairedis
$(LIBSAIREDIS)_SRC_PATH = $(SRC_PATH)/sonic-sairedis $(LIBSAIREDIS)_SRC_PATH = $(SRC_PATH)/sonic-sairedis
$(LIBSAIREDIS)_DEPENDS += $(LIBSWSSCOMMON_DEV) $(LIBSAIREDIS)_DEPENDS += $(LIBSWSSCOMMON_DEV)
$(LIBSAIREDIS)_RDEPENDS += $(LIBSWSSCOMMON) $(LIBSAIREDIS)_RDEPENDS += $(LIBSWSSCOMMON)
ifneq ($(ENABLE_SYNCD_RPC),y)
$(LIBSAIREDIS)_DPKG_TARGET = binary-syncd
else
# Inject libthrift build dependency for RPC build
$(LIBSAIREDIS)_DEPENDS += $(LIBSWSSCOMMON_DEV) $(LIBTHRIFT_DEV)
$(LIBSAIREDIS)_DPKG_TARGET = binary-syncd-rpc
endif
$(LIBSAIREDIS)_DEB_BUILD_OPTIONS = nocheck $(LIBSAIREDIS)_DEB_BUILD_OPTIONS = nocheck
SONIC_DPKG_DEBS += $(LIBSAIREDIS) SONIC_DPKG_DEBS += $(LIBSAIREDIS)
@ -23,18 +17,6 @@ $(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIVS)))
LIBSAIVS_DEV = libsaivs-dev_1.0.0_$(CONFIGURED_ARCH).deb LIBSAIVS_DEV = libsaivs-dev_1.0.0_$(CONFIGURED_ARCH).deb
$(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIVS_DEV))) $(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIVS_DEV)))
ifneq ($(CONFIGURED_PLATFORM),vs)
SYNCD = syncd_1.0.0_$(CONFIGURED_ARCH).deb
$(SYNCD)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA)
$(eval $(call add_derived_package,$(LIBSAIREDIS),$(SYNCD)))
ifeq ($(ENABLE_SYNCD_RPC),y)
SYNCD_RPC = syncd-rpc_1.0.0_$(CONFIGURED_ARCH).deb
$(SYNCD_RPC)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA)
$(eval $(call add_derived_package,$(LIBSAIREDIS),$(SYNCD_RPC)))
endif
endif
LIBSAIMETADATA = libsaimetadata_1.0.0_$(CONFIGURED_ARCH).deb LIBSAIMETADATA = libsaimetadata_1.0.0_$(CONFIGURED_ARCH).deb
$(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIMETADATA))) $(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIMETADATA)))
@ -52,20 +34,6 @@ $(LIBSAIVS_DBG)_DEPENDS += $(LIBSAIVS)
$(LIBSAIVS_DBG)_RDEPENDS += $(LIBSAIVS) $(LIBSAIVS_DBG)_RDEPENDS += $(LIBSAIVS)
$(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIVS_DBG))) $(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIVS_DBG)))
ifneq ($(CONFIGURED_PLATFORM),vs)
SYNCD_DBG = syncd-dbg_1.0.0_$(CONFIGURED_ARCH).deb
$(SYNCD_DBG)_DEPENDS += $(SYNCD)
$(SYNCD_DBG)_RDEPENDS += $(SYNCD)
$(eval $(call add_derived_package,$(LIBSAIREDIS),$(SYNCD_DBG)))
ifeq ($(ENABLE_SYNCD_RPC),y)
SYNCD_RPC_DBG = syncd-rpc-dbg_1.0.0_$(CONFIGURED_ARCH).deb
$(SYNCD_RPC_DBG)_DEPENDS += $(SYNCD_RPC)
$(SYNCD_RPC_DBG)_RDEPENDS += $(SYNCD_RPC)
$(eval $(call add_derived_package,$(LIBSAIREDIS),$(SYNCD_RPC_DBG)))
endif
endif
LIBSAIMETADATA_DBG = libsaimetadata-dbg_1.0.0_$(CONFIGURED_ARCH).deb LIBSAIMETADATA_DBG = libsaimetadata-dbg_1.0.0_$(CONFIGURED_ARCH).deb
$(LIBSAIMETADATA_DBG)_DEPENDS += $(LIBSAIMETADATA) $(LIBSAIMETADATA_DBG)_DEPENDS += $(LIBSAIMETADATA)
$(LIBSAIMETADATA_DBG)_RDEPENDS += $(LIBSAIMETADATA) $(LIBSAIMETADATA_DBG)_RDEPENDS += $(LIBSAIMETADATA)
@ -75,4 +43,3 @@ $(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIMETADATA_DBG)))
# are archived into debug one image to facilitate debugging. # are archived into debug one image to facilitate debugging.
# #
DBG_SRC_ARCHIVE += sonic-sairedis DBG_SRC_ARCHIVE += sonic-sairedis

View File

@ -3,7 +3,9 @@
SWSS = swss_1.0.0_$(CONFIGURED_ARCH).deb SWSS = swss_1.0.0_$(CONFIGURED_ARCH).deb
$(SWSS)_SRC_PATH = $(SRC_PATH)/sonic-swss $(SWSS)_SRC_PATH = $(SRC_PATH)/sonic-swss
$(SWSS)_DEPENDS += $(LIBSAIREDIS_DEV) $(LIBSAIMETADATA_DEV) $(LIBTEAM_DEV) \ $(SWSS)_DEPENDS += $(LIBSAIREDIS_DEV) $(LIBSAIMETADATA_DEV) $(LIBTEAM_DEV) \
$(LIBTEAMDCTL) $(LIBTEAM_UTILS) $(LIBSWSSCOMMON_DEV) $(LIBTEAMDCTL) $(LIBTEAM_UTILS) $(LIBSWSSCOMMON_DEV) \
$(LIBSAIVS) $(LIBSAIVS_DEV)
$(SWSS)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) $(LIBTEAM) \ $(SWSS)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) $(LIBTEAM) \
$(LIBTEAMDCTL) $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON) $(LIBTEAMDCTL) $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON)
SONIC_DPKG_DEBS += $(SWSS) SONIC_DPKG_DEBS += $(SWSS)

20
rules/syncd.dep Normal file
View File

@ -0,0 +1,20 @@
ifneq ($(CONFIGURED_PLATFORM),vs)
#DPKG FRK
SPATH := $($(SYNCD)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/syncd.mk rules/syncd.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
SMDEP_PATHS := $(SPATH) $(SPATH)/SAI $(SPATH)/SAI/bm/behavioral-model $(SPATH)/SAI/test/ptf $(SPATH)/SAI/test/saithrift/ctypesgen
$(foreach path, $(SMDEP_PATHS), $(eval $(path) :=$(filter-out $(SMDEP_PATHS),$(addprefix $(path)/, \
$(shell cd $(path) && git ls-files | grep -v " ")))))
$(SYNCD)_CACHE_MODE := GIT_CONTENT_SHA
$(SYNCD)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SYNCD)_DEP_FILES := $(DEP_FILES)
$(SYNCD)_SMDEP_FILES := $(foreach path, $(SMDEP_PATHS), $($(path)))
$(SYNCD)_SMDEP_PATHS := $(SMDEP_PATHS)
endif

36
rules/syncd.mk Normal file
View File

@ -0,0 +1,36 @@
# only used for non-vs platforms
ifneq ($(CONFIGURED_PLATFORM),vs)
SYNCD = syncd_1.0.0_$(CONFIGURED_ARCH).deb
$(SYNCD)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA)
$(SYNCD)_DPKG_TARGET = binary-syncd
$(SYNCD)_SRC_PATH = $(SRC_PATH)/sonic-sairedis
$(SYNCD)_DEPENDS += $(LIBSWSSCOMMON_DEV) $(LIBSAIREDIS)
$(SYNCD)_RDEPENDS += $(LIBSWSSCOMMON)
$(SYNCD)_DEB_BUILD_OPTIONS = nocheck
SONIC_DPKG_DEBS += $(SYNCD)
ifeq ($(ENABLE_SYNCD_RPC),y)
SYNCD_RPC = syncd-rpc_1.0.0_$(CONFIGURED_ARCH).deb
$(SYNCD_RPC)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA)
$(eval $(call add_derived_package,$(SYNCD),$(SYNCD_RPC)))
# Inject libthrift build dependency for RPC build
$(SYNCD)_DEPENDS += $(LIBSWSSCOMMON_DEV) $(LIBTHRIFT_DEV)
$(SYNCD)_DPKG_TARGET = binary-syncd-rpc
endif
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)))
ifeq ($(ENABLE_SYNCD_RPC),y)
SYNCD_RPC_DBG = syncd-rpc-dbg_1.0.0_$(CONFIGURED_ARCH).deb
$(SYNCD_RPC_DBG)_DEPENDS += $(SYNCD_RPC)
$(SYNCD_RPC_DBG)_RDEPENDS += $(SYNCD_RPC)
$(eval $(call add_derived_package,$(SYNCD),$(SYNCD_RPC_DBG)))
endif
endif

View File

@ -479,7 +479,7 @@ SONIC_INSTALL_TARGETS = $(addsuffix -install,$(addprefix $(DEBS_PATH)/, \
$(SONIC_PYTHON_STDEB_DEBS) \ $(SONIC_PYTHON_STDEB_DEBS) \
$(SONIC_DERIVED_DEBS) \ $(SONIC_DERIVED_DEBS) \
$(SONIC_EXTRA_DEBS))) $(SONIC_EXTRA_DEBS)))
$(SONIC_INSTALL_TARGETS) : $(DEBS_PATH)/%-install : .platform $$(addsuffix -install,$$(addprefix $(DEBS_PATH)/,$$($$*_DEPENDS))) $(DEBS_PATH)/$$* $(SONIC_INSTALL_TARGETS) : $(DEBS_PATH)/%-install : .platform $$(addsuffix -install,$$(addprefix $(DEBS_PATH)/,$$($$*_DEPENDS))) $(DEBS_PATH)/$$* $$(addsuffix -uninstall,$$(addprefix $(DEBS_PATH)/,$$($$*_CONFLICTS)))
$(HEADER) $(HEADER)
[ -f $(DEBS_PATH)/$* ] || { echo $(DEBS_PATH)/$* does not exist $(LOG) && false $(LOG) } [ -f $(DEBS_PATH)/$* ] || { echo $(DEBS_PATH)/$* does not exist $(LOG) && false $(LOG) }
# put a lock here because dpkg does not allow installing packages in parallel # put a lock here because dpkg does not allow installing packages in parallel
@ -490,6 +490,27 @@ $(SONIC_INSTALL_TARGETS) : $(DEBS_PATH)/%-install : .platform $$(addsuffix -inst
done done
$(FOOTER) $(FOOTER)
# Targets for installing debian packages prior to build one that depends on them
SONIC_UNINSTALL_TARGETS = $(addsuffix -uninstall,$(addprefix $(DEBS_PATH)/, \
$(SONIC_ONLINE_DEBS) \
$(SONIC_COPY_DEBS) \
$(SONIC_MAKE_DEBS) \
$(SONIC_DPKG_DEBS) \
$(SONIC_PYTHON_STDEB_DEBS) \
$(SONIC_DERIVED_DEBS) \
$(SONIC_EXTRA_DEBS)))
$(SONIC_UNINSTALL_TARGETS) : $(DEBS_PATH)/%-uninstall : .platform
$(HEADER)
[ -f $(DEBS_PATH)/$* ] || { echo $(DEBS_PATH)/$* does not exist $(LOG) && false $(LOG) }
# put a lock here because dpkg does not allow installing packages in parallel
while true; do
if mkdir $(DEBS_PATH)/dpkg_lock &> /dev/null; then
{ sudo DEBIAN_FRONTEND=noninteractive dpkg -P $(firstword $(subst _, ,$(basename $*))) $(LOG) && rm -d $(DEBS_PATH)/dpkg_lock && break; } || { rm -d $(DEBS_PATH)/dpkg_lock && exit 1 ; }
fi
done
$(FOOTER)
############################################################################### ###############################################################################
## Python packages ## Python packages
############################################################################### ###############################################################################

@ -1 +1 @@
Subproject commit ef721595520d827277610d11e24082934afc4df8 Subproject commit ccbb3bcc877cff271104ed428d9aadc4438dd73a