Skip to content

[Tomahawk] Use legacy-th instead of legacy for Tomahawk image#25871

Open
lipxu wants to merge 5 commits intosonic-net:masterfrom
lipxu:20260304_publicMaster_th
Open

[Tomahawk] Use legacy-th instead of legacy for Tomahawk image#25871
lipxu wants to merge 5 commits intosonic-net:masterfrom
lipxu:20260304_publicMaster_th

Conversation

@lipxu
Copy link
Contributor

@lipxu lipxu commented Mar 4, 2026

Why I did it

Address comments from previous PR #25192

Work item tracking
  • Microsoft ADO (number only):
    36979666

How I did it

Use legacy-th instead of legacy for Tomahawk image

How to verify it

Run the nightly test on 7060cx
https://elastictest.org/scheduler/testplan/69a3b9c08fe9299bbb5c0552
https://elastictest.org/scheduler/testplan/69a3b9c02953d208e64681f8

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

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

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

Copilot AI review requested due to automatic review settings March 4, 2026 03:02
@lipxu lipxu requested a review from lguohan as a code owner March 4, 2026 03:02
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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 renames the Tomahawk (TH) platform's SAI modules, Docker images, and related configurations from the generic legacy naming to the more specific legacy-th naming, addressing review comments from a previous PR (#25192).

Changes:

  • Rename all legacy references to legacy-th for Tomahawk-specific build targets (SAI modules, Docker images, machine identifiers)
  • Replace sai-legacy.mk and docker-syncd-brcm-legacy.mk with new legacy-th variants
  • Update platform ASIC identifier for Arista 7060CX32S device

Reviewed changes

Copilot reviewed 10 out of 586 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
platform/broadcom/sai-modules.mk Renames kernel module variables and package names from legacy to legacy-th
platform/broadcom/sai-legacy.mk Deleted — replaced by sai-legacy-th.mk
platform/broadcom/sai-legacy-th.mk New file defining SAI packages for the Legacy-TH ASIC family
platform/broadcom/rules.mk Updates include directives to use the new legacy-th variants
platform/broadcom/one-image.mk Updates dependent machine list to broadcom-legacy-th
platform/broadcom/one-aboot.mk Updates dependent machine list and lazy build installs to legacy-th
platform/broadcom/docker-syncd-brcm-legacy.mk Deleted — replaced by docker-syncd-brcm-legacy-th.mk
platform/broadcom/docker-syncd-brcm-legacy-th/Dockerfile.j2 Updates Jinja2 template variable references to legacy_th
platform/broadcom/docker-syncd-brcm-legacy-th.mk New file defining the Docker syncd image for the Legacy-TH ASIC family
device/arista/x86_64-arista_7060_cx32s/platform_asic Updates ASIC identifier from broadcom-legacy to broadcom-legacy-th

LIBSAIBCM_LEGACY_TH_URL_PREFIX = "https://packages.trafficmanager.net/public/sai/sai-broadcom/$(LIBSAIBCM_LEGACY_TH_BRANCH_NAME)/$(LIBSAIBCM_LEGACY_TH_VERSION)/xgs"

# SAI module for LEGACY-TH Asic family
BRCM_LEGACY_TH_SAI = libsaibcm_$(LIBSAIBCM_LEGACY_TH_VERSION)_amd64.deb
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

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

The package filename libsaibcm_$(LIBSAIBCM_LEGACY_TH_VERSION)_amd64.deb is identical to the one that was used in the deleted sai-legacy.mk (which also resolved to libsaibcm_13.2.1.100_amd64.deb). Since both the old BRCM_LEGACY_SAI and the new BRCM_LEGACY_TH_SAI map to the same .deb filename but are intended to be separate packages (one for legacy, one for legacy-th), there is a naming collision risk if both variables ever coexist or if the URL prefix resolves to the same artifact. Verify that the package filename and URL are indeed unique to the legacy-th variant, or add a -legacy-th suffix to the package name (e.g., libsaibcm-legacy-th_...) to clearly distinguish it.

Suggested change
BRCM_LEGACY_TH_SAI = libsaibcm_$(LIBSAIBCM_LEGACY_TH_VERSION)_amd64.deb
BRCM_LEGACY_TH_SAI = libsaibcm-legacy-th_$(LIBSAIBCM_LEGACY_TH_VERSION)_amd64.deb

Copilot uses AI. Check for mistakes.
lipxu added 5 commits March 4, 2026 03:03
- Rename saibcm-modules-legacy -> saibcm-modules-legacy-th
- Rename docker-syncd-brcm-legacy -> docker-syncd-brcm-legacy-th

Signed-off-by: Liping Xu <xuliping@microsoft.com>
- Rename sai-legacy.mk -> sai-legacy-th.mk
- Rename docker-syncd-brcm-legacy.mk -> docker-syncd-brcm-legacy-th.mk

Signed-off-by: Liping Xu <xuliping@microsoft.com>
- Update variable names: BRCM_LEGACY_* -> BRCM_LEGACY_TH_*
- Update paths: saibcm-modules-legacy -> saibcm-modules-legacy-th
- Update docker paths: docker-syncd-brcm-legacy -> docker-syncd-brcm-legacy-th
- Update machine type: broadcom-legacy -> broadcom-legacy-th
- Update package names: syncd-legacy -> syncd-legacy-th, opennsl-modules-legacy -> opennsl-modules-legacy-th
- Update include statements in rules.mk to use renamed files

Signed-off-by: Liping Xu <xuliping@microsoft.com>
Update variable name from docker_syncd_brcm_legacy_debs to
docker_syncd_brcm_legacy_th_debs to match the renamed directory.

The build system auto-generates template variable names from directory
names by converting hyphens to underscores, so docker-syncd-brcm-legacy-th
generates docker_syncd_brcm_legacy_th_debs variable.

Signed-off-by: Liping Xu <xuliping@microsoft.com>
Remove broadcom-legacy from platform_asic_checker valid platforms list
and replace it with broadcom-legacy-th, since we've fully migrated to
the new naming convention. No devices use broadcom-legacy anymore.

Signed-off-by: Liping Xu <xuliping@microsoft.com>
@lipxu lipxu force-pushed the 20260304_publicMaster_th branch from 8e8cfe9 to c0be07b Compare March 4, 2026 03:03
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

3 participants