The above runs a 32-bit kernel, if you were already running 64-bit Raspbian use the arm64 kernel instead and replace qemu-system-arm with qemu-system-aarch64. The kernel produced by meta-raspberrypi (kernel7.img) immediately breaks qemu with: qemu-system-arm: Trying to execute code outside RAM or ROM at 0xe0833006. Specify the 'raw' format explicitly to remove the restrictions. ![]() initrd /rpi/initrd.img-5.10.0-21-armmp-lpae \ Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. netdev tap,id=net0,ifname=tap0,script=no,downscript=no \ device virtio-scsi-device -device scsi-hd,drive=hd \ QEMU QEMU is a popular process emulator that uses dynamic binary translation to achieve a reasonable speed while being easy to port to new architectures. drive file=/rpi/root.img,format=raw,id=hd,if=none,media=disk \ Since yocto uses 3.4.20 or a newer version of the Linux kernel, no extra packages are required only a proper kernel configuration. Sudo dpkg -install linux-image-5.10.0-21-armmp-lpae_5.10.162-1_bĬopy out the kernel and initrd from /boot to the host, then run QEMU with something like this: qemu-system-arm \ First install a virtualization-capable kernel, Raspian doesn't provide one but the regular Debian ARM distro does: wget Getting it running is a bit more work but in the end not too complicated (more instructions here). ![]() It also supports arbitrary CPU counts and memory sizes. I've had better success using the virt model which emulates a generic ARM system, but uses virtualization, rather than device emulation, which leads to lower CPU utilization on the host and much better I/O performance. It's also locked to 4 CPUs and 1 GB of memory. While the raspi3b model works well, it is quite inefficient and its network speeds are really low because it emulates the USB-Ethernet adapter.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |