u-boot-dey: improvements to microSD and USB install scripts

- Check the existence of files before the 10 second wait.
- Print the list of filenames to program to each partition.
- Print the file that's being updated to each partition.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
This commit is contained in:
Hector Palacios 2021-05-31 09:50:17 +02:00
parent 9f3ab7c9d9
commit a61873f7f1
10 changed files with 320 additions and 210 deletions

View File

@ -3,21 +3,9 @@
# card into the eMMC # card into the eMMC
# #
echo "############################################################" # Reset temp variables
echo "# Linux firmware install from micro SD #" install_abort=0
echo "############################################################" BASEFILENAME=0
echo ""
echo " This process will erase your eMMC and will install a new"
echo " U-Boot and Linux firmware images on the eMMC."
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Determine U-Boot file to program basing on module variant # Determine U-Boot file to program basing on module variant
if test -n "${module_variant}"; then if test -n "${module_variant}"; then
@ -60,7 +48,7 @@ for g in ${GRAPHICAL_IMAGES}; do
BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##"
fi fi
done done
if test -z "${BASEFILENAME}"; then if test "${BASEFILENAME} = "0"; then
BASEFILENAME="${image-name}" BASEFILENAME="${image-name}"
fi fi
setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.vfat setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.vfat
@ -74,11 +62,34 @@ for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_R
install_abort=1; install_abort=1;
fi; fi;
done done
if test -n "${install_abort}"; then if test "${install_abort}" = "1"; then
echo "Aborted."; echo "Aborted.";
exit; exit;
fi fi
echo "############################################################"
echo "# Linux firmware install from micro SD #"
echo "############################################################"
echo ""
echo " This process will erase your eMMC and will install the following files"
echo " on the partitions of the eMMC."
echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Skip user confirmation for U-Boot update # Skip user confirmation for U-Boot update
setenv forced_update 1 setenv forced_update 1
@ -92,7 +103,7 @@ setenv mmcdev 0
# Update U-Boot # Update U-Boot
echo "" echo ""
echo "" echo ""
echo ">> Installing U-Boot boot loader (target will reset)" echo ">> Installing U-Boot boot loader image ${INSTALL_UBOOT_FILENAME} (target will reset)"
echo "" echo ""
echo "" echo ""
update uboot mmc ${INSTALL_MMCDEV} fat ${INSTALL_UBOOT_FILENAME} update uboot mmc ${INSTALL_MMCDEV} fat ${INSTALL_UBOOT_FILENAME}
@ -129,7 +140,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux kernel and device tree files\"; echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update linux mmc ${INSTALL_MMCDEV} fat ${INSTALL_LINUX_FILENAME}; update linux mmc ${INSTALL_MMCDEV} fat ${INSTALL_LINUX_FILENAME};
@ -141,7 +152,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing recovery\"; echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update recovery mmc ${INSTALL_MMCDEV} fat ${INSTALL_RECOVERY_FILENAME}; update recovery mmc ${INSTALL_MMCDEV} fat ${INSTALL_RECOVERY_FILENAME};
@ -153,7 +164,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux root file system\"; echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update rootfs mmc ${INSTALL_MMCDEV} fat ${INSTALL_ROOTFS_FILENAME}; update rootfs mmc ${INSTALL_MMCDEV} fat ${INSTALL_ROOTFS_FILENAME};

View File

