Skip to content

Conversation

@sreeiyer-1
Copy link
Contributor

@sreeiyer-1 sreeiyer-1 commented Nov 12, 2025

Why I did it

Updating the scripts and makefiles in the common directories to support the Alpine platform (HLD - https://github.com/sonic-net/SONiC/blob/master/doc/alpine/alpine_hld.md ).

Work item tracking
  • Microsoft ADO (number only):

How I did it

Updated sonic_debian_extension.j2 and build_image.sh for alpine specific changes.

How to verify it

This commit includes part of the changes for Alpine in sonic-buildimage. Built these changes together in a local workspace to verify the build and basic sanity.

keyword_check.sh ./diffs
Keyword check Passed.

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

  • 202205
  • 202211
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Tested branch (Please provide the tested image version)

Description for the changelog

Changes to scripts and makefiles for supporting Alpine

Link to config_db schema for YANG module changes

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

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sreeiyer-1 sreeiyer-1 marked this pull request as ready for review November 13, 2025 13:21
@sreeiyer-1 sreeiyer-1 requested a review from lguohan as a code owner November 13, 2025 13:21
@sreeiyer-1
Copy link
Contributor Author

@lguohan - can you please review the changes in the scripts for Alpine. Please let us know if you have questions or comments.

The alpine repo is in https://github.com/sonic-net/sonic-alpine

@lguohan lguohan requested a review from Copilot November 15, 2025 20:34
Copilot finished reviewing on behalf of lguohan November 15, 2025 20:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for the Alpine virtual switch platform to SONiC, implementing changes to scripts, makefiles, and configuration files as outlined in the Alpine HLD.

  • Adds Alpine-specific platform configuration files (platform.json, pmon_daemon_control.json)
  • Updates build scripts to handle Alpine platform differences
  • Excludes warmboot-finalizer for Alpine and includes Alpine-specific services and platform files

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/sonic-device-data/src/Makefile Adds exception to skip platform.json validation for Alpine directories due to format differences
files/build_templates/sonic_debian_extension.j2 Excludes warmboot-finalizer for Alpine and adds Alpine-specific platform files, services, and warm-reboot support
device/virtual/x86_64-kvm_x86_64-r0/alpine_vs/pmon_daemon_control.json Configures platform monitoring daemons to be skipped for Alpine virtual switch
device/virtual/x86_64-kvm_x86_64-r0/alpine_vs/platform.json Defines 16 Ethernet interfaces with 100G breakout modes for Alpine platform
build_image.sh Adds x86_64-kvm_x86_64-r0 to the platform list when building for Alpine

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sreeiyer-1
Copy link
Contributor Author

@lguohan - addressed copilot's review comments. I do not have the permission to trigger the copilot review again.

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sreeiyer-1
Copy link
Contributor Author

kvmtest-t0 by Elastictest fails repeatedly because of two gnmi tests which are unrelated to the changes in the PR :

Error type: RUN_TEST_CASE_FAILED
Error message: gnmi/test_gnmi_configdb.py|||2 failed for RUN_TEST_CASE_FAILED, stop whole test plan

Error type: RUN_TEST_CASE_FAILED
Error message: gnmi/test_gnmi_configdb.py|||2 failed for RUN_TEST_CASE_FAILED, stop whole test plan

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sreeiyer-1
Copy link
Contributor Author

@kazinator-arista - Hi Kaz, sonic-buildimage script changes for alpine for review.

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

sudo mkdir -p $GENERIC_PCIE_DEVICE
sudo cp $ALPINE_PLATFORM/aer_dev_correctable $GENERIC_PCIE_DEVICE
sudo cp $ALPINE_PLATFORM/aer_dev_fatal $GENERIC_PCIE_DEVICE
sudo cp $ALPINE_PLATFORM/aer_dev_nonfatal $GENERIC_PCIE_DEVICE
Copy link
Collaborator

Choose a reason for hiding this comment

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

these aer, pcie seems generic to kvm as well. it does not seem alpine specific. can you clarify?

Copy link
Contributor Author

@sreeiyer-1 sreeiyer-1 Nov 23, 2025

Choose a reason for hiding this comment

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

Yes but these are part of the sonic-alpine repository and copied from https://github.com/sonic-net/sonic-alpine/tree/master/src/platform only while building sonic-alpinevs.img.gz

echo "alpinevs-init.service" | sudo tee -a $GENERATED_SERVICE_FILE
sudo cp $ALPINE_SERVICES/init/alpinevs-init.sh $FILESYSTEM_ROOT/usr/bin/

sudo cp $ALPINE_SERVICES/config/alpinevs-appdb.service $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM
Copy link
Collaborator

Choose a reason for hiding this comment

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

where are these files? it seems not in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These files are part of the sonic-alpine repository (https://github.com/sonic-net/sonic-alpine)

The ALPINE_SERVICES maps to https://github.com/sonic-net/sonic-alpine/tree/master/src/services

@lguohan
Copy link
Collaborator

lguohan commented Nov 22, 2025

@copilot please identify all files referenced in the PR which either not in current codebase or not in PR.

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sreeiyer-1
Copy link
Contributor Author

@lguohan - can you please approve if the changes are fine.

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