[build]: sonic arm64 changes (#3419)
Marvell arm64 changes over sonic Signed-off-by: Antony Rheneus <arheneus@marvell.com>
This commit is contained in:
parent
3ff0c4d0dc
commit
11258e5db4
@ -126,7 +126,7 @@ ifneq (,$(filter $(CONFIGURED_ARCH), armhf arm64))
|
||||
|
||||
DOCKER_MULTIARCH_CHECK := docker inspect --type image multiarch/qemu-user-static:register &> /dev/null || (echo "multiarch docker not found ..."; docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes)
|
||||
|
||||
DOCKER_SERVICE_MULTIARCH_CHECK := docker -H unix:///var/run/march/docker.sock info &> /dev/null || (echo "Docker march service not running..."; sudo rm -fr /var/run/march/docker*; (sudo $(SONIC_NATIVE_DOCKERD_FOR_MUTLIARCH) &) &>/dev/null ; sleep 1; sudo $(SONIC_USERFACL_DOCKERD_FOR_MUTLIARCH);)
|
||||
DOCKER_SERVICE_MULTIARCH_CHECK := docker -H unix:///var/run/march/docker.sock info &> /dev/null || (echo "Docker march service not running..."; sudo rm -fr /var/run/march/*; (sudo $(SONIC_NATIVE_DOCKERD_FOR_MUTLIARCH) &) &>/dev/null ; sleep 1; sudo $(SONIC_USERFACL_DOCKERD_FOR_MUTLIARCH);)
|
||||
|
||||
# Docker service to load the compiled dockers-*.gz
|
||||
SONIC_NATIVE_DOCKERD_FOR_DOCKERFS := rm -fr $(PWD)/dockerfs/; mkdir -p $(PWD)/dockerfs/; sudo dockerd --storage-driver=overlay2 --iptables=false \
|
||||
|
@ -32,6 +32,7 @@ COPY ["dpkg_01_drop", "/etc/dpkg/dpkg.cfg.d/01_drop"]
|
||||
COPY ["sources.list.armhf", "/etc/apt/sources.list"]
|
||||
{% elif CONFIGURED_ARCH == "arm64" %}
|
||||
COPY ["sources.list.arm64", "/etc/apt/sources.list"]
|
||||
COPY ["aptconf_archive_expired_release", "/etc/apt/apt.conf.d"]
|
||||
{% else %}
|
||||
COPY ["sources.list", "/etc/apt/sources.list"]
|
||||
{% endif %}
|
||||
|
3
dockers/docker-base/aptconf_archive_expired_release
Normal file
3
dockers/docker-base/aptconf_archive_expired_release
Normal file
@ -0,0 +1,3 @@
|
||||
# Instruct apt-get to override expired releases repo list for jessie archives
|
||||
|
||||
Acquire::Check-Valid-Until "0";
|
@ -29,11 +29,16 @@ RUN apt-get update && \
|
||||
libmnl0 \
|
||||
bridge-utils
|
||||
|
||||
{% if CONFIGURED_ARCH == "armhf" %}
|
||||
{% if ( CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" ) %}
|
||||
## Fix for gcc/python not found in arm docker
|
||||
RUN apt-get install -y gcc-6
|
||||
RUN ln -s -f /usr/bin/gcc-6 /usr/bin/arm-linux-gnueabihf-gcc
|
||||
RUN apt-get install -f -y python2.7 python2.7-dev
|
||||
RUN apt-get install -y gcc-6
|
||||
{% endif %}
|
||||
{% if CONFIGURED_ARCH == "armhf" %}
|
||||
RUN ln -s -f /usr/bin/gcc-6 /usr/bin/arm-linux-gnueabihf-gcc
|
||||
{% endif %}
|
||||
{% if CONFIGURED_ARCH == "arm64" %}
|
||||
RUN ln -s -f /usr/bin/gcc-6 /usr/bin/aarch64-linux-gnu-gcc
|
||||
{% endif %}
|
||||
|
||||
RUN pip install \
|
||||
@ -44,7 +49,7 @@ RUN pip install \
|
||||
netifaces==0.10.7 \
|
||||
monotonic==1.5
|
||||
|
||||
{% if CONFIGURED_ARCH == "armhf" %}
|
||||
{% if ( CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" ) %}
|
||||
# Remove installed gcc
|
||||
RUN apt-get remove -y gcc-6
|
||||
{% endif %}
|
||||
|
@ -33,7 +33,6 @@ RUN apt-get update && \
|
||||
{{ install_debian_packages(docker_snmp_sv2_debs.split(' ')) }}
|
||||
{%- endif %}
|
||||
|
||||
{%- if CONFIGURED_ARCH == "armhf" %}
|
||||
# Fix for hiredis compilation issues for ARM
|
||||
# python will throw for missing locale
|
||||
RUN apt-get install -y locales
|
||||
@ -42,7 +41,6 @@ RUN dpkg-reconfigure --frontend noninteractive locales
|
||||
ENV LC_CTYPE=en_US.UTF-8
|
||||
RUN sed -i '/^#.* en_US.* /s/^#//' /etc/locale.gen
|
||||
RUN locale-gen
|
||||
{% endif %}
|
||||
|
||||
# Install up-to-date version of pip
|
||||
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.6
|
||||
|
7
platform/marvell-arm64/docker-ptf-mrvl.mk
Normal file
7
platform/marvell-arm64/docker-ptf-mrvl.mk
Normal file
@ -0,0 +1,7 @@
|
||||
# docker image for docker-ptf-mrvl
|
||||
|
||||
DOCKER_PTF_MRVL = docker-ptf-mrvl.gz
|
||||
$(DOCKER_PTF_MRVL)_PATH = $(DOCKERS_PATH)/docker-ptf-saithrift
|
||||
$(DOCKER_PTF_MRVL)_DEPENDS += $(PYTHON_SAITHRIFT)
|
||||
$(DOCKER_PTF_MRVL)_LOAD_DOCKERS += $(DOCKER_PTF)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_PTF_MRVL)
|
15
platform/marvell-arm64/docker-saiserver-mrvl.mk
Normal file
15
platform/marvell-arm64/docker-saiserver-mrvl.mk
Normal file
@ -0,0 +1,15 @@
|
||||
# docker image for mrvl saiserver
|
||||
|
||||
DOCKER_SAISERVER_MRVL = docker-saiserver-mrvl.gz
|
||||
$(DOCKER_SAISERVER_MRVL)_PATH = $(PLATFORM_PATH)/docker-saiserver-mrvl
|
||||
$(DOCKER_SAISERVER_MRVL)_DEPENDS += $(SAISERVER)
|
||||
$(DOCKER_SAISERVER_MRVL)_FILES += $(DSSERVE) $(BCMCMD)
|
||||
$(DOCKER_SAISERVER_MRVL)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SAISERVER_MRVL)
|
||||
|
||||
$(DOCKER_SAISERVER_MRVL)_CONTAINER_NAME = saiserver
|
||||
$(DOCKER_SAISERVER_MRVL)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_SAISERVER_MRVL)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||
$(DOCKER_SAISERVER_MRVL)_RUN_OPT += -v /var/run/docker-saiserver:/var/run/sswsyncd
|
||||
$(DOCKER_SAISERVER_MRVL)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
$(DOCKER_SAISERVER_MRVL)_RUN_OPT += -v /host/warmboot:/var/warmboot
|
@ -9,8 +9,9 @@ $(DOCKER_SYNCD_MRVL_RPC)_DEPENDS += $(SYNCD_RPC_DBG) \
|
||||
$(LIBSAIMETADATA_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
endif
|
||||
$(DOCKER_SYNCD_MRVL_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_MRVL)
|
||||
$(DOCKER_SYNCD_MRVL_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_BASE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_MRVL_RPC)
|
||||
SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_MRVL_RPC)
|
||||
ifeq ($(ENABLE_SYNCD_RPC),y)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MRVL_RPC)
|
||||
endif
|
||||
@ -19,3 +20,4 @@ $(DOCKER_SYNCD_MRVL_RPC)_CONTAINER_NAME = syncd
|
||||
$(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||
$(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
$(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /host/warmboot:/var/warmboot
|
||||
|
@ -1,21 +1,13 @@
|
||||
# docker image for mrvl syncd
|
||||
|
||||
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) \
|
||||
DOCKER_SYNCD_PLATFORM_CODE = mrvl
|
||||
include $(PLATFORM_PATH)/../template/docker-syncd-base.mk
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD) $(PYTHON_SDK_API)
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_DBG_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)
|
||||
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
|
||||
$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot
|
||||
|
@ -26,7 +26,7 @@ RUN dpkg -i \
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor %}
|
||||
|
||||
COPY ["start.sh", "syncd.sh", "/usr/bin/"]
|
||||
COPY ["start.sh", "/usr/bin/"]
|
||||
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
||||
|
||||
## Clean up
|
||||
@ -34,4 +34,3 @@ RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
||||
RUN rm -rf /debs
|
||||
|
||||
ENTRYPOINT ["/usr/bin/supervisord"]
|
||||
|
||||
|
@ -5,4 +5,3 @@ rm -f /var/run/rsyslogd.pid
|
||||
supervisorctl start rsyslogd
|
||||
|
||||
supervisorctl start syncd
|
||||
|
||||
|
@ -26,4 +26,3 @@ autostart=false
|
||||
autorestart=false
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
|
||||
|
@ -12,7 +12,7 @@ PYTHON_SAITHRIFT = python-saithrift_$(SAI_VER)_$(CONFIGURED_ARCH).deb
|
||||
$(eval $(call add_extra_package,$(LIBSAITHRIFT_DEV),$(PYTHON_SAITHRIFT)))
|
||||
|
||||
SAISERVER = saiserver_$(SAI_VER)_$(CONFIGURED_ARCH).deb
|
||||
$(SAISERVER)_RDEPENDS += $(LIBTHRIFT) $(BRCM_SAI)
|
||||
$(SAISERVER)_RDEPENDS += $(LIBTHRIFT) $(MRVL_SAI)
|
||||
$(eval $(call add_extra_package,$(LIBSAITHRIFT_DEV),$(SAISERVER)))
|
||||
|
||||
SAISERVER_DBG = saiserver-dbg_$(SAI_VER)_$(CONFIGURED_ARCH).deb
|
||||
|
@ -1,8 +1,10 @@
|
||||
# linux kernel package for marvell arm64
|
||||
|
||||
KVERSION= 4.4.8
|
||||
KVERSION = 4.9.168
|
||||
|
||||
|
||||
LINUX_KERNEL= linux-image-4.4.8_4.4.8-4_arm64.deb
|
||||
$(LINUX_KERNEL)_PATH = /sonic
|
||||
SONIC_COPY_DEBS += $(LINUX_KERNEL)
|
||||
LINUX_KERNEL = linux-image-4.9.168-arm64.deb
|
||||
export LINUX_KERNEL
|
||||
|
||||
$(LINUX_KERNEL)_SRC_PATH = $(PLATFORM_PATH)/linux
|
||||
SONIC_MAKE_DEBS += $(LINUX_KERNEL)
|
||||
|
10
platform/marvell-arm64/linux/Makefile
Normal file
10
platform/marvell-arm64/linux/Makefile
Normal file
@ -0,0 +1,10 @@
|
||||
.ONESHELL:
|
||||
SHELL = /bin/bash
|
||||
.SHELLFLAGS += -e
|
||||
|
||||
LINUX_KERNEL_MRVL_URL = https://github.com/Marvell-switching/sonic-marvell-binaries/raw/master/arm64/kernel/$(LINUX_KERNEL)
|
||||
|
||||
$(addprefix $(DEST)/, $(LINUX_KERNEL)): $(DEST)/% :
|
||||
# get deb package
|
||||
wget -O $(DEST)/$(LINUX_KERNEL) $(LINUX_KERNEL_MRVL_URL)
|
||||
|
@ -1,7 +1,7 @@
|
||||
# sonic marvell one image installer
|
||||
|
||||
SONIC_ONE_IMAGE = sonic-marvell.bin
|
||||
$(SONIC_ONE_IMAGE)_MACHINE = marvell
|
||||
SONIC_ONE_IMAGE = sonic-marvell-arm64.bin
|
||||
$(SONIC_ONE_IMAGE)_MACHINE = marvell-arm64
|
||||
$(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie
|
||||
$(SONIC_ONE_IMAGE)_INSTALLS += $(SYSTEMD_SONIC_GENERATOR)
|
||||
ifeq ($(INSTALL_DEBUG_TOOLS),y)
|
||||
|
@ -2,16 +2,21 @@
|
||||
include $(PLATFORM_PATH)/sai.mk
|
||||
include $(PLATFORM_PATH)/docker-syncd-mrvl.mk
|
||||
include $(PLATFORM_PATH)/docker-syncd-mrvl-rpc.mk
|
||||
include $(PLATFORM_PATH)/docker-saiserver-mrvl.mk
|
||||
include $(PLATFORM_PATH)/libsaithrift-dev.mk
|
||||
include $(PLATFORM_PATH)/docker-ptf-mrvl.mk
|
||||
include $(PLATFORM_PATH)/one-image.mk
|
||||
include $(PLATFORM_PATH)/linux-kernel-arm64.mk
|
||||
ENABLE_SYSTEM_TELEMETRY = ""
|
||||
ENABLE_SYNCD_RPC = ""
|
||||
|
||||
|
||||
SONIC_ALL += $(SONIC_ONE_IMAGE) \
|
||||
$(DOCKER_FPM) \
|
||||
$(DOCKER_SYNCD_MRVL_RPC)
|
||||
$(DOCKER_FPM)
|
||||
#$(DOCKER_SYNCD_MRVL_RPC)
|
||||
|
||||
# Inject mrvl sai into sairedis
|
||||
$(LIBSAIREDIS)_DEPENDS += $(MRVL_FPA) $(MRVL_SAI) $(LIBSAITHRIFT_DEV_MRVL)
|
||||
$(LIBSAIREDIS)_DEPENDS += $(MRVL_SAI) $(LIBSAITHRIFT_DEV_MRVL)
|
||||
|
||||
# Runtime dependency on mrvl sai is set only for syncd
|
||||
$(SYNCD)_RDEPENDS += $(MRVL_SAI)
|
||||
|
@ -2,7 +2,7 @@
|
||||
SHELL = /bin/bash
|
||||
.SHELLFLAGS += -e
|
||||
|
||||
MRVL_SAI_URL = https://github.com/Marvell-switching/SAI-plugin/raw/$(MRVL_SAI_TAG)/sai_deb/$(MRVL_SAI)
|
||||
MRVL_SAI_URL = https://github.com/Marvell-switching/sonic-marvell-binaries/raw/master/arm64/sai-plugin/$(MRVL_SAI)
|
||||
|
||||
$(addprefix $(DEST)/, $(MRVL_SAI)): $(DEST)/% :
|
||||
# get deb package
|
||||
|
@ -21,7 +21,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
||||
stg init
|
||||
stg import -s ../patch/series
|
||||
|
||||
ifeq ($(CONFIGURED_ARCH), armhf)
|
||||
ifneq (,$(filter $(CONFIGURED_ARCH), armhf arm64))
|
||||
stg import -s ../patch/series-armhf
|
||||
endif
|
||||
|
||||
|
@ -5,7 +5,7 @@ SHELL = /bin/bash
|
||||
MAIN_TARGET = libnss-tacplus_$(NSS_TACPLUS_VERSION)_$(CONFIGURED_ARCH).deb
|
||||
|
||||
GIT_APPLY = am
|
||||
ifeq ($(CONFIGURED_ARCH), armhf)
|
||||
ifneq (,$(filter $(CONFIGURED_ARCH), armhf arm64))
|
||||
# Workaround git am issue "Out of memory getdelim failed"
|
||||
GIT_APPLY = apply
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user