From: Jacek Kryszyn Date: Wed, 24 Jul 2024 05:19:11 +0000 (+0200) Subject: Handle virtual a/b X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5f6aa6ac6b268bfa7d76326f82fea869422363c0;p=platform%2Fkernel%2Fu-boot.git Handle virtual a/b This commit changes the way that super is prepared in order to handle virtual a/b partition schema. Instead of two slots there is only one and instead of rootfs_b and hal_b there are rootfs_a_cow and hal_a_cow. Change-Id: I9ed2e15df9a20a0e6b59e6f03376ad32b55120bc --- diff --git a/scripts/tizen/sd_fusing.py b/scripts/tizen/sd_fusing.py index e894e01af7..04e659f412 100755 --- a/scripts/tizen/sd_fusing.py +++ b/scripts/tizen/sd_fusing.py @@ -1180,7 +1180,7 @@ def do_fuse_file(f, name, target): # be part of some class def do_fuse_image_super(tmpd, target): - metadata_slots = 2 + metadata_slots = 1 metadata_size = 65536 header_size = 1024 * 1024 # default alignment used in lpmake super_size = 0 @@ -1194,7 +1194,7 @@ def do_fuse_image_super(tmpd, target): logging.error(f"No information found about super partition, cannot create image") sys.exit(1) - group_size = int((super_size - header_size) / 2); + group_size = int((super_size - header_size)); hal_path = os.path.join(tmpd, 'hal.img') rootfs_path = os.path.join(tmpd, 'rootfs.img') super_path = os.path.join(tmpd, 'super.img') @@ -1216,16 +1216,13 @@ def do_fuse_image_super(tmpd, target): f"--device-size={super_size}", f"--metadata-size={metadata_size}", f"--metadata-slots={metadata_slots}", - "-g", f"tizen_a:{group_size}", - "-p", f"rootfs_a:none:{rootfs_size}:tizen_a", - "-p", f"hal_a:none:{hal_size}:tizen_a", - "-g", f"tizen_b:{group_size}", - "-p", f"rootfs_b:none:{rootfs_size}:tizen_b", - "-p", f"hal_b:none:{hal_size}:tizen_b", + "-g", f"tizen:{group_size}", + "-p", f"rootfs_a:none:{rootfs_size}:tizen", + "-p", f"rootfs_a_cow:none:{rootfs_size}:tizen", + "-p", f"hal_a:none:{hal_size}:tizen", + "-p", f"hal_a_cow:none:{hal_size}:tizen", "-i", f"rootfs_a={rootfs_path}", - "-i", f"rootfs_b={rootfs_path}", - "-i", f"hal_a={hal_path}", - "-i", f"hal_b={hal_path}"] + "-i", f"hal_a={hal_path}"] logging.debug(" ".join(argv)) proc = subprocess.run(argv, stdin=subprocess.DEVNULL,