在 QEMU 中加载 Linux bzImage?

Cod*_*404 15 linux boot x86 qemu linux-kernel

make menuconfig当时编译了一个 Linux make,现在我编译了最新版本的 Linux。如何将内核加载到 QEMU 中?

Ren*_*nan 17

来自 qemu 的帮助:

Linux/Multiboot boot specific:
-kernel bzImage use 'bzImage' as kernel image
-append cmdline use 'cmdline' as kernel command line
-initrd file    use 'file' as initial ram disk
-dtb    file    use 'file' as device tree image
Run Code Online (Sandbox Code Playgroud)

此处使用 Arch 的内核/initrd ( qemu -kernel /boot/vmlinuz-linux -initrd /boot/initramfs-linux.img)进行了快速测试(由于我没有提供根设备,因此将我放入了恢复 shell)。