class VF2(RV64):
long_name = "VisionFive2"
+class X86emu(SdFusingTarget):
+ part_table = [
+ {"size": 512, "fstype": "vfat", "name": "EFI", "start": 4,
+ "ptype": "C12A7328-F81F-11D2-BA4B-00A0C93EC93B",
+ "binaries": ""},
+ {"size": 512, "fstype": "ext2", "name": "boot",
+ "binaries": "emulator-boot.img",},
+ {"size": 2048, "fstype": "ext4", "name": "rootfs",
+ "binaries": "emulator-rootfs.img"},
+ {"size": 1344, "fstype": "ext4", "name": "system-data",
+ "binaries": "emulator-sysdata.img"},
+ {"size": 1024, "fstype": "swap", "name": "emulator-swap",
+ "ptype": "0657FD6D-A4AB-43C4-84E5-0933C84B4F4F"},
+ ]
+
+ def __init__(self, device, args):
+ super().__init__(device, 'gpt')
+ for p in self.label.part_table:
+ if p.name == "rootfs":
+ p.ptype = args._rootfs_uuid
+ break
+
+class X86emu32(X86emu):
+ long_name = "QEMU x86 32-bit"
+
+ def __init__(self, device, args):
+ setattr(args, "_rootfs_uuid", "44479540-F297-41B2-9AF7-D131D5F0458A")
+ super().__init__(device, args)
+
+class X86emu64(X86emu):
+ long_name = "QEMU x86 64-bit"
+
+ def __init__(self, device, args):
+ setattr(args, "_rootfs_uuid", "44479540-F297-41B2-9AF7-D131D5F0458A")
+ super().__init__(device, args)
+
TARGETS = {
'rpi3': Rpi3,
'rpi4': Rpi4,
'rpi4s': Rpi4Super,
'vf2': VF2,
- 'rv64': RV64
+ 'rv64': RV64,
+ 'x86emu32': X86emu32,
+ 'x86emu64': X86emu64,
}
def device_size(device):