From 460e432e95c4ef4a70ad249c182c5ff060825431 Mon Sep 17 00:00:00 2001 From: Jacek Kryszyn Date: Thu, 12 Sep 2024 07:29:42 +0200 Subject: [PATCH] scripts: sd_fusing: add QEMU RISC-V A/B and super targets Add QEMU RISC-V targets: - A/B - Super (Dynamic Partitions) Which allow to test upgrade related features in QEMU. Change-Id: I6d71254f1a881f7c89c511933c9ae856229ec625 Signed-off-by: Jacek Kryszyn --- scripts/tizen/sd_fusing.py | 87 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/scripts/tizen/sd_fusing.py b/scripts/tizen/sd_fusing.py index 614a12e993..d4995a9b27 100755 --- a/scripts/tizen/sd_fusing.py +++ b/scripts/tizen/sd_fusing.py @@ -505,6 +505,91 @@ class RV64(InitParams, SdFusingTarget): self.apply_partition_sizes(args.partition_sizes) super().__init__(device, 'gpt') +class RV64AB(InitParams, SdFusingTargetAB): + long_name = "QEMU RISC-V 64-bit with A/B" + part_table = [ + {"size": 292, "name": "boot_a", "start": 4, + "ptype": "C12A7328-F81F-11D2-BA4B-00A0C93EC93B", + "binaries": "boot.img"}, + {"size": 3072, "name": "rootfs_a", + "binaries": "rootfs.img"}, + {"size": 1344, "name": "system-data", + "binaries": "system-data.img"}, + {"size": None, "name": "user", + "binaries": "user.img"}, + {"size": 32, "name": "module_a", + "binaries": "modules.img"}, + {"size": 32, "name": "ramdisk_a", + "binaries": "ramdisk.img"}, + {"size": 32, "name": "ramdisk-recovery_a", + "binaries": "ramdisk-recovery.img"}, + {"size": 8, "name": "inform", "fstype": "ext4"}, + {"size": 256, "name": "hal_a", + "binaries": "hal.img"}, + {"size": 292, "name": "boot_b", + "ptype": "C12A7328-F81F-11D2-BA4B-00A0C93EC93B", + "binaries_b": "boot.img"}, + {"size": 3072, "name": "rootfs_b", + "binaries_b": "rootfs.img"}, + {"size": 32, "name": "module_b", + "binaries_b": "modules.img"}, + {"size": 32, "name": "ramdisk_b", + "binaries_b": "ramdisk.img"}, + {"size": 32, "name": "ramdisk-recovery_b", + "binaries_b": "ramdisk-recovery.img"}, + {"size": 256, "name": "hal_b", + "binaries_b": "hal.img"}, + {"size": 4, "name": "reserved0"}, + {"size": 64, "name": "reserved1"}, + {"size": 125, "name": "reserved2"}, + ] + + def __init__(self, device, args): + self.reserved_space = 5 + self.update = args.update + self.apply_partition_sizes(args.partition_sizes) + super().__init__(device, 'gpt') + +class RV64Super(InitParams, SdFusingTargetAB): + long_name = "QEMU RISC-V 64-bit with super" + part_table = [ + {"size": 292, "name": "boot_a", "start": 4, + "ptype": "C12A7328-F81F-11D2-BA4B-00A0C93EC93B", + "binaries": "boot.img"}, + {"size": 6656, "name": "super", + "binaries": "super.img"}, + {"size": 1344, "name": "system-data", + "binaries": "system-data.img"}, + {"size": None, "name": "user", + "binaries": "user.img"}, + {"size": 32, "name": "module_a", + "binaries": "modules.img"}, + {"size": 32, "name": "ramdisk_a", + "binaries": "ramdisk.img"}, + {"size": 32, "name": "ramdisk-recovery_a", + "binaries": "ramdisk-recovery.img"}, + {"size": 8, "name": "inform", "fstype": "ext4"}, + {"size": 292, "name": "boot_b", + "ptype": "C12A7328-F81F-11D2-BA4B-00A0C93EC93B", + "binaries_b": "boot.img"}, + {"size": 32, "name": "module_b", + "binaries_b": "modules.img"}, + {"size": 32, "name": "ramdisk_b", + "binaries_b": "ramdisk.img"}, + {"size": 32, "name": "ramdisk-recovery_b", + "binaries_b": "ramdisk-recovery.img"}, + {"size": 4, "name": "reserved0"}, + {"size": 64, "name": "reserved1"}, + {"size": 125, "name": "reserved2"}, + ] + + def __init__(self, device, args): + self.reserved_space = 5 + self.update = args.update + self.apply_partition_sizes(args.partition_sizes) + super().__init__(device, 'gpt') + self.with_super = True + class VF2(InitParams, SdFusingTargetAB): long_name = "VisionFive2" part_table = [ @@ -814,6 +899,8 @@ TARGETS = { 'vf2': VF2, 'vf2s': VF2Super, 'rv64': RV64, + 'rv64ab': RV64AB, + 'rv64s': RV64Super, 'lpi4a': LicheePi4A, 'lpi4as': LicheePi4ASuper, 'bpif3': BpiF3, -- 2.34.1