Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/aienux/spark/mk_qemu_disk.py # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / aienux / spark / mk_qemu_disk.py` 87 lines · 4001 bytes Raw Blame History 1 #!/usr/bin/env python3 2 # SPDX-License-Identifier: Apache-2.0 3 # aienux/spark/mk_qemu_disk.py OUT_IMG WORKDIR: 4 # Builds the synthetic NVMe disk for the QEMU spark_main e2e gate step (gate-only test data): 5 # protective MBR + GPT (UEFI 2.10 §5.3, header + entry-array CRC32, backup header at last LBA) 6 # with one Linux-filesystem partition (0FC63DAF-8483-4772-8E79-3D69D8477DE4) holding a 4K-block 7 # ext4 (mke2fs -d) that contains /aienos/spark-bundle.img: an OMFWBND1 v1 bundle with kinds 1..6 8 # (pseudo-random payloads, real SHA-256 per entry). No NVIDIA firmware bytes are used. 9 import hashlib, os, struct, subprocess, sys, uuid, zlib, random, shutil 10 11 out, work = sys.argv[1], sys.argv[2] 12 SEC = 512 13 TOTAL = 131072 # 64 MiB disk 14 P_FIRST, P_SECS = 2048, 65536 # 32 MiB partition 15 P_LAST = P_FIRST + P_SECS - 1 16 17 def bundle(): 18 rng = random.Random(0x5BA4C) 19 # kind -> size: gsp.bin, bl.img, fmc.img, fmc.hash, fmc.pubkey, fmc.sig 20 ents = [(1, 65536), (2, 212992), (3, 212296), (4, 48), (5, 384), (6, 384)] 21 off = 4096 22 toc = bytearray(4096) 23 toc[0:8] = b"OMFWBND1" 24 struct.pack_into("