{"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"},
#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')
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}",
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}",