Run prebuilt Linux of i.MX8 8MPLUSLPD4-EVK in QEMU on x64 desktop

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Run prebuilt Linux of i.MX8 8MPLUSLPD4-EVK in QEMU on x64 desktop

751 Views
zippo
Contributor I

There is board 8MPLUSLPD4-EVK

It has prebuilt Linux in Software section L6.1.36_2.1.0_MX8MP

How to run it in QEMU or other emulator on my desktop x64 Windows/Linux?

I have found that there are manuls how to bake images from scratch, like Yocto and other, but not how to use existing prebuilt images.

0 Kudos
Reply
3 Replies

685 Views
zippo
Contributor I

Hello @Alejandro_Salas 

So I was able to build NXP_DESKTOP_LINUX based on Ubuntu. By the way, there are errors, I had manually to add such strings:

 

DEPENDS = "openssl"
RDEPENDS:${PN} = "openssl"

 

into two reciepes in build folder

 

sources/poky/meta/recipes-support/curl/curl_8.0.1.bb
sources/poky/meta/recipes-kernel/kmod/kmod_30.bb

 

Without it, there were such errors:

 

ERROR: kmod-30-r0 do_package_qa: QA Issue: /usr/bin/kmod contained in package kmod requires libcrypto.so.3(OPENSSL_3.0.0)(64bit), but no providers found in RDEPENDS:kmod? [file-rdeps]
ERROR: Task (/home/build/main_build/sources/poky/meta/recipes-kernel/kmod/kmod_30.bb:do_package_qa) failed with exit code '1'

ERROR: curl-8.0.1-r0 do_package_qa: QA Issue: /usr/lib/libcurl.so.4.8.0 contained in package libcurl requires libcrypto.so.3(OPENSSL_3.0.0)(64bit), but no providers found in RDEPENDS:libcurl? [file-rdeps]
ERROR: Task (/home/build/main_build/sources/poky/meta/recipes-support/curl/curl_8.0.1.bb:do_package_qa) failed with exit code '1'

 

 

I got resulting images in tmp/deploy/images folder

imx-image-desktop-imx8mpevk-20231027173956.rootfs.tar.zst

imx-image-desktop-imx8mpevk-20231027173956.rootfs.wic.zst

 

I was able to unpack imx-image-desktop-imx8mpevk.wic.zst to imx-image-desktop-imx8mpevk.wic and flash it on SD card. My development board started well and showed Ubuntu like desktop.

 

How now to run this all in QEMU? Since I compiled it using 

 

bitbake imx-image-desktop

and have now all sources, libraries and everything else. How to run it QEMU on my host machines x64 Windows/Ubuntu?

 

I tried different approaches, like flashing *.wic to SD card. Then using tool imageusb to read content of my SD card to image.bin file and then running QEMU on it:

qemu-system-aarch64 -machine virt -cpu cortex-a57 \
-drive if=virtio,file="image.bin",format=raw \
-device virtio-gpu-pci \
-device virtio-keyboard \
-device virtio-mouse \
-serial mon:stdio

OR

qemu-system-x86_64 image.bin

Nothing worked, QEMU only showing it's black screen with missing load devices

 

0 Kudos
Reply

709 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @zippo !

 

For Pre-build images that is not possible. As you said, you need to compile your image in Yocto and then you will be able to emulate in QEMU.

 

Best regards!

0 Kudos
Reply

385 Views
ricciolino
Contributor II

Hi @Alejandro_Salas ,

Could you please share some details on how to proceed for configuring our custom Yocto distribution with QEMU emulation?
I was wandering which are the pieces that need to be taken into account after a generic build.... how to provide u-boot bin, kernel image and rootfs to QEMU command line ?

Thanks a lot.

0 Kudos
Reply