From 6d1dc51b7669f7aa1a17983189c46fd46435dac2 Mon Sep 17 00:00:00 2001 From: Francisco Gil Date: Wed, 5 Mar 2025 16:41:29 +0100 Subject: [PATCH] installers: escape quotes in assignment of variable Assignment of variable 'force_erase' was done without escaping quotes which led to wrong assignment and the script not forcing the erasure of NAND partitions. While on it, remove it from ccmp1 scripts where its use makes no sense as the 'ubivolscript' script takes care of erasing the partitions. Signed-off-by: Francisco Gil (cherry picked from commit 96e1e8351d2684a27d0042df3103d87fd53c5dda) Signed-off-by: Hector Palacios --- .../u-boot-dey/ccimx6ul/install_linux_fw_sd.txt | 16 ++++++++-------- .../u-boot-dey/ccimx6ul/install_linux_fw_usb.txt | 16 ++++++++-------- .../u-boot-dey/ccmp1/install_linux_fw_sd.txt | 14 +++++++------- .../u-boot-dey/ccmp1/install_linux_fw_usb.txt | 14 +++++++------- 4 files changed, 30 insertions(+), 30 deletions(-) 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 6beae5bcf..61b3bb892 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 @@ -171,7 +171,7 @@ setenv bootcmd " if test \"\$\{singlemtdsys\}\" = yes; then run ubivolscript; else - force_erase="-e"; + force_erase=\"-e\"; fi; if test \"\$\{dualboot\}\" = yes; then echo \"\"; @@ -179,7 +179,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\"; echo \"\"; echo \"\"; - update linux_a mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME} ${force_erase}; + update linux_a mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME} \$\{force_erase\}; if test \$? -eq 1; then echo \"[ERROR] Failed to update linux_a!\"; echo \"\"; @@ -192,7 +192,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\"; echo \"\"; echo \"\"; - update linux_b mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME} ${force_erase}; + update linux_b mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME} \$\{force_erase\}; if test \$? -eq 1; then echo \"[ERROR] Failed to update linux_b!\"; echo \"\"; @@ -205,7 +205,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\"; echo \"\"; echo \"\"; - update rootfs_a mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME} ${force_erase}; + update rootfs_a mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME} \$\{force_erase\}; if test \$? -eq 1; then echo \"[ERROR] Failed to update rootfs_a partition!\"; echo \"\"; @@ -218,7 +218,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\"; echo \"\"; echo \"\"; - update rootfs_b mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME} ${force_erase}; + update rootfs_b mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME} \$\{force_erase\}; if test \$? -eq 1; then echo \"[ERROR] Failed to update rootfs_b partition!\"; echo \"\"; @@ -233,7 +233,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux\"; echo \"\"; echo \"\"; - update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME} ${force_erase}; + update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME} \$\{force_erase\}; if test \$? -eq 1; then echo \"[ERROR] Failed to update linux!\"; echo \"\"; @@ -245,7 +245,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_RECOVERY_FILENAME} on recovery\"; echo \"\"; echo \"\"; - update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME} ${force_erase}; + update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME} \$\{force_erase\}; if test \$? -eq 1; then echo \"[ERROR] Failed to update recovery partition!\"; echo \"\"; @@ -257,7 +257,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\"; echo \"\"; echo \"\"; - update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME} ${force_erase}; + update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME} \$\{force_erase\}; if test \$? -eq 1; then echo \"[ERROR] Failed to update rootfs partition!\"; echo \"\"; 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 3a88ce753..5d8b6e7ce 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 @@ -173,7 +173,7 @@ setenv bootcmd " if test \"\$\{singlemtdsys\}\" = yes; then run ubivolscript; else - force_erase="-e"; + force_erase=\"-e\"; fi; usb start; if test \"\$\{dualboot\}\" = yes; then @@ -182,7 +182,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\"; echo \"\"; echo \"\"; - update linux_a usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME} ${force_erase}; + update linux_a usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME} \$\{force_erase\}; if test \$? -eq 1; then echo \"[ERROR] Failed to update linux_a!\"; echo \"\"; @@ -195,7 +195,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\"; echo \"\"; echo \"\"; - update linux_b usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME} ${force_erase}; + update linux_b usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME} \$\{force_erase\}; if test \$? -eq 1; then echo \"[ERROR] Failed to update linux_b!\"; echo \"\"; @@ -208,7 +208,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\"; echo \"\"; echo \"\"; - update rootfs_a usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME} ${force_erase}; + update rootfs_a usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME} \$\{force_erase\}; if test \$? -eq 1; then echo \"[ERROR] Failed to update rootfs_a partition!\"; echo \"\"; @@ -221,7 +221,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\"; echo \"\"; echo \"\"; - update rootfs_b usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME} ${force_erase}; + update rootfs_b usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME} \$\{force_erase\}; if test \$? -eq 1; then echo \"[ERROR] Failed to update rootfs_b partition!\"; echo \"\"; @@ -236,7 +236,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux\"; echo \"\"; echo \"\"; - update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME} ${force_erase}; + update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME} \$\{force_erase\}; if test \$? -eq 1; then echo \"[ERROR] Failed to update linux!\"; echo \"\"; @@ -248,7 +248,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_RECOVERY_FILENAME} on recovery\"; echo \"\"; echo \"\"; - update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME} ${force_erase}; + update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME} \$\{force_erase\}; if test \$? -eq 1; then echo \"[ERROR] Failed to update recovery partition!\"; echo \"\"; @@ -260,7 +260,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\"; echo \"\"; echo \"\"; - update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME} ${force_erase}; + update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME} \$\{force_erase\}; if test \$? -eq 1; then echo \"[ERROR] Failed to update rootfs partition!\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_sd.txt index 0c201f1e4..1b02a2b78 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_sd.txt @@ -173,7 +173,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\"; echo \"\"; echo \"\"; - update linux_a mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME} ${force_erase}; + update linux_a mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME}; if test \$? -eq 1; then echo \"[ERROR] Failed to update linux_a!\"; echo \"\"; @@ -186,7 +186,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\"; echo \"\"; echo \"\"; - update linux_b mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME} ${force_erase}; + update linux_b mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME}; if test \$? -eq 1; then echo \"[ERROR] Failed to update linux_b!\"; echo \"\"; @@ -199,7 +199,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\"; echo \"\"; echo \"\"; - update rootfs_a mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME} ${force_erase}; + update rootfs_a mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; if test \$? -eq 1; then echo \"[ERROR] Failed to update rootfs_a partition!\"; echo \"\"; @@ -212,7 +212,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\"; echo \"\"; echo \"\"; - update rootfs_b mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME} ${force_erase}; + update rootfs_b mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; if test \$? -eq 1; then echo \"[ERROR] Failed to update rootfs_b partition!\"; echo \"\"; @@ -227,7 +227,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux\"; echo \"\"; echo \"\"; - update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME} ${force_erase}; + update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME}; if test \$? -eq 1; then echo \"[ERROR] Failed to update linux!\"; echo \"\"; @@ -239,7 +239,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_RECOVERY_FILENAME} on recovery\"; echo \"\"; echo \"\"; - update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME} ${force_erase}; + update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME}; if test \$? -eq 1; then echo \"[ERROR] Failed to update recovery partition!\"; echo \"\"; @@ -251,7 +251,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\"; echo \"\"; echo \"\"; - update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME} ${force_erase}; + update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; if test \$? -eq 1; then echo \"[ERROR] Failed to update rootfs partition!\"; echo \"\"; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_usb.txt index eb0432506..73afcbffc 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_usb.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_usb.txt @@ -176,7 +176,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\"; echo \"\"; echo \"\"; - update linux_a usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME} ${force_erase}; + update linux_a usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME}; if test \$? -eq 1; then echo \"[ERROR] Failed to update linux_a!\"; echo \"\"; @@ -189,7 +189,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\"; echo \"\"; echo \"\"; - update linux_b usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME} ${force_erase}; + update linux_b usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME}; if test \$? -eq 1; then echo \"[ERROR] Failed to update linux_b!\"; echo \"\"; @@ -202,7 +202,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\"; echo \"\"; echo \"\"; - update rootfs_a usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME} ${force_erase}; + update rootfs_a usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; if test \$? -eq 1; then echo \"[ERROR] Failed to update rootfs_a partition!\"; echo \"\"; @@ -215,7 +215,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\"; echo \"\"; echo \"\"; - update rootfs_b usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME} ${force_erase}; + update rootfs_b usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; if test \$? -eq 1; then echo \"[ERROR] Failed to update rootfs_b partition!\"; echo \"\"; @@ -230,7 +230,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux\"; echo \"\"; echo \"\"; - update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME} ${force_erase}; + update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME}; if test \$? -eq 1; then echo \"[ERROR] Failed to update linux!\"; echo \"\"; @@ -242,7 +242,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_RECOVERY_FILENAME} on recovery\"; echo \"\"; echo \"\"; - update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME} ${force_erase}; + update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME}; if test \$? -eq 1; then echo \"[ERROR] Failed to update recovery partition!\"; echo \"\"; @@ -254,7 +254,7 @@ setenv bootcmd " echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\"; echo \"\"; echo \"\"; - update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME} ${force_erase}; + update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; if test \$? -eq 1; then echo \"[ERROR] Failed to update rootfs partition!\"; echo \"\";