scripts: sd_fusing: Add support for Amlogic Meson based Odroid C4 board
authorMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 14 Aug 2024 07:49:28 +0000 (09:49 +0200)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 28 Oct 2024 11:28:47 +0000 (20:28 +0900)
This allows to easily fuse Tizen to SD card or eMMC module in SD card
adapter.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ifea9a29ca23dafab7b9745efb71c7202fa025170

scripts/tizen/sd_fusing.py

index 917e381a8bd587588d79c1bb8db0ba5b939aff3f..e894e01af7faceb018cabf3bd97bf9647aea0270 100755 (executable)
@@ -15,7 +15,7 @@ import sys
 import tarfile
 import tempfile
 
-__version__ = "1.1.10"
+__version__ = "1.1.11"
 
 Format = False
 Device = ""
@@ -298,6 +298,40 @@ class Rpi3(InitParams, SdFusingTarget):
         self.user_partition = 4
         super().__init__(device, "dos")
 
+class OdroidC4(InitParams, SdFusingTarget):
+    long_name = "Odroid C4"
+    part_table = [
+        {"size": 128,   "name": "boot", "start": 4, "ptype": "0xe", "bootable": True,
+         "binaries":   "boot.img"},
+        {"size": 3072, "name": "rootfs",
+         "binaries":   "rootfs.img"},
+        {"size": 1344, "name": "system-data",
+         "binaries":   "system-data.img"},
+        {"size": None, "ptype":  "5",    "name": "extended", "start": 4548},
+        {"size": None, "name": "user",
+         "binaries":   "user.img"},
+        {"size": 100,   "name": "modules",
+         "binaries":   "modules.img"},
+        {"size": 32,   "name": "ramdisk",
+         "binaries":   "ramdisk.img"},
+        {"size": 32,   "name": "ramdisk-recovery",
+         "binaries":   "ramdisk-recovery.img"},
+        {"size": 8,    "name": "inform", "fstype": "ext4"},
+        {"size": 64,   "name": "hal",
+         "binaries":   "hal.img"},
+        {"size": 128,  "name": "reserved2"},
+    ]
+    raw_binary_table = [
+        {"name":       "bootloader",
+         "start_sector": 1,
+         "binaries":   "u-boot-c4.bin", },
+    ]
+
+    def __init__(self, device, args):
+        self.reserved_space = 12
+        self.user_partition = 4
+        super().__init__(device, "dos")
+
 class Rpi4Super(InitParams, SdFusingTargetAB):
     long_name = "Raspberry Pi 4 w/ super partition"
     part_table = [
@@ -785,6 +819,7 @@ class X86emu64(X86emu):
 
 TARGETS = {
     'rpi3': Rpi3,
+    'odroidc4': OdroidC4,
     'rpi4': Rpi4,
     'rpi4s': Rpi4Super,
     'rpi4aot': Rpi4AoT,