update nor-script

This commit is contained in:
Qubot 2025-04-08 10:45:36 +08:00
parent 61a9d23d9f
commit 7a6064d84c
3 changed files with 28 additions and 52 deletions

View File

@ -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}

View File

@ -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}

28
nor-script/nor-script.sh Normal file
View File

@ -0,0 +1,28 @@
#!/bin/bash
RET=0
sleep 2
echo " "
echo " "
echo " "
echo "######################################################################################"
echo "########################## NOR Flash Device Testing Start #####################"
dd if=/dev/mtdblock3 of=/tmp/.nor_test.img bs=1M count=1
if [ $? == 0 ]; then
echo "### Access the NOR Flash Device Successfully ###"
else
RET=1
echo "Error Notice: Access the NOR Flash Device failed ###"
fi
echo "######################################################################################"
echo " "
echo " "
echo " "
sleep 2
exit ${RET}