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/cisco-8000 module for sonic-buildimage #8172

Merged
merged 9 commits into from
Aug 6, 2021

Conversation

VenkatCisco
Copy link
Contributor

@VenkatCisco VenkatCisco commented Jul 13, 2021

Why I did it

Update Makefile, so it does the following:
For a given platform, verify if platform/checkout/.ini exists and hence run the platform/checkout/template.j2. This allows platform code to be checked out during the 'make configure' stage.

How I did it

git clone [email protected]:Azure/sonic-buildimage.git
mkdir platform/cisco-8000

make init
make configure PLATFORM=cisco-8000
make all

How to verify it

Ensure, the platform/checkout/.ini file refers to the correct github page with the correct version tag that can be downloaded.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

@VenkatCisco VenkatCisco marked this pull request as ready for review July 14, 2021 03:26
@xumia
Copy link
Collaborator

xumia commented Jul 14, 2021

@VenkatCisco , is the PR similar to #7821 ?

PLATFORM_PATH := platform/$(if $(PLATFORM),$(PLATFORM),$(CONFIGURED_PLATFORM))
PLATFORM_CHECKOUT := platform/checkout
PLATFORM_CHECKOUT_FILE := $(PLATFORM_CHECKOUT)/$(PLATFORM).ini
PLATFORM_CHECKOUT_CMD := $(shell if [ -f $(PLATFORM_CHECKOUT_FILE) ]; then PLATFORM_PATH=$(PLATFORM_PATH) j2 $(PLATFORM_CHECKOUT)/template.j2 $(PLATFORM_CHECKOUT_FILE); fi)
Copy link
Collaborator

Choose a reason for hiding this comment

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

To support azp, please allow the step can be skipped when the repo has already checked out.

Copy link

Choose a reason for hiding this comment

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

To support azp, please allow the step can be skipped when the repo has already checked out.

@xumia would the change in platform/checkout/template.j2 be sufficient to support azp?

Copy link
Contributor

Choose a reason for hiding this comment

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

This step will automatically be skipped if the $(PLATFORM_PATH) directory already exists in the workspace

@VenkatCisco
Copy link
Contributor Author

@VenkatCisco , is the PR similar to #7821 ?

Somehow given the forked branch is too old, updating #7821 resulted into #8172. So closed #7821. The platform changes are tracked via #8172

Makefile Outdated Show resolved Hide resolved
Copy link

@huanlev huanlev left a comment

Choose a reason for hiding this comment

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

Request change to Makefile.

Makefile Show resolved Hide resolved
@xumia
Copy link
Collaborator

xumia commented Jul 16, 2021

@VenkatCisco , I created a pipeline for test only, please refer to the azp definition for the code checkout logic, thanks.
Commit on your change: xumia@ccdaf6e
Build result: https://dev.azure.com/mssonic/cisco/_build/results?buildId=24166&view=results
(The build failed with downloading package, maybe another issue, not sure cisco branch correct or not, could you please clarify it?)

The error is as below:

[ building ] [ target/debs/buster/cisco-wb-acpi-8101-32h-o_0.1-0-ga5fd31d_amd64.deb ] 
[ finished ] [ target/debs/buster/cisco-wb-acpi-8101-32h-o_0.1-0-ga5fd31d_amd64.deb ] 
[ FAIL LOG START ] [ target/debs/buster/cisco-wb-acpi-8101-32h-o_0.1-0-ga5fd31d_amd64.deb ]
cp: cannot stat 'platform/cisco-8000/artifactory/cisco-wb-bsp/buster/cisco-wb-acpi-8101-32h-o_0.1-0-ga5fd31d_amd64.deb': No such file or directory
[  FAIL LOG END  ] [ target/debs/buster/cisco-wb-acpi-8101-32h-o_0.1-0-ga5fd31d_amd64.deb ]
make: *** [slave.mk:308: target/debs/buster/cisco-wb-acpi-8101-32h-o_0.1-0-ga5fd31d_amd64.deb] Error 1

The PR looks good now, it may be only a submodule repo commit issue.

@VenkatCisco VenkatCisco changed the title Venkat cisco/cisco 8000/pr Platform/cisco-8000 module for sonic-buildimage Jul 16, 2021
@VenkatCisco
Copy link
Contributor Author

@xumia, the PR is updated based on the use case you mentioned. It also accommodates adjustments to the Makefile based on the new bullseye addition. Please review.

@VenkatCisco
Copy link
Contributor Author

How to build 'sonic-cisco-8000.bin'

-make init
-make configure PLATFORM=cisco-8000
-make all

Ensure the platform/checkout/cisco-8000.ini has the right repo & tag versions that is been shared

@judyjoseph
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@judyjoseph
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liushilongbuaa
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@xumia
Copy link
Collaborator

xumia commented Jul 31, 2021

@VenkatCisco , could you please run a test to build sonic-cisco-8000.bin? I tested in my local dev env, it was failed with the same result as I mentioned above.

[ FAIL LOG START ] [ target/debs/buster/cisco-wb-acpi-8101-32h-o_0.1-0-ga5fd31d_amd64.deb ]
cp: cannot stat 'platform/cisco-8000/artifactory/cisco-wb-bsp/buster/cisco-wb-acpi-8101-32h-o_0.1-0-ga5fd31d_amd64.deb': No such file or directory
[  FAIL LOG END  ] [ target/debs/buster/cisco-wb-acpi-8101-32h-o_0.1-0-ga5fd31d_amd64.deb ]
make: *** [slave.mk:308: target/debs/buster/cisco-wb-acpi-8101-32h-o_0.1-0-ga5fd31d_amd64.deb] Error 1

