--- /dev/null
+#!/bin/bash
+
+RESULT_FILE_PATH='/opt/usr/update-control-server.conf'
+
+DELTA_TYPE=""
+TTF_LAST_SUCCESS_LOG=""
+FOTA_FROM_URL_BASE=""
+USER_ID=""
+API_KEY=""
+
+function get_device_type {
+ system-info-tool --get "http://tizen.org/system/device_type" | cut -d' ' -f2 | cut -d'=' -f2 2> /dev/null
+}
+
+function get_device_model {
+ system-info-tool --get "http://tizen.org/system/model_name" | cut -d' ' -f2 | cut -d'=' -f2 2> /dev/null
+}
+
+function get_device_arch {
+ sed --quiet 's/^BUILD_ID=.*-\([^-]\+\)$/\1/p' /etc/tizen-release
+}
+
+function get_device_release_name {
+ sed --quiet 's/^TZ_BUILD_RELEASE_NAME="\(.*\)"$/\1/p' /etc/tizen-build.conf | tr '/' '_'
+}
+
+function get_device_image_version {
+ sed --quiet 's/^Release=\(.*\);$/\1/p' /etc/info.ini
+}
+
+function get_latest_success_image_version {
+ local arch=$1
+ local tizen_image_fname_regex='tizen-unified_\([0-9]\{8\}\.[0-9]\{6\}\)_tizen-headed-'${arch}'\.tar\.gz'
+
+ # ex) 20240216.120214
+ curl ${TTF_LAST_SUCCESS_LOG} -s |
+ grep -as wget |
+ sed -n "s/.*${tizen_image_fname_regex}.*/\\1/p" 2>/dev/null
+}
+
+function make_update_control_config {
+ local device_type=$(get_device_type)
+ local device_model=$(get_device_model)
+ local arch=$(get_device_arch)
+ local release_name=$(get_device_release_name)
+
+ local image_version_from=$(get_device_image_version)
+ local image_version_to=$(get_latest_success_image_version ${arch})
+
+ if [[ -z ${image_version_from} ]]; then
+ echo "Failed to get \"from\" image version."
+ return 1
+ fi
+
+ if [[ -z ${image_version_to} ]]; then
+ echo "Failed to get \"to\" image version."
+ return 1
+ fi
+
+ local delta_fname="${device_type}--${device_model}--${DELTA_TYPE}--${arch}--${image_version_from}@${image_version_to}.tar.gz"
+ local delta_url="${FOTA_FROM_URL_BASE}/${release_name}/${delta_fname}"
+
+ :> ${RESULT_FILE_PATH}
+ echo "[BART]" >> ${RESULT_FILE_PATH}
+ echo "delta_url=${delta_url}" >> ${RESULT_FILE_PATH}
+ echo "user_id=${USER_ID}" >> ${RESULT_FILE_PATH}
+ echo "api_key=${API_KEY}" >> ${RESULT_FILE_PATH}
+}
+
+if [[ $# -ne 5 ]]; then
+ echo "usage: $0 <delta type> <url to get last ttf-success log> <delta downloading server url> <user id> <api key>"
+ exit 1
+fi
+
+DELTA_TYPE=$1
+TTF_LAST_SUCCESS_LOG=$2
+FOTA_FROM_URL_BASE=$3
+USER_ID=$4
+API_KEY=$5
+
+make_update_control_config
+exit 0