How to re-build GPU demo inside/outside Yocto build for IMX8MQ

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

How to re-build GPU demo inside/outside Yocto build for IMX8MQ

3,213 Views
hiteshviradiya
Contributor III

Dear NXP Executive,

I am using NXP imx8mq EVK and playing with it. I am exploring GPU to achieve different use cases.

To build, I use below steps:

repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-sumo -m imx-4.14.78-1.0.0_ga.xml
repo sync
DISTRO=fsl-imx-wayland MACHINE=imx8mqevk source fsl-setup-release.sh -b build-wayland
bitbake fsl-image-validation-imx

It has generated rootfs under "build-wayland/tmp/work/imx8mqevk-poky-linux/fsl-image-validation-imx/1.0-r0/rootfs/" and various binaries under "build-wayland/tmp/deploy/images/imx8mqevk" I flashed the SD card with the generated "fsl-image-validation-imx-imx8mqevk-*.rootfs.sdcard.bz2 using below steps:

bzip2 -vfd fsl-image-validation-imx-imx8mqevk-20190403105454.rootfs.sdcard.bz2 (edited)
sudo dd if=fsl-image-validation-imx-imx8mqevk-20190403105454.rootfs.sdcard of=/dev/sdc bs=1M conv=fsync

And I tested many interesting GPU demos.

Now I want to changes them, re-build them and want to test my changes. I am already following Yocto build guidelines & whatever is explained here GitHub - NXPmicro/gtec-demo-framework  but I am failing with different errors due to different dependencies.

cd build-wayland/tmp/work/aarch64-mx8m-poky-linux/imx-gpu-sdk/5.2.0-r0/git/

source prepare.sh

cd DemoApps

FslBuild.py --Variants [WindowSystem=Wayland] -t sdk --BuildThreads 16

I am beginner to Yovto or GPU and might be doing some silly mistakes. Your quick help push me in my explorations.

Please help in finding my mistakes in "How to re build GPU demos?"

--

Thanks,

Hitesh

0 Kudos
8 Replies

2,139 Views
RameshChandrakasan
Contributor III

Dear all

Board : imx8-image-multimedia in imx8QMax MEK

I want to build the Demo outside the Yocto using Cross compile.

1) Question

I have tried SimpleTriangle.cpp using Make file. It is compiled properly and running without any break . But it is not giving any output on board hdmi connetor (j6). But Demo binary came with yocto build is running and showing picture.


In Make file linking the Egl binary file, i am linking the files from tar files created for rootfs image for SDCARD during cross compile.

Here

eglNativeDisplayType = fbGetDisplayByIndex(0);

//Pass the argument as required to show the framebuffer

&

native_window = fbCreateWindow(eglNativeDisplayType, 0, 0, 1024, 768);


Whether the above API will give proper egl context?

Pls suggest.

Is it Ok?

Regards

Ramesh

0 Kudos

2,596 Views
vsuneja63
Contributor III

Hi Hitesh,

I could run OpenCV demos on imx8mq CPU but looking the same to run on GPU. Can you please guide me on the same?

Thanks & Regards,

Vipul Kumar

0 Kudos

2,596 Views
hiteshviradiya
Contributor III

Dear NXP team,

Any updates on this thread?

--

Thanks,

Hitesh

0 Kudos

2,596 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

If you want to use the GPU of the i.MX8MQ. I recommend you to add OpenCV or OpenCL to your end image and with that, you can create your own examples about graphics.

 

Please, find some information on the below web-page

https://diegodorta.com.br/gpu/OpenCL-Overview.html

https://community.nxp.com/thread/435590

Best regards,

Diego.

0 Kudos

2,597 Views
hiteshviradiya
Contributor III

Thanks Diego !

Unfortunately this doesn't helped !!

I still don't understand "bitbake fsl-image-validation-imx" builds source code available at "build-wayland/tmp/work/aarch64-mx8m-poky-linux/imx-gpu-sdk/5.2.0-r0/git/" but there is no way to recompile them !!!

Even what is mentioned in "i.MX Yocto Project User's Guide, Rev. L4.14.78-1.0.0_ga"  Page#9 is not working.

I tried "-c compile -f" option but still doesn't work.

I added CORE_IMAGE_EXTRA_INSTALL += "libopencv-core-dev libopencv-highgui-dev
libopencv-imgproc-dev libopencv-objdetect-dev libopencv-ml-dev" in conf/local.conf and it has copied opencv includes and libraries into "rootfs" directory but still build errors.

I also tried "bitbake meta-toolchain" but the generated SDK doesn't have opencv.hpp, vx.h and few other header and libraries in it.

I am clue less how the generated sdcard image has everything and I am surprised how yocto builds SDK and generate all the demos running on GPUs.

Please consider me as a beginner and give some detailed response so that I can proceeds with the build and play with the Demos to achieve some usecase on imx8mq EVK

--

Thanks,

Hitesh

0 Kudos

2,597 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

I apologize for the delay, can you please share your error output log.

Best regards,

Diego

0 Kudos

2,597 Views
hiteshviradiya
Contributor III

Thanks !

I managed it by myself.

--

Thanks,

Hitesh

0 Kudos

2,398 Views
dotanhofling
Contributor II

Dear hiteshviradiya,

Can you please share how you've manage to compile those examples, same problem i have.

0 Kudos