On Fri, 11 Aug 2023 at 18:52, Mario Marietto <marietto2...@gmail.com> wrote: > > ok. I could extract the kernel files (so,between the qemu parameters I should > put : initrd and vmlinuz,right ? How ? > > -enable-kvm -serial stdio -kernel vmlinux -what here initrd \ > > from the ubuntu 22.10 img,but I'm sure that it does not have any dtb file. I > never needed a dtb file when I booted my vms,neither with qemu,nor with bhyve.
The option for the initrd is '-initrd'. You don't need a dtb file if you are using the "virt" machine type, because that machine type will create a suitable DTB within QEMU to pass to the kernel. You only need it with arm machine types that are emulating real hardware, like vexpress-a15. Here it matches how a real boot loader like uboot works -- uboot loads the kernel, initrd and dtb file. (A few boards in real hardware, like the raspberry pi, provide the dtb file with their firmware for the bootloader to pick up, rather than having the distro ship the dtb alongside the kernel image file. QEMU's emulation of those boards requires the user to provide the dtb file to it anyway. The vexpress hardware never did this in any case, you always had to build a kernel and a dtb file.) thanks -- PMM