Commit 0a376436 authored by Benoit Rat's avatar Benoit Rat

sw: add FAN checking

parent ac39fabf
...@@ -21,26 +21,27 @@ printf "======: $0\n" ...@@ -21,26 +21,27 @@ printf "======: $0\n"
pwm_module=/wr/lib/modules/at91_softpwm.ko pwm_module=/wr/lib/modules/at91_softpwm.ko
if [[ -f $pwm_module ]]; fi if [[ -f $pwm_module ]]; then
insmod &> /dev/null insmod $pwm_module &> /dev/null
else else
echo "$pwm_module not found" echo "$pwm_module not found"
fi fi
speed=10 speed=100
while [ speed -lt 80 ]; do while [ ${speed} -gt 30 ]; do
echo "$speed"
${APTS_SWITCH_DIR}/bin/shw_tool --fan ${speed} ${APTS_SWITCH_DIR}/bin/shw_tool --fan ${speed}
speed=$(expr $speed + 10) sleep 1
speed=$(expr $speed - 10)
done done
ans=""
user_echoasking "y/n" "Did you hear the speed of FAN increase" user_echoasking "y/n" "Did you hear the speed of FAN decrease" "fan_speed_up"
ret0=$ret ret0=-$?
if [ $ret == "n" ]; then if [ $ans == "n" ]; then
user_echoasking "y/n" "Does the FAN is working?" user_echoasking "y/n" "Does the FAN is working?" "fan_enable"
ret1=$ret ret1=-$?
if [ $ret == "n" ]; then if [ $ans == "n" ]; then
echo "WARNING: NO FAN DETECTED! YOU SHOULD STOP THIS TEST BEFORE OVERHEATING YOUR FPGA" echo "WARNING: NO FAN DETECTED! YOU SHOULD STOP THIS TEST BEFORE OVERHEATING YOUR FPGA"
fi fi
fi fi
......
...@@ -22,7 +22,7 @@ run() ...@@ -22,7 +22,7 @@ run()
if [ x"$1" != x ]; then if [ x"$1" != x ]; then
numseq="$1" numseq="$1"
else else
numseq="01 02 05 06 07 08 09 10" numseq="01 02 03 05 06 07 08 09 10"
fi fi
for itest in $numseq; do for itest in $numseq; do
load_ask2run $(ls *${itest}-*.sh) $ask $update $inlog load_ask2run $(ls *${itest}-*.sh) $ask $update $inlog
...@@ -77,9 +77,8 @@ done ...@@ -77,9 +77,8 @@ done
# Obtain mac address # Obtain mac address
#MAC=$(ifconfig | grep 'eth0' | tr -s ' ' | cut -d ' ' -f5 | sed s/://g) #MAC=$(ifconfig | grep 'eth0' | tr -s ' ' | cut -d ' ' -f5 | sed s/://g)
if [ ${SN} -eq "0" ]; then if [ ${SN} -eq "0" ]; then
ret=""
user_echoasking "num" "Type the serial number" "S/N" user_echoasking "num" "Type the serial number" "S/N"
SN=$ret; SN=$ans;
fi fi
export logfname="${APTS_SWITCH_DIR}/logs/output-${SN}" export logfname="${APTS_SWITCH_DIR}/logs/output-${SN}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment