summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacek Kryszyn <j.kryszyn@samsung.com>2024-04-04 15:17:27 +0200
committerMarek Szyprowski <m.szyprowski@samsung.com>2024-04-10 12:01:15 +0200
commite30e4d5b641bfaef414aa5507ef4a37f21f29a74 (patch)
treeed7095846fd6d59dc677d2682d544acea339f8e3
parent0d426dc59035d9082bf3fbcfcf454d1afbb8bd08 (diff)
downloadu-boot-e30e4d5b641bfaef414aa5507ef4a37f21f29a74.tar.gz
u-boot-e30e4d5b641bfaef414aa5507ef4a37f21f29a74.tar.bz2
u-boot-e30e4d5b641bfaef414aa5507ef4a37f21f29a74.zip
tizen: sd_fusing.py: rpi4s: getting rid of unnecessary alignments
In case of rpi4s target (Tizen with dynamic partitions on rpi4) do not perform unnecessary calculations of aligned size of partitions. Change-Id: Ieea75f133d35d29f72a5b2336181b200809e5f14 Signed-off-by: Jacek Kryszyn <j.kryszyn@samsung.com>
-rwxr-xr-xscripts/tizen/sd_fusing.py20
1 files changed, 7 insertions, 13 deletions
diff --git a/scripts/tizen/sd_fusing.py b/scripts/tizen/sd_fusing.py
index bc3de3c48c..a158f75811 100755
--- a/scripts/tizen/sd_fusing.py
+++ b/scripts/tizen/sd_fusing.py
@@ -254,7 +254,7 @@ class Rpi4Super(InitParams, SdFusingTargetAB):
{"size": 64, "fstype": "vfat", "name": "boot_a","start": 4,
"ptype": "C12A7328-F81F-11D2-BA4B-00A0C93EC93B",
"binaries": "boot.img"},
- {"size": 6656, "fstype": "ext4", "name": "super",
+ {"size": 6657, "fstype": "ext4", "name": "super",
"binaries": "super.img"},
{"size": 1344, "fstype": "ext4", "name": "system-data",
"binaries": "system-data.img"},
@@ -880,13 +880,9 @@ def do_fuse_file(f, name, target):
#TODO: functions with the target argument should probably
# be part of some class
-def get_aligned_size(size, target):
- return target.super_alignment*int(1+(size-1)/target.super_alignment)
-
def do_fuse_image_super(tmpd, target):
metadata_slots = 2
metadata_size = 65536
- metadata_aligned_size = get_aligned_size(metadata_size, target)
hal_path = os.path.join(tmpd, 'hal.img')
rootfs_path = os.path.join(tmpd, 'rootfs.img')
@@ -900,10 +896,8 @@ def do_fuse_image_super(tmpd, target):
logging.warning(f"{fn} is missing, skipping super partition image")
return
- hal_aligned_size = get_aligned_size(hal_size, target)
- rootfs_aligned_size = get_aligned_size(rootfs_size, target)
- group_size = hal_aligned_size + rootfs_aligned_size
- super_size = metadata_aligned_size + 2 * group_size
+ group_size = 2 * hal_size + rootfs_size
+ super_size = metadata_size + 2 * group_size
argv = ["lpmake", "-F",
f"-o={super_path}",
@@ -911,11 +905,11 @@ def do_fuse_image_super(tmpd, target):
f"--metadata-size={metadata_size}",
f"--metadata-slots={metadata_slots}",
"-g", f"tizen_a:{group_size}",
- "-p", f"rootfs_a:none:{rootfs_aligned_size}:tizen_a",
- "-p", f"hal_a:none:{hal_aligned_size}:tizen_a",
+ "-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_aligned_size}:tizen_b",
- "-p", f"hal_b:none:{hal_aligned_size}:tizen_b",
+ "-p", f"rootfs_b:none:{rootfs_size}:tizen_b",
+ "-p", f"hal_b:none:{hal_size}:tizen_b",
"-i", f"rootfs_a={rootfs_path}",
"-i", f"rootfs_b={rootfs_path}",
"-i", f"hal_a={hal_path}",