Debug linux kernel in QEMU

QEMU There are two modes in QEMU: user mode: execute simple application code in different architecutre. qemu-xxx system mode: need a kernel img file including the whole os system. qemu-system-xxx User mode Compile a 32-bits i386 program:gcc -m32 hello.c -o hello run in qemu by user mode: qemu-i386 ./hello System mode In system mode we need to provide kernel, rootfs and other arguments to qemu. qemu-system-x86_64 -kernel xxx -initrd xxx -append xxx...

2024-08-28 · 2 min