From 9d37b63824d9af4002773513dbe12672063e3f2f Mon Sep 17 00:00:00 2001 From: "Marty Y. Lok" <76118573+mlok-nokia@users.noreply.github.com> Date: Mon, 10 Oct 2022 21:49:26 -0400 Subject: [PATCH] [Nokia] Update Nokia platform IXR7250E device data (#11611) Signed-off-by: mlok --- .../platform_components.template | 19 +++++ .../platform_ndk.json | 8 +- .../platform_reboot | 19 +++++ .../Nokia-IXR7250E-SUP-10/platform.json | 3 + .../platform_components.json | 81 +++++++++++++++++++ .../platform_ndk.json | 4 + 6 files changed, 132 insertions(+), 2 deletions(-) create mode 100755 device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_components.template create mode 100644 device/nokia/x86_64-nokia_ixr7250e_sup-r0/Nokia-IXR7250E-SUP-10/platform_components.json diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_components.template b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_components.template new file mode 100755 index 0000000000..7b05296ae1 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_components.template @@ -0,0 +1,19 @@ + { + "module": { + "LINE-CARD": { + "component": {} + }, + "SUPERVISOR0": { + "component": {} + } + }, + "chassis": { + "Nokia-IXR7250E-36x400G": { + "component": { + "FPGA2": {}, + "FPGA1": {}, + "BIOS": {} + } + } + } + } diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_ndk.json b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_ndk.json index 2220f87478..f7be140980 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_ndk.json +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_ndk.json @@ -1,8 +1,8 @@ { "options": [ { - "key": "sfp_init_tx_en", - "stringval": "yes" + "key": "module_direct_ipc_ue", + "stringval": "no" }, { "key": "midplane_subnet", @@ -39,6 +39,10 @@ { "key": "enable_firmware_update", "intval": 0 + }, + { + "key": "sonic_log_level", + "stringval": "error" } ] } diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_reboot b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_reboot index a32a3549bc..b086d09bdd 100755 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_reboot +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_reboot @@ -1,5 +1,24 @@ #!/bin/bash +update_reboot_cause_for_supervisor_reboot() +{ + DEVICE_MGR_REBOOT_FILE=/tmp/device_mgr_reboot + REBOOT_CAUSE_FILE=/host/reboot-cause/reboot-cause.txt + TMP_REBOOT_CAUSE_FILE=/tmp/tmp-reboot-cause.txt + if [ -f $DEVICE_MGR_REBOOT_FILE ]; then + if [ -f $REBOOT_CAUSE_FILE ]; then + t1=`sudo grep "User: ," $REBOOT_CAUSE_FILE` + if [ ! -z "$t1" ]; then + echo $t1 | sed 's/reboot/reboot from Supervisor/g' | sed 's/User: /User: admin/g' > $TMP_REBOOT_CAUSE_FILE + cp $TMP_REBOOT_CAUSE_FILE $REBOOT_CAUSE_FILE + fi + fi + fi +} + +# update the reboot_cuase file when reboot is trigger by device-mgr +update_reboot_cause_for_supervisor_reboot + systemctl stop nokia-watchdog.service sleep 2 echo "w" > /dev/watchdog diff --git a/device/nokia/x86_64-nokia_ixr7250e_sup-r0/Nokia-IXR7250E-SUP-10/platform.json b/device/nokia/x86_64-nokia_ixr7250e_sup-r0/Nokia-IXR7250E-SUP-10/platform.json index e41b6fc8e5..4d7b66229f 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_sup-r0/Nokia-IXR7250E-SUP-10/platform.json +++ b/device/nokia/x86_64-nokia_ixr7250e_sup-r0/Nokia-IXR7250E-SUP-10/platform.json @@ -7,6 +7,9 @@ }, { "name": "FPGA1" + }, + { + "name": "SFM-FPGA" } ], "watchdog": { diff --git a/device/nokia/x86_64-nokia_ixr7250e_sup-r0/Nokia-IXR7250E-SUP-10/platform_components.json b/device/nokia/x86_64-nokia_ixr7250e_sup-r0/Nokia-IXR7250E-SUP-10/platform_components.json new file mode 100644 index 0000000000..6acb33f5bf --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250e_sup-r0/Nokia-IXR7250E-SUP-10/platform_components.json @@ -0,0 +1,81 @@ +{ + "chassis": { + "Nokia-IXR7250E-SUP-10": { + "component": { + "BIOS": { }, + "FPGA1": { }, + "SFM-FPGA": { } + } + } + }, + "module": { + "SUPERVISOR0": { + "component": { + } + }, + "LINE-CARD0": { + "component": { + } + }, + "LINE-CARD1": { + "component": { + } + }, + "LINE-CARD2": { + "component": { + } + }, + "LINE-CARD3": { + "component": { + } + }, + "LINE-CARD4": { + "component": { + } + }, + "LINE-CARD5": { + "component": { + } + }, + "LINE-CARD6": { + "component": { + } + }, + "LINE-CARD7": { + "component": { + } + }, + "FABRIC-CARD0": { + "component": { + } + }, + "FABRIC-CARD1": { + "component": { + } + }, + "FABRIC-CARD2": { + "component": { + } + }, + "FABRIC-CARD3": { + "component": { + } + }, + "FABRIC-CARD4": { + "component": { + } + }, + "FABRIC-CARD5": { + "component": { + } + }, + "FABRIC-CARD6": { + "component": { + } + }, + "FABRIC-CARD7": { + "component": { + } + } + } +} diff --git a/device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_ndk.json b/device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_ndk.json index a6d6bbf8a4..e40ac50574 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_ndk.json +++ b/device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_ndk.json @@ -27,6 +27,10 @@ { "key": "enable_firmware_update", "intval": 0 + }, + { + "key": "sonic_log_level", + "stringval": "error" } ] }