Problems building i.MX6 image for LinuxFB with Dizzy BSP

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

Problems building i.MX6 image for LinuxFB with Dizzy BSP

3,912 Views
NathanJozwiak
Contributor III

Hi all,

I'm trying to get a working setup going for my i.MX6 reference board (Nitrogen6x). I have the latest BSP (dizzy) and I had no problems building and running the fsl-image-multimedia-full image from sources/meta-fsl-demos/recipes-fsl/images. I was even able to validate both gstreamer-0.10 and gstreamer1.0 that were built into the rootfs using the following commands:

# gst-launch-0.10 mfw_v4lsrc ! mfw_v4lsink

# gst-launch-1.0 imxv4l2src ! imxg2dvideosink

The trouble came when I tried to create my own image. In my target environment I will be running Qt 5.4.0 and displaying directly to the LinuxFB. So I have no need for any window environments. I copied the fsl-image-multimedia recipe and created my own, but used DISTRO_FEATURES_remove to remove X11, Wayland, and DirectFB from the image. I did a build and everything seemed to go fine. I was even able to validate GStreamer was working in that image too. So I used the rootfs that was created to cross-build Qt. The build failed with undefined references to several functions in QEglFSimx6Hooks: fbCreateWindow, fbGetDisplayByIndex, etc.

This told me the GPU libraries were off. I did a little investigating and found that the GPU libraries built into the rootfs of my new image still appear to be the X11 versions. I can tell this by doing a byte size comparison on the one in the rootfs to the one in the build directory:

Here is the build directory:

user@ubuntu:../buildtmp/work/cortexa9hf-vfp-neon-mx6qdl-poky-linux-gnueabi/gpu-viv-bin-mx6q/1_3.10.17-1.0.2-hfp-r0/gpu-viv-bin-mx6q-3.10.17-1.0.2-hfp/usr/lib$ ll

...

-rwxr-xr-x 1 njozwiak njozwiak   619328 Aug 31  2014 libEGL-dfb.so*

-rwxr-xr-x 1 njozwiak njozwiak   381674 Aug 31  2014 libEGL-fb.so*

lrwxrwxrwx 1 njozwiak njozwiak       12 Aug 31  2014 libEGL.so -> libEGL-fb.so*

lrwxrwxrwx 1 njozwiak njozwiak       12 Aug 31  2014 libEGL.so.1 -> libEGL-fb.so*

lrwxrwxrwx 1 njozwiak njozwiak       12 Aug 31  2014 libEGL.so.1.0 -> libEGL-fb.so*

-rwxr-xr-x 1 njozwiak njozwiak   394640 Aug 31  2014 libEGL-wl.so*

-rwxr-xr-x 1 njozwiak njozwiak   360435 Aug 31  2014 libEGL-x11.so*

...

Here is the contents of the rootfs

user@ubuntu:../build/tmp/deploy/images/nitrogen6x$ tar jtvf my-build-nitrogen6x-20150410213651.rootfs.tar.bz2 | grep libEGL

lrwxrwxrwx root/root             0 2015-04-10 19:09 ./usr/lib/libEGL.so -> libEGL.so.1.0

-rw-r--r-- root/root        360435 2015-04-10 18:32 ./usr/lib/libEGL.so.1.0

lrwxrwxrwx root/root             0 2015-04-10 19:09 ./usr/lib/libEGL.so.1 -> libEGL.so.1.0

The links are pointing to the LinuxFB versions of the libraries, but it was the libEGL-x11 library that was installed in the rootfs. I also noted the build date on gpu-viv-bin-mx6q libraries as August 31st. That seems fishy to me as it means the libraries were pre-packaged with the BSP and not built.

Here is my custom recipe. How do I build an image for LinuxFB and get the GPU drivers to install properly?

DISTRO_FEATURES_remove = "x11 wayland directfb"

IMAGE_FEATURES += "dev-pkgs splash ssh-server-openssh"

LICENSE = "MIT"

inherit core-image

CORE_IMAGE_EXTRA_INSTALL += " \

    packagegroup-fsl-gstreamer \

    packagegroup-fsl-tools-gpu \

    packagegroup-fslc-gstreamer1.0 \

    packagegroup-fsl-gstreamer-full \

    packagegroup-fslc-gstreamer1.0-full \

