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.
|
# 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,23 +139,16 @@ 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.
|
|
||||||
if is_dualboot; then
|
|
||||||
local active_part="$(get_active_system)"
|
local active_part="$(get_active_system)"
|
||||||
rootfs_source_partiton="${rootfs_source_partiton}_${active_part}"
|
rootfs_source_partiton="rootfs_${active_part}"
|
||||||
if [ "${active_part}" = "a" ]; then
|
if [ "${active_part}" = "a" ]; then
|
||||||
rootfs_source_dev=${ROOTFS_DEV_BLOCK_A}
|
rootfs_source_dev=${ROOTFS_DEV_BLOCK_A}
|
||||||
else
|
else
|
||||||
rootfs_source_dev=${ROOTFS_DEV_BLOCK_B}
|
rootfs_source_dev=${ROOTFS_DEV_BLOCK_B}
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
# Update variables for MTD systems.
|
# Update variables for MTD systems.
|
||||||
if is_ubifs; then
|
if is_ubifs; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue