Mikrotik boot loader change to avoid boot lockup problem (#654)

See: https://forum.openwrt.org/t/openwrt-installed-mikrotik-rb750gr3-wont-boot-when-wan-cable-plugged/146330/7
This commit is contained in:
Tim Wilkinson 2023-01-16 11:57:19 -08:00 committed by GitHub
parent 45ac6c583f
commit 3366f9baa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#! /bin/sh
#
# On Mikrotik devices, make sure the boot mode is 'flasheth' otherwise
# the node can fail to boot.
#
if [ -f /sys/firmware/mikrotik/soft_config/boot_device ]; then
if [ "$(grep '\[flasheth\]' /sys/firmware/mikrotik/soft_config/boot_device)" = "" ]; then
echo "flasheth" > /sys/firmware/mikrotik/soft_config/boot_device
echo "1" > /sys/firmware/mikrotik/soft_config/commit
fi
fi