tizen: sd_fusing.py: add support for VisionFive2 with Super partition 08/309508/1
authorMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 11 Apr 2024 12:40:39 +0000 (14:40 +0200)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 11 Apr 2024 12:55:19 +0000 (14:55 +0200)
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Id5a23a2edd5af357d1febd756793f4aa96ca0d5b

scripts/tizen/sd_fusing.py

index 38c3019..e9f2caf 100755 (executable)
@@ -511,6 +511,60 @@ class VF2(InitParams, SdFusingTargetAB):
         self.apply_partition_sizes(args.partition_sizes)
         super().__init__(device, 'gpt')
 
+class VF2Super(InitParams, SdFusingTargetAB):
+    long_name = "VisionFive2 w/ super partition"
+    part_table = [
+        {"size": 2,    "fstype": "raw",  "name": "SPL", "start": 4,
+         "ptype": "2E54B353-1271-4842-806F-E436D6AF6985",
+         "binaries": ["u-boot-spl.bin.normal.out"],},
+        {"size": 4,    "fstype": "raw",  "name": "u-boot",
+         "ptype": "5B193300-FC78-40CD-8002-E86C45580B47",
+         "binaries": ["u-boot.img", "u-boot.itb"],},
+        {"size": 128,  "fstype": "vfat", "name": "boot_a",
+         "ptype": "C12A7328-F81F-11D2-BA4B-00A0C93EC93B",
+         "binaries": "boot.img"},
+        {"size": 6656, "fstype": "ext4", "name": "super",
+         "binaries": "super.img"},
+        {"size": 1344, "fstype": "ext4", "name": "system-data",
+         "binaries": "system-data.img"},
+        {"size": None, "fstype": "ext4", "name": "user",
+         "binaries": "user.img"},
+        {"size": 32,   "fstype": "ext4", "name": "module_a",
+         "binaries": "modules.img"},
+        {"size": 32,   "fstype": "ext4", "name": "ramdisk_a",
+         "binaries": "ramdisk.img"},
+        {"size": 32,   "fstype": "ext4", "name": "ramdisk-recovery_a",
+         "binaries": "ramdisk-recovery.img"},
+        {"size": 8,    "fstype": "ext4", "name": "inform"},
+        {"size": 128,  "fstype": "vfat", "name": "boot_b",
+         "ptype": "C12A7328-F81F-11D2-BA4B-00A0C93EC93B",
+         "binaries_b": "boot.img"},
+        {"size": 32,   "fstype": "ext4", "name": "module_b",
+         "binaries_b": "modules.img"},
+        {"size": 32,   "fstype": "ext4", "name": "ramdisk_b",
+         "binaries_b": "ramdisk.img"},
+        {"size": 32,   "fstype": "ext4", "name": "ramdisk-recovery_b",
+         "binaries_b": "ramdisk-recovery.img"},
+        {"size": 4,    "fstype": "raw",  "name": "reserved0"},
+        {"size": 64,   "fstype": "raw",  "name": "reserved1"},
+        {"size": 125,  "fstype": "raw",  "name": "reserved2"},
+    ]
+    params = (('reboot-param.bin', 'norm'),
+              ('reboot-param.info', 'norm'),
+              ('partition-ab.info', 'a'),
+              ('partition-ab-cloned.info', '1'),
+              ('upgrade-status.info', '0'),
+              ('partition-a-status.info', 'ok'),
+              ('partition-b-status.info', 'ok'))
+
+    def __init__(self, device, args):
+        self.user_partition = 5
+        self.reserved_space = 5
+        self.update = args.update
+        super().__init__(device, 'gpt')
+        self.with_super = True
+        self.super_alignment = 1048576
+
 class LicheePi4A(InitParams, SdFusingTargetAB):
     long_name = "LicheePi4A"
     part_table = [
@@ -669,6 +723,7 @@ TARGETS = {
     'rpi4s': Rpi4Super,
     'rpi4aot': Rpi4AoT,
     'vf2': VF2,
+    'vf2s': VF2Super,
     'rv64': RV64,
     'lpi4a': LicheePi4A,
     'lpi4as': LicheePi4ASuper,