"

0 Kudos
7 Replies

1,267 Views
LaurenPost
NXP Employee
NXP Employee

If you are building off dizzy branch then you are picking up the 3,10.17 v4 graphics not latest graphics provided in 3.10.53 and 3.14.28 which is v5.  Your gsteamer 1.0 is from community using gstreamer-imx not Freescale's Gstreamer 1.0.

If you build on fido branch you can pick up latest graphics and Freescale gstreamer.

There was a name change of graphics between 3.10.17 and 3.10.53 to imx-gpu-viv.

The 3.10.17 build was released last year around August with the 3.10.17-1.0.2 update so that is why the dates are so old.  fido has a much more current version.

For all GPU package we generate libraries for all backends and package together in one package.  If your local.conf has DISTRO_FEATURES_remove = "x11 wayland directfb"  it will copy the frame buffer graphics libraries.  .

Try our fsl-image-gui image recipes we have in our release layer and see if that works better for frame buffer.


Lauren

0 Kudos

1,267 Views
NathanJozwiak
Contributor III

Hi Lauren,

Thanks for the response. Couple follow up questions though:

1. I thought Dizzy (v1.7) was the latest release [http://freescale.github.io/#download]? I assume if you are pointing me to Fido it is the latest (v1.8). When will it officially be released?

2. So DISTRO_FEATURES_remove must be defined in local.conf and *not* in the image recipe? Could you explain?

3. I ran a search through the sources directory of both my dizzy pull and my fido pull using find and was unable to locate any recipes matching or close to "fsl-image-gui". Could you point me in the right direction?

I downloaded Fido and am doing an image build with DISTRO_FEATURES_remove defined in local.conf instead of my image recipe. I will report when the build finishes.


Thanks

Nate

0 Kudos

1,267 Views
daiane_angolini
NXP Employee
NXP Employee

1. fido is not already released, the planned day is 26th April (along with Yocto Project release). The branch is already created because we've been working on some final tests.

2. Long story short, DISTRO_FEATURES is not a variable to be used in image files because affect the complete distro. In fact, the presence on local.conf is only advised on very restricts tests. It's important that you undersand the concept behind this variable, so please, go to Yocto Project Reference Manual ;-)

3. Please, follow Lauren's directions in order to get fsl-image-gui. And make sure you have read FSL Community BSP release notes (under github.io)

0 Kudos

1,267 Views
LaurenPost
NXP Employee
NXP Employee

Based on the details given above, you are building from the dizzy community branches not from our release layer.

3.10.17 was released on top of dora yocto community but upstreamed into daisy

3.10.17-1.0.2 was upstreamed into dizzy (community chose not to take the beta for 3.10.53 which was available for dizzy)

3.10.53 and 3.14.28 were upstreamed into what is now fido released this month.

If you are seeing gpu-viv-bin-mx6q you are using 3.10.17 and not using Freescale gstreamer 1.0.

If you are using fido, it has latest graphics and

If you want to use official releases use our release layer built on top.  The latest relaese is 3.14.28-1.0.0 released on top of dizzy.  Here is how to get it.

fsl-arm-yocto-bsp.git - Freescale i.MX Yocto Project manifests

Yes DISTRO_FEATURES must be in local.conf not image recipe otherwise it won't be picked up correctly. 

fsl-image-gui is in our release layer only not in community layers.

0 Kudos

1,267 Views
daiane_angolini
NXP Employee
NXP Employee

Only 2 additional points.

1)

Everytime you change any piece of DISTRO_FEATURES you must clean your build dir. So your problem I think is caused by dirty build system (the mismatch between x11 and fb libs)

2) the sysroot you find under tmp/work is not *the* rootfs. If you are looking for a way to cross-compile for development, I recommend you to use meta-toolchain or the one for QT5

0 Kudos

1,267 Views
NathanJozwiak
Contributor III

Hi Daiane,


Your first point could potentially be the problem here... Could you explain the proper way to do a clean before a rebuild?

0 Kudos

1,267 Views
daiane_angolini
NXP Employee
NXP Employee

inside your build folder:

rm -rf tmp

:smileygrin:

tmp is temporary only.

What I have on my day-by-day is a build-fb build-x11, only to make sure.... (but, I must work on all they, so for me it makes sense)

0 Kudos