Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[oneimage] Add cavium packet driver #469

Merged
merged 3 commits into from
Apr 4, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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" or sonic_asic_platform == "cavium" %}
Copy link
Collaborator

@lguohan lguohan Apr 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the issue for installation on your platform? mellanox is a workaround, it should be installation.

Copy link
Contributor Author

@NStetskovych-zz NStetskovych-zz Apr 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installation done in syncd PreExec in xpnet.sh script.

Copy link
Contributor Author

@NStetskovych-zz NStetskovych-zz Apr 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current package has depmod -a in postinstall script that fails in chroot during building.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use dh_installinit to automatically generate the post-install script, it will use the return code of policy-rc.d to determine whether to run the post-install script or not.

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
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/7704afc78cc1ce3b4e2aca6659afa9dc171ba874/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