diff --git a/sbin/reform-display-config b/sbin/reform-display-config index 798cb734bad6402f6f4910340f1fc20e9cff1847..f42be59d6b14f62afaa5175f4c1c76ce63142a2a 100755 --- a/sbin/reform-display-config +++ b/sbin/reform-display-config @@ -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." diff --git a/sbin/reform-flash-uboot b/sbin/reform-flash-uboot index b77c73548e6bd9b05fd6e310e9402ab0de410ded..0520d44e2ce561f00a7ec545b4bacc4c1c3e5566 100755 --- a/sbin/reform-flash-uboot +++ b/sbin/reform-flash-uboot @@ -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