Compare commits

..

No commits in common. "cdfcd0523282cf56316f4f74b2189c2ebf1178ba" and "e19d0e87ee015ffcb374e9e0d779c454b408d321" have entirely different histories.

2 changed files with 11 additions and 72 deletions

@ -1,8 +1,3 @@
# Script Version 1.5 20250304
Release Note
1.[新增功能]添加适配服务器5688m7
2.[功能优化]优化程序执行
# Script Version 1.4 20250110 # Script Version 1.4 20250110
Release Note Release Note
1.[问题修复]修正tmp112传感器读取的逻辑问题 1.[问题修复]修正tmp112传感器读取的逻辑问题

@ -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_VERSION="1.5 Standard" SCRIPT_VERSION="1.4 Rev1"
fru_file_name=$option_data2 fru_file_name=$option_data2
fru_write_size=0 fru_write_size=0
@ -286,11 +286,6 @@ set_configuration_5280m7(){
} }
set_configuration_5468m7(){ set_configuration_5468m7(){
if [ $nic_type == "ocp" ];then
format_print $ERROR "Unsupport OCP Nic on $server_type"
format_print $INFO "Please check if script has update version"
exit 1
fi
is_have_pca9641=1 is_have_pca9641=1
@ -334,12 +329,6 @@ set_configuration_5468m7(){
} }
set_configuration_donghu(){ set_configuration_donghu(){
if [ $nic_type == "ocp" ];then
format_print $ERROR "Unsupport OCP Nic on $server_type"
format_print $INFO "Please check if script has update version"
exit 1
fi
is_have_pca9641=0 is_have_pca9641=0
i2c_bus=3 i2c_bus=3
@ -368,12 +357,6 @@ set_configuration_donghu(){
} }
set_configuration_yichun(){ set_configuration_yichun(){
if [ $nic_type == "ocp" ];then
format_print $ERROR "Unsupport OCP Nic on $server_type"
format_print $INFO "Please check if script has update version"
exit 1
fi
is_have_pca9641=0 is_have_pca9641=0
pca9548_slave="0x74" pca9548_slave="0x74"
@ -393,12 +376,6 @@ set_configuration_yichun(){
} }
set_configuration_qiandaohu(){ set_configuration_qiandaohu(){
if [ $nic_type == "ocp" ];then
format_print $ERROR "Unsupport OCP Nic on $server_type"
format_print $INFO "Please check if script has update version"
exit 1
fi
is_have_pca9641=0 is_have_pca9641=0
if [ $slot_number -le 7 ];then if [ $slot_number -le 7 ];then
@ -440,15 +417,9 @@ set_configuration_qiandaohu(){
} }
set_configuration_5688m7(){ set_configuration_5688m7(){
if [ $nic_type == "ocp" ];then
format_print $ERROR "Unsupport OCP Nic on $server_type"
format_print $INFO "Please check if script has update version"
exit 1
fi
is_have_pca9641=1 is_have_pca9641=1
pca9641_slave="0x31" pca9641_slave="0x41"
i2c_bus=12 i2c_bus=13
if [ $slot_number -le 3 ];then if [ $slot_number -le 3 ];then
pca9548_slave=0x71 pca9548_slave=0x71
@ -571,7 +542,8 @@ record_config_info(){
# Record i2c device info to log # Record i2c device info to log
format_log_print $INFO "At the beginning, I2C bus status:" format_log_print $INFO "At the beginning, I2C bus status:"
i2cdetect -y $i2c_bus >> $log res_info=`i2cdetect -y $i2c_bus`
echo $res_info >> $log
} }
get_pca9641_control(){ get_pca9641_control(){
@ -585,7 +557,8 @@ get_pca9641_control(){
format_log_print $INFO "After Build 9641 connection, The REG value is $res_build" format_log_print $INFO "After Build 9641 connection, The REG value is $res_build"
# After get 9641 controll, Record i2c device info to log # After get 9641 controll, Record i2c device info to log
i2cdetect -y $i2c_bus >> $log res_after=`i2cdetect -y $i2c_bus`
echo $res_after >> $log
if [ "$res_build" != "0x87" ];then if [ "$res_build" != "0x87" ];then
format_print $ERROR "Cannot establish connection with pca9641 !!!" format_print $ERROR "Cannot establish connection with pca9641 !!!"
@ -600,7 +573,8 @@ switch_pca9548_channel(){
format_log_print $INFO "After switch channel" format_log_print $INFO "After switch channel"
# After set 9548 channel , record i2c device info # After set 9548 channel , record i2c device info
i2cdetect -y $i2c_bus >> $log res_after=`i2cdetect -y $i2c_bus`
echo $res_after >> $log
} }
@ -1247,12 +1221,6 @@ detect_on_5280m7(){
} }
detect_on_5468m7(){ detect_on_5468m7(){
if [ $nic_type == "ocp" ];then
format_print $ERROR "Unsupport OCP Nic on $server_type"
format_print $INFO "Please check if script has update version"
exit 1
fi
i2c_bus=13 i2c_bus=13
pca9641_slave="0x31" pca9641_slave="0x31"
get_pca9641_control get_pca9641_control
@ -1276,12 +1244,6 @@ detect_on_5468m7(){
} }
detect_on_donghu(){ detect_on_donghu(){
if [ $nic_type == "ocp" ];then
format_print $ERROR "Unsupport OCP Nic on $server_type"
format_print $INFO "Please check if script has update version"
exit 1
fi
i2c_bus=3 i2c_bus=3
do_i2c_detect $i2c_bus 0x70 0x80 7 0 do_i2c_detect $i2c_bus 0x70 0x80 7 0
do_i2c_detect $i2c_bus 0x70 0x40 6 1 do_i2c_detect $i2c_bus 0x70 0x40 6 1
@ -1294,12 +1256,6 @@ detect_on_donghu(){
} }
detect_on_yichun(){ detect_on_yichun(){
if [ $nic_type == "ocp" ];then
format_print $ERROR "Unsupport OCP Nic on $server_type"
format_print $INFO "Please check if script has update version"
exit 1
fi
i2c_bus=12 i2c_bus=12
do_i2c_detect $i2c_bus 0x74 0x02 2 0 do_i2c_detect $i2c_bus 0x74 0x02 2 0
@ -1311,12 +1267,6 @@ detect_on_yichun(){
} }
detect_on_qiandaohu(){ detect_on_qiandaohu(){
if [ $nic_type == "ocp" ];then
format_print $ERROR "Unsupport OCP Nic on $server_type"
format_print $INFO "Please check if script has update version"
exit 1
fi
i2c_bus=3 i2c_bus=3
do_i2c_detect $i2c_bus 0x70 0x08 3 0 do_i2c_detect $i2c_bus 0x70 0x08 3 0
do_i2c_detect $i2c_bus 0x70 0x04 2 1 do_i2c_detect $i2c_bus 0x70 0x04 2 1
@ -1335,14 +1285,8 @@ detect_on_qiandaohu(){
} }
detect_on_5688m7(){ detect_on_5688m7(){
if [ $nic_type == "ocp" ];then i2c_bus=13
format_print $ERROR "Unsupport OCP Nic on $server_type" pca9641_slave="0x41"
format_print $INFO "Please check if script has update version"
exit 1
fi
i2c_bus=12
pca9641_slave="0x31"
get_pca9641_control get_pca9641_control
do_i2c_detect $i2c_bus 0x71 0x01 0 0 do_i2c_detect $i2c_bus 0x71 0x01 0 0