From: Jacek Kryszyn Date: Wed, 22 May 2024 08:02:42 +0000 (+0200) Subject: Dynamic partitions: change size of a slot X-Git-Tag: accepted/tizen/unified/20240603.161029~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fd75c9b88ee8d6cf62b2b9db80e1eaba2050759c;p=platform%2Fkernel%2Fu-boot.git Dynamic partitions: change size of a slot Slot size was incorrect due to missing brackets. Now it is equal to double size of hal and rootfs. Some additional code is added to take into account metadata size and alignment of super. Change-Id: I7f163d7e4a74b3f5e7a1a2f207ebece9581b4876 Signed-off-by: Jacek Kryszyn --- diff --git a/scripts/tizen/sd_fusing.py b/scripts/tizen/sd_fusing.py index 0d2bd228ba..7624f69097 100755 --- a/scripts/tizen/sd_fusing.py +++ b/scripts/tizen/sd_fusing.py @@ -1035,8 +1035,19 @@ def do_fuse_image_super(tmpd, target): logging.warning(f"{fn} is missing, skipping super partition image") return - group_size = 2 * hal_size + rootfs_size - super_size = metadata_size + 2 * group_size + group_size = 2 * (hal_size + rootfs_size) + super_size = 2 * group_size + + # calculate additional space needed for metadata. + # There are 2 metadata slots having 65536 B each. 131072 B in total + additional_space = (metadata_slots * metadata_size) / target.super_alignment + + if additional_space > 1: + # if metadata takes more than super alignment, add 1 MiB to super + super_size += 1024*1024 + else: + # if metadata takes less than super alignment, add alignment size to super + super_size += target.super_alignment argv = ["lpmake", "-F", f"-o={super_path}",