Issue
I create Yocto image for architecture x86_64 and run on the QEMU virtual machine by the below qemu command:
qemu-system-x86_64.exe -m 1024 -hda "rootfs.img" -cpu q35 -kernel "vmlinuz" -initrd "initrd" -append "root=/dev/ram0"
But the booting process was failed. How to indicate the rootfs.img to correct path? What is the problem with QEMU, I tested OK with VirtualBox.
Solution
I have to select the correct cpu (i7) and use correct virtual device to mount rootfs.img.
qemu-system-x86_64.exe -m 1024 -drive file=rootfs.img,format=raw,if=virtio -cpu Nehalem -initrd "initrd" -kernel "vmlinuz" -append "root=/dev/vda"
As the result, the image can boot successfully.
(Refer: https://wiki.qemu.org/Documentation/9psetup)
Answered By - Thảo M. Hoàng
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.