install_fw: cc6ul: erase 'update' partition unconditionally

When manually changing the partition table, it could happen that
a UBI volume already exists in the 'update' partition.
If not erased, the system may find the old UBI volume (with wrong
geometry information) and try to mount it which will result in
failure.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
This commit is contained in:
Hector Palacios 2021-01-19 13:18:22 +01:00
parent de2e9e40ad
commit ee29d0ffcd
6 changed files with 16 additions and 0 deletions

View File

@ -100,6 +100,7 @@ fi
# - Update the 'linux' partition # - Update the 'linux' partition
# - Update the 'recovery' partition # - Update the 'recovery' partition
# - Update the 'rootfs' partition # - Update the 'rootfs' partition
# - Erase the 'update' partition
# - Configure recovery to wipe 'update' partition # - Configure recovery to wipe 'update' partition
# - Run 'recovery' and let the system boot after # - Run 'recovery' and let the system boot after
setenv bootcmd " setenv bootcmd "
@ -145,6 +146,7 @@ setenv bootcmd "
exit; exit;
fi; fi;
echo \"\"; echo \"\";
nand erase.part update;
setenv boot_recovery yes; setenv boot_recovery yes;
setenv recovery_command wipe_update; setenv recovery_command wipe_update;
saveenv; saveenv;

View File

@ -100,6 +100,7 @@ fi
# - Update the 'linux' partition # - Update the 'linux' partition
# - Update the 'recovery' partition # - Update the 'recovery' partition
# - Update the 'rootfs' partition # - Update the 'rootfs' partition
# - Erase the 'update' partition
# - Configure recovery to wipe 'update' partition # - Configure recovery to wipe 'update' partition
# - Run 'recovery' and let the system boot after # - Run 'recovery' and let the system boot after
setenv bootcmd " setenv bootcmd "
@ -146,6 +147,7 @@ setenv bootcmd "
exit; exit;
fi; fi;
echo \"\"; echo \"\";
nand erase.part update;
setenv boot_recovery yes; setenv boot_recovery yes;
setenv recovery_command wipe_update; setenv recovery_command wipe_update;
saveenv; saveenv;

View File

@ -119,6 +119,7 @@ nand_update "uboot" "${INSTALL_UBOOT_FILENAME}" 5000
# - Update the 'linux' partition # - Update the 'linux' partition
# - Update the 'recovery' partition # - Update the 'recovery' partition
# - Update the 'rootfs' partition # - Update the 'rootfs' partition
# - Erase the 'update' partition
uuu fb: ucmd setenv bootcmd " uuu fb: ucmd setenv bootcmd "
env default -a; env default -a;
saveenv; saveenv;
@ -152,6 +153,9 @@ nand_update "recovery" "${INSTALL_RECOVERY_FILENAME}" 15000
# Update Rootfs # Update Rootfs
nand_update "rootfs" "${INSTALL_ROOTFS_FILENAME}" 90000 nand_update "rootfs" "${INSTALL_ROOTFS_FILENAME}" 90000
# Erase the 'Update' partition
uuu fb: ucmd nand erase.part update
# Configure u-boot to boot into recovery mode # Configure u-boot to boot into recovery mode
uuu fb: ucmd setenv boot_recovery yes uuu fb: ucmd setenv boot_recovery yes
uuu fb: ucmd setenv recovery_command wipe_update uuu fb: ucmd setenv recovery_command wipe_update

View File

@ -100,6 +100,7 @@ fi
# - Update the 'linux' partition # - Update the 'linux' partition
# - Update the 'recovery' partition # - Update the 'recovery' partition
# - Update the 'rootfs' partition # - Update the 'rootfs' partition
# - Erase the 'update' partition
# - Configure recovery to wipe 'update' partition # - Configure recovery to wipe 'update' partition
# - Run 'recovery' and let the system boot after # - Run 'recovery' and let the system boot after
setenv bootcmd " setenv bootcmd "
@ -145,6 +146,7 @@ setenv bootcmd "
exit; exit;
fi; fi;
echo \"\"; echo \"\";
nand erase.part update;
setenv boot_recovery yes; setenv boot_recovery yes;
setenv recovery_command wipe_update; setenv recovery_command wipe_update;
saveenv; saveenv;

View File

@ -100,6 +100,7 @@ fi
# - Update the 'linux' partition # - Update the 'linux' partition
# - Update the 'recovery' partition # - Update the 'recovery' partition
# - Update the 'rootfs' partition # - Update the 'rootfs' partition
# - Erase the 'update' partition
# - Configure recovery to wipe 'update' partition # - Configure recovery to wipe 'update' partition
# - Run 'recovery' and let the system boot after # - Run 'recovery' and let the system boot after
setenv bootcmd " setenv bootcmd "
@ -146,6 +147,7 @@ setenv bootcmd "
exit; exit;
fi; fi;
echo \"\"; echo \"\";
nand erase.part update;
setenv boot_recovery yes; setenv boot_recovery yes;
setenv recovery_command wipe_update; setenv recovery_command wipe_update;
saveenv; saveenv;

View File

@ -119,6 +119,7 @@ nand_update "uboot" "${INSTALL_UBOOT_FILENAME}" 5000
# - Update the 'linux' partition # - Update the 'linux' partition
# - Update the 'recovery' partition # - Update the 'recovery' partition
# - Update the 'rootfs' partition # - Update the 'rootfs' partition
# - Erase the 'update' partition
uuu fb: ucmd setenv bootcmd " uuu fb: ucmd setenv bootcmd "
env default -a; env default -a;
saveenv; saveenv;
@ -152,6 +153,9 @@ nand_update "recovery" "${INSTALL_RECOVERY_FILENAME}" 15000
# Update Rootfs # Update Rootfs
nand_update "rootfs" "${INSTALL_ROOTFS_FILENAME}" 90000 nand_update "rootfs" "${INSTALL_ROOTFS_FILENAME}" 90000
# Erase the 'Update' partition
uuu fb: ucmd nand erase.part update
# Configure u-boot to boot into recovery mode # Configure u-boot to boot into recovery mode
uuu fb: ucmd setenv boot_recovery yes uuu fb: ucmd setenv boot_recovery yes
uuu fb: ucmd setenv recovery_command wipe_update uuu fb: ucmd setenv recovery_command wipe_update