self.part_table[self.user_partition]["size"] = self.user_size
self.label = Label(self.part_table, ltype)
- if not hasattr(self, 'bootcode'):
- self.bootcode = None
self.binaries = self._get_binaries('binaries')
def apply_partition_sizes(self, partition_sizes):
"binaries": "bootcode.bin", },
]
- # bootcode written to the protective MBR, aka RV64 'J 0x4400' (sector 34)
- bootcode = b'\x6f\x40\x00\x40'
-
def __init__(self, device, args):
self.user_partition = 4
self.reserved_space = 5
"binaries": "bootcode.bin", },
]
- # bootcode written to the protective MBR, aka RV64 'J 0x4400' (sector 34)
- bootcode = b'\x6f\x40\x00\x40'
-
def __init__(self, device, args):
self.reserved_space = 8
self.user_partition = 4
logging.error(f"New partition table:\n" + str(target.label))
sys.exit(1)
- if target.bootcode:
- logging.debug("Writing bootcode\n")
- with open(Device, "wb") as f:
- f.write(target.bootcode)
- f.close
-
# Run `udevadm settle` to ensure that partition change made by `sfdisk` is completely reflected in userspace.
logging.info("Waiting for the udev event queue to empty...")
argv = ['udevadm', 'settle']