Skip to content

[arm64][Nokia-7215-A1]Add support for Nokia-7215-A1 platform#13795

Merged
lguohan merged 2 commits intosonic-net:masterfrom
Pavan-Nokia:dev_arm64_build_m1_platform
May 18, 2023
Merged

[arm64][Nokia-7215-A1]Add support for Nokia-7215-A1 platform#13795
lguohan merged 2 commits intosonic-net:masterfrom
Pavan-Nokia:dev_arm64_build_m1_platform

Conversation

@Pavan-Nokia
Copy link
Copy Markdown
Contributor

@Pavan-Nokia Pavan-Nokia commented Feb 13, 2023

Why I did it

Add new Nokia build target and establish an arm64 build:

    Platform: arm64-nokia_ixs7215_52xb-r0
    HwSKU: Nokia-7215-A1
    ASIC: marvell
    Port Config: 48x1G + 4x10G

How I did it

  1. Change make files for saiserver and syncd to use Bulleseye kernel
  2. Change Marvell SAI version to 1.11.0-1
  3. Add Prestera make files to build kernel, Flattened Device Tree blob and ramdisk for arm64 platforms
  4. Provide device and platform related files for new platform support (arm64-nokia_ixs7215_52xb-r0).

How to verify it

  1. Build arm64 target for Nokia-7215-A1 with updated sonic-linux-kernel submodule including PR's [marvell-arm64]: Add support for 98DX35xx and 98CX85xx platform sonic-linux-kernel#311 and Fix unable to probe emc2301/2/3 sonic-linux-kernel#312
  2. Run this image on arm64-nokia_ixs7215_52xb-r0 and verify all dockers are up and test basic commands like:
    • show version
    • show platform summary
    • show platform syseeprom
    • show platform fan
    • show platform psustatus
    • show platform firmware status
    • show platform temperature
    • show platform ssdhealth
  3. Verify ports are up using "show interface status" command

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

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

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

@Pavan-Nokia Pavan-Nokia requested a review from lguohan as a code owner February 13, 2023 17:58
@zhangyanzhao zhangyanzhao requested a review from xumia February 18, 2023 08:08
@Pavan-Nokia Pavan-Nokia force-pushed the dev_arm64_build_m1_platform branch from e725efd to 86b31c7 Compare February 24, 2023 18:38
@Pavan-Nokia Pavan-Nokia force-pushed the dev_arm64_build_m1_platform branch from 86b31c7 to 54b0fcf Compare March 24, 2023 12:52
@Pavan-Nokia
Copy link
Copy Markdown
Contributor Author

@carl-nokia @jon-nokia @mlok-nokia Please review this PR for 7215-IXS-A1 platform

@Pavan-Nokia Pavan-Nokia changed the title [arm64][Nokia-7215]Add support for Nokia-7215 platform [arm64][Nokia-7215-A1]Add support for Nokia-7215-A1 platform Mar 24, 2023
@mlok-nokia
Copy link
Copy Markdown
Contributor

@carl-nokia @jon-nokia @mlok-nokia Please review this PR for 7215-IXS-A1 platform

It looks ok to me.

@carl-nokia
Copy link
Copy Markdown
Contributor

Looks good

@jon-nokia
Copy link
Copy Markdown
Contributor

@carl-nokia @jon-nokia @mlok-nokia Please review this PR for 7215-IXS-A1 platform

looks good

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this one is very similiar to this pr.

I am not sure if they are almost exactly the same.

https://github.com/sonic-net/sonic-buildimage/pull/13500/files

I suggest to unified the arm64 installation file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

my comments on the other pr applied to this pr as well.

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.

@lguohan I see 4 comments from you on the other PR related to platform.conf

  1. The comment about “boot_once” does not apply to our PR. We do not have that line
  2. Next comment about “bootcmd” behavior also does not apply to us. We do not do that.
  3. Merge code blocks in line 204-217 to the block 229-240 instead of writing 2 separate blocks
  4. comment about swap being added to sonic.

Are you referring to comments 3 and 4 being applied to this PR.

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.

Hi @lguohan
We have addressed all your comments on the arm64 installation file from the other PR
As stated above I see 4 comments from you related to platform.conf file

Comment 1 and 2 does not apply to this PR as we do not have those lines of code.
Comment 3: The Code blocks have been consolidated into existing block
Comment 4: After careful analysis and testing, the arm64 on our A1 platform does not require swap so we have removed the blocks of code that created the swap partition

Can you please review

