Can qemu emulate i.MX 8M Plus ?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Can qemu emulate i.MX 8M Plus ?

5,875 次查看
mm2021
Contributor III

We do not have i.MX 8M Plus board, so I'd like to ask if qemu can emulate i.MX 8M Plus?

I'd like to run qemu Linux based on i.MX 8M Plus.

Can the qemu Linux run applications compiled by XTENSA, like the SOF project?

Thank anyone who can give any information.

0 项奖励
回复
7 回复数

496 次查看
Younkin
Contributor I

I run the qemu setup command:

qemu-system-aarch64 \
-machine imx8mp-evk \
-cpu cortex-a53 \
-m 2G \
-smp 4 \
-kernel ./imx-image-full-imx8mpevk/boot/Image \
-drive file=imx-image-full-imx8mpevk.qcow2,format=qcow2,id=disk,if=none \
-append "root=/dev/vda console=ttyAMA0"

the system can't be loaded successfully.Can you help me check the command, the argument -kernel is right?

0 项奖励
回复

332 次查看
Younkin
Contributor I

Finally,I run the qemu command:

qemu-system-aarch64 \
    -machine virt  \
    -cpu cortex-a53 \
    -smp 4 \
    -m 2G \
    -kernel ./Image \
    -drive file=imx-image-full-imx8mpevk.qcow2,if=none,id=drive0,format=qcow2 \
    -device virtio-blk-pci,drive=drive0 \
    -append "root=/dev/vda2 rootwait rw console=ttyAMA0,115200" \
    -netdev user,id=eth0 \
    -device virtio-net-device,netdev=eth0 \
    -device virtio-gpu-pci \
-nographic
the virtual machine can setup successfully.
标记 (1)
0 项奖励
回复

200 次查看
mehmetarifboyraz
Contributor I
Hello,
I am emulating the i.MX8MP board in QEMU and trying to connect my laptop’s built-in camera to the board using USB passthrough.
I used the following command:

sudo /home/arif/src/qemu/build/qemu-system-aarch64 \
-M imx8mp-evk -smp 4 -m 3G -display none -serial null -serial stdio \
-kernel /home/arif/imx-qemu/buildroot-2024.11.1/output/images/Image \
-dtb /home/arif/imx-qemu/buildroot-2024.11.1/output/images/imx8mp-evk.dtb \
-append "root=/dev/mmcblk2p2" \
-drive file=/home/arif/imx-qemu/buildroot-2024.11.1/output/images/sdcard.img,if=sd,bus=2,format=raw,id=mmcblk2 \
-usb -device usb-ehci,id=ehci -device usb-host,hostbus=1,hostaddr=3


When I checked the camera on the host, I saw the “device not found” error — meaning QEMU successfully captured the device —
but when I listed connected USB devices inside QEMU, the camera was not visible at all.

Do you have any idea what I might be doing wrong? I would really appreciate your help.
0 项奖励
回复

145 次查看
mehmetarifboyraz
Contributor I

 

I solved the issue. QEMU’s i.MX8MP emulation already creates its own USB controllers (DWC3/XHCI). I was adding a separate EHCI USB controller using the command -device usb-ehci,id=ehci, and these two controllers were working independently. The device I attached to the EHCI controller couldn’t communicate with the i.MX8MP’s actual USB bus. I removed the EHCI controller and instead used the board’s built-in USB controller, and that allowed me to successfully connect the camera to the board.

Here’s the working command:

 

 
sudo /home/arif/src/qemu/build/qemu-system-aarch64 \ -M imx8mp-evk -smp 4 -m 3G -display none -serial null -serial stdio \ -kernel /home/arif/imx-qemu/buildroot-2024.11.1/output/images/Image \ -dtb /home/arif/imx-qemu/buildroot-2024.11.1/output/images/imx8mp-evk.dtb \ -append "root=/dev/mmcblk2p2" \ -drive file=/home/arif/imx-qemu/buildroot-2024.11.1/output/images/sdcard.img,if=sd,bus=2,format=raw,id=mmcblk2 \ -device usb-host,bus=usb-bus.0,port=1,vendorid=0x04f2,productid=0xb729 \ -monitor telnet:127.0.0.1:4444,server,nowait
 

 

0 项奖励
回复

5,872 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello mm2021,

The qemu-system-aarch64 binary supports all the 32-bit CPUs and boards, in the same way that qemu-system-x86_64 lets you run a 32-bit x86 CPU guest, which is why the list is so long and full of 32-bit boards. You cannot just try to use a 32-bit board with a -cpu cortex-a53, since is 64 bits.

 

Regards

 

0 项奖励
回复

5,864 次查看
mm2021
Contributor III

Thank you for the reply.

Could  I ask for another question about qemu + i.MX 8M Plus?

I'd like to know qemu + i.MX 8M Plus supports emulating xtensa dsp core?

How to run a xtensa application under qemu + i.MX 8M Plus?

0 项奖励
回复

5,843 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

no, Xtensa is not supported by qemu.

 

0 项奖励
回复