From a61873f7f1172fcd60a33257473a22f635968bfe Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Mon, 31 May 2021 09:50:17 +0200 Subject: [PATCH] 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 --- .../ccimx6qpsbc/install_linux_fw_sd.txt | 53 +++++++++++------- .../ccimx6qpsbc/install_linux_fw_usb.txt | 53 +++++++++++------- .../ccimx6sbc/install_linux_fw_sd.txt | 53 +++++++++++------- .../ccimx6sbc/install_linux_fw_usb.txt | 51 ++++++++++------- .../ccimx6ul/install_linux_fw_sd.txt | 53 +++++++++++------- .../ccimx6ul/install_linux_fw_usb.txt | 53 +++++++++++------- .../ccimx8m/install_linux_fw_sd.txt | 53 +++++++++++------- .../ccimx8m/install_linux_fw_usb.txt | 53 +++++++++++------- .../ccimx8x/install_linux_fw_sd.txt | 53 +++++++++++------- .../ccimx8x/install_linux_fw_usb.txt | 55 +++++++++++-------- 10 files changed, 320 insertions(+), 210 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_sd.txt index a9a61d06f..f7268a619 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_sd.txt @@ -3,21 +3,9 @@ # card into the eMMC # -echo "############################################################" -echo "# Linux firmware install from micro SD #" -echo "############################################################" -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 +# Reset temp variables +install_abort=0 +BASEFILENAME=0 # Determine U-Boot file to program basing on module variant if test -n "${module_variant}"; then @@ -60,7 +48,7 @@ for g in ${GRAPHICAL_IMAGES}; do BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" fi done -if test -z "${BASEFILENAME}"; then +if test "${BASEFILENAME} = "0"; then BASEFILENAME="${image-name}" fi 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; fi; done -if test -n "${install_abort}"; then +if test "${install_abort}" = "1"; then echo "Aborted."; exit; 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 setenv forced_update 1 @@ -92,7 +103,7 @@ setenv mmcdev 0 # Update U-Boot 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 "" update uboot mmc ${INSTALL_MMCDEV} fat ${INSTALL_UBOOT_FILENAME} @@ -129,7 +140,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing Linux kernel and device tree files\"; + echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\"; echo \"\"; echo \"\"; update linux mmc ${INSTALL_MMCDEV} fat ${INSTALL_LINUX_FILENAME}; @@ -141,7 +152,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing recovery\"; + echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\"; echo \"\"; echo \"\"; update recovery mmc ${INSTALL_MMCDEV} fat ${INSTALL_RECOVERY_FILENAME}; @@ -153,7 +164,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing Linux root file system\"; + echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\"; echo \"\"; echo \"\"; update rootfs mmc ${INSTALL_MMCDEV} fat ${INSTALL_ROOTFS_FILENAME}; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_usb.txt index 7156078ea..dcdae6227 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_usb.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_usb.txt @@ -3,21 +3,9 @@ # into the eMMC # -echo "#######################################################" -echo "# Linux firmware install from USB #" -echo "#######################################################" -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 +# Reset temp variables +install_abort=0 +BASEFILENAME=0 # Determine U-Boot file to program basing on module variant if test -n "${module_variant}"; then @@ -60,7 +48,7 @@ for g in ${GRAPHICAL_IMAGES}; do BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" fi done -if test -z "${BASEFILENAME}"; then +if test "${BASEFILENAME} = "0"; then BASEFILENAME="${image-name}" fi 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; fi; done -if test -n "${install_abort}"; then +if test "${install_abort}" = "1"; then echo "Aborted."; exit; 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 setenv forced_update 1 @@ -92,7 +103,7 @@ setenv mmcdev 0 # Update U-Boot 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 "" update uboot usb ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME} @@ -130,7 +141,7 @@ setenv bootcmd " usb start; echo \"\"; echo \"\"; - echo \">> Installing Linux kernel and device tree files\"; + echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\"; echo \"\"; echo \"\"; update linux usb ${INSTALL_USBDEV} fat ${INSTALL_LINUX_FILENAME}; @@ -142,7 +153,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing recovery\"; + echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\"; echo \"\"; echo \"\"; update recovery usb ${INSTALL_USBDEV} fat ${INSTALL_RECOVERY_FILENAME}; @@ -154,7 +165,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing Linux root file system\"; + echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\"; echo \"\"; echo \"\"; update rootfs usb ${INSTALL_USBDEV} fat ${INSTALL_ROOTFS_FILENAME}; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_sd.txt index 46f9761c7..f37280de9 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_sd.txt @@ -3,21 +3,9 @@ # card into the eMMC # -echo "############################################################" -echo "# Linux firmware install from micro SD #" -echo "############################################################" -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 +# Reset temp variables +install_abort=0 +BASEFILENAME=0 # Determine U-Boot file to program basing on module variant if test -n "${module_variant}"; then @@ -71,7 +59,7 @@ for g in ${GRAPHICAL_IMAGES}; do BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" fi done -if test -z "${BASEFILENAME}"; then +if test "${BASEFILENAME} = "0"; then BASEFILENAME="${image-name}" fi 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; fi; done -if test -n "${install_abort}"; then +if test "${install_abort}" = "1"; then echo "Aborted."; exit; 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 setenv forced_update 1 @@ -103,7 +114,7 @@ setenv mmcdev 0 # Update U-Boot 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 "" update uboot mmc ${INSTALL_MMCDEV} fat ${INSTALL_UBOOT_FILENAME} @@ -140,7 +151,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing Linux kernel and device tree files\"; + echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\"; echo \"\"; echo \"\"; update linux mmc ${INSTALL_MMCDEV} fat ${INSTALL_LINUX_FILENAME}; @@ -152,7 +163,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing recovery\"; + echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\"; echo \"\"; echo \"\"; update recovery mmc ${INSTALL_MMCDEV} fat ${INSTALL_RECOVERY_FILENAME}; @@ -164,7 +175,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing Linux root file system\"; + echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\"; echo \"\"; echo \"\"; update rootfs mmc ${INSTALL_MMCDEV} fat ${INSTALL_ROOTFS_FILENAME}; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_usb.txt index b0ac4fbd4..1bef598c7 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_usb.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_usb.txt @@ -3,21 +3,9 @@ # into the eMMC # -echo "#######################################################" -echo "# Linux firmware install from USB #" -echo "#######################################################" -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 +# Reset temp variables +install_abort=0 +BASEFILENAME=0 # Determine U-Boot file to program basing on module variant if test -n "${module_variant}"; then @@ -71,7 +59,7 @@ for g in ${GRAPHICAL_IMAGES}; do BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" fi done -if test -z "${BASEFILENAME}"; then +if test "${BASEFILENAME} = "0"; then BASEFILENAME="${image-name}" fi setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.vfat @@ -90,6 +78,29 @@ if test -n "${install_abort}"; then exit; 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 setenv forced_update 1 @@ -103,7 +114,7 @@ setenv mmcdev 0 # Update U-Boot 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 "" update uboot usb ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME} @@ -141,7 +152,7 @@ setenv bootcmd " usb start; echo \"\"; echo \"\"; - echo \">> Installing Linux kernel and device tree files\"; + echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\"; echo \"\"; echo \"\"; update linux usb ${INSTALL_USBDEV} fat ${INSTALL_LINUX_FILENAME}; @@ -153,7 +164,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing recovery\"; + echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\"; echo \"\"; echo \"\"; update recovery usb ${INSTALL_USBDEV} fat ${INSTALL_RECOVERY_FILENAME}; @@ -165,7 +176,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing Linux root file system\"; + echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\"; echo \"\"; echo \"\"; update rootfs usb ${INSTALL_USBDEV} fat ${INSTALL_ROOTFS_FILENAME}; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_sd.txt index 115046ade..7285bc1d0 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_sd.txt @@ -3,21 +3,9 @@ # card into the NAND # -echo "############################################################" -echo "# Linux firmware install from micro SD #" -echo "############################################################" -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 +# Reset temp variables +install_abort=0 +BASEFILENAME=0 # Determine U-Boot file to program basing on module variant if test -n "${module_variant}"; then @@ -64,7 +52,7 @@ for g in ${GRAPHICAL_IMAGES}; do BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" fi done -if test -z "${BASEFILENAME}"; then +if test "${BASEFILENAME} = "0"; then BASEFILENAME="${image-name}" fi 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; fi; done -if test -n "${install_abort}"; then +if test "${install_abort}" = "1"; then echo "Aborted."; exit; 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 setenv forced_update 1 @@ -93,7 +104,7 @@ setenv bootdelay 0 # Update U-Boot 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 "" update uboot mmc ${INSTALL_MMCDEV} ${INSTALL_UBOOT_FILENAME} @@ -122,7 +133,7 @@ setenv bootcmd " saveenv; echo \"\"; echo \"\"; - echo \">> Installing Linux kernel and device tree files\"; + echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\"; echo \"\"; echo \"\"; nand erase.part linux; @@ -135,7 +146,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing recovery\"; + echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\"; echo \"\"; echo \"\"; nand erase.part recovery; @@ -148,7 +159,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing Linux root file system\"; + echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\"; echo \"\"; echo \"\"; nand erase.part rootfs; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_usb.txt index 21485e2e3..b3b30ea60 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_usb.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_usb.txt @@ -3,21 +3,9 @@ # into the NAND # -echo "#######################################################" -echo "# Linux firmware install from USB #" -echo "#######################################################" -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 +# Reset temp variables +install_abort=0 +BASEFILENAME=0 # Determine U-Boot file to program basing on module variant if test -n "${module_variant}"; then @@ -64,7 +52,7 @@ for g in ${GRAPHICAL_IMAGES}; do BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" fi done -if test -z "${BASEFILENAME}"; then +if test "${BASEFILENAME}" = "0"; then BASEFILENAME="${image-name}" fi 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; fi; done -if test -n "${install_abort}"; then +if test "${install_abort}" = "1"; then echo "Aborted."; exit; 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 setenv forced_update 1 @@ -93,7 +104,7 @@ setenv bootdelay 0 # Update U-Boot 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 "" update uboot usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME} @@ -123,7 +134,7 @@ setenv bootcmd " usb start; echo \"\"; echo \"\"; - echo \">> Installing Linux kernel and device tree files\"; + echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\"; echo \"\"; echo \"\"; nand erase.part linux; @@ -136,7 +147,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing recovery\"; + echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\"; echo \"\"; echo \"\"; nand erase.part recovery; @@ -149,7 +160,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing Linux root file system\"; + echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\"; echo \"\"; echo \"\"; nand erase.part rootfs; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_sd.txt index ddb57af6c..157dab1ff 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_sd.txt @@ -3,21 +3,9 @@ # card into the eMMC # -echo "############################################################" -echo "# Linux firmware install from micro SD #" -echo "############################################################" -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 +# Reset temp variables +install_abort=0 +BASEFILENAME=0 setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##.bin; setenv INSTALL_MMCDEV 1 @@ -31,7 +19,7 @@ for g in ${GRAPHICAL_IMAGES}; do BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" fi done -if test -z "${BASEFILENAME}"; then +if test "${BASEFILENAME} = "0"; then BASEFILENAME="${image-name}" fi 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; fi; done -if test -n "${install_abort}"; then +if test "${install_abort}" = "1"; then echo "Aborted."; exit; 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 setenv forced_update 1 @@ -63,7 +74,7 @@ setenv mmcdev 0 # Update U-Boot 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 "" update uboot mmc ${INSTALL_MMCDEV} ${INSTALL_UBOOT_FILENAME} @@ -107,7 +118,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing Linux kernel and device tree files\"; + echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\"; echo \"\"; echo \"\"; update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME}; @@ -119,7 +130,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing recovery\"; + echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\"; echo \"\"; echo \"\"; update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME}; @@ -131,7 +142,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing Linux root file system\"; + echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\"; echo \"\"; echo \"\"; update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_usb.txt index ec72bb8d0..578d7b7ab 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_usb.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_usb.txt @@ -3,21 +3,9 @@ # into the eMMC # -echo "######################################################" -echo "# Linux firmware install from USB #" -echo "######################################################" -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 +# Reset temp variables +install_abort=0 +BASEFILENAME=0 setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##.bin; setenv INSTALL_USBDEV 0 @@ -31,7 +19,7 @@ for g in ${GRAPHICAL_IMAGES}; do BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" fi done -if test -z "${BASEFILENAME}"; then +if test "${BASEFILENAME} = "0"; then BASEFILENAME="${image-name}" fi 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; fi; done -if test -n "${install_abort}"; then +if test "${install_abort}" = "1"; then echo "Aborted."; exit; 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 setenv forced_update 1 @@ -63,7 +74,7 @@ setenv mmcdev 0 # Update U-Boot 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 "" update uboot usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME} @@ -108,7 +119,7 @@ setenv bootcmd " usb start; echo \"\"; echo \"\"; - echo \">> Installing Linux kernel and device tree files\"; + echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\"; echo \"\"; echo \"\"; update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME}; @@ -120,7 +131,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing recovery\"; + echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\"; echo \"\"; echo \"\"; update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME}; @@ -132,7 +143,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing Linux root file system\"; + echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\"; echo \"\"; echo \"\"; update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_sd.txt index f811db5d7..d19cc9a86 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_sd.txt @@ -3,21 +3,9 @@ # card into the eMMC # -echo "############################################################" -echo "# Linux firmware install from micro SD #" -echo "############################################################" -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 +# Reset temp variables +install_abort=0 +BASEFILENAME=0 # 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 @@ -102,7 +90,7 @@ for g in ${GRAPHICAL_IMAGES}; do BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" fi done -if test -z "${BASEFILENAME}"; then +if test "${BASEFILENAME} = "0"; then BASEFILENAME="${image-name}" fi 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; fi; done -if test -n "${install_abort}"; then +if test "${install_abort}" = "1"; then echo "Aborted."; exit; 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 setenv forced_update 1 @@ -134,7 +145,7 @@ setenv mmcdev 0 # Update U-Boot 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 "" update uboot mmc ${INSTALL_MMCDEV} ${INSTALL_UBOOT_FILENAME} @@ -178,7 +189,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing Linux kernel and device tree files\"; + echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\"; echo \"\"; echo \"\"; update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME}; @@ -190,7 +201,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing recovery\"; + echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\"; echo \"\"; echo \"\"; update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME}; @@ -202,7 +213,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing Linux root file system\"; + echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\"; echo \"\"; echo \"\"; update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_usb.txt index 3ab0e0041..16c8a1578 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_usb.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_usb.txt @@ -3,21 +3,9 @@ # into the eMMC # -echo "######################################################" -echo "# Linux firmware install from USB #" -echo "######################################################" -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 +# Reset temp variables +install_abort=0 +BASEFILENAME=0 # 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 @@ -102,7 +90,7 @@ for g in ${GRAPHICAL_IMAGES}; do BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##" fi done -if test -z "${BASEFILENAME}"; then +if test "${BASEFILENAME} = "0"; then BASEFILENAME="${image-name}" fi 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; fi; done -if test -n "${install_abort}"; then +if test "${install_abort}" = "1"; then echo "Aborted."; exit; 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 setenv forced_update 1 @@ -134,7 +145,7 @@ setenv mmcdev 0 # Update U-Boot 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 "" update uboot usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME} @@ -179,10 +190,10 @@ setenv bootcmd " usb start; echo \"\"; echo \"\"; - echo \">> Installing Linux kernel and device tree files\"; + echo \">> Installing linux image file ${INSTALL_LINUX_FILENAME}\"; echo \"\"; echo \"\"; - update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME}; + update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME}; if test \$? -eq 1; then echo \"[ERROR] Failed to update linux partition!\"; echo \"\"; @@ -191,7 +202,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing recovery\"; + echo \">> Installing recovery file ${INSTALL_RECOVERY_FILENAME}\"; echo \"\"; echo \"\"; update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME}; @@ -203,7 +214,7 @@ setenv bootcmd " fi; echo \"\"; echo \"\"; - echo \">> Installing Linux root file system\"; + echo \">> Installing root file system file ${INSTALL_ROOTFS_FILENAME}\"; echo \"\"; echo \"\"; update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};