Skip to content

[vs][multi-asic]: Add support to build multi-asic vs images#8270

Merged
SuvarnaMeenakshi merged 5 commits intosonic-net:masterfrom
SuvarnaMeenakshi:masic_mkvm_build
Sep 2, 2021
Merged

[vs][multi-asic]: Add support to build multi-asic vs images#8270
SuvarnaMeenakshi merged 5 commits intosonic-net:masterfrom
SuvarnaMeenakshi:masic_mkvm_build

Conversation

@SuvarnaMeenakshi
Copy link
Copy Markdown
Contributor

@SuvarnaMeenakshi SuvarnaMeenakshi commented Jul 27, 2021

Why I did it

Pre-requisite: #8269

  • To be able to generate multi-asic KVM image.
  • To provide flexibility to generate single asic or both single and multi-asic images.

How I did it

  • Add a new build param, BUILD_MULTIASIC_KVM, if set to "y", the multi-asic VS target KVM images will be generated. If not, only single asic VS image will be generated.
  • Make changes to build_image.sh to generate 4-asic and 6-asic KVM images if BUILD_MULTIASIC_KVM parameter is set to y

How to verify it

Generate single-asic VS as currently done, no change in build steps:
make configure PLATFORM=vs
make target/sonic-vs.img.gz - will generate only single asic KVM image.

make BUILD_MULTIASIC_KVM=y target/sonic-vs.img.gz - will generate single asic and multi-asic KVM images.
should generate:
sonic-vs.bin
sonic-vs.img.gz
sonic-4asic-vs.img.gz
sonic-6asic-vs.img.gz

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)

- Add a new build parameter BUILD_MKVM to select if multi-asic
KVM images should be generated.
- Add changes to build 4-asic and 6-asic KVM images if
BUILD_MKVM parameter is set to "y".

Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
build_image.sh Outdated
generate_kvm_image()
{
NUM_ASIC=$1
if [ $NUM_ASIC == 1 ]; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

make default as 1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated as per comment.

build_image.sh Outdated
echo "Error : build kvm image failed"
exit 1
# Generate single asic KVM image
generate_kvm_image 1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

no need to pass 1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated as per comment.

Modify build parameter to BUILD_MULTIASIC_KVM.

Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
abdosi
abdosi previously approved these changes Aug 6, 2021
Copy link
Copy Markdown
Contributor

@abdosi abdosi left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
judyjoseph
judyjoseph previously approved these changes Aug 17, 2021
lguohan
lguohan previously approved these changes Aug 27, 2021
Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
@SuvarnaMeenakshi SuvarnaMeenakshi dismissed stale reviews from lguohan and judyjoseph via 5dabc90 August 27, 2021 22:23
@SuvarnaMeenakshi
Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@SuvarnaMeenakshi SuvarnaMeenakshi merged commit 1646678 into sonic-net:master Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants