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 <francisco.gilmartinez@digi.com>

# Conflicts:
#	meta-digi-dey/recipes-digi/swu-images/files/update_rdiff.sh
This commit is contained in:
Francisco Gil 2024-10-11 10:07:28 +02:00
parent ed8113d99b
commit 7c543bbafb
1 changed files with 6 additions and 15 deletions

View File

@ -31,9 +31,7 @@ fi
# Variables. # Variables.
BLOCK_SIZE=4096 BLOCK_SIZE=4096
ROOTFS_NAME="rootfs"
ROOTFS_SOURCE_ENDPOINT="/dev/rdiff_source_rootfs" ROOTFS_SOURCE_ENDPOINT="/dev/rdiff_source_rootfs"
ROOTFS_DEV_BLOCK="mmcblk0p3"
ROOTFS_DEV_BLOCK_A="mmcblk0p3" ROOTFS_DEV_BLOCK_A="mmcblk0p3"
ROOTFS_DEV_BLOCK_B="mmcblk0p4" 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 # 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. # required link from the running system once all the information is available.
create_source_endpoint() { 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. # Remove previous link.
[ -L "${ROOTFS_SOURCE_ENDPOINT}" ] && unlink "${ROOTFS_SOURCE_ENDPOINT}" [ -L "${ROOTFS_SOURCE_ENDPOINT}" ] && unlink "${ROOTFS_SOURCE_ENDPOINT}"
# Update variables for dualboot systems. local active_part="$(get_active_system)"
if is_dualboot; then rootfs_source_partiton="rootfs_${active_part}"
local active_part="$(get_active_system)" if [ "${active_part}" = "a" ]; then
rootfs_source_partiton="${rootfs_source_partiton}_${active_part}" rootfs_source_dev=${ROOTFS_DEV_BLOCK_A}
if [ "${active_part}" = "a" ]; then else
rootfs_source_dev=${ROOTFS_DEV_BLOCK_A} rootfs_source_dev=${ROOTFS_DEV_BLOCK_B}
else
rootfs_source_dev=${ROOTFS_DEV_BLOCK_B}
fi
fi fi
# Update variables for MTD systems. # Update variables for MTD systems.