Mount hal partition during RW-Upgrade 42/278742/1 accepted/tizen/unified/20220726.012304 submit/tizen/20220725.143901
authorMateusz Moscicki <m.moscicki2@partner.samsung.com>
Mon, 25 Jul 2022 13:40:06 +0000 (15:40 +0200)
committerMateusz Moscicki <m.moscicki2@partner.samsung.com>
Mon, 25 Jul 2022 14:40:47 +0000 (16:40 +0200)
Not mounting hal partition results in not mounting inform partition, and
this makes it impossible to change the reboot parameter.

Change-Id: Ia72423392606a9986f55045e7cfb4c4adbfcbb4a

scripts/fus_rw-init.sh

index f9cbb78d9007c5dff823d5dbca4498ee743ace68..4699abea93585396539356c55cd478cbefa1f8f2 100755 (executable)
@@ -4,6 +4,7 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
 WITH_USR_PART=
 
 FAKE_ROOT=/run/upgrade-sysroot
+HAL_MNT=hal
 
 SYNC="/bin/sync"
 REBOOT="/sbin/reboot"
@@ -81,6 +82,19 @@ mount_rootfs()
        "$MOUNT" -o ro "${PART_ROOTFS}" "${FAKE_ROOT}"
 }
 
+
+#------------------------------------------------
+#       mount_hal
+#------------------------------------------------
+mount_hal() {
+    if [ "z${PART_HAL}" = "z" ]; then
+        # No hal partition
+        return
+    fi
+
+    "$MOUNT" -o ro "${PART_HAL}" "${FAKE_ROOT}/${HAL_MNT}"
+}
+
 #------------------------------------------------
 #       mount_partitions
 #------------------------------------------------
@@ -88,6 +102,7 @@ mount_partitions() {
     get_partition_id
 
     mount_rootfs
+    mount_hal
     "$MOUNT" -t proc none ${FAKE_ROOT}/proc
     "$MOUNT" -t sysfs none ${FAKE_ROOT}/sys
     "$MOUNT" -t devtmpfs devtmpfs ${FAKE_ROOT}/dev