From 7c543bbafb575576381fe9bfef53a8bd38f77783 Mon Sep 17 00:00:00 2001 From: Francisco Gil Date: Fri, 11 Oct 2024 10:07:28 +0200 Subject: [PATCH] ccmp25: swupdate: remove unnecessary logic in the script The rdiff update is only available for dual-boot systems, and it is checked at the beginning of the process. We can remove the related logic and some variables in the script. Signed-off-by: Francisco Gil # Conflicts: # meta-digi-dey/recipes-digi/swu-images/files/update_rdiff.sh --- .../swu-images/files/update_rdiff.sh | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/meta-digi-dey/recipes-digi/swu-images/files/update_rdiff.sh b/meta-digi-dey/recipes-digi/swu-images/files/update_rdiff.sh index aca86d7f5..85ee8f265 100755 --- a/meta-digi-dey/recipes-digi/swu-images/files/update_rdiff.sh +++ b/meta-digi-dey/recipes-digi/swu-images/files/update_rdiff.sh @@ -31,9 +31,7 @@ fi # Variables. BLOCK_SIZE=4096 -ROOTFS_NAME="rootfs" ROOTFS_SOURCE_ENDPOINT="/dev/rdiff_source_rootfs" -ROOTFS_DEV_BLOCK="mmcblk0p3" ROOTFS_DEV_BLOCK_A="mmcblk0p3" ROOTFS_DEV_BLOCK_B="mmcblk0p4" @@ -141,22 +139,15 @@ get_ubi_volume() { # For this reason, hook the source update to a well known endpoint and just create the # required link from the running system once all the information is available. create_source_endpoint() { - # Initialize vars. Assume system is MMC based. - local rootfs_source_partiton="${ROOTFS_NAME}" - local rootfs_source_dev="${ROOTFS_DEV_BLOCK}" - # Remove previous link. [ -L "${ROOTFS_SOURCE_ENDPOINT}" ] && unlink "${ROOTFS_SOURCE_ENDPOINT}" - # Update variables for dualboot systems. - if is_dualboot; then - local active_part="$(get_active_system)" - rootfs_source_partiton="${rootfs_source_partiton}_${active_part}" - if [ "${active_part}" = "a" ]; then - rootfs_source_dev=${ROOTFS_DEV_BLOCK_A} - else - rootfs_source_dev=${ROOTFS_DEV_BLOCK_B} - fi + local active_part="$(get_active_system)" + rootfs_source_partiton="rootfs_${active_part}" + if [ "${active_part}" = "a" ]; then + rootfs_source_dev=${ROOTFS_DEV_BLOCK_A} + else + rootfs_source_dev=${ROOTFS_DEV_BLOCK_B} fi # Update variables for MTD systems.