Skip to content

Commit

Permalink
[oneimage] Add cavium packet driver (#469)
Browse files Browse the repository at this point in the history
* [oneimage] Add cavium packet driver

Signed-off-by: Nadiya.Stetskovych <Nadiya.Stetskovych@cavium.com>

* Rename cavm_platform_modules.mk and cavm_xpnet.mk to fit naming convetion

Signed-off-by: Nadiya.Stetskovych <Nadiya.Stetskovych@cavium.com>

* Allow dpkg -i for cavm_xpnet

Signed-off-by: Nadiya.Stetskovych <Nadiya.Stetskovych@cavium.com>
  • Loading branch information
Nadiya authored and lguohan committed Apr 4, 2017
1 parent 4ff0f86 commit 6f04867
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
6 changes: 3 additions & 3 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

Expand Down
1 change: 0 additions & 1 deletion files/build_templates/swss.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions platform/cavium/cavm-xpnet.mk
Original file line number Diff line number Diff line change
@@ -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)
3 changes: 2 additions & 1 deletion platform/cavium/one-image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 2 additions & 1 deletion platform/cavium/rules.mk
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 6f04867

Please sign in to comment.