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:
parent
ed8113d99b
commit
7c543bbafb
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue