1) Build debug docker image for each docker (#3104)
2) Install debug tools in every debug docker image 3) Install available debug symbols in debug docker image 4) Provide additional host/docker mapping for host dirs /src & /debug 4.1) The one-image will have source code under /src 4.2) /debug is mapped as rw. User can put his core file there and use this dir to collect debug session logs too. 5) Build debug image using debug dockers 6) Source code is archived into /src of debug image 7) The welcome banner is extended to display these additional facilities in debug image.
This commit is contained in:
parent
9e02684b2d
commit
0bca6b8468
@ -412,6 +412,28 @@ fi
|
||||
sudo sed -i 's/EBTABLES_LOAD_ON_START="no"/EBTABLES_LOAD_ON_START="yes"/g' ${FILESYSTEM_ROOT}/etc/default/ebtables
|
||||
sudo cp files/image_config/ebtables/ebtables.filter ${FILESYSTEM_ROOT}/etc
|
||||
|
||||
## Debug Image specific changes
|
||||
## Update motd for debug image
|
||||
if [ "$DEBUG_IMG" == "y" ]
|
||||
then
|
||||
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '**************' >> /etc/motd"
|
||||
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo 'Running DEBUG image' >> /etc/motd"
|
||||
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '**************' >> /etc/motd"
|
||||
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '/src has the sources' >> /etc/motd"
|
||||
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '/src is mounted in each docker' >> /etc/motd"
|
||||
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '/debug is created for core files or temp files' >> /etc/motd"
|
||||
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo 'Create a subdir under /debug to upload your files' >> /etc/motd"
|
||||
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '/debug is mounted in each docker' >> /etc/motd"
|
||||
|
||||
sudo mkdir -p $FILESYSTEM_ROOT/src
|
||||
pushd src
|
||||
../dbg_files.sh | sudo tar -cvzf ../$FILESYSTEM_ROOT/src/sonic_src.tar.gz -T -
|
||||
popd
|
||||
|
||||
sudo mkdir -p $FILESYSTEM_ROOT/debug
|
||||
|
||||
fi
|
||||
|
||||
## Remove gcc and python dev pkgs
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y remove gcc libpython2.7-dev
|
||||
|
||||
|
44
build_debug_docker_j2.sh
Executable file
44
build_debug_docker_j2.sh
Executable file
@ -0,0 +1,44 @@
|
||||
#! /bin/bash
|
||||
|
||||
echo "
|
||||
FROM $1
|
||||
|
||||
ARG docker_container_name
|
||||
|
||||
## Make apt-get non-interactive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
{% if $2 is defined %}
|
||||
{% if $2|length %}
|
||||
|
||||
COPY \
|
||||
{% for deb in $2.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
RUN dpkg -i \
|
||||
{% for deb in $2.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor %}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if $3 is defined %}
|
||||
{% if $3|length %}
|
||||
|
||||
RUN apt-get install -f -y \
|
||||
{% for dbg in $3.split(' ') -%}
|
||||
{{ dbg }}{{' '}}
|
||||
{%- endfor %}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
## Clean up
|
||||
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
||||
RUN rm -rf /debs
|
||||
|
||||
"
|
27
dbg_files.sh
Executable file
27
dbg_files.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Provie file paths to archive for debug image as relative to src subdir
|
||||
#
|
||||
SRC_DIR_LIST="\
|
||||
libteam \
|
||||
lldpd \
|
||||
libnl3 \
|
||||
radvd \
|
||||
redis \
|
||||
snmpd \
|
||||
sonic-dbsyncd \
|
||||
sonic-frr \
|
||||
sonic-platform-common \
|
||||
sonic-platform-daemons \
|
||||
sonic-py-swsssdk \
|
||||
sonic-sairedis \
|
||||
sonic-snmpagent \
|
||||
sonic-swss \
|
||||
sonic-swss-common \
|
||||
tacacs"
|
||||
|
||||
for i in $SRC_DIR_LIST
|
||||
do
|
||||
find $i/ -name "*.c" -o -name "*.cpp" -o -name "*.h" -o -name "*.hpp" -type f
|
||||
done
|
||||
|
@ -1,24 +1,5 @@
|
||||
# docker image for orchagent
|
||||
|
||||
DOCKER_ORCHAGENT_BFN = docker-orchagent-bfn.gz
|
||||
$(DOCKER_ORCHAGENT_BFN)_PATH = $(DOCKERS_PATH)/docker-orchagent
|
||||
$(DOCKER_ORCHAGENT_BFN)_DEPENDS += $(SWSS) $(REDIS_TOOLS) $(IPROUTE2)
|
||||
ifeq ($(INSTALL_DEBUG_TOOLS), y)
|
||||
$(DOCKER_ORCHAGENT_BFN)_DEPENDS += $(SWSS_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
endif
|
||||
$(DOCKER_ORCHAGENT_BFN)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_BFN)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_BFN)
|
||||
DOCKER_ORCHAGENT_PLATFORM_CODE = bfn
|
||||
include $(PLATFORM_PATH)/../template/docker-orchagent-base.mk
|
||||
|
||||
$(DOCKER_ORCHAGENT_BFN)_CONTAINER_NAME = swss
|
||||
$(DOCKER_ORCHAGENT_BFN)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_ORCHAGENT_BFN)_RUN_OPT += -v /etc/network/interfaces:/etc/network/interfaces:ro
|
||||
$(DOCKER_ORCHAGENT_BFN)_RUN_OPT += -v /etc/network/interfaces.d/:/etc/network/interfaces.d/:ro
|
||||
$(DOCKER_ORCHAGENT_BFN)_RUN_OPT += -v /host/machine.conf:/host/machine.conf:ro
|
||||
$(DOCKER_ORCHAGENT_BFN)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
$(DOCKER_ORCHAGENT_BFN)_RUN_OPT += -v /var/log/swss:/var/log/swss:rw
|
||||
|
||||
$(DOCKER_ORCHAGENT_BFN)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
|
||||
$(DOCKER_ORCHAGENT_BFN)_FILES += $(ARP_UPDATE_SCRIPT)
|
||||
|
@ -1,15 +1,13 @@
|
||||
# docker image for syncd
|
||||
|
||||
DOCKER_SYNCD_BFN = docker-syncd-bfn.gz
|
||||
$(DOCKER_SYNCD_BFN)_PATH = $(PLATFORM_PATH)/docker-syncd-bfn
|
||||
$(DOCKER_SYNCD_BFN)_DEPENDS += $(SYNCD)
|
||||
$(DOCKER_SYNCD_BFN)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BFN)
|
||||
ifneq ($(ENABLE_SYNCD_RPC),y)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BFN)
|
||||
endif
|
||||
|
||||
$(DOCKER_SYNCD_BFN)_CONTAINER_NAME = syncd
|
||||
$(DOCKER_SYNCD_BFN)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_SYNCD_BFN)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||
$(DOCKER_SYNCD_BFN)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
DOCKER_SYNCD_PLATFORM_CODE = bfn
|
||||
include $(PLATFORM_PATH)/../template/docker-syncd-base.mk
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD)
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIMETADATA_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
|
||||
|
@ -1,24 +1,5 @@
|
||||
# docker image for orchagent
|
||||
|
||||
DOCKER_ORCHAGENT_BRCM = docker-orchagent-brcm.gz
|
||||
$(DOCKER_ORCHAGENT_BRCM)_PATH = $(DOCKERS_PATH)/docker-orchagent
|
||||
$(DOCKER_ORCHAGENT_BRCM)_DEPENDS += $(SWSS) $(REDIS_TOOLS) $(IPROUTE2)
|
||||
ifeq ($(INSTALL_DEBUG_TOOLS), y)
|
||||
$(DOCKER_ORCHAGENT_BRCM)_DEPENDS += $(SWSS_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
endif
|
||||
$(DOCKER_ORCHAGENT_BRCM)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_BRCM)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_BRCM)
|
||||
DOCKER_ORCHAGENT_PLATFORM_CODE = brcm
|
||||
include $(PLATFORM_PATH)/../template/docker-orchagent-base.mk
|
||||
|
||||
$(DOCKER_ORCHAGENT_BRCM)_CONTAINER_NAME = swss
|
||||
$(DOCKER_ORCHAGENT_BRCM)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_ORCHAGENT_BRCM)_RUN_OPT += -v /etc/network/interfaces:/etc/network/interfaces:ro
|
||||
$(DOCKER_ORCHAGENT_BRCM)_RUN_OPT += -v /etc/network/interfaces.d/:/etc/network/interfaces.d/:ro
|
||||
$(DOCKER_ORCHAGENT_BRCM)_RUN_OPT += -v /host/machine.conf:/host/machine.conf:ro
|
||||
$(DOCKER_ORCHAGENT_BRCM)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
$(DOCKER_ORCHAGENT_BRCM)_RUN_OPT += -v /var/log/swss:/var/log/swss:rw
|
||||
|
||||
$(DOCKER_ORCHAGENT_BRCM)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
|
||||
$(DOCKER_ORCHAGENT_BRCM)_FILES += $(ARP_UPDATE_SCRIPT)
|
||||
|
@ -1,21 +1,18 @@
|
||||
# docker image for brcm syncd
|
||||
|
||||
DOCKER_SYNCD_BRCM = docker-syncd-brcm.gz
|
||||
$(DOCKER_SYNCD_BRCM)_PATH = $(PLATFORM_PATH)/docker-syncd-brcm
|
||||
$(DOCKER_SYNCD_BRCM)_DEPENDS += $(SYNCD)
|
||||
$(DOCKER_SYNCD_BRCM)_FILES += $(DSSERVE) $(BCMCMD)
|
||||
$(DOCKER_SYNCD_BRCM)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM)
|
||||
ifneq ($(ENABLE_SYNCD_RPC),y)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM)
|
||||
endif
|
||||
DOCKER_SYNCD_PLATFORM_CODE = brcm
|
||||
include $(PLATFORM_PATH)/../template/docker-syncd-base.mk
|
||||
|
||||
$(DOCKER_SYNCD_BRCM)_CONTAINER_NAME = syncd
|
||||
$(DOCKER_SYNCD_BRCM)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_SYNCD_BRCM)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||
$(DOCKER_SYNCD_BRCM)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd
|
||||
$(DOCKER_SYNCD_BRCM)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
$(DOCKER_SYNCD_BRCM)_RUN_OPT += -v /host/warmboot:/var/warmboot
|
||||
$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD)
|
||||
$(DOCKER_SYNCD_BASE)_FILES += $(DSSERVE) $(BCMCMD)
|
||||
|
||||
$(DOCKER_SYNCD_BRCM)_BASE_IMAGE_FILES += bcmcmd:/usr/bin/bcmcmd
|
||||
$(DOCKER_SYNCD_BRCM)_BASE_IMAGE_FILES += bcmsh:/usr/bin/bcmsh
|
||||
$(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIMETADATA_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd
|
||||
$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += bcmcmd:/usr/bin/bcmcmd
|
||||
$(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += bcmsh:/usr/bin/bcmsh
|
||||
|
@ -35,5 +35,10 @@ $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(DELL_S6000_PLATFORM_MODULE) \
|
||||
$(MITAC_LY1200_32X_PLATFORM_MODULE) \
|
||||
$(ALPHANETWORKS_SNH60A0_320FV2_PLATFORM_MODULE) \
|
||||
$(ALPHANETWORKS_SNH60B0_640F_PLATFORM_MODULE)
|
||||
$(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES)
|
||||
ifeq ($(INSTALL_DEBUG_TOOLS),y)
|
||||
$(SONIC_ONE_IMAGE)_DOCKERS = $(SONIC_INSTALL_DOCKER_DBG_IMAGES)
|
||||
$(SONIC_ONE_IMAGE)_DOCKERS += $(filter-out $(patsubst %-$(DBG_IMAGE_MARK).gz,%.gz, $(SONIC_INSTALL_DOCKER_DBG_IMAGES)), $(SONIC_INSTALL_DOCKER_IMAGES))
|
||||
else
|
||||
$(SONIC_ONE_IMAGE)_DOCKERS = $(SONIC_INSTALL_DOCKER_IMAGES)
|
||||
endif
|
||||
SONIC_INSTALLERS += $(SONIC_ONE_IMAGE)
|
||||
|
@ -1,24 +1,5 @@
|
||||
# docker image for orchagent
|
||||
|
||||
DOCKER_ORCHAGENT_CAVM = docker-orchagent-cavm.gz
|
||||
$(DOCKER_ORCHAGENT_CAVM)_PATH = $(DOCKERS_PATH)/docker-orchagent
|
||||
$(DOCKER_ORCHAGENT_CAVM)_DEPENDS += $(SWSS) $(REDIS_TOOLS) $(IPROUTE2)
|
||||
ifeq ($(INSTALL_DEBUG_TOOLS), y)
|
||||
$(DOCKER_ORCHAGENT_CAVM)_DEPENDS += $(SWSS_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
endif
|
||||
$(DOCKER_ORCHAGENT_CAVM)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_CAVM)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_CAVM)
|
||||
DOCKER_ORCHAGENT_PLATFORM_CODE = cavm
|
||||
include $(PLATFORM_PATH)/../template/docker-orchagent-base.mk
|
||||
|
||||
$(DOCKER_ORCHAGENT_CAVM)_CONTAINER_NAME = swss
|
||||
$(DOCKER_ORCHAGENT_CAVM)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_ORCHAGENT_CAVM)_RUN_OPT += -v /etc/network/interfaces:/etc/network/interfaces:ro
|
||||
$(DOCKER_ORCHAGENT_CAVM)_RUN_OPT += -v /etc/network/interfaces.d/:/etc/network/interfaces.d/:ro
|
||||
$(DOCKER_ORCHAGENT_CAVM)_RUN_OPT += -v /host/machine.conf:/host/machine.conf:ro
|
||||
$(DOCKER_ORCHAGENT_CAVM)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
$(DOCKER_ORCHAGENT_CAVM)_RUN_OPT += -v /var/log/swss:/var/log/swss:rw
|
||||
|
||||
$(DOCKER_ORCHAGENT_CAVM)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
|
||||
$(DOCKER_ORCHAGENT_CAVM)_FILES += $(ARP_UPDATE_SCRIPT)
|
||||
|
@ -1,15 +1,12 @@
|
||||
# docker image for cavium syncd
|
||||
|
||||
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)
|
||||
$(DOCKER_SYNCD_CAVM)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_CAVM)
|
||||
ifneq ($(ENABLE_SYNCD_RPC),y)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CAVM)
|
||||
endif
|
||||
DOCKER_SYNCD_PLATFORM_CODE = cavm
|
||||
include $(PLATFORM_PATH)/../template/docker-syncd-base.mk
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD) $(CAVM_LIBSAI) $(XP_TOOLS) $(REDIS_TOOLS)
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIMETADATA_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
|
||||
$(DOCKER_SYNCD_CAVM)_CONTAINER_NAME = syncd
|
||||
$(DOCKER_SYNCD_CAVM)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_SYNCD_CAVM)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||
$(DOCKER_SYNCD_CAVM)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
|
@ -1,24 +1,5 @@
|
||||
# docker image for orchagent
|
||||
|
||||
DOCKER_ORCHAGENT_CENTEC = docker-orchagent-centec.gz
|
||||
$(DOCKER_ORCHAGENT_CENTEC)_PATH = $(DOCKERS_PATH)/docker-orchagent
|
||||
$(DOCKER_ORCHAGENT_CENTEC)_DEPENDS += $(SWSS) $(REDIS_TOOLS) $(IPROUTE2)
|
||||
ifeq ($(INSTALL_DEBUG_TOOLS), y)
|
||||
$(DOCKER_ORCHAGENT_CENTEC)_DEPENDS += $(SWSS_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
endif
|
||||
$(DOCKER_ORCHAGENT_CENTEC)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_CENTEC)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_CENTEC)
|
||||
DOCKER_ORCHAGENT_PLATFORM_CODE = centec
|
||||
include $(PLATFORM_PATH)/../template/docker-orchagent-base.mk
|
||||
|
||||
$(DOCKER_ORCHAGENT_CENTEC)_CONTAINER_NAME = swss
|
||||
$(DOCKER_ORCHAGENT_CENTEC)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_ORCHAGENT_CENTEC)_RUN_OPT += -v /etc/network/interfaces:/etc/network/interfaces:ro
|
||||
$(DOCKER_ORCHAGENT_CENTEC)_RUN_OPT += -v /etc/network/interfaces.d/:/etc/network/interfaces.d/:ro
|
||||
$(DOCKER_ORCHAGENT_CENTEC)_RUN_OPT += -v /host/machine.conf:/host/machine.conf:ro
|
||||
$(DOCKER_ORCHAGENT_CENTEC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
$(DOCKER_ORCHAGENT_CENTEC)_RUN_OPT += -v /var/log/swss:/var/log/swss:rw
|
||||
|
||||
$(DOCKER_ORCHAGENT_CENTEC)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
|
||||
$(DOCKER_ORCHAGENT_CENTEC)_FILES += $(ARP_UPDATE_SCRIPT)
|
||||
|
@ -1,16 +1,13 @@
|
||||
# docker image for centec syncd
|
||||
|
||||
DOCKER_SYNCD_CENTEC = docker-syncd-centec.gz
|
||||
$(DOCKER_SYNCD_CENTEC)_PATH = $(PLATFORM_PATH)/docker-syncd-centec
|
||||
$(DOCKER_SYNCD_CENTEC)_DEPENDS += $(SYNCD)
|
||||
$(DOCKER_SYNCD_CENTEC)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC)
|
||||
ifneq ($(ENABLE_SYNCD_RPC),y)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC)
|
||||
endif
|
||||
DOCKER_SYNCD_PLATFORM_CODE = centec
|
||||
include $(PLATFORM_PATH)/../template/docker-syncd-base.mk
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD)
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIMETADATA_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
|
||||
$(DOCKER_SYNCD_CENTEC)_CONTAINER_NAME = syncd
|
||||
$(DOCKER_SYNCD_CENTEC)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_SYNCD_CENTEC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||
$(DOCKER_SYNCD_CENTEC)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd
|
||||
$(DOCKER_SYNCD_CENTEC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
|
@ -1,23 +1,5 @@
|
||||
# docker image for orchagent
|
||||
|
||||
DOCKER_ORCHAGENT_MRVL = docker-orchagent-mrvl.gz
|
||||
$(DOCKER_ORCHAGENT_MRVL)_PATH = $(DOCKERS_PATH)/docker-orchagent
|
||||
$(DOCKER_ORCHAGENT_MRVL)_DEPENDS += $(SWSS) $(REDIS_TOOLS) $(IPROUTE2)
|
||||
ifeq ($(INSTALL_DEBUG_TOOLS), y)
|
||||
$(DOCKER_ORCHAGENT_MRVL)_DEPENDS += $(SWSS_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
endif
|
||||
$(DOCKER_ORCHAGENT_MRVL)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_MRVL)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_MRVL)
|
||||
DOCKER_ORCHAGENT_PLATFORM_CODE = mrvl
|
||||
include $(PLATFORM_PATH)/../template/docker-orchagent-base.mk
|
||||
|
||||
$(DOCKER_ORCHAGENT_MRVL)_CONTAINER_NAME = swss
|
||||
$(DOCKER_ORCHAGENT_MRVL)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_ORCHAGENT_MRVL)_RUN_OPT += -v /etc/network/interfaces:/etc/network/interfaces:ro
|
||||
$(DOCKER_ORCHAGENT_MRVL)_RUN_OPT += -v /etc/network/interfaces.d/:/etc/network/interfaces.d/:ro
|
||||
$(DOCKER_ORCHAGENT_MRVL)_RUN_OPT += -v /host/machine.conf:/host/machine.conf
|
||||
$(DOCKER_ORCHAGENT_MRVL)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
|
||||
$(DOCKER_ORCHAGENT_MRVL)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
|
||||
$(DOCKER_ORCHAGENT_MRVL)_FILES += $(ARP_UPDATE_SCRIPT)
|
||||
|
@ -1,15 +1,15 @@
|
||||
# docker image for mrvl syncd
|
||||
# docker image for syncd
|
||||
|
||||
|
||||
DOCKER_SYNCD_PLATFORM_CODE = mrvl
|
||||
include $(PLATFORM_PATH)/../template/docker-syncd-base.mk
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD) $(MRVL_FPA) $(REDIS_TOOLS)
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIMETADATA_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
|
||||
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)
|
||||
$(DOCKER_SYNCD_MRVL)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_MRVL)
|
||||
ifneq ($(ENABLE_SYNCD_RPC),y)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MRVL)
|
||||
endif
|
||||
|
||||
$(DOCKER_SYNCD_MRVL)_CONTAINER_NAME = syncd
|
||||
$(DOCKER_SYNCD_MRVL)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_SYNCD_MRVL)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||
$(DOCKER_SYNCD_MRVL)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
|
@ -1,24 +1,5 @@
|
||||
# docker image for orchagent
|
||||
|
||||
DOCKER_ORCHAGENT_MLNX = docker-orchagent-mlnx.gz
|
||||
$(DOCKER_ORCHAGENT_MLNX)_PATH = $(DOCKERS_PATH)/docker-orchagent
|
||||
$(DOCKER_ORCHAGENT_MLNX)_DEPENDS += $(SWSS) $(REDIS_TOOLS) $(IPROUTE2)
|
||||
ifeq ($(INSTALL_DEBUG_TOOLS), y)
|
||||
$(DOCKER_ORCHAGENT_MLNX)_DEPENDS += $(SWSS_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
endif
|
||||
$(DOCKER_ORCHAGENT_MLNX)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_MLNX)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_MLNX)
|
||||
DOCKER_ORCHAGENT_PLATFORM_CODE = mlnx
|
||||
include $(PLATFORM_PATH)/../template/docker-orchagent-base.mk
|
||||
|
||||
$(DOCKER_ORCHAGENT_MLNX)_CONTAINER_NAME = swss
|
||||
$(DOCKER_ORCHAGENT_MLNX)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_ORCHAGENT_MLNX)_RUN_OPT += -v /etc/network/interfaces:/etc/network/interfaces:ro
|
||||
$(DOCKER_ORCHAGENT_MLNX)_RUN_OPT += -v /etc/network/interfaces.d/:/etc/network/interfaces.d/:ro
|
||||
$(DOCKER_ORCHAGENT_MLNX)_RUN_OPT += -v /host/machine.conf:/host/machine.conf:ro
|
||||
$(DOCKER_ORCHAGENT_MLNX)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
$(DOCKER_ORCHAGENT_MLNX)_RUN_OPT += -v /var/log/swss:/var/log/swss:rw
|
||||
|
||||
$(DOCKER_ORCHAGENT_MLNX)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
|
||||
$(DOCKER_ORCHAGENT_MLNX)_FILES += $(ARP_UPDATE_SCRIPT)
|
||||
|
@ -1,17 +1,14 @@
|
||||
# docker image for mlnx syncd
|
||||
|
||||
DOCKER_SYNCD_MLNX = docker-syncd-mlnx.gz
|
||||
$(DOCKER_SYNCD_MLNX)_PATH = $(PLATFORM_PATH)/docker-syncd-mlnx
|
||||
$(DOCKER_SYNCD_MLNX)_DEPENDS += $(SYNCD) $(PYTHON_SDK_API) $(MLNX_SFPD)
|
||||
$(DOCKER_SYNCD_MLNX)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX)
|
||||
ifneq ($(ENABLE_SYNCD_RPC),y)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX)
|
||||
endif
|
||||
DOCKER_SYNCD_PLATFORM_CODE = mlnx
|
||||
include $(PLATFORM_PATH)/../template/docker-syncd-base.mk
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD) $(PYTHON_SDK_API) $(MLNX_SFPD)
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIMETADATA_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
|
||||
$(DOCKER_SYNCD_MLNX)_CONTAINER_NAME = syncd
|
||||
$(DOCKER_SYNCD_MLNX)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_SYNCD_MLNX)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||
$(DOCKER_SYNCD_MLNX)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
$(DOCKER_SYNCD_MLNX)_RUN_OPT += -v /host/warmboot:/var/warmboot
|
||||
|
||||
|
@ -1,24 +1,5 @@
|
||||
# docker image for orchagent
|
||||
|
||||
DOCKER_ORCHAGENT_NEPHOS = docker-orchagent-nephos.gz
|
||||
$(DOCKER_ORCHAGENT_NEPHOS)_PATH = $(DOCKERS_PATH)/docker-orchagent
|
||||
$(DOCKER_ORCHAGENT_NEPHOS)_DEPENDS += $(SWSS) $(REDIS_TOOLS) $(IPROUTE2)
|
||||
ifeq ($(INSTALL_DEBUG_TOOLS), y)
|
||||
$(DOCKER_ORCHAGENT_NEPHOS)_DEPENDS += $(SWSS_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
endif
|
||||
$(DOCKER_ORCHAGENT_NEPHOS)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_NEPHOS)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_NEPHOS)
|
||||
DOCKER_ORCHAGENT_PLATFORM_CODE = nephos
|
||||
include $(PLATFORM_PATH)/../template/docker-orchagent-base.mk
|
||||
|
||||
$(DOCKER_ORCHAGENT_NEPHOS)_CONTAINER_NAME = swss
|
||||
$(DOCKER_ORCHAGENT_NEPHOS)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_ORCHAGENT_NEPHOS)_RUN_OPT += -v /etc/network/interfaces:/etc/network/interfaces:ro
|
||||
$(DOCKER_ORCHAGENT_NEPHOS)_RUN_OPT += -v /etc/network/interfaces.d/:/etc/network/interfaces.d/:ro
|
||||
$(DOCKER_ORCHAGENT_NEPHOS)_RUN_OPT += -v /host/machine.conf:/host/machine.conf:ro
|
||||
$(DOCKER_ORCHAGENT_NEPHOS)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
$(DOCKER_ORCHAGENT_NEPHOS)_RUN_OPT += -v /var/log/swss:/var/log/swss:rw
|
||||
|
||||
$(DOCKER_ORCHAGENT_NEPHOS)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
|
||||
$(DOCKER_ORCHAGENT_NEPHOS)_FILES += $(ARP_UPDATE_SCRIPT)
|
||||
|
@ -1,19 +1,17 @@
|
||||
# docker image for nephos syncd
|
||||
|
||||
DOCKER_SYNCD_NEPHOS = docker-syncd-nephos.gz
|
||||
$(DOCKER_SYNCD_NEPHOS)_PATH = $(PLATFORM_PATH)/docker-syncd-nephos
|
||||
$(DOCKER_SYNCD_NEPHOS)_DEPENDS += $(SYNCD)
|
||||
$(DOCKER_SYNCD_NEPHOS)_FILES += $(DSSERVE) $(NPX_DIAG)
|
||||
$(DOCKER_SYNCD_NEPHOS)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_NEPHOS)
|
||||
ifneq ($(ENABLE_SYNCD_RPC),y)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_NEPHOS)
|
||||
endif
|
||||
DOCKER_SYNCD_PLATFORM_CODE = bfn
|
||||
include $(PLATFORM_PATH)/../template/docker-syncd-base.mk
|
||||
|
||||
$(DOCKER_SYNCD_NEPHOS)_CONTAINER_NAME = syncd
|
||||
$(DOCKER_SYNCD_NEPHOS)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_SYNCD_NEPHOS)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||
$(DOCKER_SYNCD_NEPHOS)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd
|
||||
$(DOCKER_SYNCD_NEPHOS)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD)
|
||||
|
||||
$(DOCKER_SYNCD_NEPHOS)_BASE_IMAGE_FILES += npx_diag:/usr/bin/npx_diag
|
||||
$(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIMETADATA_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_FILES += $(DSSERVE) $(NPX_DIAG)
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += npx_diag:/usr/bin/npx_diag
|
||||
|
35
platform/template/docker-orchagent-base.mk
Normal file
35
platform/template/docker-orchagent-base.mk
Normal file
@ -0,0 +1,35 @@
|
||||
# docker image for orchagent
|
||||
|
||||
DOCKER_ORCHAGENT_BASE_STEM = docker-orchagent-$(DOCKER_ORCHAGENT_PLATFORM_CODE)
|
||||
DOCKER_ORCHAGENT_BASE = $(DOCKER_ORCHAGENT_BASE_STEM).gz
|
||||
DOCKER_ORCHAGENT_BASE_DBG = $(DOCKER_ORCHAGENT_BASE_STEM)-$(DBG_IMAGE_MARK).gz
|
||||
|
||||
$(DOCKER_ORCHAGENT_BASE)_DEPENDS += $(SWSS) $(REDIS_TOOLS) $(IPROUTE2)
|
||||
|
||||
$(DOCKER_ORCHAGENT_BASE)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE)_DBG_DEPENDS)
|
||||
$(DOCKER_ORCHAGENT_BASE)_DBG_DEPENDS += $(SWSS_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
|
||||
$(DOCKER_ORCHAGENT_BASE)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE)_DBG_IMAGE_PACKAGES)
|
||||
|
||||
$(DOCKER_ORCHAGENT_BASE)_PATH = $(DOCKERS_PATH)/docker-orchagent
|
||||
|
||||
$(DOCKER_ORCHAGENT_BASE)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_BASE)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_BASE)
|
||||
|
||||
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_ORCHAGENT_BASE_DBG)
|
||||
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_ORCHAGENT_BASE_DBG)
|
||||
|
||||
$(DOCKER_ORCHAGENT_BASE)_CONTAINER_NAME = swss
|
||||
$(DOCKER_ORCHAGENT_BASE)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_ORCHAGENT_BASE)_RUN_OPT += -v /etc/network/interfaces:/etc/network/interfaces:ro
|
||||
$(DOCKER_ORCHAGENT_BASE)_RUN_OPT += -v /etc/network/interfaces.d/:/etc/network/interfaces.d/:ro
|
||||
$(DOCKER_ORCHAGENT_BASE)_RUN_OPT += -v /host/machine.conf:/host/machine.conf:ro
|
||||
$(DOCKER_ORCHAGENT_BASE)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
$(DOCKER_ORCHAGENT_BASE)_RUN_OPT += -v /var/log/swss:/var/log/swss:rw
|
||||
|
||||
$(DOCKER_ORCHAGENT_BASE)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
|
||||
$(DOCKER_ORCHAGENT_BASE)_FILES += $(ARP_UPDATE_SCRIPT)
|
31
platform/template/docker-syncd-base.mk
Normal file
31
platform/template/docker-syncd-base.mk
Normal file
@ -0,0 +1,31 @@
|
||||
# docker image for syncd
|
||||
|
||||
|
||||
DOCKER_SYNCD_BASE_STEM = docker-syncd-$(DOCKER_SYNCD_PLATFORM_CODE)
|
||||
DOCKER_SYNCD_BASE = $(DOCKER_SYNCD_BASE_STEM).gz
|
||||
DOCKER_SYNCD_BASE_DBG = $(DOCKER_SYNCD_BASE_STEM)-$(DBG_IMAGE_MARK).gz
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_PATH = $(PLATFORM_PATH)/docker-syncd-$(DOCKER_SYNCD_PLATFORM_CODE)
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $($(DOCKER_CONFIG_ENGINE)_DBG_DEPENDS)
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE)_DBG_IMAGE_PACKAGES)
|
||||
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BASE)
|
||||
ifneq ($(ENABLE_SYNCD_RPC),y)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BASE)
|
||||
endif
|
||||
|
||||
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_SYNCD_BASE_DBG)
|
||||
ifneq ($(ENABLE_SYNCD_RPC),y)
|
||||
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_SYNCD_BASE_DBG)
|
||||
endif
|
||||
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_CONTAINER_NAME = syncd
|
||||
$(DOCKER_SYNCD_BASE)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||
$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
|
@ -1,24 +1,5 @@
|
||||
# docker image for orchagent
|
||||
|
||||
DOCKER_ORCHAGENT_VS = docker-orchagent-vs.gz
|
||||
$(DOCKER_ORCHAGENT_VS)_PATH = $(DOCKERS_PATH)/docker-orchagent
|
||||
$(DOCKER_ORCHAGENT_VS)_DEPENDS += $(SWSS) $(REDIS_TOOLS) $(IPROUTE2)
|
||||
ifeq ($(INSTALL_DEBUG_TOOLS), y)
|
||||
$(DOCKER_ORCHAGENT_VS)_DEPENDS += $(SWSS_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
endif
|
||||
$(DOCKER_ORCHAGENT_VS)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_VS)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_VS)
|
||||
DOCKER_ORCHAGENT_PLATFORM_CODE = vs
|
||||
include $(PLATFORM_PATH)/../template/docker-orchagent-base.mk
|
||||
|
||||
$(DOCKER_ORCHAGENT_VS)_CONTAINER_NAME = swss
|
||||
$(DOCKER_ORCHAGENT_VS)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_ORCHAGENT_VS)_RUN_OPT += -v /etc/network/interfaces:/etc/network/interfaces:ro
|
||||
$(DOCKER_ORCHAGENT_VS)_RUN_OPT += -v /etc/network/interfaces.d/:/etc/network/interfaces.d/:ro
|
||||
$(DOCKER_ORCHAGENT_VS)_RUN_OPT += -v /host/machine.conf:/host/machine.conf:ro
|
||||
$(DOCKER_ORCHAGENT_VS)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
$(DOCKER_ORCHAGENT_VS)_RUN_OPT += -v /var/log/swss:/var/log/swss:rw
|
||||
|
||||
$(DOCKER_ORCHAGENT_VS)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
|
||||
$(DOCKER_ORCHAGENT_VS)_FILES += $(ARP_UPDATE_SCRIPT)
|
||||
|
@ -1,14 +1,16 @@
|
||||
# docker image for vs syncd
|
||||
|
||||
DOCKER_SYNCD_VS = docker-syncd-vs.gz
|
||||
$(DOCKER_SYNCD_VS)_PATH = $(PLATFORM_PATH)/docker-syncd-vs
|
||||
$(DOCKER_SYNCD_VS)_DEPENDS += $(SYNCD_VS)
|
||||
$(DOCKER_SYNCD_VS)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_VS)
|
||||
DOCKER_SYNCD_PLATFORM_CODE = vs
|
||||
include $(PLATFORM_PATH)/../template/docker-syncd-base.mk
|
||||
|
||||
$(DOCKER_SYNCD_SYNCD)_DEPENDS += $(SYNCD_VS)
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_VS_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIMETADATA_DBG) \
|
||||
$(LIBSAIREDIS_DBG) \
|
||||
$(LIBSAIVS_DBG)
|
||||
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_VS)
|
||||
|
||||
$(DOCKER_SYNCD_VS)_CONTAINER_NAME = syncd
|
||||
$(DOCKER_SYNCD_VS)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_SYNCD_VS)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||
$(DOCKER_SYNCD_VS)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
$(DOCKER_SYNCD_VS)_RUN_OPT += -v /host/warmboot:/var/warmboot
|
||||
|
@ -3,5 +3,10 @@
|
||||
SONIC_ONE_IMAGE = sonic-vs.bin
|
||||
$(SONIC_ONE_IMAGE)_MACHINE = vs
|
||||
$(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie
|
||||
$(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES)
|
||||
ifeq ($(INSTALL_DEBUG_TOOLS),y)
|
||||
$(SONIC_ONE_IMAGE)_DOCKERS = $(SONIC_INSTALL_DOCKER_DBG_IMAGES)
|
||||
$(SONIC_ONE_IMAGE)_DOCKERS += $(filter-out $(patsubst %-$(DBG_IMAGE_MARK).gz,%.gz, $(SONIC_INSTALL_DOCKER_DBG_IMAGES)), $(SONIC_INSTALL_DOCKER_IMAGES))
|
||||
else
|
||||
$(SONIC_ONE_IMAGE)_DOCKERS = $(SONIC_INSTALL_DOCKER_IMAGES)
|
||||
endif
|
||||
SONIC_INSTALLERS += $(SONIC_ONE_IMAGE)
|
||||
|
@ -6,13 +6,11 @@ $(DOCKER_BASE)_DEPENDS += $(SUPERVISOR)
|
||||
$(DOCKER_BASE)_DEPENDS += $(BASH)
|
||||
$(DOCKER_BASE)_DEPENDS += $(SOCAT)
|
||||
|
||||
ifeq ($(INSTALL_DEBUG_TOOLS),y)
|
||||
GDB = gdb
|
||||
VIM = vim
|
||||
OPENSSH = openssh-client
|
||||
SSHPASS = sshpass
|
||||
STRACE = strace
|
||||
$(DOCKER_BASE)_DBG_PACKAGES += $(GDB) $(VIM) $(OPENSSH) $(SSHPASS) $(STRACE)
|
||||
endif
|
||||
$(DOCKER_BASE)_DBG_IMAGE_PACKAGES += $(GDB) $(VIM) $(OPENSSH) $(SSHPASS) $(STRACE)
|
||||
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_BASE)
|
||||
|
@ -5,4 +5,8 @@ $(DOCKER_CONFIG_ENGINE)_PATH = $(DOCKERS_PATH)/docker-config-engine
|
||||
$(DOCKER_CONFIG_ENGINE)_PYTHON_WHEELS += $(SWSSSDK_PY2)
|
||||
$(DOCKER_CONFIG_ENGINE)_PYTHON_WHEELS += $(SONIC_CONFIG_ENGINE)
|
||||
$(DOCKER_CONFIG_ENGINE)_LOAD_DOCKERS += $(DOCKER_BASE)
|
||||
|
||||
$(DOCKER_CONFIG_ENGINE)_DBG_DEPENDS += $($(DOCKER_BASE)_DBG_DEPENDS)
|
||||
$(DOCKER_CONFIG_ENGINE)_DBG_IMAGE_PACKAGES += $($(DOCKER_BASE)_DBG_IMAGE_PACKAGES)
|
||||
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_CONFIG_ENGINE)
|
||||
|
@ -1,12 +1,24 @@
|
||||
# docker image for database
|
||||
|
||||
DOCKER_DATABASE = docker-database.gz
|
||||
DOCKER_DATABASE_STEM = docker-database
|
||||
DOCKER_DATABASE = $(DOCKER_DATABASE_STEM).gz
|
||||
DOCKER_DATABASE_DBG = $(DOCKER_DATABASE_STEM)-$(DBG_IMAGE_MARK).gz
|
||||
|
||||
$(DOCKER_DATABASE)_PATH = $(DOCKERS_PATH)/docker-database
|
||||
|
||||
$(DOCKER_DATABASE)_DEPENDS += $(REDIS_TOOLS) $(REDIS_SERVER)
|
||||
$(DOCKER_DATABASE)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE)_DBG_DEPENDS)
|
||||
|
||||
$(DOCKER_DATABASE)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE)_DBG_IMAGE_PACKAGES)
|
||||
|
||||
$(DOCKER_DATABASE)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_DATABASE)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_DATABASE)
|
||||
|
||||
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_DATABASE_DBG)
|
||||
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_DATABASE_DBG)
|
||||
|
||||
$(DOCKER_DATABASE)_CONTAINER_NAME = database
|
||||
$(DOCKER_DATABASE)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_DATABASE)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
|
@ -1,12 +1,22 @@
|
||||
# Docker image for DHCP relay
|
||||
|
||||
DOCKER_DHCP_RELAY = docker-dhcp-relay.gz
|
||||
DOCKER_DHCP_RELAY_STEM = docker-dhcp-relay
|
||||
DOCKER_DHCP_RELAY = $(DOCKER_DHCP_RELAY_STEM).gz
|
||||
DOCKER_DHCP_RELAY_DBG = $(DOCKER_DHCP_RELAY_STEM)-$(DBG_IMAGE_MARK).gz
|
||||
|
||||
$(DOCKER_DHCP_RELAY)_PATH = $(DOCKERS_PATH)/docker-dhcp-relay
|
||||
|
||||
$(DOCKER_DHCP_RELAY)_DEPENDS += $(ISC_DHCP_COMMON) $(ISC_DHCP_RELAY)
|
||||
$(DOCKER_DHCP_RELAY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE)_DBG_DEPENDS)
|
||||
$(DOCKER_DHCP_RELAY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE)_DBG_IMAGE_PACKAGES)
|
||||
|
||||
$(DOCKER_DHCP_RELAY)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE)
|
||||
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_DHCP_RELAY)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_DHCP_RELAY)
|
||||
|
||||
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_DHCP_RELAY_DBG)
|
||||
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_DHCP_RELAY_DBG)
|
||||
|
||||
$(DOCKER_DHCP_RELAY)_CONTAINER_NAME = dhcp_relay
|
||||
$(DOCKER_DHCP_RELAY)_RUN_OPT += --net=host --privileged -t
|
||||
|
@ -1,11 +1,23 @@
|
||||
# docker image for fpm-frr
|
||||
|
||||
DOCKER_FPM_FRR = docker-fpm-frr.gz
|
||||
DOCKER_FPM_FRR_STEM = docker-fpm-frr
|
||||
DOCKER_FPM_FRR = $(DOCKER_FPM_FRR_STEM).gz
|
||||
DOCKER_FPM_FRR_DBG = $(DOCKER_FPM_FRR_STEM)-$(DBG_IMAGE_MARK).gz
|
||||
|
||||
$(DOCKER_FPM_FRR)_PATH = $(DOCKERS_PATH)/docker-fpm-frr
|
||||
|
||||
$(DOCKER_FPM_FRR)_DEPENDS += $(FRR) $(SWSS)
|
||||
$(DOCKER_FRR)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE)_DBG_DEPENDS)
|
||||
$(DOCKER_FRR)_DBG_DEPENDS += $(FRR_DBG) $(SWSS_DBG) $(LIBSWSSCOMMON_DBG)
|
||||
|
||||
$(DOCKER_FRR)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE)_DBG_IMAGE_PACKAGES)
|
||||
|
||||
$(DOCKER_FPM_FRR)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_FPM_FRR)
|
||||
|
||||
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_FPM_FRR_DBG)
|
||||
|
||||
$(DOCKER_FPM_FRR)_CONTAINER_NAME = bgp
|
||||
$(DOCKER_FPM_FRR)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_FPM_FRR)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
|
@ -1,15 +1,28 @@
|
||||
# Docker image for SONiC platform monitoring tools
|
||||
|
||||
DOCKER_PLATFORM_MONITOR = docker-platform-monitor.gz
|
||||
DOCKER_PLATFORM_MONITOR_STEM = docker-platform-monitor
|
||||
DOCKER_PLATFORM_MONITOR = $(DOCKER_PLATFORM_MONITOR_STEM).gz
|
||||
DOCKER_PLATFORM_MONITOR_DBG = $(DOCKER_PLATFORM_MONITOR_STEM)-$(DBG_IMAGE_MARK).gz
|
||||
|
||||
$(DOCKER_PLATFORM_MONITOR)_PATH = $(DOCKERS_PATH)/docker-platform-monitor
|
||||
|
||||
$(DOCKER_PLATFORM_MONITOR)_DEPENDS += $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON) $(SONIC_LEDD) $(SONIC_XCVRD)
|
||||
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PLATFORM_COMMON_PY2)
|
||||
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SWSSSDK_PY2)
|
||||
|
||||
$(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE)_DBG_DEPENDS)
|
||||
$(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS += $(LIBSWSSCOMMON_DBG)
|
||||
|
||||
$(DOCKER_PLATFORM_MONITOR)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE)_DBG_IMAGE_PACKAGES)
|
||||
|
||||
$(DOCKER_PLATFORM_MONITOR)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE)
|
||||
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_PLATFORM_MONITOR)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_PLATFORM_MONITOR)
|
||||
|
||||
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_PLATFORM_MONITOR_DBG)
|
||||
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_PLATFORM_MONITOR_DBG)
|
||||
|
||||
$(DOCKER_PLATFORM_MONITOR)_CONTAINER_NAME = pmon
|
||||
$(DOCKER_PLATFORM_MONITOR)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_PLATFORM_MONITOR)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
|
@ -1,12 +1,23 @@
|
||||
# Docker image for router advertiser
|
||||
|
||||
DOCKER_ROUTER_ADVERTISER = docker-router-advertiser.gz
|
||||
DOCKER_ROUTER_ADVERTISER_STEM = docker-router-advertiser
|
||||
DOCKER_ROUTER_ADVERTISER = $(DOCKER_ROUTER_ADVERTISER_STEM).gz
|
||||
DOCKER_ROUTER_ADVERTISER_DBG = $(DOCKER_ROUTER_ADVERTISER_STEM)-$(DBG_IMAGE_MARK).gz
|
||||
|
||||
$(DOCKER_ROUTER_ADVERTISER)_PATH = $(DOCKERS_PATH)/docker-router-advertiser
|
||||
|
||||
$(DOCKER_ROUTER_ADVERTISER)_DEPENDS += $(RADVD) $(REDIS_TOOLS)
|
||||
$(DOCKER_ROUTER_ADVERTISER)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE)_DBG_DEPENDS)
|
||||
|
||||
$(DOCKER_ROUTER_ADVERTISER)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE)_DBG_IMAGE_PACKAGES)
|
||||
|
||||
$(DOCKER_ROUTER_ADVERTISER)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE)
|
||||
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_ROUTER_ADVERTISER)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ROUTER_ADVERTISER)
|
||||
|
||||
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_ROUTER_ADVERTISER_DBG)
|
||||
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_ROUTER_ADVERTISER_DBG)
|
||||
|
||||
$(DOCKER_ROUTER_ADVERTISER)_CONTAINER_NAME = radv
|
||||
$(DOCKER_ROUTER_ADVERTISER)_RUN_OPT += --net=host --privileged -t
|
||||
|
@ -1,12 +1,25 @@
|
||||
# docker image for teamd agent
|
||||
|
||||
DOCKER_TEAMD = docker-teamd.gz
|
||||
DOCKER_TEAMD_STEM = docker-teamd
|
||||
DOCKER_TEAMD = $(DOCKER_TEAMD_STEM).gz
|
||||
DOCKER_TEAMD_DBG = $(DOCKER_TEAMD_STEM)-$(DBG_IMAGE_MARK).gz
|
||||
|
||||
$(DOCKER_TEAMD)_PATH = $(DOCKERS_PATH)/docker-teamd
|
||||
|
||||
$(DOCKER_TEAMD)_DEPENDS += $(SWSS) $(LIBTEAMDCT) $(LIBTEAM_UTILS) $(REDIS_TOOLS)
|
||||
$(DOCKER_TEAMD)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE)_DBG_DEPENDS)
|
||||
$(DOCKER_TEAMD)_DBG_DEPENDS += $(SWSS_DBG) $(LIBSWSSCOMMON_DBG)
|
||||
|
||||
$(DOCKER_TEAMD)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE)_DBG_IMAGE_PACKAGES)
|
||||
|
||||
$(DOCKER_TEAMD)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_TEAMD)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_TEAMD)
|
||||
|
||||
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_TEAMD_DBG)
|
||||
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_TEAMD_DBG)
|
||||
|
||||
$(DOCKER_TEAMD)_CONTAINER_NAME = teamd
|
||||
$(DOCKER_TEAMD)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_TEAMD)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
|
@ -1,14 +1,27 @@
|
||||
# docker image for telemetry agent
|
||||
|
||||
DOCKER_TELEMETRY = docker-sonic-telemetry.gz
|
||||
DOCKER_TELEMETRY_STEM = docker-sonic-telemetry
|
||||
DOCKER_TELEMETRY = $(DOCKER_TELEMETRY_STEM).gz
|
||||
DOCKER_TELEMETRY_DBG = $(DOCKER_TELEMETRY_STEM)-$(DBG_IMAGE_MARK).gz
|
||||
|
||||
$(DOCKER_TELEMETRY)_PATH = $(DOCKERS_PATH)/docker-sonic-telemetry
|
||||
|
||||
$(DOCKER_TELEMETRY)_DEPENDS += $(REDIS_TOOLS) $(SONIC_TELEMETRY)
|
||||
$(DOCKER_TELEMETRY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE)_DBG_DEPENDS)
|
||||
|
||||
$(DOCKER_TELEMETRY)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
$(DOCKER_TELEMETRY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE)_DBG_IMAGE_PACKAGES)
|
||||
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_TELEMETRY)
|
||||
ifeq ($(ENABLE_SYSTEM_TELEMETRY), y)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_TELEMETRY)
|
||||
endif
|
||||
|
||||
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_TELEMETRY_DBG)
|
||||
ifeq ($(ENABLE_SYSTEM_TELEMETRY), y)
|
||||
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_TELEMETRY_DBG)
|
||||
endif
|
||||
|
||||
$(DOCKER_TELEMETRY)_CONTAINER_NAME = telemetry
|
||||
$(DOCKER_TELEMETRY)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_TELEMETRY)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
|
@ -7,3 +7,7 @@ FRR = frr_$(FRR_VERSION)-1~sonic.debian8+1_amd64.deb
|
||||
$(FRR)_DEPENDS += $(LIBSNMP_DEV)
|
||||
$(FRR)_SRC_PATH = $(SRC_PATH)/sonic-frr
|
||||
SONIC_MAKE_DEBS += $(FRR)
|
||||
|
||||
FRR_DBG = frr-dbgsym_$(FRR_VERSION)-sonic-$(FRR_SUBVERSION)_amd64.deb
|
||||
$(eval $(call add_derived_package,$(FRR),$(FRR_DBG)))
|
||||
|
||||
|
60
slave.mk
60
slave.mk
@ -28,6 +28,7 @@ DEBS_PATH = $(TARGET_PATH)/debs
|
||||
FILES_PATH = $(TARGET_PATH)/files
|
||||
PYTHON_WHEELS_PATH = $(TARGET_PATH)/python-wheels
|
||||
PROJECT_ROOT = $(shell pwd)
|
||||
DBG_IMAGE_MARK = dbg
|
||||
|
||||
CONFIGURED_PLATFORM := $(shell [ -f .platform ] && cat .platform || echo generic)
|
||||
PLATFORM_PATH = platform/$(CONFIGURED_PLATFORM)
|
||||
@ -492,9 +493,40 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .pl
|
||||
|
||||
SONIC_TARGET_LIST += $(addprefix $(TARGET_PATH)/, $(SONIC_DOCKER_IMAGES))
|
||||
|
||||
# Targets for building debug docker images
|
||||
$(addprefix $(TARGET_PATH)/, $(SONIC_DOCKER_DBG_IMAGES)) : $(TARGET_PATH)/%-$(DBG_IMAGE_MARK).gz : .platform docker-start \
|
||||
$$(addprefix $(DEBS_PATH)/,$$($$*.gz_DBG_DEPENDS)) \
|
||||
$$(addsuffix -load,$$(addprefix $(TARGET_PATH)/,$$*.gz))
|
||||
$(HEADER)
|
||||
# Apply series of patches if exist
|
||||
mkdir -p $($*.gz_PATH)/debs $(LOG)
|
||||
sudo mount --bind $(DEBS_PATH) $($*.gz_PATH)/debs $(LOG)
|
||||
# Export variables for j2. Use path for unique variable names, e.g. docker_orchagent_debs
|
||||
$(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_dbg_debs=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_DBG_DEPENDS),RDEPENDS))\n" | awk '!a[$$0]++'))
|
||||
$(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_image_dbgs=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_DBG_IMAGE_PACKAGES)))\n" | awk '!a[$$0]++'))
|
||||
./build_debug_docker_j2.sh $* $(subst -,_,$(notdir $($*.gz_PATH)))_dbg_debs $(subst -,_,$(notdir $($*.gz_PATH)))_image_dbgs > $($*.gz_PATH)/Dockerfile-dbg.j2
|
||||
j2 $($*.gz_PATH)/Dockerfile-dbg.j2 > $($*.gz_PATH)/Dockerfile-dbg
|
||||
docker info $(LOG)
|
||||
docker build \
|
||||
$(if $($*.gz_DBG_DEPENDS), --squash --no-cache) \
|
||||
--build-arg http_proxy=$(HTTP_PROXY) \
|
||||
--build-arg https_proxy=$(HTTPS_PROXY) \
|
||||
--build-arg docker_container_name=$($*.gz_CONTAINER_NAME) \
|
||||
--label Tag=$(SONIC_GET_VERSION) \
|
||||
--file $($*.gz_PATH)/Dockerfile-dbg \
|
||||
-t $*-dbg $($*.gz_PATH) $(LOG)
|
||||
docker save $*-dbg | gzip -c > $@
|
||||
# Clean up
|
||||
if [ -f $($*.gz_PATH).patch/series ]; then pushd $($*.gz_PATH) && quilt pop -a -f; popd; fi
|
||||
$(FOOTER)
|
||||
|
||||
SONIC_TARGET_LIST += $(addprefix $(TARGET_PATH)/, $(SONIC_DOCKER_DBG_IMAGES))
|
||||
|
||||
DOCKER_LOAD_TARGETS = $(addsuffix -load,$(addprefix $(TARGET_PATH)/, \
|
||||
$(SONIC_SIMPLE_DOCKER_IMAGES) \
|
||||
$(SONIC_DOCKER_IMAGES)))
|
||||
$(SONIC_DOCKER_IMAGES) \
|
||||
$(SONIC_DOCKER_DBG_IMAGES)))
|
||||
|
||||
$(DOCKER_LOAD_TARGETS) : $(TARGET_PATH)/%.gz-load : .platform docker-start $$(TARGET_PATH)/$$*.gz
|
||||
$(HEADER)
|
||||
docker load -i $(TARGET_PATH)/$*.gz $(LOG)
|
||||
@ -551,19 +583,19 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
|
||||
$(foreach docker, $($*_DOCKERS),\
|
||||
export docker_image="$(docker)"
|
||||
export docker_image_name="$(basename $(docker))"
|
||||
export docker_container_name="$($(docker)_CONTAINER_NAME)"
|
||||
$(eval $(docker)_RUN_OPT += $($(docker)_$($*_IMAGE_TYPE)_RUN_OPT))
|
||||
export docker_image_run_opt="$($(docker)_RUN_OPT)"
|
||||
j2 files/build_templates/docker_image_ctl.j2 > $($(docker)_CONTAINER_NAME).sh
|
||||
if [ -f files/build_templates/$($(docker)_CONTAINER_NAME).service.j2 ]; then
|
||||
j2 files/build_templates/$($(docker)_CONTAINER_NAME).service.j2 > $($(docker)_CONTAINER_NAME).service
|
||||
export docker_container_name="$($(docker:-dbg.gz=.gz)_CONTAINER_NAME)"
|
||||
$(eval $(docker:-dbg.gz=.gz)_RUN_OPT += $($(docker:-dbg.gz=.gz)_$($*_IMAGE_TYPE)_RUN_OPT))
|
||||
export docker_image_run_opt="$($(docker:-dbg.gz=.gz)_RUN_OPT)"
|
||||
j2 files/build_templates/docker_image_ctl.j2 > $($(docker:-dbg.gz=.gz)_CONTAINER_NAME).sh
|
||||
if [ -f files/build_templates/$($(docker:-dbg.gz=.gz)_CONTAINER_NAME).service.j2 ]; then
|
||||
j2 files/build_templates/$($(docker:-dbg.gz=.gz)_CONTAINER_NAME).service.j2 > $($(docker:-dbg.gz=.gz)_CONTAINER_NAME).service
|
||||
fi
|
||||
chmod +x $($(docker)_CONTAINER_NAME).sh
|
||||
chmod +x $($(docker:-dbg.gz=.gz)_CONTAINER_NAME).sh
|
||||
)
|
||||
|
||||
export installer_start_scripts="$(foreach docker, $($*_DOCKERS),$(addsuffix .sh, $($(docker)_CONTAINER_NAME)))"
|
||||
export installer_services="$(foreach docker, $($*_DOCKERS),$(addsuffix .service, $($(docker)_CONTAINER_NAME)))"
|
||||
export installer_extra_files="$(foreach docker, $($*_DOCKERS), $(foreach file, $($(docker)_BASE_IMAGE_FILES), $($(docker)_PATH)/base_image_files/$(file)))"
|
||||
export installer_start_scripts="$(foreach docker, $($*_DOCKERS),$(addsuffix .sh, $($(docker:-dbg.gz=.gz)_CONTAINER_NAME)))"
|
||||
export installer_services="$(foreach docker, $($*_DOCKERS),$(addsuffix .service, $($(docker:-dbg.gz=.gz)_CONTAINER_NAME)))"
|
||||
export installer_extra_files="$(foreach docker, $($*_DOCKERS), $(foreach file, $($(docker:-dbg.gz=.gz)_BASE_IMAGE_FILES), $($(docker:-dbg.gz=.gz)_PATH)/base_image_files/$(file)))"
|
||||
|
||||
j2 -f env files/initramfs-tools/union-mount.j2 onie-image.conf > files/initramfs-tools/union-mount
|
||||
j2 -f env files/initramfs-tools/arista-convertfs.j2 onie-image.conf > files/initramfs-tools/arista-convertfs
|
||||
@ -575,6 +607,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
|
||||
chmod +x sonic_debian_extension.sh,
|
||||
)
|
||||
|
||||
DEBUG_IMG="$(INSTALL_DEBUG_TOOLS)" \
|
||||
USERNAME="$(USERNAME)" \
|
||||
PASSWORD="$(PASSWORD)" \
|
||||
./build_debian.sh $(LOG)
|
||||
@ -586,8 +619,8 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
|
||||
./build_image.sh $(LOG)
|
||||
|
||||
$(foreach docker, $($*_DOCKERS), \
|
||||
rm -f $($(docker)_CONTAINER_NAME).sh
|
||||
rm -f $($(docker)_CONTAINER_NAME).service
|
||||
rm -f $($(docker:-dbg.gz=.gz)_CONTAINER_NAME).sh
|
||||
rm -f $($(docker:-dbg.gz=.gz)_CONTAINER_NAME).service
|
||||
)
|
||||
|
||||
$(if $($*_DOCKERS),
|
||||
@ -627,6 +660,7 @@ $(SONIC_CLEAN_FILES) : $(FILES_PATH)/%-clean : .platform
|
||||
|
||||
SONIC_CLEAN_TARGETS += $(addsuffix -clean,$(addprefix $(TARGET_PATH)/, \
|
||||
$(SONIC_DOCKER_IMAGES) \
|
||||
$(SONIC_DOCKER_DBG_IMAGES) \
|
||||
$(SONIC_SIMPLE_DOCKER_IMAGES) \
|
||||
$(SONIC_INSTALLERS)))
|
||||
$(SONIC_CLEAN_TARGETS) : $(TARGET_PATH)/%-clean : .platform
|
||||
|
@ -3,6 +3,7 @@ SHELL = /bin/bash
|
||||
.SHELLFLAGS += -e
|
||||
|
||||
MAIN_TARGET = frr_$(FRR_VERSION)-1~sonic.debian8+1_amd64.deb
|
||||
DERIVED_TARGET = $(FRR_DBG)
|
||||
|
||||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
||||
|
||||
@ -35,7 +36,8 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
||||
# build package
|
||||
dpkg-buildpackage -rfakeroot -b -us -uc
|
||||
cd ..
|
||||
mv $* $(DEST)/
|
||||
mv $(DERIVED_TARGET) $* $(DEST)/
|
||||
|
||||
popd
|
||||
|
||||
$(addprefix $(DEST)/, $(DERIVED_TARGET)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)
|
||||
|
Loading…
Reference in New Issue
Block a user