From 27c13055ebf4f61cc86bcca0e284d260554d63a7 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Fri, 3 Sep 2021 16:10:09 +0200 Subject: [PATCH] uboot: ccimx6ul: decide on using UBI vols basing on ubisysvols The script required the passing of option '-b' for setting up the target to use a single MTD partition and multiple UBI volumes. If a target however already has the variable 'ubisysvols' set to 'yes' but this parameter is forgotten when calling the script, the partition layout would change to default (several MTD partitions). Remove the recently added '-b' option and make the script decide basing on the current value of 'ubisysvols' variable. Signed-off-by: Hector Palacios --- .../ccimx6ul/install_linux_fw_uuu.sh | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_uuu.sh b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_uuu.sh index 5179970c5..8d22d569c 100755 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_uuu.sh +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_uuu.sh @@ -32,9 +32,6 @@ show_usage() echo "Usage: $0 [options]" echo "" echo " Options:" - echo " -b Use one MTD 'system' partition to hold system UBI volumes (linux," - echo " recovery, rootfs, update)." - echo " Default is the opposite: one UBI volume per MTD partition." echo " -h Show this help." echo " -i Image name that prefixes the image filenames, such as 'dey-image-qt', " echo " 'dey-image-webkit', 'core-image-base'..." @@ -73,10 +70,9 @@ echo "############################################################" # Command line admits the following parameters: # -u # -i -while getopts 'bhi:nu:' c +while getopts 'hi:nu:' c do case $c in - b) UBISYSVOLS=true ;; h) show_usage ;; i) IMAGE_NAME=${OPTARG} ;; n) NOWAIT=true ;; @@ -84,12 +80,18 @@ do esac done -echo "" -echo "Determining image files to use..." - # Enable the redirect support to get u-boot variables values uuu fb: ucmd setenv stdout serial,fastboot +# Check if ubisysvols variable is active +ubisysvols=$(getenv "ubisysvols") +if [ "${ubisysvols}" = "yes" ]; then + UBISYSVOLS=true; +fi + +echo "" +echo "Determining image files to use..." + # Determine U-Boot filename if not provided if [ -z "${INSTALL_UBOOT_FILENAME}" ]; then module_variant=$(getenv "module_variant") @@ -225,7 +227,7 @@ sleep 3 # Set fastboot buffer address to $loadaddr uuu fb: ucmd setenv fastboot_buffer \${loadaddr} -# Set up ubisysvols if so requested +# Restore ubisysvols if previously active if [ "${UBISYSVOLS}" = true ]; then uuu fb: ucmd setenv ubisysvols yes fi