Skip to content

Commit

Permalink
[libsaithrift-dev]: Enable building libsaithrift-dev and pythonthrift…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
pavel-shirshov authored Jan 12, 2018
1 parent ac0de13 commit 47aba6f
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 37 deletions.
6 changes: 3 additions & 3 deletions platform/broadcom/libsaithrift-dev.mk
Original file line number Diff line number Diff line change
@@ -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)
6 changes: 3 additions & 3 deletions platform/broadcom/python-saithrift.mk
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion platform/broadcom/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions platform/cavium/libsaithrift-dev.mk
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 2 additions & 2 deletions platform/cavium/python-saithrift.mk
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion platform/cavium/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions platform/centec/libsaithrift-dev.mk
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 2 additions & 2 deletions platform/centec/python-saithrift.mk
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 2 additions & 2 deletions platform/marvell/libsaithrift-dev.mk
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 2 additions & 2 deletions platform/marvell/python-saithrift.mk
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion platform/marvell/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 3 additions & 3 deletions platform/mellanox/libsaithrift-dev.mk
Original file line number Diff line number Diff line change
@@ -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)
6 changes: 3 additions & 3 deletions platform/mellanox/python-saithrift.mk
Original file line number Diff line number Diff line change
@@ -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)
6 changes: 3 additions & 3 deletions platform/nephos/libsaithrift-dev.mk
Original file line number Diff line number Diff line change
@@ -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)
6 changes: 3 additions & 3 deletions platform/nephos/python-saithrift.mk
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion platform/nephos/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions rules/sairedis.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/sonic-sairedis

0 comments on commit 47aba6f

Please sign in to comment.