Skip to content
Snippets Groups Projects
Commit 41fd49ad authored by minute's avatar minute
Browse files

skel: fixes to reform-display-config and reform-boot-config

parent 4eadb0ca
No related branches found
No related tags found
1 merge request!12RC1 of MNT Reform System Image and Rescue Image
......@@ -25,12 +25,12 @@ then
exit
fi
MOUNTED_AT=$(mount | grep mmblk1p1 | cut -d ' ' -s -f 3)
if [ $? -eq 0 ]
MOUNTED_AT=$(mount | grep mmcblk1p1 | grep "on /" | cut -d ' ' -s -f 3)
if [[ "x$MOUNTED_AT" != "x" ]]
then
echo "Found SD card mounted at $MOUNTED_AT."
echo "$BOOTPREF" > "$MOUNTED_AT/reform-boot-medium"
echo "Boot medium choice $BOOTPREF recorded in $MOUNTED_AT/reform-boot-medium."
echo "$BOOTPREF" > "${MOUNTED_AT}/reform-boot-medium"
echo "Boot medium choice $BOOTPREF recorded in ${MOUNTED_AT}/reform-boot-medium."
echo "Restart MNT Reform (type: reboot) after saving your work to activate the changes."
exit
fi
......@@ -51,4 +51,3 @@ fi
echo "Error: could not mount the SD card."
umount /boot
......@@ -12,7 +12,7 @@ DTB_TARGET="imx8mq-mnt-reform2.dtb"
case "$1" in
dual) DTB="imx8mq-mnt-reform2-dual-display.dtb";;
internal) DTB="imx8mq-mnt-reform2-single-display.dtb";;
single) DTB="imx8mq-mnt-reform2-single-display.dtb";;
esac
if [[ "$DTB" == "x" ]]
......@@ -23,18 +23,19 @@ then
exit
fi
MOUNTED_AT=$(mount | grep mmblk1p1 | cut -d ' ' -s -f 3)
MOUNTED_AT=$(mount | grep mmcblk1p1 | grep "on /" | cut -d ' ' -s -f 3)
if [[ "x$MOUNTED_AT" != "x" ]]
then
if [[ -e "$MOUNTED_AT$DTB_TARGET" ]] && [[ -e "$MOUNTED_AT$DTB" ]]
if [[ -e "${MOUNTED_AT}/${DTB_TARGET}" ]] && [[ -e "${MOUNTED_AT}/${DTB}" ]]
then
echo "Found source and target files in $MOUNTED_AT."
cp -v "/$DTB" "/$DTB_TARGET"
cp -v "${MOUNTED_AT}/${DTB}" "${MOUNTED_AT}/${DTB_TARGET}"
echo "Restart MNT Reform (type: reboot) after saving your work to activate the changes."
exit
fi
echo "Error: the SD card is already mounted at $MOUNTED_AT, but the DTB files ($DTB_TARGET and $DTB) are not there."
exit
fi
echo "Assuming boot files are on SD card, but your system is not. Mounting /dev/mmcblk1p1 on /boot."
......@@ -53,4 +54,3 @@ fi
echo "Error: could not find the DTB files ($DTB_TARGET and $DTB) in any of the expected places."
umount /boot
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