Kernel Debugging with QEMU: Difference between revisions
imported>Mic92 generalize make command |
imported>Mic92 fix qemu image example |
||
| Line 46: | Line 46: | ||
<syntaxhighlight lang="console"> | <syntaxhighlight lang="console"> | ||
$ nix-shell -p debootstrap qemu | $ nix-shell -p debootstrap qemu | ||
$ qemu-img create qemu-image.img | $ qemu-img create qemu-image.img 5G | ||
$ mkfs.ext2 qemu-image.img | $ mkfs.ext2 qemu-image.img | ||
$ mkdir mount-point.dir | $ mkdir mount-point.dir | ||
| Line 63: | Line 63: | ||
$ qemu-system-x86_64 -s -S \ | $ qemu-system-x86_64 -s -S \ | ||
-kernel arch/x86/boot/bzImage \ | -kernel arch/x86/boot/bzImage \ | ||
-hda qemu- | -hda qemu-image.img \ | ||
-append "root=/dev/sda console=ttyS0 nokaslr" \ | -append "root=/dev/sda console=ttyS0 nokaslr" \ | ||
-enable-kvm \ | -enable-kvm \ | ||