3 Running
uosfz edited this page 2025-02-21 16:21:39 +01:00

Running KarlOS

In an emulator

It should suffice to simply call the run-qemu.sh script after building.

Debugging

One-Time Setup

  • create a ~/.gdbinit file in your home directory
  • add the line add-auto-load-safe-path <path-to-karlos>/.gdbinit

Starting gdb

  • run the debug-run-qemu.sh script.
  • in another window, run gdb without arguments.
  • there is a .gdbinit script in the main karlos directory which automatically loads the kernel, connects to qemu, sets a breakpoint at _start and begins execution.

On real hardware

Build the kernel, and flash the resulting build/disk.img onto a bootable device such as a USB stick.