feat( script : nicsensor.sh ) Update to version 1.2 Intest Rev3
This commit is contained in:
parent
7e93eb0022
commit
14129aae22
@ -1,7 +1,7 @@
|
|||||||
# Script Version 1.2
|
# Script Version 1.2
|
||||||
Release Note:
|
Release Note:
|
||||||
1.[新增功能]支持写入板卡FRU
|
1.[新增功能]支持写入板卡FRU
|
||||||
2.[新增功能]添加适配服务器 donghu
|
2.[新增功能]添加适配服务器 donghu yichun
|
||||||
3.[功能优化]修复一些交互类bug,增强脚本健壮性
|
3.[功能优化]修复一些交互类bug,增强脚本健壮性
|
||||||
4.[功能优化]更便捷的支持脚本传感器名称本地化
|
4.[功能优化]更便捷的支持脚本传感器名称本地化
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ EMC1413_Channel2_name="Channel 2"
|
|||||||
fru_offset="0x00 0x00"
|
fru_offset="0x00 0x00"
|
||||||
|
|
||||||
# 应用的服务器产品,根据服务器产品手动修改这个变量
|
# 应用的服务器产品,根据服务器产品手动修改这个变量
|
||||||
# 当前适配的服务器产品 5280m7 5468m7 donghu
|
# 当前适配的服务器产品 5280m7 5468m7 donghu yichun
|
||||||
server_type="5280m7"
|
server_type="5280m7"
|
||||||
|
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
@ -134,7 +134,7 @@ ina3221_ch2_volt="0"
|
|||||||
ina3221_ch0_current="0"
|
ina3221_ch0_current="0"
|
||||||
ina3221_ch1_current="0"
|
ina3221_ch1_current="0"
|
||||||
ina3221_ch2_current="0"
|
ina3221_ch2_current="0"
|
||||||
SCRIPT_VRESION="1.2 InTest Rev2"
|
SCRIPT_VRESION="1.2 InTest Rev3"
|
||||||
|
|
||||||
fru_file_name=$option_data2
|
fru_file_name=$option_data2
|
||||||
fru_write_size=0
|
fru_write_size=0
|
||||||
@ -295,9 +295,28 @@ set_configuration_donghu(){
|
|||||||
pca9548_channel="0x02"
|
pca9548_channel="0x02"
|
||||||
elif [ $pcie_slot -eq 7 ];then
|
elif [ $pcie_slot -eq 7 ];then
|
||||||
pca9548_channel="0x01"
|
pca9548_channel="0x01"
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 根据yichun pcie slot 和 i2c 对对应关系调整变量
|
||||||
|
set_configuration_yichun(){
|
||||||
|
is_have_pca9641=0
|
||||||
|
pca9548_slave="0x74"
|
||||||
|
|
||||||
|
# set pca9548 switch channel
|
||||||
|
if [ $pcie_slot -eq 0 ];then
|
||||||
|
i2c_bus=12
|
||||||
|
pca9548_channel="0x02"
|
||||||
|
elif [ $pcie_slot -eq 1 ];then
|
||||||
|
i2c_bus=13
|
||||||
|
pca9548_channel="0x02"
|
||||||
|
elif [ $pcie_slot -eq 2 ];then
|
||||||
|
i2c_bus=14
|
||||||
|
pca9548_channel="0x02"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# 根据输入信息调整选通芯片的配置(PCA9641 PCA9548)
|
# 根据输入信息调整选通芯片的配置(PCA9641 PCA9548)
|
||||||
# 20240912 - 更新脚本:支持通过服务器型号进行配置
|
# 20240912 - 更新脚本:支持通过服务器型号进行配置
|
||||||
set_configuration(){
|
set_configuration(){
|
||||||
@ -311,6 +330,8 @@ set_configuration(){
|
|||||||
set_configuration_5468m7
|
set_configuration_5468m7
|
||||||
elif [ $server_type == "donghu" ];then
|
elif [ $server_type == "donghu" ];then
|
||||||
set_configuration_donghu
|
set_configuration_donghu
|
||||||
|
elif [ $server_type == "yichun" ];then
|
||||||
|
set_configuration_yichun
|
||||||
else
|
else
|
||||||
format_print $ERROR "Error: Unsupport Server Type !!! - $server_type"
|
format_print $ERROR "Error: Unsupport Server Type !!! - $server_type"
|
||||||
exit 1
|
exit 1
|
||||||
@ -987,6 +1008,24 @@ detect_on_donghu(){
|
|||||||
i2cdetect -y $i2c_bus
|
i2cdetect -y $i2c_bus
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 在 yichun 上扫描每个pcie slot下的I2C设备
|
||||||
|
detect_on_yichun(){
|
||||||
|
i2c_bus=12
|
||||||
|
echo ">>> PCIe slot 0 : bus12 9546channel 2"
|
||||||
|
i2ctransfer -y $i2c_bus w1@0x74 0x02
|
||||||
|
i2cdetect -y $i2c_bus
|
||||||
|
|
||||||
|
i2c_bus=13
|
||||||
|
echo ">>> PCIe slot 1 : bus13 9546channel 2"
|
||||||
|
i2ctransfer -y $i2c_bus w1@0x74 0x02
|
||||||
|
i2cdetect -y $i2c_bus
|
||||||
|
|
||||||
|
i2c_bus=14
|
||||||
|
echo ">>> PCIe slot 2 : bus14 9546channel 2"
|
||||||
|
i2ctransfer -y $i2c_bus w1@0x74 0x02
|
||||||
|
i2cdetect -y $i2c_bus
|
||||||
|
}
|
||||||
|
|
||||||
# 搜索服务器所有PCIE插槽的I2C设备信息,当前仅支持特定Riser卡上的设备
|
# 搜索服务器所有PCIE插槽的I2C设备信息,当前仅支持特定Riser卡上的设备
|
||||||
# change list : 20240912-支持服务器器型号5280m7,5468m7
|
# change list : 20240912-支持服务器器型号5280m7,5468m7
|
||||||
start_detect_device(){
|
start_detect_device(){
|
||||||
@ -1006,6 +1045,8 @@ start_detect_device(){
|
|||||||
detect_on_5468m7
|
detect_on_5468m7
|
||||||
elif [ $server_type == "donghu" ];then
|
elif [ $server_type == "donghu" ];then
|
||||||
detect_on_donghu
|
detect_on_donghu
|
||||||
|
elif [ $server_type == "yichun" ];then
|
||||||
|
detect_on_yichun
|
||||||
else
|
else
|
||||||
echo "Error: Unsupport Server Type !!!"
|
echo "Error: Unsupport Server Type !!!"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user