Skip unnecessary mounting for A/B upgrade 74/279874/3
authorMateusz Moscicki <m.moscicki2@partner.samsung.com>
Thu, 18 Aug 2022 12:30:49 +0000 (14:30 +0200)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Mon, 22 Aug 2022 13:01:47 +0000 (13:01 +0000)
Change-Id: Ib60092ae7d822ed8a67f062cc67a50df742a880f

scripts/fota-init.sh
scripts/fus_rw-init.sh

index f91a73ee514da91fcc01fd725d09a64747b8ef1c..9eb2f6f1e92bdd5659feef0e99bb359305cd6c11 100755 (executable)
@@ -590,6 +590,13 @@ function log_boot_info() {
 #------------------------------------------------
 
 get_partition_id
+
+if [ "${P_SLOT}" != "" ]
+then
+       log "[Info] FOTA with A/B detected - skip RO update"
+       exec /sbin/fus_rw-init
+fi
+
 prepare_fakeroot
 
 if ! mount_partitions ; then
@@ -600,15 +607,6 @@ fi
 
 log_boot_info
 
-if [ "${P_SLOT}" != "" ]
-then
-       log "[Info] FOTA with A/B detected - skip RO update"
-
-       UPGRADE_SUCCESS=1
-       umount_partitions
-       exec /sbin/fus_rw-init
-fi
-
 # For debugging - It should be deleted on Release
 /sbin/agetty -l /bin/bash -n --keep-baud 115200,38400,9600 console linux &
 
index 835a0cc1ab186fd9cdceaa9da892f7d62f5ab69c..fdf6b0f526b9a6c8d700b8486d08b29966eaed1e 100755 (executable)
@@ -139,10 +139,17 @@ do_rw_update() {
        fi
        do_reboot
 }
+#------------------------------------------------
+#      prepare_fakeroot
+#------------------------------------------------
+prepare_fakeroot() {
+    mkdir -p ${FAKE_ROOT}
+}
 
 #------------------------------------------------
 #      Main Routine Start
 #------------------------------------------------
+prepare_fakeroot
 mount_partitions
 
 echo "rw update mode start ..." >> ${INT_LOG_FILE}