Running it
Everything goes through the top-level GNUmakefile. If you have the tree, you never need
to type a QEMU command by hand.
From the source tree
Section titled “From the source tree”make all # userspace, kernel, then a bootable ISOmake run # QEMU: q35, UEFI, KVM, 4 coresmake run opens a local window, so it needs an X or Wayland session. Over SSH, use
the headless path instead.
The run targets attach sata-disk.img, a persistent 5G EFS disk, and the kernel
prefers it over the live root carried inside the ISO, which is what you want while
developing, since files survive a reboot. The ISO alone boots too; see
Downloads for the plain QEMU invocation and
On real hardware for installing to a disk.
The run targets
Section titled “The run targets”| Target | What it does |
|---|---|
make run |
q35 + UEFI + KVM, 4 cores, virtio-gpu, e1000e, xHCI, Intel HDA |
make run-single |
the same, on one core |
make run-big |
the same, on sixteen |
make run-gdb |
TCG, one core, paused with a gdbserver on :1234 |
make gdb |
attach rust-gdb with the project’s .gdbinit |
make run-capture |
dump network traffic to /tmp/edos.pcap |
make run-storage |
attach a USB mass-storage disk |
make run-headless |
no local display: VNC for you, QMP for scripts |
make test |
boot with --features sched-test and exit through isa-debug-exit |
What you get
Section titled “What you get”The kernel mounts the root filesystem, then spawns bin/edos-init, which starts the
window manager, the taskbar and a terminal. From the shell:
/ $ uname -aEDOS 0.1.0 x86_64/ $ free total(KiB) used(KiB) free(KiB)Mem: 2067888 133724 1934164Frames: 516972 33431 483541Page size: 4096 Bls /bin lists everything available. ping, dns and wget work against the real
internet through QEMU’s user networking.
Without a display
Section titled “Without a display”scripts/edos-vm boots the same ISO headless and exposes two channels: VNC for a human,
and QMP for scripts.
make run-headless # prints the VNC display and the QMP socketscripts/edos-vm shot desktop.png # PNG of the guest framebufferscripts/edos-vm click 400 300 # focus a window before typing into itscripts/edos-vm type 'ls /bin' --enterscripts/edos-vm log -n 40 # tail the guest serial logscripts/edos-vm stopTo watch it, forward the VNC port and point a viewer at localhost:5901:
ssh -L 5901:127.0.0.1:5901 <host>Three properties of the guest will otherwise waste your time: the keyboard layout, the relative-only mouse, and click-to-focus. Driving the VM covers all three.
When it does not boot
Section titled “When it does not boot”The serial console is written to run_log.txt in the repository root, truncated on every
start, so the file always describes the current run. That is the first place to look.
Resolve an address from a panic with:
addr2line -e kernel/target/x86_64-unknown-none/debug/edos-kernel -f 0xffffffff8009c422