Handle virtual a/b sandbox/jkryszyn/virtual-ab
authorJacek Kryszyn <j.kryszyn@samsung.com>
Wed, 28 Aug 2024 19:37:00 +0000 (21:37 +0200)
committerJacek Kryszyn <j.kryszyn@samsung.com>
Thu, 29 Aug 2024 04:42:44 +0000 (06:42 +0200)
This commit adds support for virtual a/b. It is assumed
that super contains only one set of partitions instead
of two slots. A dm-snapshot is created during upgrade
which will be treated as a next partition and changes
will be applied to it. After booting to fota and
successful rw update the snapshot will be merged to
an origin partition.

Change-Id: If0a1f550008b86780a92c9ddbd26f6ee02fdc44c

src/initrd-recovery/init

index 196e488a11e6a62d3cd5508257989f8b3f351cbe..52b544b42490f7f134f4acc3f77cfefcc0c9bfba 100755 (executable)
@@ -96,12 +96,12 @@ get_partition_id() {
         PARSE_DYNPARTS=`/usr/sbin/parse-dynparts "$SUPERFS" --list-tables`
 
         while read -r part_name part_table; do
-            if [ "$part_name" = "rootfs${P_SUFFIX}" ]
+            if [ "$part_name" = "rootfs_a" ]
             then
                 PART_ROOTFS=`map_from_super "$part_name" "$part_table"`
             fi
 
-            if [ "$part_name" = "hal${P_SUFFIX}" ]
+            if [ "$part_name" = "hal_a" ]
             then
                 PART_HAL=`map_from_super "$part_name" "$part_table"`
             fi