Looks like the PR missing a step to download artifactory-v0.1.tar.gz as: https:/Cisco-8000-sonic/platform-cisco-8000/releases

@huanlev
Copy link

huanlev commented Aug 4, 2021

@VenkatCisco , could you please run a test to build sonic-cisco-8000.bin? I tested in my local dev env, it was failed with the same result as I mentioned above.

[ FAIL LOG START ] [ target/debs/buster/cisco-wb-acpi-8101-32h-o_0.1-0-ga5fd31d_amd64.deb ]
cp: cannot stat 'platform/cisco-8000/artifactory/cisco-wb-bsp/buster/cisco-wb-acpi-8101-32h-o_0.1-0-ga5fd31d_amd64.deb': No such file or directory
[  FAIL LOG END  ] [ target/debs/buster/cisco-wb-acpi-8101-32h-o_0.1-0-ga5fd31d_amd64.deb ]
make: *** [slave.mk:308: target/debs/buster/cisco-wb-acpi-8101-32h-o_0.1-0-ga5fd31d_amd64.deb] Error 1

Looks like the PR missing a step to download artifactory-v0.1.tar.gz as: https:/Cisco-8000-sonic/platform-cisco-8000/releases

@xumia The build instruction is included in the private Cisco-8000-sonic github organization. It is not part of this PR (in which the intent is to integrate a private platform-specific repository into azure/sonic-buildimage during make configure PLATFORM=.....

Please review and merge if it is LGTM (and we also request a double-commit to 202012 branch). Thank you.

@xumia
Copy link
Collaborator

xumia commented Aug 4, 2021

@xumia
Copy link
Collaborator

xumia commented Aug 4, 2021

@huanlev , for the release package, we need to add a step in azp to download it (see above links), is there any better solution, similar to download the other web packages during the build?

@xumia
Copy link
Collaborator

xumia commented Aug 4, 2021

@qiluo-msft , could you please help review it?

@huanlev
Copy link

huanlev commented Aug 4, 2021

@huanlev , for the release package, we need to add a step in azp to download it (see above links), is there any better solution, similar to download the other web packages during the build?

@xumia we will collaborate more about this via email.

@huanlev
Copy link

huanlev commented Aug 4, 2021

@huanlev , it works fine on master branch, but not good in 202012 branch, could you please take a look?
Master: https://dev.azure.com/mssonic/cisco/_build/results?buildId=26456&view=logs&j=62f941c1-829a-538b-5bf0-e540f1e71cee
202012 (Azure/sonic-buildimage): https://dev.azure.com/mssonic/cisco/_build/results?buildId=26561&view=logs&j=62f941c1-829a-538b-5bf0-e540f1e71cee&t=01718d7f-11bc-54b7-ded4-a9029f466c3a
202012 (Cisco-8000-sonic/sonic-buildimage): https://dev.azure.com/mssonic/cisco/_build/results?buildId=26561&view=logs&j=62f941c1-829a-538b-5bf0-e540f1e71cee&t=01718d7f-11bc-54b7-ded4-a9029f466c3a

@xumia I don't have access to the 202012 (Cisco-8000-sonic) URL. Can you help giving me read permission?

@huanlev
Copy link

huanlev commented Aug 5, 2021

@xumia @qiluo-msft thanks for reviewing and approving the PR.
Can this PR be merged? or do we need to have another reviewer?

@xumia
Copy link
Collaborator

xumia commented Aug 6, 2021

@xumia @qiluo-msft thanks for reviewing and approving the PR.
Can this PR be merged? or do we need to have another reviewer?

I think we can merge it, it should have no impact on the other platforms and the 202012 branch issue can be fixed later (not quite relative to this PR). For the azp to download the GitHub release artifacts, it is not very good, we need to do additional steps for cisco-8000, but it is acceptable.

@xumia xumia merged commit 702e852 into sonic-net:master Aug 6, 2021
judyjoseph pushed a commit that referenced this pull request Aug 7, 2021
Why I did it
Update Makefile, so it does the following:
For a given platform, verify if platform/checkout/.ini exists and hence run the platform/checkout/template.j2. This allows platform code to be checked out during the 'make configure' stage.

How I did it
git clone [email protected]:Azure/sonic-buildimage.git
mkdir platform/cisco-8000

make init
make configure PLATFORM=cisco-8000
make all
@qiluo-msft
Copy link
Collaborator

This PR could not be cleanly cherry-pick to 202012. Please submit another PR.

carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
Why I did it
Update Makefile, so it does the following:
For a given platform, verify if platform/checkout/.ini exists and hence run the platform/checkout/template.j2. This allows platform code to be checked out during the 'make configure' stage.

How I did it
git clone [email protected]:Azure/sonic-buildimage.git
mkdir platform/cisco-8000

make init
make configure PLATFORM=cisco-8000
make all
@huanlev
Copy link

huanlev commented Aug 7, 2021

This PR could not be cleanly cherry-pick to 202012. Please submit another PR.

We will submit another PR for 202012. Thank you Qi!

@anamehra
Copy link
Contributor

This PR could not be cleanly cherry-pick to 202012. Please submit another PR.

Hi Qi, submitted PR #8399

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants