Skip to content
Snippets Groups Projects
Verified Commit 2cf6d5b4 authored by Johannes Schauer Marin Rodrigues's avatar Johannes Schauer Marin Rodrigues
Browse files

reform-flash-uboot: inform about the DIP switch on imx8mq

parent a6781e8d
No related branches found
No related tags found
No related merge requests found
......@@ -65,10 +65,8 @@ fi
if [ "--emmc" = "$1" ]; then
echo "Your /boot partition is on emmc (/dev/$BOOTPART)." >&2
echo "Make sure that your DIP switch has been set to OFF." >&2
else
echo "Your /boot partition is on your SD-Card (/dev/$BOOTPART)." >&2
echo "Make sure that your DIP switch has been set to ON." >&2
fi
echo "Restart MNT Reform (type: reboot) after saving your work to activate the changes."
......@@ -170,3 +170,27 @@ for dev in "$@"; do
dd if=/boot/flash.bin of="$dev" bs=512 seek="$ubootoffset" skip="$flashbinoffset"
done
# inform about the DIP switch position only on imx8mq
case "$(cat /proc/device-tree/model)" in "MNT Reform 2"|"MNT Reform 2 HDMI")
DOMMC=0
DOSD=0
for dev in "$@"; do
case $dev in
emmc) dev=/dev/${MMCDEV}boot0;;
sd) dev=/dev/${SDDEV};;
esac
case $dev in
"/dev/${MMCDEV}"*) DOMMC=1;;
"/dev/${SDDEV}"*) DOSD=1;;
esac
done
if [ "$DOMMC" != "0" ]; then
echo "For the i.MX8MQ to load u-boot from MMC, make sure" >&2
echo "that your DIP switch is set to OFF." >&2
fi
if [ "$DOSD" != "0" ]; then
echo "For the i.MX8MQ to load u-boot from SD-Card, make sure" >&2
echo "that your DIP switch is set to ON." >&2
fi
esac
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment