Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpb-qt: qt5/eglfs image (no window manager) #33

Merged
merged 1 commit into from
Nov 17, 2016

Conversation

ldts
Copy link
Contributor

@ldts ldts commented Nov 7, 2016

This pull requests allows the generation of an image suitable for embedded systems not needing a window manager (x11 or Wayland).

It enables Qt5/eglfs (http://doc.qt.io/qt-5/embedded-linux.html)

The user can validate the native window using Qt5_CinematicExperience as follows:

$ cd /usr/share/cinematicexperience-1.0/
$ ./Qt5_CinematicExperience --platform eglfs

This commit was tested for the db410c release:
IMAGES=rpb-qt5-image
DISTRO=rpb-qt5

@koenkooi
Copy link
Contributor

koenkooi commented Nov 7, 2016

is this a qt5 distro or an eglfs? It looks to me like it's not really 'rpb-qt5'.

@ndechesne
Copy link
Contributor

yes, it is a specific 'distro' to enable eglfs, so maybe rpb-qt5-eglfs might be a better name, but it is a long name, and I don't like it a lot ;-)

I would think that qt5 should work in rpb-x11 and rpb-wayland distro already, but with their respective backend. it might be interesting to try the qt5 image sample on the other distro, it might "just work".


DISTRO_NAME = "Reference-Platform-Build-QT5"

PACKAGECONFIG_append_pn-qtbase = " gles2 eglfs fontconfig kms"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add examples as well in PACKAGECONFIG and add them into the image by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

PACKAGECONFIG_append_pn-qtbase = " gles2 eglfs fontconfig kms"

DISTRO_FEATURES_remove = "wayland x11"
DISTRO_FEATURES_append = " pam systemd opengl"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is taken care by rpb.inc already. you shouldn't need them here, and should rely on the defaults from rpb.inc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

# let's make sure we have a good image..
REQUIRED_DISTRO_FEATURES = "pam systemd opengl"

# make sure we boot to desktop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comment here is wrong.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and multi-user.target is already the default (i think).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment removed.
multi-user.target...even if it is the default (which I dont know), doesnt it make sense to highlight it here anyways?

# by default and without x11-base in IMAGE_FEATURES we default to multi-user.target
SYSTEMD_DEFAULT_TARGET = "multi-user.target"

CORE_IMAGE_BASE_INSTALL += " \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you remove gstreamer and gps packages compared to the other images?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we probably want to keep the x11 packages as well, but check for X11 in DISTRO_FEATURES. I believe this image should be used for DISTRO=rpb and DISTRO=rpb-wayland, and in case of rpb it should be using Qt5 over x11 backend, so the x11 packages would be needed.

in fact we might eventually end up with a single desktop image, who knows..

Copy link
Contributor Author

@ldts ldts Nov 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some of them (gps I think) seemed to require x11. will add them back and retest.
same thing for the gstreamer plugins (gstreamer1.0-plugins-bad-meta)

ok checking DISTRO_FEATURES in the image install.

iptables \
kernel-modules \
sshfs-fuse \
cinematicexperience \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as sais earlier let's add the qt5 examples package as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added them in the lines after this (see below). Not sure how to add them all so I selected them just as I added cinematicexperience. is there an easier way?

@ldts
Copy link
Contributor Author

ldts commented Nov 8, 2016

hi @ndechesne, implemented the changes, rebased, tested and pushed.

Copy link
Contributor

@ndechesne ndechesne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for making the changes. we still need to agree on the distro name qt5 vs qt5-eglfs vs anything else..

gps-utils \
gpsd \
gptfdisk \
${@bb.utils.contains("DISTRO_FEATURES", "x11", "gstreamer1.0-plugins-bad-meta", "", d)} \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we should not need to check for X11 here. if we need , it looks like a bug in oe-core. did you really need it? if so, do you have a log of the failure without it?

Copy link
Contributor Author

@ldts ldts Nov 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can start another build with the change removed and capture a failure log but yes, there is a dependency with X11. do (libglu IIRC). ..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's ok, i will take care of that, later.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm. i found the issue, it is a bug upstream, but in meta-qcom ;-) it's coming from
https://github.com/ndechesne/meta-qcom/blob/master/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%25.bbappend

i will fix it. then we can leave gstreamer1.0-plugin-bad-meta in the image.. thanks for spotting it..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i pushed Linaro/meta-qcom@7be7a1c. it should fix the issue with libglu. you can update your patch and include gstreamer1.0-plugins-bad-meta unconditionally

qt5-opengles2-test \
qtsmarthome \
quitbattery \
quitindicators \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where are these apps coming from? do they work? let's see if we include them or not.

the one example i had in mind was qtbase-examples.

Copy link
Contributor Author

@ldts ldts Nov 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are all the apps contained in the examples (meta-qt5/recipes-qt/examples/*)
I only tested a couple of them and yes they work with --platform eglfs

Copy link
Contributor Author

@ldts ldts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just pushed following your meta-qcom update. thanks for fixing it :)

iptables \
kernel-modules \
sshfs-fuse \
cinematicexperience \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added them in the lines after this (see below). Not sure how to add them all so I selected them just as I added cinematicexperience. is there an easier way?

DISTRO_NAME = "Reference-Platform-Build-QT5"

PACKAGECONFIG_append_pn-qtbase = " gles2 eglfs fontconfig kms"
PACKAGECONFIG_append_pn-examples = " examples"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be in pn-qtbase as well, pn-examples doesn't do anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok


DISTRO_NAME = "Reference-Platform-Build-QT5"

PACKAGECONFIG_append_pn-qtbase = " gles2 eglfs fontconfig kms"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i tried to build the qt5 image with RPB/X11 distro and it failed. I think this is because gles2 and fontconfig should be enabled in rpb.inc, and we should keep eglfs and kms only here. i will test that..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, i confirm that we need to set gles2 and fontconfig in rpb.inc and only set eglfs and kms in rpb-qt5.conf. with that change we can build the Qt5 image for X11 and for wayland too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it is building on my side as well. should I send an updated patch or will you push your own?

@koenkooi
Copy link
Contributor

koenkooi commented Nov 9, 2016

what about rpb-eglfs as a name for it?

Copy link
Contributor

@ndechesne ndechesne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only 1 comment, and then it will be good for merge i believe.. you rename the image file to eglfs, but you shouldn't have.. the image is 'generic' and can be built for DISTRO=rpb or DISTRO=rpb-eglfs. it will use a different backend for Qt5 (X11 or eglfs). So the image should be called rpb-qt5-image, since it is a reference image with Qt5 apps.

Allows the generation of an image suitable for embedded systems not
needing a window manager (x11 or Wayland).

It enables Qt5/eglfs (http://doc.qt.io/qt-5/embedded-linux.html)

The user can validate the native window using Qt5_CinematicExperience
as follows:

$ cd /usr/share/cinematicexperience-1.0/
$ ./Qt5_CinematicExperience --platform eglfs

This commit was tested for the db410c release:
IMAGES=rpb-qt5-image
DISTRO=rpb-eglfs
@ldts
Copy link
Contributor Author

ldts commented Nov 9, 2016

yep, renamed

@ldts
Copy link
Contributor Author

ldts commented Nov 10, 2016

anything else?

@ndechesne
Copy link
Contributor

need some time for testing/trying out ;-)

@politoleo
Copy link

Hello, I'm trying to build using this configuration but it's failing with this error:

ERROR: Nothing PROVIDES 'libglu' (but /oe-rpb/build-rpb-eglfs/conf/../../layers/openembedded-core/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb DEPENDS on or otherwise requires it)
ERROR: libglu was skipped: missing required distro feature 'x11' (not in DISTRO_FEATURES)
NOTE: Runtime target 'gstreamer1.0-plugins-bad-meta' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['gstreamer1.0-plugins-bad-meta', 'libglu']
ERROR: Required build target 'rpb-qt5-image' has no buildable providers.
Missing or unbuildable dependency chain was: ['rpb-qt5-image', 'gstreamer1.0-plugins-bad-meta', 'libglu']

Is there something obvious I'm missing?
Thank you

@ndechesne
Copy link
Contributor

this error was fixed during the review, it was an issue in meta-qcom actually. the fix is this one:

Linaro/meta-qcom@7be7a1c

Note that we've tested only with master and morty, which have a 'recent' qt5. You seem to be using krogoth which has a much older qt version. if you can, you should upgrade.. we have seen issues with qt5/krogoth/eglfs and we have ignored them since we are moving the main release to morty..

@politoleo
Copy link

Thank you, I'm switching to master right now!

@ndechesne ndechesne merged commit 5dad416 into 96boards:master Nov 17, 2016
@ndechesne
Copy link
Contributor

thanks @ldts I tried on DB410c and it worked fine. It is a bit slow , but I suspect this is the best we can do on this GPU (i was using 1080p display). I tried various qt5 examples included in the image..

thanks a lot for sending this out.

@ldts
Copy link
Contributor Author

ldts commented Nov 17, 2016

cool. thanks for your help on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants