fix init dev failed error

This commit is contained in:
Neucrack
2025-07-30 13:34:59 +08:00
parent 21ffdadc78
commit 6aedfa43db

View File

@@ -97,11 +97,21 @@ mount -t sysfs sysfs /sys
# mount -t debugfs debugfs /sys/kernel/debug
mkdir -p /boot
mount -o ro /dev/mmcblk0p1 /boot
if [ -e /boot/rec ] # recovery mode
then
msc
# wait ready
i=0
while [ ! -e /dev/mmcblk0p1 ] && [ $i -lt 5 ]; do
echo "Waiting for /dev/mmcblk0p1..."
sleep 1
i=$((i+1))
done
mount -o ro /dev/mmcblk0p1 /boot
ret=$?
if [ $ret -ne 0 ] || [ -e /boot/rec ]; then
echo "Mount boot failed, Entering recovery mode..."
msc
fi
# flashkey0=$(cat /sys/kernel/debug/gpio | grep 'User Key' | grep lo | wc -l)