sonic-buildimage
sonic-buildimage copied to clipboard
[Micas/Platform]platform support M2-W6510
Why I did it
Add new platform m2-w6510(Trident 3) ASIC Vendor: Broadcom Switch ASIC: Trident 3 Port Config: 48x25G+8x100G
How I did it
Provide device and platform related files.
How to verify it
show platform fan show platform ssdhealth show platform psustatus show platform summary show platform syseeprom show platform temperature show interface status
Work item tracking
- Microsoft ADO (number only):
How I did it
How to verify it
Which release branch to backport (provide reason below if selected)
- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [ ] 202111
- [ ] 202205
- [ ] 202211
- [ ] 202305
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)
/azp run Azure.sonic-buildimage
Azure Pipelines successfully started running 1 pipeline(s).
/easycla
@lguohan Hi guohan, help assign a code review to forward this PR, thanks!
@prgeor Help review the code, thanks!
@prgeor thanks for reviewing, and have replied some comments, and the reason for keeping other kernel modules show as below:
- wb_at24.c is revised based on the at24.c, adding AT24_FLAG_IRUGO flag for EEPROM's flag to enable none root users' read access, solving the problem of none root users throwing exceptions when executing the show command
- wb_i2c_algo_bit.c is revised based on the i2c-algo-bit.c, adding I2C level detection and 9 clock functions to improve I2C reliability
- wb_i2c_i801.c is revised based on the i2c-i801.c, adding controller reset and 9 clock functions to improve I2C reliability
@lguohan for additional review
for all duplicated drivers in the kernel, please create patch in sonic-linux-kernel, meanwhile do the upstream efforts. we can see whether some of the patch make sense or not. for example, the change to "adding AT24_FLAG_IRUGO flag for EEPROM's flag to enable none root users' read access" does not make sense to me.
i also see binary files, we do not accept platform binary files
@lguohan Hi Guohan, the kernel patch is only used by us for now and under Micas' platform folders. We will put forward the problems we encountered and some of our suggestions in sonic-linux-kernel community, and cooperate the community to push the solution of the problem.
Also, we follow the community rules and have deleted all binary files except custom_led.bin because the solution provided by BRCM requires users to write custom_led.c and compile it to generate the custom_led.bin file, same file exists on other vendors' platforms.
/azpw ms_conflict
@philo-micas I'm building this to test on a Micas unit we're evaluating with ECI. I had to make several adjustments to these files to allow the build to succeed:
platform/broadcom/sonic-platform-modules-micas/common/modules/intel_spi/intel_spi_pci.c
platform/broadcom/sonic-platform-modules-micas/common/modules/intel_spi/intel_spi.c
Those changes were necessary due to the inclusion of this version of the header file:
sonic-buildimage/src/sonic-linux-kernel/linux-5.10.140/include/linux/platform_data/intel-spi.h
...which does not include the set_writable or data members:
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Intel PCH/PCU SPI flash driver.
*
* Copyright (C) 2016, Intel Corporation
* Author: Mika Westerberg <[email protected]>
*/
#ifndef INTEL_SPI_PDATA_H
#define INTEL_SPI_PDATA_H
enum intel_spi_type {
INTEL_SPI_BYT = 1,
INTEL_SPI_LPT,
INTEL_SPI_BXT,
INTEL_SPI_CNL,
};
/**
* struct intel_spi_boardinfo - Board specific data for Intel SPI driver
* @type: Type which this controller is compatible with
* @writeable: The chip is writeable
*/
struct intel_spi_boardinfo {
enum intel_spi_type type;
bool writeable;
};
#endif /* INTEL_SPI_PDATA_H */
This is the first time I've tried building SONiC from scratch like this, so there may be a step I overlooked. But I followed the directions in the repository README exactly.
I also had to adjust files/build_templates/sonic_debian_extension.j2 to install external copies of openssh-client_8.4p1-5+deb11u1_amd64.deb and openssh-sftp-server_8.4p1-5+deb11u1_amd64.deb to align with the custom version of openssh-server that script installs on the final build step. So something needs to be adjusted there (probably just merging the more recent commits from master, I'd guess).
@lguohan Have done kernel 6.1 adaptation, as we have reviewed and fixed all reviewed comments month ago, (leave one semgrep error as 'defusedxml' not installed in sonic; test failed due to the test bed connect fail, compiling is fine), help push this pr forward again, thanks.
report_6510_0110.zip Kernel 6.1.38 adaption Platform test report from sonic-mgmt.
report_6510_0110.zip Kernel 6.1.38 adaption Platform test report from sonic-mgmt.
@lguohan Hi guohan, test report has been submitted, please help to push forward this pr. Thanks.
report_6510_0110.zip Kernel 6.1.38 adaption Platform test report from sonic-mgmt.
@lguohan Hi guohan, test report has been submitted, please help to push forward this pr. Thanks.
@lguohan Hi Guohan, please take the time to push forward this PR, it is urgent for us, many thanks!
Leave one semgrep error as 'defusedxml' was not installed in sonic.
i also see binary files, we do not accept platform binary files
Is this issue addressed? @philo-micas
i also see binary files, we do not accept platform binary files
Is this issue addressed? @philo-micas
@zhangyanzhao Yes, we have addressed and fixed it in this PR and and other PRs.
@lguohan Hi guohan, help push forward this, most comments have been addressed, and help rerun the test case for one of the failing test case, thanks.
too many duplicated linux kernel modules in this PR. All drivers under this folder (platform/broadcom/sonic-platform-modules-micas/common/modules/linux/) are duplicated from linux kernel. This is cause lots of maintenance issues.