@ -3,21 +3,9 @@
# into the eMMC # into the eMMC
# #
echo "#######################################################" # Reset temp variables
echo "# Linux firmware install from USB #" install_abort=0
echo "#######################################################" BASEFILENAME=0
echo ""
echo " This process will erase your eMMC and will install a new"
echo " U-Boot and Linux firmware images on the eMMC."
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Determine U-Boot file to program basing on module variant # Determine U-Boot file to program basing on module variant
if test -n "${module_variant}"; then if test -n "${module_variant}"; then
@ -60,7 +48,7 @@ for g in ${GRAPHICAL_IMAGES}; do
BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##"
fi fi
done done
if test -z "${BASEFILENAME}"; then if test "${BASEFILENAME} = "0"; then
BASEFILENAME="${image-name}" BASEFILENAME="${image-name}"
fi fi
setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.vfat setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.vfat
@ -74,11 +62,34 @@ for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_R
install_abort=1; install_abort=1;
fi; fi;
done done
if test -n "${install_abort}"; then if test "${install_abort}" = "1"; then
echo "Aborted."; echo "Aborted.";
exit; exit;
fi fi
echo "############################################################"
echo "# Linux firmware install from USB #"
echo "############################################################"
echo ""
echo " This process will erase your eMMC and will install the following files"
echo " on the partitions of the eMMC."
echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Skip user confirmation for U-Boot update # Skip user confirmation for U-Boot update
setenv forced_update 1 setenv forced_update 1
@ -92,7 +103,7 @@ setenv mmcdev 0
# Update U-Boot # Update U-Boot
echo "" echo ""
echo "" echo ""
echo ">> Installing U-Boot boot loader (target will reset)" echo ">> Installing U-Boot boot loader image ${INSTALL_UBOOT_FILENAME} (target will reset)"
echo "" echo ""
echo "" echo ""
update uboot usb ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME} update uboot usb ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME}
@ -130,7 +141,7 @@ setenv bootcmd "
usb start; usb start;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux kernel and device tree files\"; echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update linux usb ${INSTALL_USBDEV} fat ${INSTALL_LINUX_FILENAME}; update linux usb ${INSTALL_USBDEV} fat ${INSTALL_LINUX_FILENAME};
@ -142,7 +153,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing recovery\"; echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update recovery usb ${INSTALL_USBDEV} fat ${INSTALL_RECOVERY_FILENAME}; update recovery usb ${INSTALL_USBDEV} fat ${INSTALL_RECOVERY_FILENAME};
@ -154,7 +165,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux root file system\"; echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update rootfs usb ${INSTALL_USBDEV} fat ${INSTALL_ROOTFS_FILENAME}; update rootfs usb ${INSTALL_USBDEV} fat ${INSTALL_ROOTFS_FILENAME};

View File

@ -3,21 +3,9 @@
# card into the eMMC # card into the eMMC
# #
echo "############################################################" # Reset temp variables
echo "# Linux firmware install from micro SD #" install_abort=0
echo "############################################################" BASEFILENAME=0
echo ""
echo " This process will erase your eMMC and will install a new"
echo " U-Boot and Linux firmware images on the eMMC."
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Determine U-Boot file to program basing on module variant # Determine U-Boot file to program basing on module variant
if test -n "${module_variant}"; then if test -n "${module_variant}"; then
@ -71,7 +59,7 @@ for g in ${GRAPHICAL_IMAGES}; do
BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##"
fi fi
done done
if test -z "${BASEFILENAME}"; then if test "${BASEFILENAME} = "0"; then
BASEFILENAME="${image-name}" BASEFILENAME="${image-name}"
fi fi
setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.vfat setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.vfat
@ -85,11 +73,34 @@ for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_R
install_abort=1; install_abort=1;
fi; fi;
done done
if test -n "${install_abort}"; then if test "${install_abort}" = "1"; then
echo "Aborted."; echo "Aborted.";
exit; exit;
fi fi
echo "############################################################"
echo "# Linux firmware install from micro SD #"
echo "############################################################"
echo ""
echo " This process will erase your eMMC and will install the following files"
echo " on the partitions of the eMMC."
echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Skip user confirmation for U-Boot update # Skip user confirmation for U-Boot update
setenv forced_update 1 setenv forced_update 1
@ -103,7 +114,7 @@ setenv mmcdev 0
# Update U-Boot # Update U-Boot
echo "" echo ""
echo "" echo ""
echo ">> Installing U-Boot boot loader (target will reset)" echo ">> Installing U-Boot boot loader image ${INSTALL_UBOOT_FILENAME} (target will reset)"
echo "" echo ""
echo "" echo ""
update uboot mmc ${INSTALL_MMCDEV} fat ${INSTALL_UBOOT_FILENAME} update uboot mmc ${INSTALL_MMCDEV} fat ${INSTALL_UBOOT_FILENAME}
@ -140,7 +151,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux kernel and device tree files\"; echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update linux mmc ${INSTALL_MMCDEV} fat ${INSTALL_LINUX_FILENAME}; update linux mmc ${INSTALL_MMCDEV} fat ${INSTALL_LINUX_FILENAME};
@ -152,7 +163,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing recovery\"; echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update recovery mmc ${INSTALL_MMCDEV} fat ${INSTALL_RECOVERY_FILENAME}; update recovery mmc ${INSTALL_MMCDEV} fat ${INSTALL_RECOVERY_FILENAME};
@ -164,7 +175,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux root file system\"; echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update rootfs mmc ${INSTALL_MMCDEV} fat ${INSTALL_ROOTFS_FILENAME}; update rootfs mmc ${INSTALL_MMCDEV} fat ${INSTALL_ROOTFS_FILENAME};

