Issue
I just installed qemu-system-aarch64 but can't figureout how to start it with a kernel image. I have a kernel image vmlinux for a arm64 machine(arm's n1 sdp) and I know it will not work out but I just want to try running it on a arm64 virtual machine(The document on the options is too long). I tried
qemu-system-aarch64 -machine virt -serial stdio -m 1G -kernel ../linux/out/n1sdp/vmlinux
but it gives me no response(just ends with no message). How should I run it?
Solution
In principle, the answer is "use the -kernel option", but that doesn't mean that QEMU can magically run anything you pass to that option.
You've tried to run a kernel built for one machine on a QEMU that's emulating a different one. In general this won't work, unless the kernel was compiled with enough support for this (it is more common for an aarch64 to be "generic" than for 32-bit Arm, but if your kernel is for a specific machine rather than being a distro installation kernel it probably doesn't have full driver support). When it doesn't work, what usually happens is that the kernel crashes and is unable to print out any output (it might not even have the right serial driver compiled in!), so "no response" is exactly what you should expect.
What you should do is run a kernel that is intended to be run on this machine. For instance you could look at this tutorial for running a standard Debian kernel on the virt board. That directly runs a kernel from QEMU. It's also possible to get QEMU to boot a UEFI BIOS and then load a kernel from UEFI, but I don't have any handy tutorial links for that approach.
Answered By - Peter Maydell
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.