@Pavan-Nokia
Copy link
Copy Markdown
Contributor Author

@xumia I have made the requested change and updated the PR. Could you please review

@xumia
Copy link
Copy Markdown
Collaborator

xumia commented Apr 5, 2023

@xumia I have made the requested change and updated the PR. Could you please review

LGTM, added a new small comment.

@carl-nokia
Copy link
Copy Markdown
Contributor

Is there anything we can do to move this PR forward? , it seems to be waiting now 2 weeks ?

@liushilongbuaa
Copy link
Copy Markdown
Contributor

I am checking if there are build issues

@liushilongbuaa
Copy link
Copy Markdown
Contributor

@liushilongbuaa
Copy link
Copy Markdown
Contributor

liushilongbuaa commented Apr 25, 2023

https://github.com/Pavan-Nokia/sonic-buildimage/blob/d5eaf4da88fd9982f3553c9c37582b92bd7a9325/platform/marvell-arm64/sai/Makefile#L9
Please check wget result. If it failed, please remove the target file.
If we keep a bad file and rerun make command, we will get unexpected error.

wget -O $(DEST)/$(MRVL_SAI) $(MRVL_SAI_URL) || rm -f $(DEST)/$(MRVL_SAI)

@Pavan-Nokia
Copy link
Copy Markdown
Contributor Author

https://github.com/Pavan-Nokia/sonic-buildimage/blob/d5eaf4da88fd9982f3553c9c37582b92bd7a9325/platform/marvell-arm64/sai/Makefile#L9 Please check wget result. If it failed, please remove the target file. If we keep a bad file and rerun make command, we will get unexpected error.

wget -O $(DEST)/$(MRVL_SAI) $(MRVL_SAI_URL) || rm -f $(DEST)/$(MRVL_SAI)

Hello @liushilongbuaa,

I have made the requested change.

This file is the Marvell SAI debian, and it is available at the location pointed by the link. I tried a wget and it is successful.
The sai debian is located in this git public git repo https://github.com/Marvell-switching/sonic-marvell-binaries/tree/master/arm64/sai-plugin. The version of Sai that we are currently using is present in the sai.mk file

export MRVL_SAI_VERSION = 1.11.0-1
export MRVL_SAI = mrvllibsai_$(MRVL_SAI_VERSION)_$(PLATFORM_ARCH).deb

@Pavan-Nokia Pavan-Nokia force-pushed the dev_arm64_build_m1_platform branch from 474fdce to 01a6841 Compare April 25, 2023 19:12
@liushilongbuaa
Copy link
Copy Markdown
Contributor

liushilongbuaa commented Apr 26, 2023

I met this error, do you have any suggestions:

make modules -C /lib/modules/5.10.0-18-2-arm64/build M=/sonic/platform/marvell-arm64/prestera/mrvl-prestera/drivers/generic/cpssEnabler/linuxNoKernelModule/drivers/
make[2]: Entering directory '/usr/src/linux-headers-5.10.0-18-2-arm64'
/usr/src/linux-headers-5.10.0-18-2-common/scripts/Makefile.build:44: /sonic/platform/marvell-arm64/prestera/mrvl-prestera/drivers/generic/cpssEnabler/linuxNoKernelModule/drivers//Makefile: No such file or directory
make[4]: *** No rule to make target '/sonic/platform/marvell-arm64/prestera/mrvl-prestera/drivers/generic/cpssEnabler/linuxNoKernelModule/drivers//Makefile'.  Stop.
make[3]: *** [/usr/src/linux-headers-5.10.0-18-2-common/Makefile:1856: /sonic/platform/marvell-arm64/prestera/mrvl-prestera/drivers/generic/cpssEnabler/linuxNoKernelModule/drivers/] Error 2
make[2]: *** [/usr/src/linux-headers-5.10.0-18-2-common/Makefile:185: __sub-make] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-5.10.0-18-2-arm64'
make[1]: *** [debian/rules:26: build] Error 2
make[1]: Leaving directory '/sonic/platform/marvell-arm64/prestera'
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
[  FAIL LOG END  ] [ target/debs/bullseye/mrvlprestera_1.0_arm64.deb ]

https://dev.azure.com/mssonic/build/_build/results?buildId=260912&view=logs&j=712a2a98-2630-52ac-ed49-4850e5af4e10&t=b2c30a30-98c5-58f9-7d50-fefbf2c245dc

@Pavan-Nokia
Copy link
Copy Markdown
Contributor Author

Hi @liushilongbuaa,

