From 47aba6f76d364452517cedf2f1b3d2f66ccdf61b Mon Sep 17 00:00:00 2001 From: pavel-shirshov Date: Thu, 11 Jan 2018 20:32:14 -0800 Subject: [PATCH] [libsaithrift-dev]: Enable building libsaithrift-dev and pythonthrift libraries (#1296) * Fix build of libsaithrift for broadcom * Restore libsaithrift-dev building * Comment out libsaithrift library on cavium and marvell. Both of them have old SAI drivers * Revert back unintentional acton changes * Don't run the package checks when building sairedis package --- platform/broadcom/libsaithrift-dev.mk | 6 +++--- platform/broadcom/python-saithrift.mk | 6 +++--- platform/broadcom/rules.mk | 2 +- platform/cavium/libsaithrift-dev.mk | 4 ++-- platform/cavium/python-saithrift.mk | 4 ++-- platform/cavium/rules.mk | 2 +- platform/centec/libsaithrift-dev.mk | 4 ++-- platform/centec/python-saithrift.mk | 4 ++-- platform/marvell/libsaithrift-dev.mk | 4 ++-- platform/marvell/python-saithrift.mk | 4 ++-- platform/marvell/rules.mk | 2 +- platform/mellanox/libsaithrift-dev.mk | 6 +++--- platform/mellanox/python-saithrift.mk | 6 +++--- platform/nephos/libsaithrift-dev.mk | 6 +++--- platform/nephos/python-saithrift.mk | 6 +++--- platform/nephos/rules.mk | 2 +- rules/sairedis.mk | 1 + slave.mk | 4 ++-- src/sonic-sairedis | 2 +- 19 files changed, 38 insertions(+), 37 deletions(-) diff --git a/platform/broadcom/libsaithrift-dev.mk b/platform/broadcom/libsaithrift-dev.mk index 6e422db6e799..772f98339cbf 100644 --- a/platform/broadcom/libsaithrift-dev.mk +++ b/platform/broadcom/libsaithrift-dev.mk @@ -1,7 +1,7 @@ # libsaithrift-dev package -LIBSAITHRIFT_DEV_BRCM = libsaithrift-dev_0.9.4_amd64.deb -$(LIBSAITHRIFT_DEV_BRCM)_SRC_PATH = $(SRC_PATH)/SAI +LIBSAITHRIFT_DEV_BRCM = libsaithrift-dev_1.0.4_amd64.deb +$(LIBSAITHRIFT_DEV_BRCM)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(LIBSAITHRIFT_DEV_BRCM)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(BRCM_SAI) $(BRCM_SAI_DEV) $(LIBSAITHRIFT_DEV_BRCM)_RDEPENDS += $(LIBTHRIFT) $(BRCM_SAI) -#SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_BRCM) +SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_BRCM) diff --git a/platform/broadcom/python-saithrift.mk b/platform/broadcom/python-saithrift.mk index 18bf77c3d009..11efddc36843 100644 --- a/platform/broadcom/python-saithrift.mk +++ b/platform/broadcom/python-saithrift.mk @@ -1,6 +1,6 @@ # python-saithrift package -PYTHON_SAITHRIFT_BRCM = python-saithrift_0.9.4_amd64.deb -$(PYTHON_SAITHRIFT_BRCM)_SRC_PATH = $(SRC_PATH)/SAI +PYTHON_SAITHRIFT_BRCM = python-saithrift_1.0.4_amd64.deb +$(PYTHON_SAITHRIFT_BRCM)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(PYTHON_SAITHRIFT_BRCM)_DEPENDS += $(BRCM_SAI_DEV) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV) -#SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_BRCM) +SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_BRCM) diff --git a/platform/broadcom/rules.mk b/platform/broadcom/rules.mk index e94361987963..0437758917c3 100755 --- a/platform/broadcom/rules.mk +++ b/platform/broadcom/rules.mk @@ -16,7 +16,7 @@ include $(PLATFORM_PATH)/raw-image.mk include $(PLATFORM_PATH)/one-aboot.mk include $(PLATFORM_PATH)/libsaithrift-dev.mk include $(PLATFORM_PATH)/python-saithrift.mk -#include $(PLATFORM_PATH)/docker-ptf-brcm.mk +include $(PLATFORM_PATH)/docker-ptf-brcm.mk BCMCMD = bcmcmd $(BCMCMD)_URL = "https://sonicstorage.blob.core.windows.net/packages/20170518/bcmcmd?sv=2015-04-05&sr=b&sig=OCW4mfmbQ6D0BH8nllpAWrS8XL9uczrw32w3XgL4jws%3D&se=2030-03-31T23%3A06%3A15Z&sp=r" diff --git a/platform/cavium/libsaithrift-dev.mk b/platform/cavium/libsaithrift-dev.mk index 4a19fabffaf2..b7203d8d1077 100644 --- a/platform/cavium/libsaithrift-dev.mk +++ b/platform/cavium/libsaithrift-dev.mk @@ -1,7 +1,7 @@ # libsaithrift-dev package -LIBSAITHRIFT_DEV_CAVM = libsaithrift-dev_0.9.4_amd64.deb -$(LIBSAITHRIFT_DEV_CAVM)_SRC_PATH = $(SRC_PATH)/SAI +LIBSAITHRIFT_DEV_CAVM = libsaithrift-dev_1.0.4_amd64.deb +$(LIBSAITHRIFT_DEV_CAVM)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(LIBSAITHRIFT_DEV_CAVM)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(CAVM_LIBSAI) $(CAVM_SAI) $(LIBSAITHRIFT_DEV_CAVM)_RDEPENDS += $(LIBTHRIFT) $(CAVM_SAI) SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_CAVM) diff --git a/platform/cavium/python-saithrift.mk b/platform/cavium/python-saithrift.mk index 91d00ebaebc0..22c38503a6b1 100644 --- a/platform/cavium/python-saithrift.mk +++ b/platform/cavium/python-saithrift.mk @@ -1,6 +1,6 @@ # python-saithrift package -PYTHON_SAITHRIFT_CAVM = python-saithrift_0.9.4_amd64.deb -$(PYTHON_SAITHRIFT_CAVM)_SRC_PATH = $(SRC_PATH)/SAI +PYTHON_SAITHRIFT_CAVM = python-saithrift_1.0.4_amd64.deb +$(PYTHON_SAITHRIFT_CAVM)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(PYTHON_SAITHRIFT_CAVM)_DEPENDS += $(CAVM_LIBSAI) $(CAVM_SAI) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV) SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_CAVM) diff --git a/platform/cavium/rules.mk b/platform/cavium/rules.mk index 37a9bd7c994b..81053227e299 100644 --- a/platform/cavium/rules.mk +++ b/platform/cavium/rules.mk @@ -15,7 +15,7 @@ SONIC_ALL += $(SONIC_ONE_IMAGE) \ $(DOCKER_SYNCD_CAVM_RPC) # Inject cavium sai into sairedis -$(LIBSAIREDIS)_DEPENDS += $(CAVM_SAI) $(CAVM_LIBSAI) $(LIBSAITHRIFT_DEV_CAVM) +$(LIBSAIREDIS)_DEPENDS += $(CAVM_SAI) $(CAVM_LIBSAI) #$(LIBSAITHRIFT_DEV_CAVM) # Runtime dependency on cavium sai is set only for syncd $(SYNCD)_RDEPENDS += $(CAVM_SAI) diff --git a/platform/centec/libsaithrift-dev.mk b/platform/centec/libsaithrift-dev.mk index b8fddbdf7731..7e148d9df00c 100644 --- a/platform/centec/libsaithrift-dev.mk +++ b/platform/centec/libsaithrift-dev.mk @@ -1,7 +1,7 @@ # libsaithrift-dev package -LIBSAITHRIFT_DEV_CENTEC = libsaithrift-dev_0.9.4_amd64.deb -$(LIBSAITHRIFT_DEV_CENTEC)_SRC_PATH = $(SRC_PATH)/SAI +LIBSAITHRIFT_DEV_CENTEC = libsaithrift-dev_1.0.4_amd64.deb +$(LIBSAITHRIFT_DEV_CENTEC)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(LIBSAITHRIFT_DEV_CENTEC)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(CENTEC_SAI) $(LIBSAITHRIFT_DEV_CENTEC)_RDEPENDS += $(LIBTHRIFT) $(CENTEC_SAI) SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_CENTEC) diff --git a/platform/centec/python-saithrift.mk b/platform/centec/python-saithrift.mk index 37d1e935c041..0d320cba5619 100644 --- a/platform/centec/python-saithrift.mk +++ b/platform/centec/python-saithrift.mk @@ -1,6 +1,6 @@ # python-saithrift package -PYTHON_SAITHRIFT_CENTEC = python-saithrift_0.9.4_amd64.deb -$(PYTHON_SAITHRIFT_CENTEC)_SRC_PATH = $(SRC_PATH)/SAI +PYTHON_SAITHRIFT_CENTEC = python-saithrift_1.0.4_amd64.deb +$(PYTHON_SAITHRIFT_CENTEC)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(PYTHON_SAITHRIFT_CENTEC)_DEPENDS += $(CENTEC_SAI) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV) SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_CENTEC) diff --git a/platform/marvell/libsaithrift-dev.mk b/platform/marvell/libsaithrift-dev.mk index 443406e9c2fb..e5b30f412bfa 100644 --- a/platform/marvell/libsaithrift-dev.mk +++ b/platform/marvell/libsaithrift-dev.mk @@ -1,7 +1,7 @@ # libsaithrift-dev package -LIBSAITHRIFT_DEV_MRVL = libsaithrift-dev_0.9.4_amd64.deb -$(LIBSAITHRIFT_DEV_MRVL)_SRC_PATH = $(SRC_PATH)/SAI +LIBSAITHRIFT_DEV_MRVL = libsaithrift-dev_1.0.4_amd64.deb +$(LIBSAITHRIFT_DEV_MRVL)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(LIBSAITHRIFT_DEV_MRVL)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(MRVL_FPA) $(MRVL_SAI) $(LIBSAITHRIFT_DEV_MRVL)_RDEPENDS += $(LIBTHRIFT) $(MRVL_SAI) SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_MRVL) diff --git a/platform/marvell/python-saithrift.mk b/platform/marvell/python-saithrift.mk index f7a63b19edb8..5830c982da99 100644 --- a/platform/marvell/python-saithrift.mk +++ b/platform/marvell/python-saithrift.mk @@ -1,6 +1,6 @@ # python-saithrift package -PYTHON_SAITHRIFT_MRVL = python-saithrift_0.9.4_amd64.deb -$(PYTHON_SAITHRIFT_MRVL)_SRC_PATH = $(SRC_PATH)/SAI +PYTHON_SAITHRIFT_MRVL = python-saithrift_1.0.4_amd64.deb +$(PYTHON_SAITHRIFT_MRVL)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(PYTHON_SAITHRIFT_MRVL)_DEPENDS += $(MRVL_FPA) $(MRVL_SAI) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV) SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_MRVL) diff --git a/platform/marvell/rules.mk b/platform/marvell/rules.mk index c5df6bab194e..185b7b5fd7a9 100644 --- a/platform/marvell/rules.mk +++ b/platform/marvell/rules.mk @@ -12,7 +12,7 @@ SONIC_ALL += $(SONIC_ONE_IMAGE) \ $(DOCKER_SYNCD_MRVL_RPC) # Inject mrvl sai into sairedis -$(LIBSAIREDIS)_DEPENDS += $(MRVL_FPA) $(MRVL_SAI) $(LIBSAITHRIFT_DEV_MRVL) +$(LIBSAIREDIS)_DEPENDS += $(MRVL_FPA) $(MRVL_SAI) #$(LIBSAITHRIFT_DEV_MRVL) # Runtime dependency on mrvl sai is set only for syncd $(SYNCD)_RDEPENDS += $(MRVL_SAI) diff --git a/platform/mellanox/libsaithrift-dev.mk b/platform/mellanox/libsaithrift-dev.mk index 39222be39cab..77c27aa7ab09 100644 --- a/platform/mellanox/libsaithrift-dev.mk +++ b/platform/mellanox/libsaithrift-dev.mk @@ -1,7 +1,7 @@ # libsaithrift-dev package -LIBSAITHRIFT_DEV_MLNX = libsaithrift-dev_0.9.4_amd64.deb -$(LIBSAITHRIFT_DEV_MLNX)_SRC_PATH = $(SRC_PATH)/SAI +LIBSAITHRIFT_DEV_MLNX = libsaithrift-dev_1.0.4_amd64.deb +$(LIBSAITHRIFT_DEV_MLNX)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(LIBSAITHRIFT_DEV_MLNX)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(MLNX_SAI) $(MLNX_SAI_DEV) $(LIBSAITHRIFT_DEV_MLNX)_RDEPENDS += $(LIBTHRIFT) $(MLNX_SAI) -#SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_MLNX) +SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_MLNX) diff --git a/platform/mellanox/python-saithrift.mk b/platform/mellanox/python-saithrift.mk index 59685121e02c..a4485da0ca90 100644 --- a/platform/mellanox/python-saithrift.mk +++ b/platform/mellanox/python-saithrift.mk @@ -1,6 +1,6 @@ # python-saithrift package -PYTHON_SAITHRIFT_MLNX = python-saithrift_0.9.4_amd64.deb -$(PYTHON_SAITHRIFT_MLNX)_SRC_PATH = $(SRC_PATH)/SAI +PYTHON_SAITHRIFT_MLNX = python-saithrift_1.0.4_amd64.deb +$(PYTHON_SAITHRIFT_MLNX)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(PYTHON_SAITHRIFT_MLNX)_DEPENDS += $(MLNX_SAI_DEV) $(MLNX_SAI) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV) -#SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_MLNX) +SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_MLNX) diff --git a/platform/nephos/libsaithrift-dev.mk b/platform/nephos/libsaithrift-dev.mk index 4103d5c0c7b0..44d92ef6db7b 100644 --- a/platform/nephos/libsaithrift-dev.mk +++ b/platform/nephos/libsaithrift-dev.mk @@ -1,7 +1,7 @@ # libsaithrift-dev package -LIBSAITHRIFT_DEV_NEPHOS = libsaithrift-dev_0.9.4_amd64.deb -$(LIBSAITHRIFT_DEV_NEPHOS)_SRC_PATH = $(SRC_PATH)/SAI +LIBSAITHRIFT_DEV_NEPHOS = libsaithrift-dev_1.0.4_amd64.deb +$(LIBSAITHRIFT_DEV_NEPHOS)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(LIBSAITHRIFT_DEV_NEPHOS)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(NEPHOS_SAI) $(NEPHOS_SAI_DEV) $(LIBSAITHRIFT_DEV_NEPHOS)_RDEPENDS += $(LIBTHRIFT) $(NEPHOS_SAI) -#SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_NEPHOS) +SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_NEPHOS) diff --git a/platform/nephos/python-saithrift.mk b/platform/nephos/python-saithrift.mk index bc4a57b64cd3..e0c56f4053ec 100644 --- a/platform/nephos/python-saithrift.mk +++ b/platform/nephos/python-saithrift.mk @@ -1,6 +1,6 @@ # python-saithrift package -PYTHON_SAITHRIFT_NEPHOS = python-saithrift_0.9.4_amd64.deb -$(PYTHON_SAITHRIFT_NEPHOS)_SRC_PATH = $(SRC_PATH)/SAI +PYTHON_SAITHRIFT_NEPHOS = python-saithrift_1.0.4_amd64.deb +$(PYTHON_SAITHRIFT_NEPHOS)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(PYTHON_SAITHRIFT_NEPHOS)_DEPENDS += $(NEPHOS_SAI_DEV) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV) -#SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_NEPHOS) +SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_NEPHOS) diff --git a/platform/nephos/rules.mk b/platform/nephos/rules.mk index 3ce0287470d7..a7fe1d1d118f 100644 --- a/platform/nephos/rules.mk +++ b/platform/nephos/rules.mk @@ -7,7 +7,7 @@ include $(PLATFORM_PATH)/docker-syncd-nephos-rpc.mk include $(PLATFORM_PATH)/one-image.mk include $(PLATFORM_PATH)/libsaithrift-dev.mk include $(PLATFORM_PATH)/python-saithrift.mk -#include $(PLATFORM_PATH)/docker-ptf-nephos.mk +include $(PLATFORM_PATH)/docker-ptf-nephos.mk NPX_DIAG = npx_diag $(NPX_DIAG)_URL = "https://github.com/NephosInc/SONiC/raw/master/sdk/npx_diag" diff --git a/rules/sairedis.mk b/rules/sairedis.mk index 760d75c5a611..fc481e620cd7 100644 --- a/rules/sairedis.mk +++ b/rules/sairedis.mk @@ -4,6 +4,7 @@ LIBSAIREDIS = libsairedis_1.0.0_amd64.deb $(LIBSAIREDIS)_SRC_PATH = $(SRC_PATH)/sonic-sairedis $(LIBSAIREDIS)_DEPENDS += $(LIBSWSSCOMMON_DEV) $(LIBTHRIFT_DEV) $(LIBSAIREDIS)_RDEPENDS += $(LIBSWSSCOMMON) +$(LIBSAIREDIS)_DEB_BUILD_OPTIONS = nocheck SONIC_DPKG_DEBS += $(LIBSAIREDIS) LIBSAIREDIS_DEV = libsairedis-dev_1.0.0_amd64.deb diff --git a/slave.mk b/slave.mk index 425ba4c41d82..2103c79046a7 100644 --- a/slave.mk +++ b/slave.mk @@ -210,8 +210,8 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_DPKG_DEBS)) : $(DEBS_PATH)/% : .platform $$(a pushd $($*_SRC_PATH) $(LOG) [ ! -f ./autogen.sh ] || ./autogen.sh $(LOG) $(if $($*_DPKG_TARGET), - dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --as-root -T$($*_DPKG_TARGET) $(LOG), - dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) $(LOG) + DEB_BUILD_OPTIONS=$($*_DEB_BUILD_OPTIONS) dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --as-root -T$($*_DPKG_TARGET) $(LOG), + DEB_BUILD_OPTIONS=$($*_DEB_BUILD_OPTIONS) dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) $(LOG) ) popd $(LOG) # Clean up diff --git a/src/sonic-sairedis b/src/sonic-sairedis index 3b817bbe14f1..f04e13e9d5ea 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit 3b817bbe14f1e5177e6200c7a80ab74db4768eaa +Subproject commit f04e13e9d5ea49c6fbcf884734043ebfdd8b998e