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

platform/cavium : Download debian packages #162

Merged
merged 3 commits into from
Dec 28, 2016
Merged
Changes from 1 commit
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
18 changes: 13 additions & 5 deletions platform/cavium/cavm-sai.mk
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
# Cavium SAI

CAVM_SAI_GITHUB = https://github.com/garyachy/OpenXPS/raw/sai_0.9.5/SAI/cavm-sai/
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are these files going to be updated within same branch?
If yes, use commit hash in URL instead of branch name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We always are going to use latest and greatest.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If, for instance, SAI headers are changed, you won't be able to compile older version of SONiC.
But it's up to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cavium provides both SAI headers and SAI adapter library.

In case if SONIC is upgraded to use SAI 1.0 headers, Cavium build will be broken until we change both our SAI headers and SAI adapter library.

Anyway, thanks for your review comments.

Copy link
Collaborator

Choose a reason for hiding this comment

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

btw, I think sonic uses sai 0.9.4 branch

Copy link
Collaborator

Choose a reason for hiding this comment

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

I also think it's better to use commit hash instead of branch name. You can always update your sai binaries to the latest and greatest in your git repo meanwhile update the url on this repo. I think it is easier for us the debug as when something is broken for cavium platform, we will know for sure whether it is because sai package update or sonic update.


CAVM_LIBSAI = libsai.deb
$(CAVM_LIBSAI)_PATH = $(PLATFORM_PATH)/cavm_sdk
CAVM_SAI = sai.deb
$(CAVM_SAI)_PATH = $(PLATFORM_PATH)/cavm_sdk
XP_TOOLS = xp-tools.deb
$(XP_TOOLS)_PATH = $(PLATFORM_PATH)/cavm_sdk
XPSHELL = xpshell.deb
$(XPSHELL)_PATH = $(PLATFORM_PATH)/cavm_sdk

SONIC_COPY_DEBS += $(CAVM_LIBSAI) $(CAVM_SAI) $(XP_TOOLS) $(XPSHELL)
$(CAVM_LIBSAI)_URL = $(CAVM_SAI_GITHUB)/$(CAVM_LIBSAI)
$(CAVM_SAI)_URL = $(CAVM_SAI_GITHUB)/$(CAVM_SAI)
$(XP_TOOLS)_URL = $(CAVM_SAI_GITHUB)/$(XP_TOOLS)
$(XPSHELL)_URL = $(CAVM_SAI_GITHUB)/$(XPSHELL)
SONIC_ONLINE_DEBS += $(CAVM_LIBSAI) $(CAVM_SAI) $(XP_TOOLS) $(XPSHELL)

#$(CAVM_LIBSAI)_PATH = $(PLATFORM_PATH)/cavm_sdk
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why still keep those lines?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need this for debug purpose

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can just copy files to target/debs, and make won't try to download them even if they are in SONIC_ONLINE_DEBS group.
Using SONIC_COPY_DEBS is an unnecessary step here.

#$(CAVM_SAI)_PATH = $(PLATFORM_PATH)/cavm_sdk
#$(XP_TOOLS)_PATH = $(PLATFORM_PATH)/cavm_sdk
#$(XPSHELL)_PATH = $(PLATFORM_PATH)/cavm_sdk
#SONIC_COPY_DEBS += $(CAVM_LIBSAI) $(CAVM_SAI) $(XP_TOOLS) $(XPSHELL)