-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SONiC support for BMC cards based on Aspeed AST2720 #24898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ae02708
df20a9f
1c96a1c
8875ce1
dd9f18c
dff5051
153d0a6
2070732
3e8fee4
1a98329
be5dad4
a2b5ea4
ca44f22
33b9dd5
41bd2db
12bec31
b467546
44ac5e5
0d23517
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Aspeed AST2700 EVB: Dummy placeholder for switch CPU console | ||
| # The EVB does not have a physical switch CPU console connection | ||
| # This file exists to prevent errors in sonic-platform-init.sh | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # aspeed-ast2700 doesn't have a switch asic but SONIC assumes NUM_ASIC to be atleast 1 | ||
| NUM_ASIC=1 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| AST2700-EVB-BMC empty |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Console configuration for AST2700 EVB platform | ||
| # CONSOLE_DEV=12 means ttyS12 | ||
| CONSOLE_DEV=12 | ||
| CONSOLE_SPEED=115200 | ||
|
|
||
| # Early console for debugging (UART12 on AST2700) | ||
| EARLYCON="earlycon=uart8250,mmio32,0x14c33b00" | ||
|
|
||
| # Variable log size(MB) | ||
| VAR_LOG_SIZE=512 | ||
|
|
||
| # Additional kernel command line arguments | ||
| ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "chassis": { | ||
| "name": "AST2700-EVB-BMC", | ||
| "thermal_manager": false, | ||
| "status_led": { | ||
| "controllable": true, | ||
| "colors": ["green", "amber", "off"] | ||
| }, | ||
| "components": [ | ||
| { | ||
| "name": "BMC" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove BMC as component. not sure why we need this . Same applies to other platform/sku
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done via #26002 |
||
| }, | ||
| { | ||
| "name": "BIOS" | ||
| } | ||
| ], | ||
| "fans": [], | ||
| "psus": [], | ||
| "thermals": [], | ||
| "sfps": [] | ||
| }, | ||
| "interfaces": {} | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| aspeed |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "chassis": { | ||
| "AST2700-EVB-BMC": { | ||
| "component": { | ||
| "BMC": {}, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BMC as a component here too
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done via #26002 |
||
| "BIOS": {} | ||
| } | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # BMC platform environment |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "skip_thermalctld": false, | ||
| "skip_ledd": true, | ||
| "skip_xcvrd": true, | ||
| "skip_psud": true, | ||
| "skip_syseepromd": true, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could have syseepromd NOT skipped in BMC to get EEPROM data and store in DB ?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is placeholder code and needs a revisit when the hardware is fully ready |
||
| "skip_pcied": true, | ||
| "skip_chassisd": true, | ||
| "skip_fancontrol": true, | ||
| "include_sensormond": false, | ||
| "thermalctld": { | ||
| "thermal_monitor_initial_interval": 5, | ||
| "thermal_monitor_update_interval": 60, | ||
| "thermal_monitor_update_elapsed_threshold": 30 | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Console configuration for Aspeed AST2700 EVB | ||
| # This file defines console port settings for the switch CPU console | ||
|
|
||
| # Baud rate for the switch CPU console (default: 115200) | ||
| CONSOLE_BAUD_RATE=115200 | ||
|
|
||
| # Flow control: 0=disabled, 1=enabled (default: 0) | ||
| CONSOLE_FLOW_CONTROL=0 | ||
|
|
||
| # Remote device name shown in consutil | ||
| CONSOLE_REMOTE_DEVICE=EVB | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "services_to_ignore": [], | ||
| "devices_to_ignore": ["psu", "fan", "asic"], | ||
| "user_defined_checkers": [], | ||
| "polling_interval": 300, | ||
| "led_color": { | ||
| "fault": "amber", | ||
| "normal": "green", | ||
| "booting": "amber_blink" | ||
| } | ||
| } | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| ttySwitchCpu | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Nexthop B27 BMC: Map host CPU console /dev/ttyS1 to common alias /dev/ttySwitchCpu0 | ||
| SUBSYSTEM=="tty", KERNEL=="ttyS1", SYMLINK+="ttySwitchCpu0", MODE="0666" | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # BMC's don't have a switch asic but SONIC assumes NUM_ASIC to be atleast 1 | ||
| NUM_ASIC=1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| NH-B27 empty |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Console configuration for AST2720 platform | ||
| # CONSOLE_DEV=12 means ttyS12 | ||
| CONSOLE_DEV=12 | ||
| CONSOLE_SPEED=115200 | ||
|
|
||
| # Early console for debugging (UART12 on AST2720) | ||
| EARLYCON="earlycon=uart8250,mmio32,0x14c33b00" | ||
|
|
||
| # Variable log size (MB) | ||
| VAR_LOG_SIZE=512 | ||
|
|
||
| # Additional kernel command line arguments | ||
| ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "chassis": { | ||
| "name": "NH-B27-BMC", | ||
| "thermal_manager": false, | ||
| "status_led": { | ||
| "controllable": true, | ||
| "colors": ["green", "amber", "off"] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the real physical device with Switch-Host + BMC, is this led visible outside to user/admin ? can we bind the led color to the BMC status?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is placeholder code and needs to be revisited when the actual hardware platform becomes ready |
||
| }, | ||
| "components": [ | ||
| { | ||
| "name": "BMC" | ||
| }, | ||
| { | ||
| "name": "BIOS" | ||
| } | ||
| ], | ||
| "fans": [], | ||
| "psus": [], | ||
| "thermals": [], | ||
| "sfps": [] | ||
| }, | ||
| "interfaces": {} | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| aspeed |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "chassis": { | ||
| "NH-B27-BMC": { | ||
| "component": { | ||
| "BMC": {}, | ||
| "BIOS": {} | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # BMC platform environment |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "skip_thermalctld": false, | ||
| "skip_ledd": true, | ||
| "skip_xcvrd": true, | ||
| "skip_psud": true, | ||
| "skip_syseepromd": true, | ||
| "skip_pcied": true, | ||
| "skip_chassisd": true, | ||
| "skip_fancontrol": true, | ||
| "include_sensormond": false, | ||
| "thermalctld": { | ||
| "thermal_monitor_initial_interval": 5, | ||
| "thermal_monitor_update_interval": 60, | ||
| "thermal_monitor_update_elapsed_threshold": 30 | ||
| } | ||
| } | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Console configuration for Nexthop B27 BMC | ||
| # This file defines console port settings for the switch CPU console | ||
|
|
||
| # Baud rate for the switch CPU console (default: 115200) | ||
| CONSOLE_BAUD_RATE=9600 | ||
|
|
||
| # Flow control: 0=disabled, 1=enabled (default: 0) | ||
| CONSOLE_FLOW_CONTROL=0 | ||
|
|
||
| # Remote device name shown in consutil | ||
| CONSOLE_REMOTE_DEVICE=SwitchCpu | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "services_to_ignore": [], | ||
| "devices_to_ignore": ["psu", "fan", "asic"], | ||
| "user_defined_checkers": [], | ||
| "polling_interval": 300, | ||
| "led_color": { | ||
| "fault": "amber", | ||
| "normal": "green", | ||
| "booting": "amber_blink" | ||
| } | ||
| } | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| ttySwitchCpu | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,11 @@ then | |
| fi | ||
| fi | ||
|
|
||
| if [[ $IS_BMC_DEVICE == "true" ]] | ||
| then | ||
| export DATABASE_TYPE="bmcdb" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We really don't have a use case to have a separate bmcdb ?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The DATABASE_TYPE bmcdb was added only to avoid BMP_STATE_DB (BGP monitoring protocol database) which doesn't make sense in our platform. Otherwise it behaves in an identical manner to DATABASE_TYPE being empty/not specified. So all the standard databases of SONIC (CONFIG_DB, APPL_DB, STATE_DB etc) would be present. If we don't have this new type, then the condition to avoid BMP_STATE_DB will have to be coded differently. I went with this approach because it was already used by one platform (dpudb). |
||
| fi | ||
|
|
||
| export BMP_DB_PORT=6400 | ||
|
|
||
| REDIS_DIR=/var/run/redis$NAMESPACE_ID | ||
|
|
@@ -143,6 +148,8 @@ done | |
|
|
||
| chown -R redis:redis $REDIS_DIR | ||
| REDIS_BMP_DIR="/var/lib/redis_bmp" | ||
| chown -R redis:redis $REDIS_BMP_DIR | ||
| if [[ -d $REDIS_BMP_DIR ]]; then | ||
| chown -R redis:redis $REDIS_BMP_DIR | ||
| fi | ||
|
|
||
| exec /usr/local/bin/supervisord | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the error there even if this file "asic.conf" is not present ? or
Can we fix the place where it imposes the NUM_ASIC = 1 check ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NUM_ASIC being not zero seems to be a fundamental SONIC assumption. Even virtual switch implementations (device/virtual) define it to be 1. So went with this.