Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fb95279c56 | |||
| 51d03e0af1 | |||
| b2844e7f78 | |||
| f811e41e5e | |||
| f9293e9a14 | |||
| aade071ab4 | |||
| e86e5ee478 | |||
| fdac7abf5b | |||
| 33755720c2 | |||
| c4ed4c0ed4 | |||
| e8d241f125 | |||
| 27b8983560 | |||
| 3788b78ad4 | |||
| 5efed997d0 | |||
| fa83cf7dac | |||
| 3d85197536 | |||
| 7a6064d84c | |||
| 61a9d23d9f | |||
| 42e374b1c5 | |||
| 9ff5a2d9d2 | |||
| c80f3e62ef |
202
26pingpio-script/26pingpio-script.sh
Normal file → Executable file
202
26pingpio-script/26pingpio-script.sh
Normal file → Executable file
@ -1,52 +1,14 @@
|
||||
#/bin/bash
|
||||
|
||||
### GPIO 18 - LED high, light on ###
|
||||
### GPIO 17 - LED high, light on ###
|
||||
### GPIO 62 - LED high, light on ###
|
||||
|
||||
### GPIO 81 - LED high, light on ###
|
||||
### GPIO 80 - LED high, light on ###
|
||||
### GPIO 50 - LED high, light on ###
|
||||
|
||||
### GPIO 30 - LED high, light on ###
|
||||
### GPIO 29 - LED high, light on ###
|
||||
### GPIO 31 - LED high, light on ###
|
||||
|
||||
### GPIO 59 - LED high, light on ###
|
||||
### GPIO 58 - LED high, light on ###
|
||||
### GPIO 51 - LED high, light on ###
|
||||
|
||||
### GPIO 61 - LED high, light on ###
|
||||
### GPIO 60 - LED high, light on ###
|
||||
|
||||
### GPIO 53 - LED high, light on ###
|
||||
### GPIO 28 - LED high, light on ###
|
||||
### GPIO 52 - LED high, light on ###
|
||||
### GPIO 18 - LED high, light on ###
|
||||
### GPIO 20 - LED high, light on ###
|
||||
|
||||
|
||||
RET=0
|
||||
EXP_GPIO18=18
|
||||
EXP_GPIO17=17
|
||||
EXP_GPIO62=62
|
||||
|
||||
EXP_GPIO81=81
|
||||
EXP_GPIO80=80
|
||||
EXP_GPIO50=50
|
||||
|
||||
EXP_GPIO30=30
|
||||
EXP_GPIO29=29
|
||||
EXP_GPIO31=31
|
||||
|
||||
EXP_GPIO59=59
|
||||
EXP_GPIO58=58
|
||||
EXP_GPIO51=51
|
||||
|
||||
EXP_GPIO61=61
|
||||
EXP_GPIO60=60
|
||||
|
||||
EXP_GPIO53=53
|
||||
EXP_GPIO28=28
|
||||
EXP_GPIO52=52
|
||||
EXP_GPIO18=18
|
||||
EXP_GPIO20=20
|
||||
|
||||
sleep 2
|
||||
|
||||
@ -58,176 +20,46 @@ echo "##########################################################################
|
||||
source `pwd`/mt_gpio.sh
|
||||
|
||||
####################################################################################################
|
||||
if [ ! -f /sys/class/gpio/gpio446/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO18} ### EXP_GPIO18 428 + 18 = 446
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio445/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO17} ### EXP_GPIO17 428 + 17 = 445
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio490/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO62} ### EXP_GPIO62 428 + 62 = 490
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio509/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO81} ### EXP_GPIO81 428 + 81 = 509
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio508/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO80} ### EXP_GPIO80 428 + 80 = 508
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio478/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO50} ### EXP_GPIO50 428 + 50 = 478
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio458/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO30} ### EXP_GPIO30 428 + 30 = 458
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio457/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO29} ### EXP_GPIO29 428 + 29 = 457
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio459/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO31} ### EXP_GPIO31 428 + 31 = 459
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio487/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO59} ### EXP_GPIO59 428 + 59 = 487
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio486/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO58} ### EXP_GPIO58 428 + 58 = 486
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio479/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO51} ### EXP_GPIO51 428 + 51 = 479
|
||||
if [ ! -f /sys/class/gpio/gpio488/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO17} ### EXP_GPIO17 471 + 17 = 488
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio489/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO61} ### EXP_GPIO61 428 + 61 = 489
|
||||
mt_gpio_export ${EXP_GPIO18} ### EXP_GPIO18 471 + 18 = 489
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio488/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO60} ### EXP_GPIO60 428 + 60 = 488
|
||||
if [ ! -f /sys/class/gpio/gpio491/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO20} ### EXP_GPIO20 471 + 20 = 491
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio481/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO53} ### EXP_GPIO53 428 + 53 = 481
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio456/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO28} ### EXP_GPIO28 428 + 28 = 456
|
||||
fi
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio480/direction ]; then
|
||||
mt_gpio_export ${EXP_GPIO52} ### EXP_GPIO52 428 + 52 = 480
|
||||
fi
|
||||
|
||||
|
||||
####################################################################################################
|
||||
mt_gpio_dir ${EXP_GPIO18} out
|
||||
mt_gpio_dir ${EXP_GPIO17} out
|
||||
mt_gpio_dir ${EXP_GPIO62} out
|
||||
|
||||
mt_gpio_dir ${EXP_GPIO81} out
|
||||
mt_gpio_dir ${EXP_GPIO80} out
|
||||
mt_gpio_dir ${EXP_GPIO50} out
|
||||
|
||||
mt_gpio_dir ${EXP_GPIO30} out
|
||||
mt_gpio_dir ${EXP_GPIO29} out
|
||||
mt_gpio_dir ${EXP_GPIO31} out
|
||||
|
||||
mt_gpio_dir ${EXP_GPIO59} out
|
||||
mt_gpio_dir ${EXP_GPIO58} out
|
||||
mt_gpio_dir ${EXP_GPIO51} out
|
||||
|
||||
mt_gpio_dir ${EXP_GPIO61} out
|
||||
mt_gpio_dir ${EXP_GPIO60} out
|
||||
|
||||
mt_gpio_dir ${EXP_GPIO53} out
|
||||
mt_gpio_dir ${EXP_GPIO28} out
|
||||
mt_gpio_dir ${EXP_GPIO52} out
|
||||
mt_gpio_dir ${EXP_GPIO18} out
|
||||
|
||||
mt_gpio_dir ${EXP_GPIO20} out
|
||||
|
||||
####################################################################################################
|
||||
echo "########################## 26PIN GPIO Expand Board Testing Start ##########################"
|
||||
|
||||
echo "### 26PIN Expand Board's all LED turn on about 10s ###"
|
||||
mt_gpio_out ${EXP_GPIO18} 1
|
||||
mt_gpio_out ${EXP_GPIO17} 1
|
||||
mt_gpio_out ${EXP_GPIO62} 1
|
||||
mt_gpio_out ${EXP_GPIO18} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO81} 1
|
||||
mt_gpio_out ${EXP_GPIO80} 1
|
||||
mt_gpio_out ${EXP_GPIO50} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO30} 1
|
||||
mt_gpio_out ${EXP_GPIO29} 1
|
||||
mt_gpio_out ${EXP_GPIO31} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO59} 1
|
||||
mt_gpio_out ${EXP_GPIO58} 1
|
||||
mt_gpio_out ${EXP_GPIO51} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO61} 1
|
||||
mt_gpio_out ${EXP_GPIO60} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO53} 1
|
||||
mt_gpio_out ${EXP_GPIO28} 1
|
||||
mt_gpio_out ${EXP_GPIO52} 1
|
||||
mt_gpio_out ${EXP_GPIO20} 1
|
||||
|
||||
sleep 10
|
||||
echo "### 26PIN Expand Board's all LED turn off about 5s ###"
|
||||
mt_gpio_out ${EXP_GPIO18} 0
|
||||
mt_gpio_out ${EXP_GPIO17} 0
|
||||
mt_gpio_out ${EXP_GPIO62} 0
|
||||
mt_gpio_out ${EXP_GPIO18} 0
|
||||
|
||||
mt_gpio_out ${EXP_GPIO81} 0
|
||||
mt_gpio_out ${EXP_GPIO80} 0
|
||||
mt_gpio_out ${EXP_GPIO50} 0
|
||||
|
||||
mt_gpio_out ${EXP_GPIO30} 0
|
||||
mt_gpio_out ${EXP_GPIO29} 0
|
||||
mt_gpio_out ${EXP_GPIO31} 0
|
||||
|
||||
mt_gpio_out ${EXP_GPIO59} 0
|
||||
mt_gpio_out ${EXP_GPIO58} 0
|
||||
mt_gpio_out ${EXP_GPIO51} 0
|
||||
|
||||
mt_gpio_out ${EXP_GPIO61} 0
|
||||
mt_gpio_out ${EXP_GPIO60} 0
|
||||
|
||||
mt_gpio_out ${EXP_GPIO53} 0
|
||||
mt_gpio_out ${EXP_GPIO28} 0
|
||||
mt_gpio_out ${EXP_GPIO52} 0
|
||||
mt_gpio_out ${EXP_GPIO20} 0
|
||||
|
||||
sleep 5
|
||||
echo "### 26PIN Expand Board's all LED turn on ###"
|
||||
mt_gpio_out ${EXP_GPIO18} 1
|
||||
mt_gpio_out ${EXP_GPIO17} 1
|
||||
mt_gpio_out ${EXP_GPIO62} 1
|
||||
mt_gpio_out ${EXP_GPIO18} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO81} 1
|
||||
mt_gpio_out ${EXP_GPIO80} 1
|
||||
mt_gpio_out ${EXP_GPIO50} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO30} 1
|
||||
mt_gpio_out ${EXP_GPIO29} 1
|
||||
mt_gpio_out ${EXP_GPIO31} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO59} 1
|
||||
mt_gpio_out ${EXP_GPIO58} 1
|
||||
mt_gpio_out ${EXP_GPIO51} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO61} 1
|
||||
mt_gpio_out ${EXP_GPIO60} 1
|
||||
|
||||
mt_gpio_out ${EXP_GPIO53} 1
|
||||
mt_gpio_out ${EXP_GPIO28} 1
|
||||
mt_gpio_out ${EXP_GPIO52} 1
|
||||
mt_gpio_out ${EXP_GPIO20} 1
|
||||
|
||||
|
||||
sleep 2
|
||||
|
||||
8
26pingpio-script/mt_gpio.sh
Normal file → Executable file
8
26pingpio-script/mt_gpio.sh
Normal file → Executable file
@ -4,7 +4,7 @@ SYS_FILE=/sys/class/gpio
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
@ -19,7 +19,7 @@ mt_gpio_export()
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
@ -35,7 +35,7 @@ mt_gpio_dir()
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
@ -51,7 +51,7 @@ mt_gpio_out()
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
|
||||
77
app_ft-script.sh
Normal file → Executable file
77
app_ft-script.sh
Normal file → Executable file
@ -1,9 +1,9 @@
|
||||
#/bin/bash
|
||||
|
||||
### This tool is for BPI-R4 function test in manufacturer ###
|
||||
### This tool is for BPI-RV2 function test in manufacturer ###
|
||||
RET=0
|
||||
PREFIX=`pwd`/
|
||||
DEUBGFILE=/var/run/r4-ft-script.log
|
||||
DEUBGFILE=/var/run/rv2-ft-script.log
|
||||
|
||||
AUTOMATIC_CASE_NUM=0
|
||||
MANUAL_CASE_NUM=0
|
||||
@ -15,7 +15,7 @@ echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
|
||||
echo "######################## BPI-R4 Function Testing Start ########################"
|
||||
echo "######################## BPI-RV2 Function Testing Start ########################"
|
||||
### Sets QUIT variable so script will finish. ###
|
||||
quit()
|
||||
{
|
||||
@ -78,73 +78,46 @@ run_script()
|
||||
step_automatic_func()
|
||||
{
|
||||
TITLE="Automatic Test Cases"
|
||||
AUTOMATIC_CASE_NUM=9
|
||||
CASE_NUM=9
|
||||
AUTOMATIC_CASE_NUM=5
|
||||
CASE_NUM=5
|
||||
|
||||
TEXT_1="Memory_Test_Case"
|
||||
FUNC_1="memory-script"
|
||||
|
||||
TEXT_2="WIFI_Test_Case"
|
||||
FUNC_2="wifi-script"
|
||||
TEXT_2="miniPCIeX2_Test_Case"
|
||||
FUNC_2="minipciex2-script"
|
||||
|
||||
TEXT_3="miniPCIeX2_Test_Case"
|
||||
FUNC_3="minipciex2-script"
|
||||
TEXT_3="miniPCIeUSB_Test_Case"
|
||||
FUNC_3="minipcieusb-script"
|
||||
|
||||
TEXT_4="miniPCIeUSB_Test_Case"
|
||||
FUNC_4="minipcieusb-script"
|
||||
TEXT_4="NOR_Test_sase"
|
||||
FUNC_4="nor-script"
|
||||
|
||||
TEXT_5="NVME_Test_Case"
|
||||
FUNC_5="nvme-script"
|
||||
|
||||
TEXT_6="NAND_Test_sase"
|
||||
FUNC_6="nand-script"
|
||||
|
||||
TEXT_7="EMMC_Test_sase"
|
||||
FUNC_7="emmc-script"
|
||||
|
||||
TEXT_8="RTC_Test_sase"
|
||||
FUNC_8="rtc-script"
|
||||
|
||||
TEXT_9="EEPROM_Test_sase"
|
||||
FUNC_9="eeprom-script"
|
||||
TEXT_5="RTC_Test_sase"
|
||||
FUNC_5="rtc-script"
|
||||
}
|
||||
|
||||
### Options for manual test cases ###
|
||||
step_manual_func()
|
||||
{
|
||||
TITLE="Manual Test Cases"
|
||||
MANUAL_CASE_NUM=10
|
||||
CASE_NUM=10
|
||||
MANUAL_CASE_NUM=5
|
||||
CASE_NUM=5
|
||||
|
||||
TEXT_1="FAN_Test_Case"
|
||||
FUNC_1="fan-script"
|
||||
TEXT_1="USB20_Test_Case"
|
||||
FUNC_1="usb20-script"
|
||||
|
||||
TEXT_2="LED_Test_Case"
|
||||
FUNC_2="led-script"
|
||||
TEXT_2="Ethernet_Test_Case"
|
||||
FUNC_2="ethernet-script"
|
||||
|
||||
TEXT_3="KEY_Test_Case"
|
||||
FUNC_3="key-script"
|
||||
TEXT_3="26PINGPIO_Test_Case"
|
||||
FUNC_3="26pingpio-script"
|
||||
|
||||
TEXT_4="USB30_Test_Case"
|
||||
FUNC_4="usb30-script"
|
||||
TEXT_4="M2KeyB_PCIE_Test_Case"
|
||||
FUNC_4="m2keybpcie-script"
|
||||
|
||||
TEXT_5="USB20_Test_Case"
|
||||
FUNC_5="usb20-script"
|
||||
|
||||
TEXT_6="Ethernet_Test_Case"
|
||||
FUNC_6="ethernet-script"
|
||||
|
||||
TEXT_7="26PINGPIO_Test_Case"
|
||||
FUNC_7="26pingpio-script"
|
||||
|
||||
TEXT_8="M2KeyB_PCIE_Test_Case"
|
||||
FUNC_8="m2keybpcie-script"
|
||||
|
||||
TEXT_9="M2KeyB_USB2_Test_Case"
|
||||
FUNC_9="m2keybusb2-script"
|
||||
|
||||
TEXT_10="M2KeyB_USB3_Test_Case"
|
||||
FUNC_10="m2keybusb3-script"
|
||||
TEXT_5="M2KeyB_USB_Test_Case"
|
||||
FUNC_5="m2keybusb-script"
|
||||
}
|
||||
|
||||
STEPS_1="step_automatic_func"
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
#/bin/bash
|
||||
|
||||
SYS_FILE=/sys/devices/platform/11005000.i2c/i2c-1
|
||||
RET=0
|
||||
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "###################### BPI-R4 EEPROM 0x57 Testing Start ############################"
|
||||
|
||||
if [ ! -f ${SYS_FILE}/i2c-2/2-0057/eeprom ]; then
|
||||
echo "### BPI-R4 eeprom 0x57 can't work fine ###"
|
||||
RET=1
|
||||
else
|
||||
echo "### BPI-R4 eeprom 0x57 can work fine ###"
|
||||
fi
|
||||
|
||||
echo "######################################################################################"
|
||||
sleep 1
|
||||
|
||||
return ${RET}
|
||||
|
||||
51
ethernet-script/ethernet-script.sh
Normal file → Executable file
51
ethernet-script/ethernet-script.sh
Normal file → Executable file
@ -9,13 +9,14 @@ echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
|
||||
ifconfig eth4 up
|
||||
ifconfig eth5 up
|
||||
ifconfig eth0 up
|
||||
ifconfig eth1 up
|
||||
ifconfig eth2 up
|
||||
ifconfig eth3 up
|
||||
ifconfig br-lan down
|
||||
ifconfig br-wan down
|
||||
brctl delbr br-lan
|
||||
brctl delbr br-wan
|
||||
sleep 2
|
||||
|
||||
echo "########################## Network ethernet Testing Start ##########################"
|
||||
@ -33,21 +34,21 @@ done
|
||||
|
||||
echo "----------------------------------------------------------------------------------------"
|
||||
sleep 3
|
||||
echo "### Ethernet 10G SFP+ WAN Testing ####"
|
||||
udhcpc -t 5 -n -i eth2
|
||||
echo "### Ethernet 2.5G RJ45 WAN Testing ####"
|
||||
udhcpc -t 5 -n -i eth4
|
||||
if [ $? == 0 ]; then
|
||||
echo "### Ethernet 10G SFP+ WAN DHCP got ip address successfully ###"
|
||||
echo "### Ethernet 2.5G RJ45 WAN DHCP got ip address successfully ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: Ethernet 10G SFP+ WAN DHCP can not got ip address failure"
|
||||
echo "Error Notice: Ethernet 2.5G RJ45 WAN DHCP can not got ip address failure"
|
||||
fi
|
||||
|
||||
echo "----------------------------------------------------------------------------------------"
|
||||
sleep 3
|
||||
echo "### Ethernet 10G SFP+ LAN Testing ####"
|
||||
udhcpc -t 5 -n -i eth1
|
||||
echo "### Ethernet 1G RJ45 LAN Testing ####"
|
||||
udhcpc -t 5 -n -i eth5
|
||||
if [ $? == 0 ]; then
|
||||
echo "### Ethernet 10G SFP+ LAN DHCP got ip address successfully ###"
|
||||
echo "### Ethernet 1G SFP+ LAN DHCP got ip address successfully ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: Ethernet 10G SFP+ LAN DHCP can not got ip address failure"
|
||||
@ -55,46 +56,46 @@ fi
|
||||
|
||||
echo "----------------------------------------------------------------------------------------"
|
||||
sleep 3
|
||||
echo "### Ethernet 1G RJ45 LAN 0 Testing ####"
|
||||
udhcpc -t 5 -n -i lan0
|
||||
echo "### Ethernet 1G RJ45 ETH 0 Testing ####"
|
||||
udhcpc -t 5 -n -i eth0
|
||||
if [ $? == 0 ]; then
|
||||
echo "### Ethernet 1G RJ45 LAN 0 DHCP got ip address successfully ###"
|
||||
echo "### Ethernet 1G RJ45 ETH 0 DHCP got ip address successfully ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: Ethernet 1G RJ45 LAN 0 DHCP can not got ip address failure"
|
||||
echo "Error Notice: Ethernet 1G RJ45 ETH 0 DHCP can not got ip address failure"
|
||||
fi
|
||||
|
||||
echo "----------------------------------------------------------------------------------------"
|
||||
sleep 3
|
||||
echo "### Ethernet 1G RJ45 LAN 1 Testing ####"
|
||||
udhcpc -t 5 -n -i lan1
|
||||
echo "### Ethernet 1G RJ45 ETH 1 Testing ####"
|
||||
udhcpc -t 5 -n -i eth1
|
||||
if [ $? == 0 ]; then
|
||||
echo "### Ethernet 1G RJ45 LAN 1 DHCP got ip address successfully ###"
|
||||
echo "### Ethernet 1G RJ45 ETH 1 DHCP got ip address successfully ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: Ethernet 1G RJ45 LAN 1 DHCP can not got ip address failure"
|
||||
echo "Error Notice: Ethernet 1G RJ45 ETH 1 DHCP can not got ip address failure"
|
||||
fi
|
||||
|
||||
echo "----------------------------------------------------------------------------------------"
|
||||
sleep 3
|
||||
echo "### Ethernet 1G RJ45 LAN 2 Testing ####"
|
||||
udhcpc -t 5 -n -i lan2
|
||||
echo "### Ethernet 1G RJ45 ETH 2 Testing ####"
|
||||
udhcpc -t 5 -n -i eth2
|
||||
if [ $? == 0 ]; then
|
||||
echo "### Ethernet 1G RJ45 LAN 2 DHCP got ip address successfully ###"
|
||||
echo "### Ethernet 1G RJ45 ETH 2 DHCP got ip address successfully ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: Ethernet 1G RJ45 LAN 2 DHCP can not got ip address failure"
|
||||
echo "Error Notice: Ethernet 1G RJ45 ETH 2 DHCP can not got ip address failure"
|
||||
fi
|
||||
|
||||
echo "----------------------------------------------------------------------------------------"
|
||||
sleep 3
|
||||
echo "### Ethernet 1G RJ45 LAN 3 Testing ####"
|
||||
udhcpc -t 5 -n -i lan3
|
||||
echo "### Ethernet 1G RJ45 ETH 3 Testing ####"
|
||||
udhcpc -t 5 -n -i eth3
|
||||
if [ $? == 0 ]; then
|
||||
echo "### Ethernet 1G RJ45 LAN 3 DHCP got ip address successfully ###"
|
||||
echo "### Ethernet 1G RJ45 ETH 3 DHCP got ip address successfully ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: Ethernet 1G RJ45 LAN 3 DHCP can not got ip address failure"
|
||||
echo "Error Notice: Ethernet 1G RJ45 ETH 3 DHCP can not got ip address failure"
|
||||
fi
|
||||
|
||||
echo "######################################################################################"
|
||||
|
||||
@ -1,64 +0,0 @@
|
||||
#/bin/bash
|
||||
|
||||
RET=0
|
||||
sleep 2
|
||||
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "########################## FAN PWM Testing Start ##########################"
|
||||
|
||||
echo 0 > /sys/class/pwm/pwmchip0/export 2> /dev/null
|
||||
echo 10000 > /sys/class/pwm/pwmchip0/pwm0/period 2> /dev/null
|
||||
echo 5000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle 2> /dev/null
|
||||
echo normal > /sys/class/pwm/pwmchip0/pwm0/polarity 2> /dev/null
|
||||
echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable 2> /dev/null
|
||||
sleep 1
|
||||
|
||||
echo "### Turn off the FAN about 5s by PWM0 ###"
|
||||
echo 10000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle 2> /dev/null
|
||||
sleep 5
|
||||
|
||||
echo "### Turn on the FAN about 10s by PWM0 ###"
|
||||
#echo 5000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle 2> /dev/null
|
||||
echo 0 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle 2> /dev/null
|
||||
sleep 10
|
||||
|
||||
echo "### Turn off the FAN completely ###"
|
||||
echo 10000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle 2> /dev/null
|
||||
|
||||
while true
|
||||
do
|
||||
read -t20 -s -n1 -p "### Please confirm if the FAN can work fine, enter y or n. "y" is good, "n" is for bad. ###" keypress
|
||||
if [ $? -eq 0 ]; then
|
||||
if [ ${keypress} == 'y' ]; then
|
||||
echo " "
|
||||
echo " "
|
||||
echo "### FAN can work fine, FAN feature is good ### "
|
||||
break
|
||||
fi
|
||||
|
||||
if [ ${keypress} == 'n' ]; then
|
||||
RET=1
|
||||
echo " "
|
||||
echo " "
|
||||
echo "Error Notice: FAN can not work fine, FAN feature is bad"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
|
||||
echo " "
|
||||
done
|
||||
|
||||
echo 0 > /sys/class/pwm/pwmchip0/unexport 2> /dev/null
|
||||
|
||||
echo "######################################################################################"
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
|
||||
sleep 2
|
||||
|
||||
exit ${RET}
|
||||
|
||||
@ -1,52 +0,0 @@
|
||||
#/bin/bash
|
||||
|
||||
RET=0
|
||||
KEY_GPIO_WPS=14
|
||||
|
||||
sleep 2
|
||||
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
|
||||
source `pwd`/mt_gpio.sh
|
||||
|
||||
echo "########################## KEY Testing Start ##########################"
|
||||
|
||||
if [ ! -f /sys/class/gpio/gpio442/direction ]; then
|
||||
mt_gpio_export ${KEY_GPIO_WPS} #Enable WPS 428 + 14 = 442
|
||||
fi
|
||||
|
||||
mt_gpio_dir ${KEY_GPIO_WPS} in
|
||||
|
||||
echo -n "Please Press one Key about WPS Key of GPIO_WPS GPIO14 about 20s ......"
|
||||
|
||||
i=0
|
||||
while true; do
|
||||
mt_gpio_in ${KEY_GPIO_WPS}
|
||||
if [ $? == 0 ]; then
|
||||
echo "### GPIO_WPS GPIO14 Key is in low level, Key is available ###"
|
||||
break
|
||||
else
|
||||
echo "waiting 1 second......"
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
let i=i+1
|
||||
if [ $i -ge 20 ]; then
|
||||
echo " ### 20s Wait time is over, it can not detect the key ###"
|
||||
RET=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
echo "######################################################################################"
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
|
||||
sleep 2
|
||||
|
||||
return ${RET}
|
||||
|
||||
@ -1,58 +0,0 @@
|
||||
#/bin/bash
|
||||
|
||||
RET=0
|
||||
|
||||
sleep 2
|
||||
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "########################## LED Testing Start ##########################"
|
||||
|
||||
echo "### all GREEN-LED BLUE-LED turn on about 10s ###"
|
||||
echo 1 > /sys/class/leds/bpi-r4\:pio\:blue/brightness
|
||||
echo 1 > /sys/class/leds/bpi-r4\:pio\:green/brightness
|
||||
sleep 10
|
||||
|
||||
echo "### all GREEN-LED BLUE-LED turn off about 5s ###"
|
||||
echo 0 > /sys/class/leds/bpi-r4\:pio\:blue/brightness
|
||||
echo 0 > /sys/class/leds/bpi-r4\:pio\:green/brightness
|
||||
sleep 5
|
||||
|
||||
echo "### all GREEN-LED BLUE-LED1 turn on ###"
|
||||
echo 1 > /sys/class/leds/bpi-r4\:pio\:blue/brightness
|
||||
echo 1 > /sys/class/leds/bpi-r4\:pio\:green/brightness
|
||||
|
||||
while true
|
||||
do
|
||||
read -t20 -s -n1 -p "### Please confirm if the LED can work fine, enter y or n. "y" is good, "n" is for bad. ###" keypress
|
||||
if [ $? -eq 0 ]; then
|
||||
if [ ${keypress} == 'y' ]; then
|
||||
echo " "
|
||||
echo " "
|
||||
echo "### LED can work fine, LED feature is good ### "
|
||||
break
|
||||
fi
|
||||
|
||||
if [ ${keypress} == 'n' ]; then
|
||||
RET=1
|
||||
echo " "
|
||||
echo " "
|
||||
echo "Error Notice: LED can not work fine, LED feature is bad"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
|
||||
echo " "
|
||||
done
|
||||
|
||||
echo "######################################################################################"
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
|
||||
sleep 2
|
||||
|
||||
return ${RET}
|
||||
|
||||
@ -1,67 +0,0 @@
|
||||
|
||||
SYS_FILE=/sys/class/gpio
|
||||
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${pin}" > ${SYS_FILE}/export
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/direction is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${dir}" > ${SYS_FILE}/gpio${pin}/direction
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${out}" > ${SYS_FILE}/gpio${pin}/value
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
result=`cat ${SYS_FILE}/gpio${pin}/value`
|
||||
if [ ${result} == "0" ] ; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
2
m2keybpcie-script/m2keybpcie-script.sh
Normal file → Executable file
2
m2keybpcie-script/m2keybpcie-script.sh
Normal file → Executable file
@ -11,7 +11,7 @@ echo "##########################################################################
|
||||
echo "#################### M.2 KeyB PCIe SATA card Module Testing Start ##################"
|
||||
echo " "
|
||||
|
||||
result=`lspci | grep "SATA controller: JMicron Technology Corp. JMB58x AHCI SATA controller" | wc -l`
|
||||
result=`lspci | grep "Non-Volatile memory controller: Intel Corporation NVMe Optane Memory Series" | wc -l`
|
||||
if [ ${result} -eq 1 ]; then
|
||||
echo "### Find one M.2 KeyB PCIe SATA card Module from M.2 KeyB slots ###"
|
||||
else
|
||||
|
||||
8
m2keybpcie-script/mt_gpio.sh
Normal file → Executable file
8
m2keybpcie-script/mt_gpio.sh
Normal file → Executable file
@ -4,7 +4,7 @@ SYS_FILE=/sys/class/gpio
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
@ -19,7 +19,7 @@ mt_gpio_export()
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
@ -35,7 +35,7 @@ mt_gpio_dir()
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
@ -51,7 +51,7 @@ mt_gpio_out()
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
|
||||
0
m2keybusb2-script/m2keybusb2-script.sh → m2keybusb-script/m2keybusb-script.sh
Normal file → Executable file
0
m2keybusb2-script/m2keybusb2-script.sh → m2keybusb-script/m2keybusb-script.sh
Normal file → Executable file
8
key-script/mt_gpio.sh → m2keybusb-script/mt_gpio.sh
Normal file → Executable file
8
key-script/mt_gpio.sh → m2keybusb-script/mt_gpio.sh
Normal file → Executable file
@ -4,7 +4,7 @@ SYS_FILE=/sys/class/gpio
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
@ -19,7 +19,7 @@ mt_gpio_export()
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
@ -35,7 +35,7 @@ mt_gpio_dir()
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
@ -51,7 +51,7 @@ mt_gpio_out()
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
@ -1,67 +0,0 @@
|
||||
|
||||
SYS_FILE=/sys/class/gpio
|
||||
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${pin}" > ${SYS_FILE}/export
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/direction is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${dir}" > ${SYS_FILE}/gpio${pin}/direction
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${out}" > ${SYS_FILE}/gpio${pin}/value
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
result=`cat ${SYS_FILE}/gpio${pin}/value`
|
||||
if [ ${result} == "0" ] ; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
@ -1,29 +0,0 @@
|
||||
#/bin/bash
|
||||
|
||||
RET=0
|
||||
|
||||
sleep 2
|
||||
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "########################### M.2 KeyB USB3.0 Testing Start ##########################"
|
||||
|
||||
result=`lsusb | grep "2c7c:0900" | wc -l`
|
||||
if [ ${result} -eq 1 ]; then
|
||||
echo "### Find one RM500U-CN 5G Module from M.2 KeyB slots ###"
|
||||
else
|
||||
echo "Error Notice: Can not Find one RM500U-CN 5G Module from M.2 KeyB slots"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
echo "######################################################################################"
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
|
||||
sleep 2
|
||||
|
||||
return ${RET}
|
||||
|
||||
@ -1,67 +0,0 @@
|
||||
|
||||
SYS_FILE=/sys/class/gpio
|
||||
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${pin}" > ${SYS_FILE}/export
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/direction is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${dir}" > ${SYS_FILE}/gpio${pin}/direction
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${out}" > ${SYS_FILE}/gpio${pin}/value
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
result=`cat ${SYS_FILE}/gpio${pin}/value`
|
||||
if [ ${result} == "0" ] ; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
0
memory-script/led-offall.sh
Normal file → Executable file
0
memory-script/led-offall.sh
Normal file → Executable file
0
memory-script/led-onall.sh
Normal file → Executable file
0
memory-script/led-onall.sh
Normal file → Executable file
0
memory-script/memory-ageing-script.sh
Normal file → Executable file
0
memory-script/memory-ageing-script.sh
Normal file → Executable file
0
memory-script/memory-script.sh
Normal file → Executable file
0
memory-script/memory-script.sh
Normal file → Executable file
BIN
memory-script/memsuck
Normal file → Executable file
BIN
memory-script/memsuck
Normal file → Executable file
Binary file not shown.
8
memory-script/mt_gpio.sh
Normal file → Executable file
8
memory-script/mt_gpio.sh
Normal file → Executable file
@ -4,7 +4,7 @@ SYS_FILE=/sys/class/gpio
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
@ -19,7 +19,7 @@ mt_gpio_export()
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
@ -35,7 +35,7 @@ mt_gpio_dir()
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
@ -51,7 +51,7 @@ mt_gpio_out()
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
|
||||
8
minipcieusb-script/minipcieusb-script.sh
Normal file → Executable file
8
minipcieusb-script/minipcieusb-script.sh
Normal file → Executable file
@ -10,11 +10,11 @@ echo " "
|
||||
echo "######################################################################################"
|
||||
echo "######################### minipcie 4G Module Testing Start #########################"
|
||||
|
||||
result=`lsusb | grep "2c7c:0125" | wc -l`
|
||||
if [ ${result} -eq 2 ]; then
|
||||
echo "### Find two EC25 4G Modules from two minipcie slots ###"
|
||||
result=`lsusb | grep "2c7c:0125 Android Android" | wc -l`
|
||||
if [ ${result} -eq 1 ]; then
|
||||
echo "### Find 1 EC25 4G Modules from two minipcie slots ###"
|
||||
else
|
||||
echo "Error Notice: Can not Find two EC25 4G Modules from two minipcie slots"
|
||||
echo "Error Notice: Can not Find EC25 4G Modules from two minipcie slots"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
|
||||
8
minipcieusb-script/mt_gpio.sh
Normal file → Executable file
8
minipcieusb-script/mt_gpio.sh
Normal file → Executable file
@ -4,7 +4,7 @@ SYS_FILE=/sys/class/gpio
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
@ -19,7 +19,7 @@ mt_gpio_export()
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
@ -35,7 +35,7 @@ mt_gpio_dir()
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
@ -51,7 +51,7 @@ mt_gpio_out()
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
|
||||
30
minipciex2-script/minipciex2-script.sh
Normal file → Executable file
30
minipciex2-script/minipciex2-script.sh
Normal file → Executable file
@ -9,39 +9,17 @@ echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "######################## minipcie wifi7 card Module Testing Start ##################"
|
||||
echo "######################## minipcie to sata Module Testing Start ##################"
|
||||
echo " "
|
||||
|
||||
result=`lspci | grep "Device 7990" | wc -l`
|
||||
result=`lspci | grep "Device 1a0a:abcd" | wc -l`
|
||||
if [ ${result} -eq 1 ]; then
|
||||
echo "### Find one MEDIATEK Corp MT7990 Module from minipcie slots ###"
|
||||
echo "### Find one ASM1062 Serial ATA Controller from minipcie slots ###"
|
||||
else
|
||||
echo "Error Notice: Can not Find one EDIATEK Corp MT7990 Module from minipcie slot"
|
||||
echo "Error Notice: Can not Find one ASM1062 Serial ATA Controller from minipcie slot"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
result=`lspci | grep "Device 7991" | wc -l`
|
||||
if [ ${result} -eq 1 ]; then
|
||||
echo "### Find one MEDIATEK Corp MT7991 Module from minipcie slots ###"
|
||||
else
|
||||
echo "Error Notice: Can not Find one EDIATEK Corp MT7991 Module from minipcie slot"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
if [ ! -f ${SYS_FILE}/i2c-5/5-0051/eeprom ]; then
|
||||
echo "### BPI-R4 wifi7 eeprom 0x51 can't work fine ###"
|
||||
RET=1
|
||||
else
|
||||
echo "### BPI-R4 wifi7 eeprom 0x51 can work fine ###"
|
||||
fi
|
||||
|
||||
if [ ! -f ${SYS_FILE}/i2c-5/5-0052/eeprom ]; then
|
||||
echo "### BPI-R4 wifi7 eeprom 0x52 can't work fine ###"
|
||||
RET=1
|
||||
else
|
||||
echo "### BPI-R4 wifi7 eeprom 0x52 can work fine ###"
|
||||
fi
|
||||
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo " "
|
||||
|
||||
8
minipciex2-script/mt_gpio.sh
Normal file → Executable file
8
minipciex2-script/mt_gpio.sh
Normal file → Executable file
@ -4,7 +4,7 @@ SYS_FILE=/sys/class/gpio
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
@ -19,7 +19,7 @@ mt_gpio_export()
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
@ -35,7 +35,7 @@ mt_gpio_dir()
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
@ -51,7 +51,7 @@ mt_gpio_out()
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
#/bin/bash
|
||||
|
||||
RET=0
|
||||
|
||||
sleep 2
|
||||
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "########################## SPIM NAND Deivce Testing Start ##########################"
|
||||
|
||||
dd if=/dev/mtdblock2 of=/tmp/.nand_test.img
|
||||
if [ $? == 0 ]; then
|
||||
echo "### Access the SPIM NAND Device Successfully ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: Access the SPIM NAND Device failure ###"
|
||||
fi
|
||||
|
||||
echo "######################################################################################"
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
|
||||
sleep 2
|
||||
|
||||
return ${RET}
|
||||
|
||||
12
emmc-script/emmc-script.sh → nor-script/nor-script.sh
Normal file → Executable file
12
emmc-script/emmc-script.sh → nor-script/nor-script.sh
Normal file → Executable file
@ -8,15 +8,14 @@ echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "########################## NOR Flash Device Testing Start #####################"
|
||||
|
||||
echo "########################## EMMC Deivce Testing Start ##########################"
|
||||
|
||||
dd if=/dev/mmcblk0boot0 of=/tmp/.emmc_test.img bs=1M count=1
|
||||
dd if=/dev/mtdblock3 of=/tmp/.nor_test.img bs=1M count=1
|
||||
if [ $? == 0 ]; then
|
||||
echo "### Access the EMMC Device Successfully ###"
|
||||
echo "### Access the NOR Flash Device Successfully ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: Access the EMMC Device failure ###"
|
||||
echo "Error Notice: Access the NOR Flash Device failed ###"
|
||||
fi
|
||||
|
||||
echo "######################################################################################"
|
||||
@ -26,5 +25,4 @@ echo " "
|
||||
|
||||
sleep 2
|
||||
|
||||
return ${RET}
|
||||
|
||||
exit ${RET}
|
||||
@ -1,67 +0,0 @@
|
||||
|
||||
SYS_FILE=/sys/class/gpio
|
||||
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+411 ### gpio base 411 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${pin}" > ${SYS_FILE}/export
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+411 ### gpio base 411 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/direction is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${dir}" > ${SYS_FILE}/gpio${pin}/direction
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+411 ### gpio base 411 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${out}" > ${SYS_FILE}/gpio${pin}/value
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+411 ### gpio base 411 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
result=`cat ${SYS_FILE}/gpio${pin}/value`
|
||||
if [ ${result} == "0" ] ; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
@ -1,29 +0,0 @@
|
||||
#/bin/bash
|
||||
|
||||
RET=0
|
||||
|
||||
sleep 2
|
||||
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "########################## NVMe SSD M.2 KeyM Testing Start # ##########################"
|
||||
|
||||
result=`fdisk -l /dev/nvme0n1 | grep "bytes" | grep "sectors" | wc -l`
|
||||
if [ ${result} -gt 0 ]; then
|
||||
echo "### NVMe SSD M.2 KeyM can be detected successfully. ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: NVMe SSD M.2 KeyM can not be detected, failure."
|
||||
fi
|
||||
|
||||
echo "######################################################################################"
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
|
||||
sleep 2
|
||||
|
||||
return ${RET}
|
||||
|
||||
6
rtc-script/rtc-script.sh
Normal file → Executable file
6
rtc-script/rtc-script.sh
Normal file → Executable file
@ -8,7 +8,7 @@ echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "############################### MT7988a RTC Testing Start ##########################"
|
||||
echo "############################### BPI-RV2 RTC Testing Start ##########################"
|
||||
|
||||
date -s 2028-08-08
|
||||
hwclock -w
|
||||
@ -16,11 +16,11 @@ date -s 2021-01-01
|
||||
line=`hwclock -r | grep "2028-08-08" | wc -l`
|
||||
if [ $line -eq 1 ]; then
|
||||
echo " "
|
||||
echo "### MT7988a RTC can work fine ### "
|
||||
echo "### BPI-RV2 RTC can work fine ### "
|
||||
echo " "
|
||||
else
|
||||
echo " "
|
||||
echo "Error Notice: MT7988a RTC can not work fine."
|
||||
echo "Error Notice: BPI-RV2 RTC can not work fine."
|
||||
echo " "
|
||||
RET=1
|
||||
fi
|
||||
|
||||
8
usb20-script/mt_gpio.sh
Normal file → Executable file
8
usb20-script/mt_gpio.sh
Normal file → Executable file
@ -4,7 +4,7 @@ SYS_FILE=/sys/class/gpio
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
@ -19,7 +19,7 @@ mt_gpio_export()
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
@ -35,7 +35,7 @@ mt_gpio_dir()
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
@ -51,7 +51,7 @@ mt_gpio_out()
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
let pin=pin+471 ### gpio base 471 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
|
||||
0
usb20-script/usb20-script.sh
Normal file → Executable file
0
usb20-script/usb20-script.sh
Normal file → Executable file
@ -1,67 +0,0 @@
|
||||
|
||||
SYS_FILE=/sys/class/gpio
|
||||
|
||||
mt_gpio_export()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/export ]; then
|
||||
echo "${SYS_FILE}/export file is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${pin}" > ${SYS_FILE}/export
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
mt_gpio_dir()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
dir=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/direction ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/direction is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${dir}" > ${SYS_FILE}/gpio${pin}/direction
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
mt_gpio_out()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
out=$2
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${out}" > ${SYS_FILE}/gpio${pin}/value
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
mt_gpio_in()
|
||||
{
|
||||
pin=$1
|
||||
let pin=pin+428 ### gpio base 428 ###
|
||||
|
||||
if [ ! -f ${SYS_FILE}/gpio${pin}/value ]; then
|
||||
echo "${SYS_FILE}/gpio${pin}/value is not present"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
result=`cat ${SYS_FILE}/gpio${pin}/value`
|
||||
if [ ${result} == "0" ] ; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
@ -1,70 +0,0 @@
|
||||
#/bin/bash
|
||||
|
||||
### This script is to check if USB3.0 USB2.0 ports are working fine ###
|
||||
|
||||
RET=0
|
||||
|
||||
sleep 2
|
||||
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "########################## USB3.0 Deivce Testing Start ##########################"
|
||||
dmesg -c > /dev/null
|
||||
|
||||
while true
|
||||
do
|
||||
read -t20 -s -n1 -p "### Please Insert one USB3.0 Device U-DISK right now , then enter any key to continue. ###" keypress
|
||||
if [ $? -eq 0 ]; then
|
||||
echo " "
|
||||
break
|
||||
fi
|
||||
echo " "
|
||||
done
|
||||
sleep 3
|
||||
|
||||
result=`dmesg | grep "new SuperSpeed" | wc -l`
|
||||
if [ ${result} -eq 0 ]; then
|
||||
RET=1
|
||||
echo "Error Notice: USB3.0 Device U-DISK can not detect at first time."
|
||||
else
|
||||
result=`dmesg | grep "Attached SCSI removable disk" | wc -l`
|
||||
if [ ${result} -eq 0 ]; then
|
||||
RET=1
|
||||
echo "Error Notice: USB3.0 Device U-DISK can not detect at second time."
|
||||
else
|
||||
echo "### USB3.0 Device U-DISK can detect successfully ###"
|
||||
|
||||
result=`fdisk -l /dev/sda | grep "bytes" | grep "sectors" | wc -l`
|
||||
if [ ${result} -gt 0 ]; then
|
||||
echo "### USB3.0 Device U-DISK partition info is good ###"
|
||||
else
|
||||
RET=1
|
||||
echo "Error Notice: USB3.0 Device U-DISK partition info is bad"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
while true
|
||||
do
|
||||
read -t20 -s -n1 -p "### Please Remove one USB3.0 Device U-DISK right now , then enter any key to continue. ###" keypress
|
||||
if [ $? -eq 0 ]; then
|
||||
echo " "
|
||||
break
|
||||
fi
|
||||
echo " "
|
||||
done
|
||||
sleep 3
|
||||
|
||||
dmesg -c > /dev/null
|
||||
echo "######################################################################################"
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
|
||||
sleep 2
|
||||
|
||||
return ${RET}
|
||||
|
||||
@ -1,63 +0,0 @@
|
||||
#/bin/bash
|
||||
|
||||
RET=0
|
||||
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo "######################################################################################"
|
||||
echo "####################### MT7988a Chip 2.4G, 5G, 6G AP Testing Start #######################"
|
||||
|
||||
ifconfig ra0 up > /dev/null
|
||||
ifconfig ra1 up > /dev/null
|
||||
ifconfig rai0 up > /dev/null
|
||||
ifconfig rax0 up > /dev/null
|
||||
|
||||
sleep 5
|
||||
|
||||
result=`ifconfig -a | grep ra0 | wc -l`
|
||||
if [ ${result} -ne 1 ]; then
|
||||
echo "### mt_wifi driver 2.4G AP can't run up ###"
|
||||
RET=1
|
||||
else
|
||||
result=`iwlist ra0 rate | grep "Current Bit Rate" | wc -l`
|
||||
if [ ${result} -ne 1 ]; then
|
||||
echo "### mt_wifi driver 2.4G AP can't work fine ###"
|
||||
RET=1
|
||||
else
|
||||
echo "### mt_wifi driver 2.4G AP can work fine ###"
|
||||
fi
|
||||
fi
|
||||
|
||||
result=`ifconfig -a | grep rai0 | wc -l`
|
||||
if [ ${result} -ne 1 ]; then
|
||||
echo "### mt_wifi driver 5G AP can't run up ###"
|
||||
RET=1
|
||||
else
|
||||
result=`iwlist rai0 rate | grep "Current Bit Rate" | wc -l`
|
||||
if [ ${result} -ne 1 ]; then
|
||||
echo "### mt_wifi driver 5G AP can't work fine ###"
|
||||
RET=1
|
||||
else
|
||||
echo "### mt_wifi driver 5G AP can work fine ###"
|
||||
fi
|
||||
fi
|
||||
|
||||
result=`ifconfig -a | grep rax0 | wc -l`
|
||||
if [ ${result} -ne 1 ]; then
|
||||
echo "### mt_wifi driver 6G AP can't run up ###"
|
||||
RET=1
|
||||
else
|
||||
result=`iwlist rax0 rate | grep "Current Bit Rate" | wc -l`
|
||||
if [ ${result} -ne 1 ]; then
|
||||
echo "### mt_wifi driver 6G AP can't work fine ###"
|
||||
RET=1
|
||||
else
|
||||
echo "### mt_wifi driver 6G AP can work fine ###"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "######################################################################################"
|
||||
|
||||
return ${RET}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user