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 <hector.palacios@digi.com>
This commit is contained in:
Hector Palacios 2021-09-03 16:10:09 +02:00
parent 6910a11eab
commit 27c13055eb
1 changed files with 11 additions and 9 deletions

View File

@ -32,9 +32,6 @@ show_usage()
echo "Usage: $0 [options]" echo "Usage: $0 [options]"
echo "" echo ""
echo " Options:" 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 " -h Show this help."
echo " -i <dey-image-name> Image name that prefixes the image filenames, such as 'dey-image-qt', " echo " -i <dey-image-name> Image name that prefixes the image filenames, such as 'dey-image-qt', "
echo " 'dey-image-webkit', 'core-image-base'..." echo " 'dey-image-webkit', 'core-image-base'..."
@ -73,10 +70,9 @@ echo "############################################################"
# Command line admits the following parameters: # Command line admits the following parameters:
# -u <u-boot-filename> # -u <u-boot-filename>
# -i <image-name> # -i <image-name>
while getopts 'bhi:nu:' c while getopts 'hi:nu:' c
do do
case $c in case $c in
b) UBISYSVOLS=true ;;
h) show_usage ;; h) show_usage ;;
i) IMAGE_NAME=${OPTARG} ;; i) IMAGE_NAME=${OPTARG} ;;
n) NOWAIT=true ;; n) NOWAIT=true ;;
@ -84,12 +80,18 @@ do
esac esac
done done
echo ""
echo "Determining image files to use..."
# Enable the redirect support to get u-boot variables values # Enable the redirect support to get u-boot variables values
uuu fb: ucmd setenv stdout serial,fastboot 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 # Determine U-Boot filename if not provided
if [ -z "${INSTALL_UBOOT_FILENAME}" ]; then if [ -z "${INSTALL_UBOOT_FILENAME}" ]; then
module_variant=$(getenv "module_variant") module_variant=$(getenv "module_variant")
@ -225,7 +227,7 @@ sleep 3
# Set fastboot buffer address to $loadaddr # Set fastboot buffer address to $loadaddr
uuu fb: ucmd setenv fastboot_buffer \${loadaddr} uuu fb: ucmd setenv fastboot_buffer \${loadaddr}
# Set up ubisysvols if so requested # Restore ubisysvols if previously active
if [ "${UBISYSVOLS}" = true ]; then if [ "${UBISYSVOLS}" = true ]; then
uuu fb: ucmd setenv ubisysvols yes uuu fb: ucmd setenv ubisysvols yes
fi fi