#!/bin/bash
# Boot the HDGL universal node. Substrate is the core (PID 1); Linux emerges as
# Π_posix(Ω) on top. Works on any host with qemu-system-x86_64 (no KVM required).
KERNEL="${1:-/boot/vmlinuz-$(uname -r)}"
IMG="${2:-hdgl_universal.img}"
exec qemu-system-x86_64 -M pc -cpu qemu64 -m 1024 -no-reboot -nographic \
  -kernel "$KERNEL" \
  -drive file="$IMG",format=raw,if=ide \
  -append "root=/dev/sda rootfstype=ext4 rw init=/init console=ttyS0 loglevel=3"
