diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index c5df3f9ac7..2720514960 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -138,11 +138,11 @@ sudo chmod a+x $FILESYSTEM_ROOT/usr/sbin/policy-rc.d {% if installer_debs.strip() -%} {% for deb in installer_debs.strip().split(' ') -%} -if [ $sonic_asic_platform == "mellanox" ]; then +{% if sonic_asic_platform == "mellanox" %} sudo dpkg --extract {{deb}} $FILESYSTEM_ROOT -else +{% else %} sudo dpkg --root=$FILESYSTEM_ROOT -i {{deb}} || sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f -fi +{% endif %} {% endfor %} {% endif %} diff --git a/files/build_templates/swss.service.j2 b/files/build_templates/swss.service.j2 index 87db5eb3b6..6e51522236 100644 --- a/files/build_templates/swss.service.j2 +++ b/files/build_templates/swss.service.j2 @@ -22,7 +22,6 @@ ExecStartPre=/etc/init.d/sxdkernel start ExecStartPre=/usr/bin/mst start ExecStartPre=/etc/mlnx/msn2700 start {% elif sonic_asic_platform == 'cavium' %} -ExecStartPre=-/etc/init.d/xpnet.sh stop ExecStartPre=/etc/init.d/xpnet.sh start {% endif %} diff --git a/platform/cavium/cavm_platform_modules.mk b/platform/cavium/cavm-platform-modules.mk similarity index 100% rename from platform/cavium/cavm_platform_modules.mk rename to platform/cavium/cavm-platform-modules.mk diff --git a/platform/cavium/cavm-xpnet.mk b/platform/cavium/cavm-xpnet.mk new file mode 100644 index 0000000000..0ae3c14703 --- /dev/null +++ b/platform/cavium/cavm-xpnet.mk @@ -0,0 +1,6 @@ +CAVM_SAI_URL = https://github.com/XPliant/OpenXPS/raw/18cd5fb556b6262943c0af70375e2631ac3fe08d/SAI + +CAVM_XPNET_DEB = xp80-Pcie-Endpoint.deb +$(CAVM_XPNET_DEB)_URL = $(CAVM_SAI_URL)/netdev/$(CAVM_XPNET_DEB) + +SONIC_ONLINE_DEBS += $(CAVM_XPNET_DEB) diff --git a/platform/cavium/one-image.mk b/platform/cavium/one-image.mk index 0b011f77ac..33bcd92cc0 100644 --- a/platform/cavium/one-image.mk +++ b/platform/cavium/one-image.mk @@ -3,6 +3,7 @@ SONIC_ONE_IMAGE = sonic-cavium.bin $(SONIC_ONE_IMAGE)_MACHINE = cavium $(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie -$(SONIC_ONE_IMAGE)_DEPENDS += $(CAVM_PLATFORM_DEB) +$(SONIC_ONE_IMAGE)_DEPENDS += $(CAVM_PLATFORM_DEB) +$(SONIC_ONE_IMAGE)_DEPENDS += $(CAVM_XPNET_DEB) $(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES) SONIC_INSTALLERS += $(SONIC_ONE_IMAGE) diff --git a/platform/cavium/rules.mk b/platform/cavium/rules.mk index f72989c241..0c11286019 100644 --- a/platform/cavium/rules.mk +++ b/platform/cavium/rules.mk @@ -1,7 +1,8 @@ include $(PLATFORM_PATH)/cavm-sai.mk include $(PLATFORM_PATH)/docker-syncd-cavm.mk include $(PLATFORM_PATH)/docker-orchagent-cavm.mk -include $(PLATFORM_PATH)/cavm_platform_modules.mk +include $(PLATFORM_PATH)/cavm-platform-modules.mk +include $(PLATFORM_PATH)/cavm-xpnet.mk include $(PLATFORM_PATH)/one-image.mk include $(PLATFORM_PATH)/libsaithrift-dev.mk include $(PLATFORM_PATH)/python-saithrift.mk