While trying to build arm64 target are you including the 2 sonic-linux-kernel PR's mentioned in the description. We need these 3 PR's for a successful marvell-arm64 build.

Build arm64 target for Nokia-7215-A1 with updated sonic-linux-kernel submodule including PR's sonic-net/sonic-linux-kernel#311 and sonic-net/sonic-linux-kernel#312

Thanks
Pavan

@liushilongbuaa
Copy link
Copy Markdown
Contributor

312 is merged. I will test build pipeline after 311 merged.

@Blueve
Copy link
Copy Markdown
Contributor

Blueve commented May 12, 2023

@lguohan do you think we can merge this PR now since all build and test are pass?

@Blueve
Copy link
Copy Markdown
Contributor

Blueve commented May 12, 2023

  • @prgeor to check platform implementation.

@Blueve Blueve requested a review from prgeor May 12, 2023 03:07
prgeor
prgeor previously approved these changes May 12, 2023
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

i think it is better to put these platform specific variable assignment in one platform. block 22-30 and this block should be merged, there are other example below should be merged as well.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this line is same as line 333, can we merge them?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why creating demo partition is platform specific? can you check with marvel on IS_MASS branch? can we get this part of code cleaned up?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we should have kernel version to be separate variable.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

what is this DISK_SIZE? why 14?

1)Update Marvell SAI and syncd kernel from Buster to Bulleseye
2)Marvell SAI version upgrade to 1.11.0-1
3)Add prestera make files to build kernel, Flattened Device Tree blob
and ramdisk for arm64 platforms
Device and platform changes to add support for new arm64 Nokia-7215
platform

Platform: arm64-nokia_ixs7215_52xb-r0
HwSKU: Nokia-7215-A1
ASIC: marvell
Port Config: 48x1G + 4x10G

Platform.conf will be added in a later commit
@Pavan-Nokia
Copy link
Copy Markdown
Contributor Author

Hi @lguohan

To allow separate iterations on platform.conf I have removed this file from the PR and will create a new PR with only this file addressing your comments

@lguohan lguohan merged commit c5d0507 into sonic-net:master May 18, 2023
@liushilongbuaa
Copy link
Copy Markdown
Contributor

@Pavan-Nokia , sonic-linux-kernel still has issues. Submodule HEAD is latest:
Submodule path 'src/sonic-linux-kernel': checked out 'e7c93a542272b5952a1082326c097ec7633f881b'

LOG:
https://dev.azure.com/mssonic/build/_build/results?buildId=276327&view=logs&j=712a2a98-2630-52ac-ed49-4850e5af4e10&t=b2c30a30-98c5-58f9-7d50-fefbf2c245dc

@Pavan-Nokia Pavan-Nokia deleted the dev_arm64_build_m1_platform branch June 1, 2023 16:14
thovikeerthi pushed a commit to thovikeerthi/sonic-buildimage that referenced this pull request Sep 18, 2023
Add new Nokia build target and establish an arm64 build:

    Platform: arm64-nokia_ixs7215_52xb-r0
    HwSKU: Nokia-7215-A1
    ASIC: marvell
    Port Config: 48x1G + 4x10G

How I did it

- Change make files for saiserver and syncd to use Bulleseye kernel
- Change Marvell SAI version to 1.11.0-1
- Add Prestera make files to build kernel, Flattened Device Tree blob and ramdisk for arm64 platforms
- Provide device and platform related files for new platform support (arm64-nokia_ixs7215_52xb-r0).

Update platform.conf (sonic-net#15163)

Update platform.conf to have a successful marvell-arm64 target image.

Fix marvell-arm64 pipeline build (sonic-net#15228)

Why I did it
When git clone -b xxx command is used the versions-git will reset the HEAD of the git to the commit ID in the versions-git file. Which causes incorrect commit to be checked out causing build errors.

Work item tracking
Microsoft ADO (number only):
How I did it
Split ‘git clone -b’ into two steps to avoid owerwrite

Git clone
cd mrvl-prestera; git checkout ; cd ..
How to verify it
Build marvell-arm64 target using below instructions
make init
make configure PLATFORM=marvell-arm64 PLATFORM_ARCH=arm64
make target/sonic-marvell-arm64.bin SONIC_BUILD_JOBS=2

Fix get_system_mac for system without eeprom

Change-Id: Ifeb78f366d80e70043db1f9828f2f75a8a710f46
Signed-off-by: Pavan Naregundi <pnaregundi@marvell.com>
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.

9 participants