Commit Graph

233 Commits

Author SHA1 Message Date
Justin Thomas
fb29a4047c
[devices]: fix show environment for n3248te (#17508)
Why I did it
The command show environment has been broken on this platform for quite a while. These adjustments allow it to function again.

How I did it
I adjusted the platform_sensors.py file for the n3248te to appease the errors that it was generating from the Python interpreter.

How to verify it
Run sudo show environment on an unchanged n3248te to see that it generates an error right away about print statements being malformed. Then place this file at /usr/bin/platform_sensors.py in the pmon container and run the command again to see the correct output.
2024-03-25 12:53:36 -07:00
Arun Saravanan Balachandran
80e743716c
[Dell] S6100 - Update EEPROM API serial_number_str to return service tag instead of serial number (#17440)
To modify EEPROM API serial_number_str to return service tag instead of serial number in Dell S6100.
Ref PR: #1239

How I did it
Update EEPROM API serial_number_str to return service tag instead of serial number.

How to verify it
Verify decode-syseeprom -s returns service tag in Dell S6100.
2023-12-07 10:08:42 -08:00
Aravind Mani
c8fe65873f [Bookworm] Upgrade Dell platforms to Bookworm (#17003)
Why I did it
[Bookworm] Update platform-modules-dell for Bookworm #16735

How I did it
Modified platform driver to comply with bookworm kernel.
Removed MODULE_SUPPORTED_DEVICE wherever used.
Modified python build commands for building whl packages.

How to verify it
Verify whether all the platform bookworm debs are built.
make target/debs/bookworm/platform-modules-z9100_1.1_amd64.deb
Load the platform debian into the device and install it in bookworm image.
Verify the platform related CLI and the functionality
2023-11-21 18:53:15 -08:00
Saikrishna Arcot
0909c671c6 Update sonic-linux-kernel to use 6.1.38
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2023-11-21 18:53:15 -08:00
Arun Saravanan Balachandran
24259ddd61
[Dell] S6100 - Copy files in platform path to platform deb (#16569)
To include files in path platform/broadcom/sonic-platform-modules-dell/s6100/bin during build in Dell S6100 platform deb package.

How I did it
During Dell S6100 platform deb package build, copy the files to the install location.

How to verify it
- Copy the required files to platform/broadcom/sonic-platform-modules-dell/s6100/bin.
- Build the SONiC image and install in a Dell S6100 device.
- The files will be available in /usr/share/sonic/device/x86_64-dell_s6100_c2538-r0/bin/.
2023-09-23 01:01:19 -07:00
Saikrishna Arcot
d62ad707bc
Update to Linux 5.10.179 (#15926)
## How I did it

Depends on sonic-net/sonic-linux-kernel#328 and sonic-net/saibcm-modules#12.

#### How to verify it

Verified that the image boots up, BGP comes up, and a basic warm-reboot works on VS, broadcom, and mellanox.
2023-09-20 15:24:39 -07:00
Aravind Mani
2f3f28691a
[devices]: Dell S6100 API 2.0 fix (#16363)
Why I did it
sonic-mgmt test failure is seen for update_firmware component API

Microsoft ADO: 25208748

How I did it
Edited API 2.0 to fix this issue.

How to verify it
Run sonic-mgmt test after the fix and verify it passes.
2023-09-19 10:24:05 -07:00
Aravind Mani
821be3f6fc
DellEMC: System health config changes (#15771)
Why I did it
System health config is missing in few Dell platforms.

How I did it
Added system health monitoring config and its related API's

How to verify it
show system-health summary/detail commands.
2023-08-23 11:05:03 -07:00
Arun LK
97113bae61
Dell: E3224F platform onboarding (#16002)
* Dell: E3224F platform onboarding

* Dell: E3224F platform onboarding
2023-08-10 17:27:30 -07:00
Santhosh Kumar T
141132c94b
Update the iSMART_64 tool (#15936)
Why I did it
Updating the iSMART_64 tool for supporting latest debian releases.

How I did it
On branch new_ismart
Changes to be committed:
(use "git restore --staged ..." to unstage)
modified: platform/broadcom/sonic-platform-modules-dell/s6100/scripts/iSMART_64

How to verify it
In s6100, run the iSMART_64 tool.
md5sum - 24725730d7649769c7ba50971c1f2955
2023-07-30 09:52:02 -07:00
Aravind Mani
2de5abdaf4
DellEMC: Fix API2.0 initialization issue (#15687)
Why I did it
To fix sonic-net/sonic-mgmt#8786

How I did it
Modified Fan API to check whether the data retrieved is valid or not and return accordingly

How to verify it
Verify whether API 2.0 is loaded properly or not.
Execute CLI's like "show version", "show interface status", "show platform psustatus" etc..
2023-07-20 09:50:22 -07:00
Aravind Mani
b26445cf7b
Dell FPGA driver fix (#15144)
Why I did it
FPGA driver crash was observed in Dell FPGA based platforms.

How I did it
Fixed FPGA crash

How to verify it
Load FPGA driver and check whether the kernel crashes.
2023-06-05 11:01:46 -07:00
Hua Liu
e17e4fc4c0
[S6100] Improve S6100 serial-getty monitor, wait and re-check when getty not running to avoid false alert. (#14402)
[S6100] Improve S6100 serial-getty monitor, wait and re-check when getty not running to avoid false alert. 

#### Why I did it
On S6100, the serial-getty service some time can't auto-restart by systemd. So there is a monit unit to check serial-getty service status and restart it.

However, this monit will report false alert, because in most case when serial-getty not running, systemd can restart it successfully.

To avoid the false alert, improve the monitor to wait and re-check.

Steps to reproduce this issue:
1. User login to device via console, and keep the connection.
2. User login to device via SSH, check the serial-getty@ttyS1.service service, it's running.
3. Run 'monit reload' from SSH connection.
4. Check syslog 1 minutes later, there will be false alert: ' 'serial-getty' process is not running'

#### How I did it
Add check-getty.sh script to recheck again later when getty service not running.
And update monit unit to check serial-getty service status with this script to avoid false alert.

#### How to verify it
Pass all UT.
Manually check fixed code work correctly:


```
admin@***:~$ sudo systemctl stop  serial-getty@ttyS1.service
admin@***:~$ sudo /usr/local/bin/check-getty.sh 
admin@***:~$ echo $?
1
admin@***:~$ sudo systemctl status serial-getty@ttyS1.serviceserial-getty@ttyS1.service - Serial Getty on ttyS1
     Loaded: loaded (/lib/systemd/system/serial-getty@.service; enabled-runtime; vendor preset: enabled)
     Active: inactive (dead) since Tue 2023-03-28 07:15:21 UTC; 1min 13s ago

admin@***:~$ sudo /usr/local/bin/check-getty.sh 
admin@***:~$ echo $?
0
admin@***:~$ sudo systemctl status serial-getty@ttyS1.serviceserial-getty@ttyS1.service - Serial Getty on ttyS1
     Loaded: loaded (/lib/systemd/system/serial-getty@.service; enabled-runtime; vendor preset: enabled)
```

syslog:
```
Mar 28 07:10:37.597458 *** INFO systemd[1]: serial-getty@ttyS1.service: Succeeded.
Mar 28 07:12:43.010550 *** ERR monit[593]: 'serial-getty' status failed (1) -- no output
Mar 28 07:12:43.010744 *** INFO monit[593]: 'serial-getty' trying to restart
Mar 28 07:12:43.010846 *** INFO monit[593]: 'serial-getty' stop: '/bin/systemctl stop serial-getty@ttyS1.service'
Mar 28 07:12:43.132172 *** INFO monit[593]: 'serial-getty' start: '/bin/systemctl start serial-getty@ttyS1.service'
Mar 28 07:13:43.286276 *** INFO monit[593]: 'serial-getty' status succeeded (0) -- no output
```

#### Description for the changelog
[S6100] Improve S6100 serial-getty monitor.

#### 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.
2023-04-05 21:34:31 -07:00
Santhosh Kumar T
c4435e833b
[DellEMC] S6100 - Adding logger to fetch SSD FW Upgrade status (#14247)
Adding logger to fetch SSD FW Upgrade status
2023-04-04 10:19:47 -07:00
Mai Bui
06e1a0bc14
[device/dell] Mitigation for security vulnerability (#11875)
Dependency: [PR (#12065)](https://github.com/sonic-net/sonic-buildimage/pull/12065) needs to merge first.

#### Why I did it
`commands` module is not protected against malicious input
`getstatusoutput` is detected without a static string, uses `shell=True`
#### How I did it
Eliminate the use of `commands`
Use `subprocess.run()`, commands in `subprorcess.run()` are totally static
Fix indentation
#### How to verify it
Tested on DUT
[dell_log.txt](https://github.com/sonic-net/sonic-buildimage/files/9561332/dell_log.txt)
2023-01-05 16:22:09 -08:00
Santhosh Kumar T
e83aa15f30
[DellEMC] Fixing 'show interface status' break in DellEMC platforms (#13021)
When a non-root user tries to run 'show interface status' command, the command got break as 2.0 API throws permission denied error.
2022-12-20 12:38:09 -08:00
Santhosh Kumar T
f10f79b754
[DellEMC] Master: S6100: SSD upgrade status: Moving from smartctl to iSMART (#12784)
Why I did it
smartctl tool is available only in PMON docker. Hence, the tool may be not accessible incase PMON docker goes down.
Using iSMART_64 tool to fetch the SSD firmware version and device model information.

How I did it
Replacing smartctl with iSMART_64.
2022-12-01 17:16:10 -08:00
Saikrishna Arcot
672367c33e
Update Linux kernel from 5.10.103 to 5.10.140 (#12660)
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2022-11-14 16:33:34 -08:00
arunlk-dell
f82c1fd8ae
Z9432F kernel dependency of platform module (#11941)
Why I did it
Z9432F Update the kernel dependency of platform module

How I did it
Modified the kernel version to current latest 5.10.0-12-2
2022-09-01 16:55:41 -07:00
Arun Saravanan Balachandran
092e0394b5
DellEMC: Z9332f - Graceful platform reboot (#10240)
Why I did it
To gracefully unmount filesystems and stop containers while performing a cold reboot.
Unmount ONIE-BOOT if mounted during fast/soft/warm reboot
How I did it
Override systemd-reboot service to perform a cold reboot.
Unmount ONIE-BOOT if mounted using fast/soft/warm-reboot plugins.
How to verify it
On reboot, verify that the container stop and filesystem unmount services have completed execution before the platform reboot.
2022-08-30 11:23:52 -07:00
arunlk-dell
13bd63e73a
DellEMC: S5296F Platform API 2.0 changes (#11162)
Why I did it
S5296F - Platform API 2.0 changes

How I did it
Implemented the functional API's needed for Platform API 2.0

How to verify it
Used the API 2.0 test suite to validate the test cases.
2022-08-25 17:07:23 -07:00
Santhosh Kumar T
847a29088b
[DellEMC] S6100 Platform Service optimization porting in master (#11330)
To reduce rc.local script execution time. Porting changes from [DellEMC] S6100 Platform Service optimization #10989
Changes:
Moving platform-modules-s6100.service and s6100-lpc-monitor.service asynchronous to rc.local script.
2022-08-02 09:56:17 -07:00
Arun Saravanan Balachandran
d974ffd707
DellEMC Z9332f: 'update_firmware' component API return False if firmware image not found (#10797)
Why I did it
To return 'False' in update_firmware component API in DellEMC Z9332f platform, if the firmware image is not present in the provided image path.

How I did it
Updated 'update_firmware' in component.py to return False if image is not found in location provided by 'image_path'

How to verify it
Verified that the API returns False when an invalid image path is specified.
2022-06-29 09:30:58 -07:00
Santhosh Kumar T
faecf38417
[DellEMC] S5212F and S5224F 2.0 API changes (#10315)
Why I did it
S5212F - Platform API 2.0 changes
S5224F - Platform API 2.0 changes
How I did it
Implemented the functional API's needed for Platform API 2.0
Added media_settings.json, pcie.yaml, platform.json, system_health_monitoring_config.json files.
How to verify it
Used the API 2.0 test suite to validate the test cases.
2022-06-16 16:50:11 -07:00
arunlk-dell
756de913cb
DellEMC: Initial commit for Z9432F platform (#10640)
Why I did it
Added support for the device Z9432F

How I did it
Implemented the support for the platform Z9432F

Switch Vendor: DellEMC
Switch SKU: Z9432F-ON
ASIC Vendor: Broadcom
SONiC Image: sonic-broadcom.bin
2022-06-15 09:39:41 -07:00
Aravind Mani
a07765ffea
[DellEMC] Fix S5248f platform issues (#11076)
* [DellEMC] Fix S5248f platform issues

* update files

Co-authored-by: Aravind Mani <aravind.m1@dell.com>
2022-06-09 09:38:13 -07:00
Arun Saravanan Balachandran
942bef4475
DellEMC: S6100, Z9332f - Include ONIE version in 'show platform firmware status' (#10493)
Why I did it
To include ONIE version in show platform firmware status command output in DellEMC S6100 and Z9332f platforms.

How I did it
Include ‘ONIE’ in the list of components provided by platform APIs in DellEMC S6100 and Z9332f.
Unmount ONIE-BOOT if mounted using fast/soft/warm-reboot plugins in DellEMC S6100.
2022-05-12 09:24:06 -07:00
Saikrishna Arcot
949e76a00f
Update Linux kernel from 5.10.46 to 5.10.103 (#10634)
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2022-05-10 13:46:31 -07:00
arunlk-dell
a9e86c3b82
DellEMC: N3248TE platform API2.0 changes (#10400)
DellEMC: N3248TE platform API2.0 changes

Why I did it
N3248TE Platform API 2.0 changes

How I did it
Implemented the functional API's needed for Platform API 2.0
Added system_health_monitoring_config.json file
How to verify it
Used the API 2.0 test suite to validate the test cases.

Co-authored-by: Arun LK <Arun_L_K@dell.com>
2022-04-01 07:34:31 -07:00
arunlk-dell
94ec85464b
DellEMC: N3248TE/N3248PXE Watchdog Support (#9398)
Why I did it
DellEMC : Added support for N3248TE/N3248PXE platforms

How I did it
Implemented the changes to enable/disable the watchdog support

How to verify it
watchdog_unit_test.txt

Co-authored-by: Arun LK <Arun_L_K@dell.com>
2022-04-01 07:33:08 -07:00
Santhosh Kumar T
e2502edefd
Refactoring DELL platform init to reduce rc.local processing time porting changes in master (#10318)
Why I did it
To reduce the processing time of rc.local, refactoring s6100 platform initialization.
Porting changes from 202012 branch [202012] Refactoring DELL platform init to reduce rc.local processing time #10171
2022-03-24 11:14:37 -07:00
Arun Saravanan Balachandran
5c7aa50463
DellEMC: Z9332f - Component API Fixes (#10187) 2022-03-16 14:16:26 -07:00
arunlk-dell
b2409be2f2
DellEMC: N3248TE Platform API 2.0 changes (#9735)
Why I did it
N3248TE - Platform API 2.0 changes

How I did it
Implemented the functional API's needed for Platform API 2.0

How to verify it
Used the API 2.0 test suite to validate the test cases.
2022-03-04 17:53:35 -08:00
Aravind Mani
6c31fc65ff
Dell: S6100 fix xcvrd crash (#10062) 2022-02-28 13:13:52 -08:00
Aravind Mani
09b0cc2cce
DellEMC: Fix Z9332f thermalctld warning logs (#9943) 2022-02-10 09:16:58 -08:00
Aravind Mani
9dfdb43070
[DellEMC] S52xx fix reboot cause issue (#9603)
Why I did it
Reboot cause is not working in S52xx platforms.

How I did it
Modified platform API's.

How to verify it
Check "show reboot-cause" to verify the reboot reason
2022-01-04 22:35:57 -08:00
Arun Saravanan Balachandran
174833d319
DellEMC: S6100, S6000 - Platform API implementation (#9586)
Why I did it
To incorporate the below changes in DellEMC S6100, S6000 platforms.

S6100, S6000:
Implement 'get_revision' method for Chassis
Implement 'get_maximum_consumed_power' method for FanDrawer
Implement 'get_revision', 'get_maximum_supplied_power' methods for PSU
Implement 'get_error_description' method for SFP.
S6100:
Implement 'get_module_index' method for Chassis
Implement 'get_description', 'get_maximum_consumed_power', 'get_oper_status', 'get_slot' methods for Module
Update component names in platform.json
How I did it
Implement the platform API methods in the respective device files

How to verify it
Verified that the respective sonic-mgmt platform API test cases report success.
2022-01-02 22:38:35 -08:00
Arun Saravanan Balachandran
6d07efa890
[DellEMC S6000]: Move fan control to thermalctld from fancontrol.sh (#7239)
Why I did it
To implement fan control using thermalctld in DellEMC S6000 platform

Requires: Azure/sonic-linux-kernel#241

How I did it
Add thermal policies in 'thermal_policy.json'
Implemented thermal_manager.py and the necessary modules to perform fan control via thermalctld
Removed fancontrol.sh
How to verify it
Verified that the fan speeds are set based on the fan and temperature status.
Logs: S6000_fan_control_test_logs.txt
2021-12-08 10:43:14 -08:00
Santhosh Kumar T
82085af786
[DellEMC] S6100 - Adding SSD component and introducing platform_fw_au_handle for auto-update (#9208)
Why I did it
Adding SSD as part of platform components list.
Introducing platform_fw_au_reboot_handle to use auto-update functionality in fwutil
How I did it
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        modified:   platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.install
        new file:   platform/broadcom/sonic-platform-modules-dell/s6100/scripts/platform_fw_au_reboot_handle
        modified:   platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/chassis.py
        modified:   platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/component.py
How to verify it
By running fwutil command.
Warning: fwupdate_fwimage_dir: /var/platform/fwpackage/.                                              
Chassis    Module    Component    Firmware                         Version (Current/Available)    Status
---------  --------  -----------  -------------------------------  -----------------------------  ------------------
S6100-ON             BIOS         S6100-BIOS-3.25.0.2-9-noRP2.bin  3.25.0.2-8 / 3.25.0.2-9        update is required
                     FPGA         smf_firmware_upgrade.tar         2.4 / 2.4                      up-to-date
                     CPLD         cpld_firmware_upgrade.tar        4 / 4                          up-to-date
                     SSD          ssd_firmware_upgrade.tar         S16425cG / S16425cG            up-to-date
root@sonic:~#
2021-12-06 23:22:35 -08:00
Arun Saravanan Balachandran
6d8c509817
[DellEMC] S6100 - iTCO watchdog support and reboot cause determination changes (#9149)
Why I did it
To support iTCO watchdog using watchdog APIs.
How I did it
Implemented a new watchdog class WatchdogTCO for interfacing with iTCO watchdog.
Updated reboot cause determination logic.
How to verify it
Verified that the watchdog APIs' return values are as expected.
Logs: UT_logs.txt
2021-12-06 21:52:20 -08:00
Aravind Mani
ab932591c1
DellEMC: S6000,S6100 SFP refactor (#9016)
* DellEMC: S6000,S6100 SFP refactor
2021-12-07 11:03:21 +05:30
Aravind Mani
d041e600e2
DellEMC: Change Platform LP mode API (#9391)
As part of SFP refactoring, LP mode is implemented for CMIS devices.
CMIS devices has to invoke common API instead of HW pin.
2021-12-02 22:35:36 -08:00
Aravind Mani
5a56659b61
DellEMC SFP Refactor (#9142)
* DellEMC SFP Refactoring

* Update SFP

* Fix LGTM errors

* update sfp

* Add get_name()

* Add get_name()

* Update sfp.py
2021-11-17 21:40:46 +05:30
Aravind Mani
1c4ca07cf5
DellEMC Z9332f: Add platform scripts (#9089)
* Z9332f: Add platform scripts

* Z9332f: Add platform scripts

* Update platform-modules-z9332f.install

* Update platform-modules-z9332f.install
2021-11-16 09:30:07 +05:30
Arun Saravanan Balachandran
f4c3aa4a03
DellEMC: S6000, S6100, Z9332f - Add capabilities fields in platform.json (#9168)
Why I did it
To include capabilities fields in platform.json of DellEMC S6000, S6100, Z9332f platforms.

How I did it
Add the capabilities fields in each platform's respective platform.json.

How to verify it
Ran sonic-mgmt platform api test cases that use capabilities fields and verified that the results are as expected.
2021-11-15 08:08:40 -08:00
Arun Saravanan Balachandran
935923b805
DellEMC: Z9332f - Fix error message during Chassis initialization (#9218) 2021-11-11 11:10:34 +05:30
Aravind Mani
cecbc4d21b DellEMC: Remove repeated files
ipmihelper files are repeated for few DellEMC platforms. Removed the
files in sonic_platform since as part of debian rules,ipmihelper will be
copied to necessary directory.
2021-11-10 15:27:22 -08:00
Aravind Mani
166efeffe2 Upgrade new DellEMC platforms to bullseye kernel (#10)
* Upgrade new DellEMC platforms to Bullseye

* Update s5212f kernel module
2021-11-10 15:27:22 -08:00
Saikrishna Arcot
1379ca14cc Update some more Dell platform modules for 5.10 and Bullseye changes
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2021-11-10 15:27:22 -08:00
Jakkapan Jangmuang
88d607f209 Update Dell z9332f platform modules for Bullseye and 5.10 kernel. (#5)
Also add out of tree pca9548 mux driver to use platform data to mapping i2c bus with front panel port.

Signed-off-by: Jakkapan Jangmuang <jjangmua@celestica.com>

Co-authored-by: Saikrishna Arcot <sarcot@microsoft.com>
2021-11-10 15:27:22 -08:00