Skip to content

Commit

Permalink
[buildsystem] Install debug packages in syncd when INSTALL_DEBUG_TOOL…
Browse files Browse the repository at this point in the history
…S=y (sonic-net#2702)

* [buildsystem] Install debug packages in syncd when INSTALL_DEBUG_TOOLS=y

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
  • Loading branch information
stepanblyschak authored and MichelMoriniaux committed May 28, 2019
1 parent 1a3c8c2 commit 7558028
Show file tree
Hide file tree
Showing 22 changed files with 98 additions and 7 deletions.
6 changes: 6 additions & 0 deletions platform/barefoot/docker-syncd-bfn-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
DOCKER_SYNCD_BFN_RPC = docker-syncd-bfn-rpc.gz
$(DOCKER_SYNCD_BFN_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-bfn-rpc
$(DOCKER_SYNCD_BFN_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_BFN_RPC)_DEPENDS += $(SYNCD_RPC_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_BFN_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_BFN)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BFN_RPC)
SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BFN_RPC)
Expand Down
2 changes: 1 addition & 1 deletion platform/barefoot/docker-syncd-bfn-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/

RUN dpkg -P syncd
RUN apt-get purge -y syncd

RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
{% for deb in docker_syncd_bfn_rpc_debs.split(' ') -%}
Expand Down
6 changes: 6 additions & 0 deletions platform/barefoot/docker-syncd-bfn.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
DOCKER_SYNCD_BFN = docker-syncd-bfn.gz
$(DOCKER_SYNCD_BFN)_PATH = $(PLATFORM_PATH)/docker-syncd-bfn
$(DOCKER_SYNCD_BFN)_DEPENDS += $(SYNCD)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_BFN)_DEPENDS += $(SYNCD_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_BFN)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BFN)
SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BFN)
Expand Down
6 changes: 6 additions & 0 deletions platform/broadcom/docker-syncd-brcm-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
DOCKER_SYNCD_BRCM_RPC = docker-syncd-brcm-rpc.gz
$(DOCKER_SYNCD_BRCM_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-brcm-rpc
$(DOCKER_SYNCD_BRCM_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_BRCM_RPC)_DEPENDS += $(SYNCD_RPC_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_BRCM_RPC)_FILES += $(DSSERVE) $(BCMCMD)
$(DOCKER_SYNCD_BRCM_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_BRCM)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM_RPC)
Expand Down
2 changes: 1 addition & 1 deletion platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/

RUN dpkg -P syncd
RUN apt-get purge -y syncd

RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
{% for deb in docker_syncd_brcm_rpc_debs.split(' ') -%}
Expand Down
6 changes: 6 additions & 0 deletions platform/broadcom/docker-syncd-brcm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
DOCKER_SYNCD_BRCM = docker-syncd-brcm.gz
$(DOCKER_SYNCD_BRCM)_PATH = $(PLATFORM_PATH)/docker-syncd-brcm
$(DOCKER_SYNCD_BRCM)_DEPENDS += $(SYNCD)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_BRCM)_DEPENDS += $(SYNCD_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_BRCM)_FILES += $(DSSERVE) $(BCMCMD)
$(DOCKER_SYNCD_BRCM)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM)
Expand Down
6 changes: 6 additions & 0 deletions platform/cavium/docker-syncd-cavm-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
DOCKER_SYNCD_CAVM_RPC = docker-syncd-cavm-rpc.gz
$(DOCKER_SYNCD_CAVM_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-cavm-rpc
$(DOCKER_SYNCD_CAVM_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT) $(CAVM_LIBSAI) $(XP_TOOLS) $(REDIS_TOOLS)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_CAVM_RPC)_DEPENDS += $(SYNCD_RPC_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_CAVM_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_CAVM)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_CAVM_RPC)
ifeq ($(ENABLE_SYNCD_RPC),y)
Expand Down
2 changes: 1 addition & 1 deletion platform/cavium/docker-syncd-cavm-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/

RUN dpkg -P syncd
RUN apt-get purge -y syncd

RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
{% for deb in docker_syncd_cavm_rpc_debs.split(' ') -%}
Expand Down
6 changes: 6 additions & 0 deletions platform/cavium/docker-syncd-cavm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
DOCKER_SYNCD_CAVM = docker-syncd-cavm.gz
$(DOCKER_SYNCD_CAVM)_PATH = $(PLATFORM_PATH)/docker-syncd-cavm
$(DOCKER_SYNCD_CAVM)_DEPENDS += $(SYNCD) $(CAVM_LIBSAI) $(XP_TOOLS) $(REDIS_TOOLS)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_CAVM)_DEPENDS += $(SYNCD_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_CAVM)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_CAVM)
ifneq ($(ENABLE_SYNCD_RPC),y)
Expand Down
6 changes: 6 additions & 0 deletions platform/centec/docker-syncd-centec-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
DOCKER_SYNCD_CENTEC_RPC = docker-syncd-centec-rpc.gz
$(DOCKER_SYNCD_CENTEC_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-centec-rpc
$(DOCKER_SYNCD_CENTEC_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_CENTEC_RPC)_DEPENDS += $(SYNCD_RPC_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_CENTEC_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_CENTEC)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC_RPC)
ifeq ($(ENABLE_SYNCD_RPC),y)
Expand Down
2 changes: 1 addition & 1 deletion platform/centec/docker-syncd-centec-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/

RUN dpkg -P syncd
RUN apt-get purge -y syncd

RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
{% for deb in docker_syncd_centec_rpc_debs.split(' ') -%}
Expand Down
6 changes: 6 additions & 0 deletions platform/centec/docker-syncd-centec.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
DOCKER_SYNCD_CENTEC = docker-syncd-centec.gz
$(DOCKER_SYNCD_CENTEC)_PATH = $(PLATFORM_PATH)/docker-syncd-centec
$(DOCKER_SYNCD_CENTEC)_DEPENDS += $(SYNCD)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_CENTEC)_DEPENDS += $(SYNCD_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_CENTEC)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC)
ifneq ($(ENABLE_SYNCD_RPC),y)
Expand Down
6 changes: 6 additions & 0 deletions platform/marvell/docker-syncd-mrvl-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
DOCKER_SYNCD_MRVL_RPC = docker-syncd-mrvl-rpc.gz
$(DOCKER_SYNCD_MRVL_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-mrvl-rpc
$(DOCKER_SYNCD_MRVL_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_MRVL_RPC)_DEPENDS += $(SYNCD_RPC_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_MRVL_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_MRVL)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_MRVL_RPC)
ifeq ($(ENABLE_SYNCD_RPC),y)
Expand Down
2 changes: 1 addition & 1 deletion platform/marvell/docker-syncd-mrvl-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/

RUN dpkg -P syncd
RUN apt-get purge -y syncd

RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
{% for deb in docker_syncd_mrvl_rpc_debs.split(' ') -%}
Expand Down
6 changes: 6 additions & 0 deletions platform/marvell/docker-syncd-mrvl.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
DOCKER_SYNCD_MRVL = docker-syncd-mrvl.gz
$(DOCKER_SYNCD_MRVL)_PATH = $(PLATFORM_PATH)/docker-syncd-mrvl
$(DOCKER_SYNCD_MRVL)_DEPENDS += $(SYNCD) $(MRVL_FPA) $(REDIS_TOOLS)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_MRVL)_DEPENDS += $(SYNCD_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_MRVL)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_MRVL)
ifneq ($(ENABLE_SYNCD_RPC),y)
Expand Down
7 changes: 7 additions & 0 deletions platform/mellanox/docker-syncd-mlnx-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
DOCKER_SYNCD_MLNX_RPC = docker-syncd-mlnx-rpc.gz
$(DOCKER_SYNCD_MLNX_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-mlnx-rpc
$(DOCKER_SYNCD_MLNX_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_MLNX_RPC)_DEPENDS += $(SYNCD_RPC_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)
endif

$(DOCKER_SYNCD_MLNX_RPC)_PYTHON_DEBS += $(MLNX_SFPD)
$(DOCKER_SYNCD_MLNX_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_MLNX)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX_RPC)
Expand Down
2 changes: 1 addition & 1 deletion platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ python-debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/

RUN dpkg -P syncd
RUN apt-get purge -y syncd

RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
{% for deb in docker_syncd_mlnx_rpc_debs.split(' ') -%}
Expand Down
6 changes: 6 additions & 0 deletions platform/mellanox/docker-syncd-mlnx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
DOCKER_SYNCD_MLNX = docker-syncd-mlnx.gz
$(DOCKER_SYNCD_MLNX)_PATH = $(PLATFORM_PATH)/docker-syncd-mlnx
$(DOCKER_SYNCD_MLNX)_DEPENDS += $(SYNCD) $(PYTHON_SDK_API)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_MLNX)_DEPENDS += $(SYNCD_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_MLNX)_PYTHON_DEBS += $(MLNX_SFPD)
$(DOCKER_SYNCD_MLNX)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX)
Expand Down
6 changes: 6 additions & 0 deletions platform/nephos/docker-syncd-nephos-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
DOCKER_SYNCD_NEPHOS_RPC = docker-syncd-nephos-rpc.gz
$(DOCKER_SYNCD_NEPHOS_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-nephos-rpc
$(DOCKER_SYNCD_NEPHOS_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_NEPHOS_RPC)_DEPENDS += $(SYNCD_RPC_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_NEPHOS_RPC)_FILES += $(DSSERVE) $(NPX_DIAG)
$(DOCKER_SYNCD_NEPHOS_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_NEPHOS)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_NEPHOS_RPC)
Expand Down
2 changes: 1 addition & 1 deletion platform/nephos/docker-syncd-nephos-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/

RUN dpkg -P syncd
RUN apt-get purge -y syncd

RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
{% for deb in docker_syncd_nephos_rpc_debs.split(' ') -%}
Expand Down
6 changes: 6 additions & 0 deletions platform/nephos/docker-syncd-nephos.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
DOCKER_SYNCD_NEPHOS = docker-syncd-nephos.gz
$(DOCKER_SYNCD_NEPHOS)_PATH = $(PLATFORM_PATH)/docker-syncd-nephos
$(DOCKER_SYNCD_NEPHOS)_DEPENDS += $(SYNCD)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_NEPHOS)_DEPENDS += $(SYNCD_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_NEPHOS)_FILES += $(DSSERVE) $(NPX_DIAG)
$(DOCKER_SYNCD_NEPHOS)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_NEPHOS)
Expand Down
6 changes: 6 additions & 0 deletions platform/vs/docker-syncd-vs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
DOCKER_SYNCD_VS = docker-syncd-vs.gz
$(DOCKER_SYNCD_VS)_PATH = $(PLATFORM_PATH)/docker-syncd-vs
$(DOCKER_SYNCD_VS)_DEPENDS += $(SYNCD_VS)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_VS)_DEPENDS += $(SYNCD_VS_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIREDIS_DBG) \
$(LIBSAIVS_DBG)
endif
$(DOCKER_SYNCD_VS)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_VS)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_VS)
Expand Down

0 comments on commit 7558028

Please sign in to comment.