mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
sd card boot: Focus on card reliability, as wider adoption identifies corrupted card to be still a common problem
This commit is contained in:
@@ -17,8 +17,8 @@ set MODE autostart
|
|||||||
|
|
||||||
set FRC /fs/microsd/etc/rc.txt
|
set FRC /fs/microsd/etc/rc.txt
|
||||||
set FCONFIG /fs/microsd/etc/config.txt
|
set FCONFIG /fs/microsd/etc/config.txt
|
||||||
|
|
||||||
set TUNE_ERR ML<<CP4CP4CP4CP4CP4
|
set TUNE_ERR ML<<CP4CP4CP4CP4CP4
|
||||||
|
set LOG_FILE /fs/microsd/bootlog.txt
|
||||||
|
|
||||||
#
|
#
|
||||||
# Try to mount the microSD card.
|
# Try to mount the microSD card.
|
||||||
@@ -27,12 +27,22 @@ set TUNE_ERR ML<<CP4CP4CP4CP4CP4
|
|||||||
echo "[i] Looking for microSD..."
|
echo "[i] Looking for microSD..."
|
||||||
if mount -t vfat /dev/mmcsd0 /fs/microsd
|
if mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||||
then
|
then
|
||||||
set LOG_FILE /fs/microsd/bootlog.txt
|
|
||||||
echo "[i] microSD mounted: /fs/microsd"
|
echo "[i] microSD mounted: /fs/microsd"
|
||||||
# Start playing the startup tune
|
# Start playing the startup tune
|
||||||
tone_alarm start
|
tone_alarm start
|
||||||
else
|
else
|
||||||
set LOG_FILE /dev/null
|
tone_alarm MBAGP
|
||||||
|
if mkfatfs /dev/mmcsd0
|
||||||
|
then
|
||||||
|
if mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||||
|
then
|
||||||
|
echo "[i] microSD card formatted"
|
||||||
|
else
|
||||||
|
echo "[i] format failed"
|
||||||
|
tone_alarm MNBG
|
||||||
|
set LOG_FILE /dev/null
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user