Build native QEMU from the third_party/qemu submodule

Native and wasm now share one source tree, so the xteink machine and SD
fixes never diverge. scripts/build-qemu.sh configures a dedicated
build-native/ dir (ucontext coroutine backend; the fork defaults to the
wasm fiber backend) that never clobbers the Emscripten build/ config.
Retires the separate _scratch/qemu-src patch-based native build.
This commit is contained in:
2026-07-21 08:34:57 -04:00
parent b22934fe0d
commit b959776068
3 changed files with 30 additions and 35 deletions
+5 -4
View File
@@ -3,10 +3,11 @@
FIRMWARE_REPO ?= ../crosspoint-reader
FIRMWARE_DIR ?= $(FIRMWARE_REPO)/.pio/build/default
SD_SRC ?= $(FIRMWARE_REPO)/sdcard
QEMU_SRC ?= _scratch/qemu-src
QEMU_BIN = $(QEMU_SRC)/build/qemu-system-riscv32
# QEMU source for the wasm build is the third_party/qemu submodule. Edit it in
# place; `make web` recompiles only what changed, no patch round-trip.
# Native and wasm builds share the third_party/qemu submodule; edit it in place
# and both recompile incrementally. Native output lives in build-native so it
# never clobbers the Emscripten build/ config.
QEMU_SRC ?= third_party/qemu
QEMU_BIN = $(QEMU_SRC)/build-native/qemu-system-riscv32
QEMU_WASM_SRC ?= third_party/qemu
WASM_OUT ?= dist/wasm
VARIANT ?= x3