View File

@ -3,21 +3,9 @@
# into the eMMC # into the eMMC
# #
echo "#######################################################" # Reset temp variables
echo "# Linux firmware install from USB #" install_abort=0
echo "#######################################################" BASEFILENAME=0
echo ""
echo " This process will erase your eMMC and will install a new"
echo " U-Boot and Linux firmware images on the eMMC."
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Determine U-Boot file to program basing on module variant # Determine U-Boot file to program basing on module variant
if test -n "${module_variant}"; then if test -n "${module_variant}"; then
@ -71,7 +59,7 @@ for g in ${GRAPHICAL_IMAGES}; do
BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##"
fi fi
done done
if test -z "${BASEFILENAME}"; then if test "${BASEFILENAME} = "0"; then
BASEFILENAME="${image-name}" BASEFILENAME="${image-name}"
fi fi
setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.vfat setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.vfat
@ -90,6 +78,29 @@ if test -n "${install_abort}"; then
exit; exit;
fi fi
echo "############################################################"
echo "# Linux firmware install from USB #"
echo "############################################################"
echo ""
echo " This process will erase your eMMC and will install the following files"
echo " on the partitions of the eMMC."
echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Skip user confirmation for U-Boot update # Skip user confirmation for U-Boot update
setenv forced_update 1 setenv forced_update 1
@ -103,7 +114,7 @@ setenv mmcdev 0
# Update U-Boot # Update U-Boot
echo "" echo ""
echo "" echo ""
echo ">> Installing U-Boot boot loader (target will reset)" echo ">> Installing U-Boot boot loader image ${INSTALL_UBOOT_FILENAME} (target will reset)"
echo "" echo ""
echo "" echo ""
update uboot usb ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME} update uboot usb ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME}
@ -141,7 +152,7 @@ setenv bootcmd "
usb start; usb start;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux kernel and device tree files\"; echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update linux usb ${INSTALL_USBDEV} fat ${INSTALL_LINUX_FILENAME}; update linux usb ${INSTALL_USBDEV} fat ${INSTALL_LINUX_FILENAME};
@ -153,7 +164,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing recovery\"; echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update recovery usb ${INSTALL_USBDEV} fat ${INSTALL_RECOVERY_FILENAME}; update recovery usb ${INSTALL_USBDEV} fat ${INSTALL_RECOVERY_FILENAME};
@ -165,7 +176,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux root file system\"; echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update rootfs usb ${INSTALL_USBDEV} fat ${INSTALL_ROOTFS_FILENAME}; update rootfs usb ${INSTALL_USBDEV} fat ${INSTALL_ROOTFS_FILENAME};

View File

