uboot: ccimx6ul: add ubisysvols support to uuu install script

With U-Boot supporting the creation of mtdparts and UBI volumes depending
on the value of variable 'ubisysvols', adapt the install script to make
use of those to generate a partition table and UBI volumes accordingly.
This can be triggered with new option '-b'.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
This commit is contained in:
Hector Palacios 2021-08-24 10:04:02 +02:00
parent fcd3791535
commit f46851e245
1 changed files with 21 additions and 3 deletions

View File

@ -29,6 +29,9 @@ 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 <dey-image-name> Image name that prefixes the image filenames, such as 'dey-image-qt', "
echo " 'dey-image-webkit', 'core-image-base'..."
@ -67,9 +70,10 @@ echo "############################################################"
# Command line admits the following parameters:
# -u <u-boot-filename>
# -i <image-name>
while getopts 'hi:nu:' c
while getopts 'bhi:nu:' c
do
case $c in
b) UBISYSVOLS=true ;;
h) show_usage ;;
i) IMAGE_NAME=${OPTARG} ;;
n) NOWAIT=true ;;
@ -218,6 +222,18 @@ sleep 3
# Set fastboot buffer address to $loadaddr
uuu fb: ucmd setenv fastboot_buffer \${loadaddr}
# Set up ubisysvols if so requested
if [ "${UBISYSVOLS}" = true ]; then
uuu fb: ucmd setenv ubisysvols yes
fi
# Create partition table
uuu "fb[-t 10000]:" ucmd run partition_nand_linux
if [ "${UBISYSVOLS}" = true ]; then
uuu "fb[-t 10000]:" ucmd run ubivolscript
fi
# Update Linux
part_update "linux" "${INSTALL_LINUX_FILENAME}" 15000
@ -227,8 +243,10 @@ part_update "recovery" "${INSTALL_RECOVERY_FILENAME}" 15000
# Update Rootfs
part_update "rootfs" "${INSTALL_ROOTFS_FILENAME}" 90000
# Erase the 'Update' partition
uuu fb: ucmd nand erase.part update
if [ ! "${UBISYSVOLS}" = true ]; then
# Erase the 'Update' partition
uuu fb: ucmd nand erase.part update
fi
# Configure u-boot to boot into recovery mode
uuu fb: ucmd setenv boot_recovery yes