BLKID_PRINT="/usr/bin/blkid-print"
fi
+if [ -z $RESIZE_DYNPARTS ]; then
+ RESIZE_DYNPARTS="/bin/resize-dynparts"
+fi
+
#------------------------------------------------
# critical_log msg [file]
#------------------------------------------------
# are copying partitions in background. In this case modify size of
# NEXT_AB partitions to match size of CURRENT_AB partitions.
if [ -f "${FOTA_DIR}/${CONFIG_FILE}" ]; then
- /bin/resize-dynparts "${SUPERFS}" "${NEXT_AB}" "${FOTA_DIR}/${CONFIG_FILE}"
+ "${RESIZE_DYNPARTS}" "${SUPERFS}" "${NEXT_AB}" "${FOTA_DIR}/${CONFIG_FILE}"
else
- /bin/resize-dynparts "${SUPERFS}" "${NEXT_AB}"
+ "${RESIZE_DYNPARTS}" "${SUPERFS}" "${NEXT_AB}"
fi
PARSE_DYNPARTS=`/usr/sbin/parse-dynparts "$SUPERFS" --list-tables`
/bin/chmod +x "$FOTA_DIR/upgrade-apply"
unpack_file "$DELTA_TAR" "upgrade-apply-deltafs"
/bin/chmod +x "$FOTA_DIR/upgrade-apply-deltafs"
-BLKID_PRINT="$FOTA_DIR/blkid-print"
if ! upgrade_images "$DELTA_TAR"; then
critical_flog "[Error] Unable to upgrade_images"
cleanup
SCRIPT_UPGRADE_PARTIAL="upgrade-partial.sh"
SCRIPT_UPGRADE_FOTA="upgrade-fota.sh"
BLKID_PRINT_FILE="blkid-print"
+RESIZE_DYNPARTS_FILE="resize-dynparts"
FLOCK_PATH="/var/lock/clone_partitions.lock"
DELTA_VERIFIER="/usr/bin/delta-verifier"
export BLKID_PRINT="$FOTA_DIR/$BLKID_PRINT_FILE"
+export RESIZE_DYNPARTS="$FOTA_DIR/$RESIZE_DYNPARTS_FILE"
prepare_fota_dir() {
if [ -d "$FOTA_DIR" ]; then
unpack_file "${DOWNLOAD_DELTA}" "${BLKID_PRINT_FILE}"
chmod +x "$FOTA_DIR/$BLKID_PRINT_FILE"
+ unpack_file "${DOWNLOAD_DELTA}" "${RESIZE_DYNPARTS_FILE}"
+ chmod +x "$FOTA_DIR/$RESIZE_DYNPARTS_FILE"
+
unpack_file "$DOWNLOAD_DELTA" "$CONFIG_FILE"
if [ "$(device_board_get_partition_ab_cloned)" -eq 0 ]; then