@ -3,21 +3,9 @@
# card into the NAND # card into the NAND
# #
echo "############################################################" # Reset temp variables
echo "# Linux firmware install from micro SD #" install_abort=0
echo "############################################################" BASEFILENAME=0
echo ""
echo " This process will erase your NAND and will install a new"
echo " U-Boot and Linux firmware images on the NAND."
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Determine U-Boot file to program basing on module variant # Determine U-Boot file to program basing on module variant
if test -n "${module_variant}"; then if test -n "${module_variant}"; then
@ -64,7 +52,7 @@ for g in ${GRAPHICAL_IMAGES}; do
BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##"
fi fi
done done
if test -z "${BASEFILENAME}"; then if test "${BASEFILENAME} = "0"; then
BASEFILENAME="${image-name}" BASEFILENAME="${image-name}"
fi fi
setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.ubifs setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.ubifs
@ -78,11 +66,34 @@ for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_R
install_abort=1; install_abort=1;
fi; fi;
done done
if test -n "${install_abort}"; then if test "${install_abort}" = "1"; then
echo "Aborted."; echo "Aborted.";
exit; exit;
fi fi
echo "############################################################"
echo "# Linux firmware install from micro SD #"
echo "############################################################"
echo ""
echo " This process will erase your NAND and will install the following files"
echo " on the partitions of the NAND."
echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Skip user confirmation for U-Boot update # Skip user confirmation for U-Boot update
setenv forced_update 1 setenv forced_update 1
@ -93,7 +104,7 @@ setenv bootdelay 0
# Update U-Boot # Update U-Boot
echo "" echo ""
echo "" echo ""
echo ">> Installing U-Boot boot loader (target will reset)" echo ">> Installing U-Boot boot loader image ${INSTALL_UBOOT_FILENAME} (target will reset)"
echo "" echo ""
echo "" echo ""
update uboot mmc ${INSTALL_MMCDEV} ${INSTALL_UBOOT_FILENAME} update uboot mmc ${INSTALL_MMCDEV} ${INSTALL_UBOOT_FILENAME}
@ -122,7 +133,7 @@ setenv bootcmd "
saveenv; saveenv;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux kernel and device tree files\"; echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
nand erase.part linux; nand erase.part linux;
@ -135,7 +146,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing recovery\"; echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
nand erase.part recovery; nand erase.part recovery;
@ -148,7 +159,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux root file system\"; echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
nand erase.part rootfs; nand erase.part rootfs;

View File

@ -3,21 +3,9 @@
# into the NAND # into the NAND
# #
echo "#######################################################" # Reset temp variables
echo "# Linux firmware install from USB #" install_abort=0
echo "#######################################################" BASEFILENAME=0
echo ""
echo " This process will erase your NAND and will install a new"
echo " U-Boot and Linux firmware images on the NAND."
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Determine U-Boot file to program basing on module variant # Determine U-Boot file to program basing on module variant
if test -n "${module_variant}"; then if test -n "${module_variant}"; then
@ -64,7 +52,7 @@ for g in ${GRAPHICAL_IMAGES}; do
BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##"
fi fi
done done
if test -z "${BASEFILENAME}"; then if test "${BASEFILENAME}" = "0"; then
BASEFILENAME="${image-name}" BASEFILENAME="${image-name}"
fi fi
setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.ubifs setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.ubifs
@ -78,11 +66,34 @@ for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_R
install_abort=1; install_abort=1;
fi; fi;
done done
if test -n "${install_abort}"; then if test "${install_abort}" = "1"; then
echo "Aborted."; echo "Aborted.";
exit; exit;
fi fi
echo "############################################################"
echo "# Linux firmware install from USB #"
echo "############################################################"
echo ""
echo " This process will erase your NAND and will install the following files"
echo " on the partitions of the NAND."
echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Skip user confirmation for U-Boot update # Skip user confirmation for U-Boot update
setenv forced_update 1 setenv forced_update 1
@ -93,7 +104,7 @@ setenv bootdelay 0
# Update U-Boot # Update U-Boot
echo "" echo ""
echo "" echo ""
echo ">> Installing U-Boot boot loader (target will reset)" echo ">> Installing U-Boot boot loader image ${INSTALL_UBOOT_FILENAME} (target will reset)"
echo "" echo ""
echo "" echo ""
update uboot usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME} update uboot usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME}
@ -123,7 +134,7 @@ setenv bootcmd "
usb start; usb start;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux kernel and device tree files\"; echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
nand erase.part linux; nand erase.part linux;
@ -136,7 +147,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing recovery\"; echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
nand erase.part recovery; nand erase.part recovery;
@ -149,7 +160,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux root file system\"; echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
nand erase.part rootfs; nand erase.part rootfs;

View File

@ -3,21 +3,9 @@
# card into the eMMC # card into the eMMC
# #
echo "############################################################" # Reset temp variables
echo "# Linux firmware install from micro SD #" install_abort=0
echo "############################################################" BASEFILENAME=0
echo ""
echo " This process will erase your eMMC and will install a new"
echo " U-Boot and Linux firmware images on the eMMC."
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##.bin; setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##.bin;
setenv INSTALL_MMCDEV 1 setenv INSTALL_MMCDEV 1
@ -31,7 +19,7 @@ for g in ${GRAPHICAL_IMAGES}; do
BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##"
fi fi
done done
if test -z "${BASEFILENAME}"; then if test "${BASEFILENAME} = "0"; then
BASEFILENAME="${image-name}" BASEFILENAME="${image-name}"
fi fi
setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.vfat setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.vfat
@ -45,11 +33,34 @@ for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_R
install_abort=1; install_abort=1;
fi; fi;
done done
if test -n "${install_abort}"; then if test "${install_abort}" = "1"; then
echo "Aborted."; echo "Aborted.";
exit; exit;
fi fi
echo "############################################################"
echo "# Linux firmware install from micro SD #"
echo "############################################################"
echo ""
echo " This process will erase your eMMC and will install the following files"
echo " on the partitions of the eMMC."
echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Skip user confirmation for U-Boot update # Skip user confirmation for U-Boot update
setenv forced_update 1 setenv forced_update 1
@ -63,7 +74,7 @@ setenv mmcdev 0
# Update U-Boot # Update U-Boot
echo "" echo ""
echo "" echo ""
echo ">> Installing U-Boot boot loader (target will reset)" echo ">> Installing U-Boot boot loader image ${INSTALL_UBOOT_FILENAME} (target will reset)"
echo "" echo ""
echo "" echo ""
update uboot mmc ${INSTALL_MMCDEV} ${INSTALL_UBOOT_FILENAME} update uboot mmc ${INSTALL_MMCDEV} ${INSTALL_UBOOT_FILENAME}
@ -107,7 +118,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux kernel and device tree files\"; echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME}; update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
@ -119,7 +130,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing recovery\"; echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME}; update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME};
@ -131,7 +142,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux root file system\"; echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};

View File

@ -3,21 +3,9 @@
# into the eMMC # into the eMMC
# #
echo "######################################################" # Reset temp variables
echo "# Linux firmware install from USB #" install_abort=0
echo "######################################################" BASEFILENAME=0
echo ""
echo " This process will erase your eMMC and will install a new"
echo " U-Boot and Linux firmware images on the eMMC."
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##.bin; setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##.bin;
setenv INSTALL_USBDEV 0 setenv INSTALL_USBDEV 0
@ -31,7 +19,7 @@ for g in ${GRAPHICAL_IMAGES}; do
BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##"
fi fi
done done
if test -z "${BASEFILENAME}"; then if test "${BASEFILENAME} = "0"; then
BASEFILENAME="${image-name}" BASEFILENAME="${image-name}"
fi fi
setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.vfat setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.vfat
@ -45,11 +33,34 @@ for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_R
install_abort=1; install_abort=1;
fi; fi;
done done
if test -n "${install_abort}"; then if test "${install_abort}" = "1"; then
echo "Aborted."; echo "Aborted.";
exit; exit;
fi fi
echo "############################################################"
echo "# Linux firmware install from USB #"
echo "############################################################"
echo ""
echo " This process will erase your eMMC and will install the following files"
echo " on the partitions of the eMMC."
echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Skip user confirmation for U-Boot update # Skip user confirmation for U-Boot update
setenv forced_update 1 setenv forced_update 1
@ -63,7 +74,7 @@ setenv mmcdev 0
# Update U-Boot # Update U-Boot
echo "" echo ""
echo "" echo ""
echo ">> Installing U-Boot boot loader (target will reset)" echo ">> Installing U-Boot boot loader image ${INSTALL_UBOOT_FILENAME} (target will reset)"
echo "" echo ""
echo "" echo ""
update uboot usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME} update uboot usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME}
@ -108,7 +119,7 @@ setenv bootcmd "
usb start; usb start;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux kernel and device tree files\"; echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME}; update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
@ -120,7 +131,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing recovery\"; echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME}; update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME};
@ -132,7 +143,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux root file system\"; echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};

View File

@ -3,21 +3,9 @@
# card into the eMMC # card into the eMMC
# #
echo "############################################################" # Reset temp variables
echo "# Linux firmware install from micro SD #" install_abort=0
echo "############################################################" BASEFILENAME=0
echo ""
echo " This process will erase your eMMC and will install a new"
echo " U-Boot and Linux firmware images on the eMMC."
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Since SOMs with the B0 SOC might have an older U-Boot that doesn't export the # Since SOMs with the B0 SOC might have an older U-Boot that doesn't export the
# SOC revision to the environment, use B0 by default # SOC revision to the environment, use B0 by default
@ -102,7 +90,7 @@ for g in ${GRAPHICAL_IMAGES}; do
BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##"
fi fi
done done
if test -z "${BASEFILENAME}"; then if test "${BASEFILENAME} = "0"; then
BASEFILENAME="${image-name}" BASEFILENAME="${image-name}"
fi fi
setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.vfat setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.vfat
@ -116,11 +104,34 @@ for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_R
install_abort=1; install_abort=1;
fi; fi;
done done
if test -n "${install_abort}"; then if test "${install_abort}" = "1"; then
echo "Aborted."; echo "Aborted.";
exit; exit;
fi fi
echo "############################################################"
echo "# Linux firmware install from micro SD #"
echo "############################################################"
echo ""
echo " This process will erase your eMMC and will install the following files"
echo " on the partitions of the eMMC."
echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Skip user confirmation for U-Boot update # Skip user confirmation for U-Boot update
setenv forced_update 1 setenv forced_update 1
@ -134,7 +145,7 @@ setenv mmcdev 0
# Update U-Boot # Update U-Boot
echo "" echo ""
echo "" echo ""
echo ">> Installing U-Boot boot loader (target will reset)" echo ">> Installing U-Boot boot loader image ${INSTALL_UBOOT_FILENAME} (target will reset)"
echo "" echo ""
echo "" echo ""
update uboot mmc ${INSTALL_MMCDEV} ${INSTALL_UBOOT_FILENAME} update uboot mmc ${INSTALL_MMCDEV} ${INSTALL_UBOOT_FILENAME}
@ -178,7 +189,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux kernel and device tree files\"; echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME}; update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
@ -190,7 +201,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing recovery\"; echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME}; update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME};
@ -202,7 +213,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux root file system\"; echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};

View File

@ -3,21 +3,9 @@
# into the eMMC # into the eMMC
# #
echo "######################################################" # Reset temp variables
echo "# Linux firmware install from USB #" install_abort=0
echo "######################################################" BASEFILENAME=0
echo ""
echo " This process will erase your eMMC and will install a new"
echo " U-Boot and Linux firmware images on the eMMC."
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Since SOMs with the B0 SOC might have an older U-Boot that doesn't export the # Since SOMs with the B0 SOC might have an older U-Boot that doesn't export the
# SOC revision to the environment, use B0 by default # SOC revision to the environment, use B0 by default
@ -102,7 +90,7 @@ for g in ${GRAPHICAL_IMAGES}; do
BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##"
fi fi
done done
if test -z "${BASEFILENAME}"; then if test "${BASEFILENAME} = "0"; then
BASEFILENAME="${image-name}" BASEFILENAME="${image-name}"
fi fi
setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.vfat setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.vfat
@ -116,11 +104,34 @@ for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_R
install_abort=1; install_abort=1;
fi; fi;
done done
if test -n "${install_abort}"; then if test "${install_abort}" = "1"; then
echo "Aborted."; echo "Aborted.";
exit; exit;
fi fi
echo "############################################################"
echo "# Linux firmware install from micro SD #"
echo "############################################################"
echo ""
echo " This process will erase your eMMC and will install the following files"
echo " on the partitions of the eMMC."
echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Skip user confirmation for U-Boot update # Skip user confirmation for U-Boot update
setenv forced_update 1 setenv forced_update 1
@ -134,7 +145,7 @@ setenv mmcdev 0
# Update U-Boot # Update U-Boot
echo "" echo ""
echo "" echo ""
echo ">> Installing U-Boot boot loader (target will reset)" echo ">> Installing U-Boot boot loader image ${INSTALL_UBOOT_FILENAME} (target will reset)"
echo "" echo ""
echo "" echo ""
update uboot usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME} update uboot usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME}
@ -179,10 +190,10 @@ setenv bootcmd "
usb start; usb start;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux kernel and device tree files\"; echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME}; update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux partition!\"; echo \"[ERROR] Failed to update linux partition!\";
echo \"\"; echo \"\";
@ -191,7 +202,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing recovery\"; echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME}; update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME};
@ -203,7 +214,7 @@ setenv bootcmd "
fi; fi;
echo \"\"; echo \"\";
echo \"\"; echo \"\";
echo \">> Installing Linux root file system\"; echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\";
echo \"\"; echo \"\";
echo \"\"; echo \"\";
update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};