From: Marek Szyprowski Date: Fri, 11 Oct 2024 07:32:04 +0000 (+0200) Subject: tizen: sd_fusing.py: add support for all 4 variants of Amlogic targets X-Git-Tag: accepted/tizen/unified/20241101.174134~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4647ce610babfb6b32c5ec4f2b92ee507cf5c01;p=platform%2Fkernel%2Fu-boot.git tizen: sd_fusing.py: add support for all 4 variants of Amlogic targets Signed-off-by: Marek Szyprowski Change-Id: I6fa7b3f5acc1c0b0e243b2f2c25625b6d7fdb670 --- diff --git a/scripts/tizen/sd_fusing.py b/scripts/tizen/sd_fusing.py index 82c1684f77..d4a521d4a0 100755 --- a/scripts/tizen/sd_fusing.py +++ b/scripts/tizen/sd_fusing.py @@ -303,8 +303,7 @@ class Rpi3(InitParams, SdFusingTarget): self.reserved_space = 12 super().__init__(device, "dos") -class OdroidC4(InitParams, SdFusingTarget): - long_name = "Odroid C4" +class AmlogicMBR(InitParams, SdFusingTarget): part_table = [ {"size": 128, "name": "boot", "start": 4, "ptype": "0xe", "bootable": True, "binaries": "boot.img"}, @@ -328,14 +327,45 @@ class OdroidC4(InitParams, SdFusingTarget): ] raw_binary_table = [ {"name": "bootloader", - "start_sector": 1, - "binaries": "u-boot-c4.bin", }, + "start_sector": 1}, ] def __init__(self, device, args): self.reserved_space = 12 + for entry in self.raw_binary_table: + if entry['name'] == 'bootloader': + entry['binaries'] = args._bootloader_name + break super().__init__(device, "dos") +class OdroidC4(AmlogicMBR): + long_name = "Odroid C4" + + def __init__(self, device, args): + setattr(args, "_bootloader_name", "u-boot-c4.bin") + super().__init__(device, args) + +class OdroidN2(AmlogicMBR): + long_name = "Odroid N2" + + def __init__(self, device, args): + setattr(args, "_bootloader_name", "u-boot-n2.bin") + super().__init__(device, args) + +class KhadasVim3(AmlogicMBR): + long_name = "Khadas VIM3" + + def __init__(self, device, args): + setattr(args, "_bootloader_name", "u-boot-vim3.bin") + super().__init__(device, args) + +class KhadasVim3L(AmlogicMBR): + long_name = "Khadas VIM3L" + + def __init__(self, device, args): + setattr(args, "_bootloader_name", "u-boot-vim3l.bin") + super().__init__(device, args) + class Rpi4Super(InitParams, SdFusingTargetAB): long_name = "Raspberry Pi 4 w/ super partition" part_table = [ @@ -891,6 +921,9 @@ class X86emu64(X86emu): TARGETS = { 'rpi3': Rpi3, 'odroidc4': OdroidC4, + 'odroidn2': OdroidN2, + 'kvim3': KhadasVim3, + 'kvim3l': KhadasVim3L, 'rpi4': Rpi4, 'rpi4s': Rpi4Super, 'rpi4aot': Rpi4AoT,