build orchagent and syncd docker on broadcom platform (#118)
* build orchagent and syncd docker on broadcom platform
This commit is contained in:
parent
c199614b69
commit
98e3479e26
@ -1,29 +0,0 @@
|
|||||||
FROM docker-base
|
|
||||||
|
|
||||||
RUN apt-get update
|
|
||||||
|
|
||||||
COPY ["deps/libhiredis0.13*.deb", "deps/libnl-3-200_*.deb", "deps/libnl-genl-3-200_*.deb", "deps/libnl-route-3-200_*.deb", "deps/libswsscommon_*.deb", "deps/libopennsl_*.deb", "deps/libsaibcm_*.deb", "deps/libsairedis_*.deb", "deps/libsaimetadata_*.deb", "deps/syncd_*.deb", "/deps/"]
|
|
||||||
|
|
||||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \
|
|
||||||
dpkg_apt /deps/libhiredis0.13*.deb \
|
|
||||||
&& dpkg_apt /deps/libnl-3-200_*.deb \
|
|
||||||
&& dpkg_apt /deps/libnl-genl-3-200_*.deb \
|
|
||||||
&& dpkg_apt /deps/libnl-route-3-200_*.deb \
|
|
||||||
&& dpkg_apt /deps/libswsscommon_*.deb \
|
|
||||||
&& dpkg_apt /deps/libopennsl_*.deb \
|
|
||||||
&& dpkg_apt /deps/libsaibcm_*.deb \
|
|
||||||
&& dpkg_apt /deps/libsairedis_*.deb \
|
|
||||||
&& dpkg_apt /deps/libsaimetadata_*.deb \
|
|
||||||
&& dpkg_apt /deps/syncd_*.deb
|
|
||||||
|
|
||||||
## TODO: add kmod into Depends
|
|
||||||
RUN apt-get install -f kmod
|
|
||||||
|
|
||||||
COPY ["deps/dsserve", "deps/bcmcmd", "start.sh", "/usr/bin/"]
|
|
||||||
|
|
||||||
## Clean up
|
|
||||||
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
|
||||||
RUN rm -rf /deps
|
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/bash"]
|
|
||||||
CMD ["/usr/bin/start.sh"]
|
|
7
platform/broadcom/docker-orchagent-brcm.mk
Normal file
7
platform/broadcom/docker-orchagent-brcm.mk
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# 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)
|
||||||
|
$(DOCKER_ORCHAGENT_BRCM)_LOAD_DOCKERS += $(DOCKER_BASE)
|
||||||
|
SONIC_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_BRCM)
|
8
platform/broadcom/docker-syncd-brcm.mk
Normal file
8
platform/broadcom/docker-syncd-brcm.mk
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# 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 += $(BRCM_DSSERVE) $(BRCM_BCMCMD)
|
||||||
|
$(DOCKER_SYNCD_BRCM)_LOAD_DOCKERS += $(DOCKER_BASE)
|
||||||
|
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM)
|
19
platform/broadcom/docker-syncd-brcm/Dockerfile.template
Executable file
19
platform/broadcom/docker-syncd-brcm/Dockerfile.template
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
FROM docker-base
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
|
||||||
|
COPY deps /deps
|
||||||
|
|
||||||
|
SED_DPKG
|
||||||
|
|
||||||
|
## TODO: add kmod into Depends
|
||||||
|
RUN apt-get install -f kmod
|
||||||
|
|
||||||
|
COPY ["deps/dsserve", "deps/bcmcmd", "start.sh", "/usr/bin/"]
|
||||||
|
|
||||||
|
## Clean up
|
||||||
|
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
||||||
|
RUN rm -rf /deps
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bin/bash"]
|
||||||
|
CMD ["/usr/bin/start.sh"]
|
@ -1,20 +1,20 @@
|
|||||||
OPENNSL = libopennsl_6.4.11-1+0~20160719212144.23~1.gbp8ec2d1_amd64.deb
|
include $(PLATFORM_PATH)/sdk.mk
|
||||||
$(OPENNSL)_PATH = $(PLATFORM_PATH)/brcm_sdk
|
include $(PLATFORM_PATH)/sai.mk
|
||||||
BRCM_SAI = libsaibcm_1.0.2~20160727172452.52_amd64.deb
|
include $(PLATFORM_PATH)/docker-orchagent-brcm.mk
|
||||||
$(BRCM_SAI)_PATH = $(PLATFORM_PATH)/brcm_sdk
|
include $(PLATFORM_PATH)/docker-syncd-brcm.mk
|
||||||
BRCM_SAI_DBG = libsaibcm-dbg_1.0.2~20160727172452.52_amd64.deb
|
|
||||||
$(BRCM_SAI_DEV)_PATH = $(PLATFORM_PATH)/brcm_sdk
|
|
||||||
BRCM_SAI_DEV = libsaibcm-dev_1.0.2~20160727172452.52_amd64.deb
|
|
||||||
$(BRCM_SAI_DBG)_PATH = $(PLATFORM_PATH)/brcm_sdk
|
|
||||||
|
|
||||||
SONIC_COPY_DEBS += $(OPENNSL) $(BRCM_SAI) $(BRCM_SAI_DBG) $(BRCM_SAI_DEV)
|
BRCM_DSSERVE = dsserve
|
||||||
|
$(BRCM_DSSERVE)_PATH = $(PLATFORM_PATH)/sdk
|
||||||
|
BRCM_BCMCMD = bcmcmd
|
||||||
|
$(BRCM_BCMCMD)_PATH = $(PLATFORM_PATH)/sdk
|
||||||
|
|
||||||
# TODO: Put dependencies for SDK packages
|
SONIC_COPY_FILES += $(BRCM_DSSERVE) $(BRCM_BCMCMD)
|
||||||
|
|
||||||
SONIC_ALL += $(SONIC_GENERIC) $(DOCKER_SYNCD) $(DOCKER_ORCHAGENT) $(DOCKER_FPM)
|
SONIC_ALL += $(DOCKER_SYNCD_BRCM) \
|
||||||
|
$(DOCKER_ORCHAGENT_MLNX)
|
||||||
|
|
||||||
# Inject brcm sai into sairedis
|
# Inject brcm sai into sairedis
|
||||||
$(LIBSAIREDIS)_DEPENDS += $(BRCM_LIBSAI)
|
$(LIBSAIREDIS)_DEPENDS += $(BRCM_OPENNSL) $(BRCM_SAI) $(BRCM_SAI_DEV)
|
||||||
|
|
||||||
# Runtime dependency on brcm sai is set only for syncd
|
# Runtime dependency on brcm sai is set only for syncd
|
||||||
$(SYNCD)_RDEPENDS += $(BRCM_LIBSAI)
|
$(SYNCD)_RDEPENDS += $(BRCM_OPENNSL) $(BRCM_SAI)
|
||||||
|
10
platform/broadcom/sai.mk
Normal file
10
platform/broadcom/sai.mk
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
BRCM_SAI = libsaibcm_2.0.3.7~20161214010054.112_amd64.deb
|
||||||
|
$(BRCM_SAI)_PATH = $(PLATFORM_PATH)/sdk
|
||||||
|
BRCM_SAI_DEV = libsaibcm-dev_2.0.3.7~20161214010054.112_amd64.deb
|
||||||
|
$(BRCM_SAI_DEV)_PATH = $(PLATFORM_PATH)/sdk
|
||||||
|
$(eval $(call add_derived_package,$(BRCM_SAI),$(BRCM_SAI_DEV)))
|
||||||
|
|
||||||
|
SONIC_COPY_DEBS += $(BRCM_SAI)
|
||||||
|
|
||||||
|
$(BRCM_SAI)_DEPENDS += $(BRCM_OPENNSL)
|
||||||
|
$(BRCM_SAI_DEV)_DEPENDS += $(BRCM_SAI)
|
4
platform/broadcom/sdk.mk
Normal file
4
platform/broadcom/sdk.mk
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
BRCM_OPENNSL = libopennsl_3.2.1.5+0~20161214000201.54~1.gbpb514c3_amd64.deb
|
||||||
|
$(BRCM_OPENNSL)_PATH = $(PLATFORM_PATH)/sdk
|
||||||
|
|
||||||
|
SONIC_COPY_DEBS += $(BRCM_OPENNSL)
|
37
slave.mk
37
slave.mk
@ -62,6 +62,31 @@ MAKEFLAGS += -j $(SONIC_CONFIG_BUILD_JOBS)
|
|||||||
## All rules must go after includes for propper targets expansion
|
## All rules must go after includes for propper targets expansion
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
## Local targets
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
# Copy debian packages from local directory
|
||||||
|
# Add new package for copy:
|
||||||
|
# SOME_NEW_DEB = some_new_deb.deb
|
||||||
|
# $(SOME_NEW_DEB)_PATH = path/to/some_new_deb.deb
|
||||||
|
# SONIC_COPY_DEBS += $(SOME_NEW_DEB)
|
||||||
|
$(addprefix $(DEBS_PATH)/, $(SONIC_COPY_DEBS)) : $(DEBS_PATH)/% : .platform
|
||||||
|
$(HEADER)
|
||||||
|
$(foreach deb,$* $($*_DERIVED_DEBS), \
|
||||||
|
{ cp $($(deb)_PATH)/$(deb) $(DEBS_PATH)/ $(LOG) || exit 1 ; } ; )
|
||||||
|
$(FOOTER)
|
||||||
|
|
||||||
|
# Copy regular files from local directory
|
||||||
|
# Add new package for copy:
|
||||||
|
# SOME_NEW_FILE = some_new_file
|
||||||
|
# $(SOME_NEW_FILE)_PATH = path/to/some_new_file
|
||||||
|
# SONIC_COPY_FILES += $(SOME_NEW_FILE)
|
||||||
|
$(addprefix $(DEBS_PATH)/, $(SONIC_COPY_FILES)) : $(DEBS_PATH)/% : .platform
|
||||||
|
$(HEADER)
|
||||||
|
cp $($*_PATH)/$* $(DEBS_PATH)/ $(LOG) || exit 1
|
||||||
|
$(FOOTER)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
## Online targets
|
## Online targets
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -88,17 +113,6 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_ONLINE_FILES)) : $(DEBS_PATH)/% : .platform
|
|||||||
wget -O $@ $($*_URL) $(LOG)
|
wget -O $@ $($*_URL) $(LOG)
|
||||||
$(FOOTER)
|
$(FOOTER)
|
||||||
|
|
||||||
# Copy debian packages from local directory
|
|
||||||
# Add new package for copy:
|
|
||||||
# SOME_NEW_DEB = some_new_deb.deb
|
|
||||||
# $(SOME_NEW_DEB)_PATH = path/to/some_new_deb.deb
|
|
||||||
# SONIC_COPY_DEBS += $(SOME_NEW_DEB)
|
|
||||||
$(addprefix $(DEBS_PATH)/, $(SONIC_COPY_DEBS)) : $(DEBS_PATH)/% : .platform
|
|
||||||
$(HEADER)
|
|
||||||
$(foreach deb,$* $($*_DERIVED_DEBS), \
|
|
||||||
{ cp $($(deb)_PATH) $(DEBS_PATH)/ $(LOG) || exit 1 ; } ; )
|
|
||||||
$(FOOTER)
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
## Debian package related targets
|
## Debian package related targets
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -271,6 +285,7 @@ SONIC_CLEAN_DEBS = $(addsuffix -clean,$(addprefix $(DEBS_PATH)/, \
|
|||||||
$(SONIC_ONLINE_DEBS) \
|
$(SONIC_ONLINE_DEBS) \
|
||||||
$(SONIC_ONLINE_FILES) \
|
$(SONIC_ONLINE_FILES) \
|
||||||
$(SONIC_COPY_DEBS) \
|
$(SONIC_COPY_DEBS) \
|
||||||
|
$(SONIC_COPY_FILES) \
|
||||||
$(SONIC_MAKE_DEBS) \
|
$(SONIC_MAKE_DEBS) \
|
||||||
$(SONIC_DPKG_DEBS) \
|
$(SONIC_DPKG_DEBS) \
|
||||||
$(SONIC_PYTHON_STDEB_DEBS) \
|
$(SONIC_PYTHON_STDEB_DEBS) \
|
||||||
|
Loading…
Reference in New Issue
Block a user