#!/usr/bin/env python3 # SPDX-License-Identifier: MPL-2.0 """Read and validate both GPT copies on the inventoried 64 GB Sargo; no writes.""" import base64,json,struct,zlib from pathlib import Path def read_gpt(): result={} with open('/dev/mmcblk0','rb',buffering=0) as disk: for name,lba in [('primary',1),('secondary',122142719)]: disk.seek(lba*512);h=disk.read(512) assert h[:8]==b'EFI PART' length,crc=struct.unpack_from('