This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: QT WebEngine on AM5728

Part Number: AM5728

This is a continuation from my previous post. On PDK 5.02, I can get the Chromium (chromium-ozone-wayland, to be precise) running on Weston desktop. However, the goal is to get a web browser running within the IVI shell:

root@sg3:/usr/share/qt5/examples# layer-add-surfaces -l 4000 -s 2 &                                                                                                                                                                                                                 
[8] 2129
layer-add-surfaces: layer (4000) on display () created, waiting for 2 surfaces ...
layerid=4000 is already used.
layer-add-surfaces: layer (4000) destination region: x:0 y:0 w:1920 h:1080
layer-add-surfaces: layer (4000) visibility TRUE
layer-add-surfaces: layer (2000) created
layer-add-surfaces: layer (4000) created
layer-add-surfaces: layer (1000) created
root@sg3:/usr/share/qt5/examples# chromium --start-fullscreen --kiosk --no-sandbox --no-first-run --incognito 10.111.221.40 --fast --fast-start --noerrdialogs --disable-infobars                                                                                                   
[2131:2131:0108/113744.205998:ERROR:browser_process_platform_part_ozone.cc(20)] Not implemented reached in virtual void BrowserProcessPlatformPart::RegisterInProcessServices(content::ContentBrowserClient::StaticServiceMap*)
[2131:2161:0108/113744.323123:ERROR:wayland_connection.cc(70)] No xdg_shell object
[2131:2161:0108/113744.323171:FATAL:ozone_platform_wayland.cc(93)] Failed to initialize Wayland platform

The qtwebbrowser (a preferred way to integrate the web engine) appears to be broken as well:

root@sg3:/usr/share/qt5/examples# export QT\_WAYLAND\_SHELL\_INTEGRATION=ivi-shell                                                        
root@sg3:/usr/share/qt5/examples# qtwebbrowser 
Using Wayland-EGL    
wlpvr: PVR Services Initialised             
Non-blocking swap buffers not supported. Subsurface rendering can be affected.


wlpvr: Creating Wayland Client surface 2 buffers for process pid=2173!
[2173:2191:0108/114353.932420:ERROR:surface_factory_qt.cpp(82)] eglGetProcAddress not found.
Using the 'ivi-shell' shell integration
layer-add-surfaces: surface (2173) created
layer-add-surfaces: surface (2173) created
layer-add-surfaces: surface (2173) created
layer-add-surfaces: surface (2173) created
layer-add-surfaces: surface (2173) created
layer-add-surfaces: surface (2173) created
Non-blocking swap buffers not supported. Subsurface rendering can be affected.
wlpvr: Creating Wayland Client surface 2 buffers for process pid=2173!
Non-blocking swap buffers not supported. Subsurface rendering can be affected.
wlpvr: Creating Wayland Client surface 2 buffers for process pid=2173!
wlpvr: Creating Wayland Client surface 2 buffers for process pid=2173!
layer-add-surfaces: surface (2173) configured with:
    dst region: x:0 y:0 w:506 h:533
    src region: x:0 y:0 w:506 h:533
    visibility: TRUE
    added to layer (4000)
layer-add-surfaces: surface (2173) configured with:
    dst region: x:0 y:0 w:506 h:533
    src region: x:0 y:0 w:506 h:533
    visibility: TRUE
    added to layer (4000)
layer-add-surfaces: surface (2173) configured with:
    dst region: x:0 y:0 w:506 h:533
    src region: x:0 y:0 w:506 h:533
    visibility: TRUE
    added to layer (4000)
layer-add-surfaces: surface (2173) configured with:
    dst region: x:0 y:0 w:506 h:533
    src region: x:0 y:0 w:506 h:533
    visibility: TRUE
    added to layer (4000)
layer-add-surfaces: surface (2173) configured with:
    dst region: x:0 y:0 w:506 h:533
layer-add-surfaces: surface (2173) configured with:
    dst region: x:0 y:0 w:506 h:533
    src region: x:0 y:0 w:506 h:533
    visibility: TRUE
    added to layer (4000)
    src region: x:0 y:0 w:506 h:533
    visibility: TRUE
    added to layer (4000)
qrc:///qml/HomeScreen.qml:260:17: QML Image: Host www.openstreetmap.org not found
qrc:///qml/HomeScreen.qml:260:17: QML Image: Host www.topgear.com not found
qrc:///qml/HomeScreen.qml:260:17: QML Image: Host www.redditstatic.com not found
qrc:///qml/HomeScreen.qml:260:17: QML Image: Host duckduckgo.com not found
qrc:///qml/HomeScreen.qml:260:17: QML Image: Host www.blogsmithmedia.com not found
[2173:2191:0108/114358.180665:ERROR:gl_surface_qt.cpp(667)] Requested OpenGL implementation is not supported. Implementation: 0
*** stack smashing detected ***: <unknown> terminated
[4]   Done                    layer-add-surfaces -l 4000 -s 2  (wd: ~)
(wd now: /usr/share/qt5/examples)
[5]   Done                    layer-add-surfaces -l 4000 -s 2  (wd: ~)
(wd now: /usr/share/qt5/examples)
[6]   Done                    layer-add-surfaces -l 4000 -s 2  (wd: ~)
(wd now: /usr/share/qt5/examples)
[7]   Done                    layer-add-surfaces -l 4000 -s 2  (wd: ~)
(wd now: /usr/share/qt5/examples)
Aborted (core dumped)
layer-add-surfaces: surface (2173) destroyed
layer-add-surfaces: surface (2173) destroyed

We know EGL 1.5 is required for the Qt WebEngine, but the PDK 5.X only ships EGL 1.4 enabled DDK 1.14 . It includes a copy of the ti-sgx-ddk-um version 1.17.x (which supports EGL 1.5), but it's supported architecture only includes the K3, and not the AM5728.

At the moment I am doing these two things:

  • Figure out a set of configurations which allows me to enable EGL 1.5 on PDK 5.x. Although I’m afraid it was a beginning of a rabbit hole (triggering changes to OpenGLES, EGL, GBM and OpenGL stuff). 
  • Update the system to PDK 6.03 in parallel, but this has much larger impact to the product as a whole. So we are trying to avoid it.

I will be updating this post with exact build / configuration issues I encounter to seek help from y'all. Thanks!

  • This is my current package providers settings that's building the Chromium, but has issues with QtWebEngine as described above:

    PREFERRED_PROVIDER_virtual/mesa="mesa-gl"
    PREFERRED_PROVIDER_virtual/egl = "ti-sgx-ddk-um"
    PREFERRED_PROVIDER_virtual/libgles1 = "ti-sgx-ddk-um"
    PREFERRED_PROVIDER_virtual/libgles2 = "ti-sgx-ddk-um"

    PREFERRED_PROVIDER_virtual/libgl = "mesa-gl"

  • Hi team,

    I also suggested taking a look at the openembedded meta-webkit layer:

    https://github.com/Igalia/meta-webkit

    Has anyone integrated this with processor SDK on 5.02?
    Munan

  • Like I said previously, I was trying to update the SGX DDK (and related components) to support EGL 1.5 and QT 5.11, while leaving the rest of the system as-is to avoid having to requalify the Kernel and etc.

    Then I thought of something - instead of upgrading to Qt 5.11 from Qt 5.9, perhaps I can go the other way. I checked out the "Pyro" branch of meta-qt, which means it's got Qt 5.8. It surprisingly built without issue. Even more surprisingly, the Qt WebEngine demo no longer crashes and runs within IVI environment!(?).

    root@sg3:~# qtwebbrowser 
    Using Wayland-EGL
    wlpvr: PVR Services Initialised
    Non-blocking swap buffers not supported. Subsurface rendering can be affected.
    wlpvr: Creating Wayland Client surface 2 buffers for process pid=2237!
    Using the 'ivi-shell' shell integration
    Non-blocking swap buffers not supported. Subsurface rendering can be affected.
    wlpvr: Creating Wayland Client surface 2 buffers for process pid=2237!
    wlpvr: Creating Wayland Client surface 2 buffers for process pid=2237!
    Non-blocking swap buffers not supported. Subsurface rendering can be affected.
    wlpvr: Creating Wayland Client surface 2 buffers for process pid=2237!
    wlpvr: Creating Wayland Client surface 2 buffers for process pid=2237!
    qrc:///qml/HomeScreen.qml:260:17: QML Image: Host www.redditstatic.com not found
    qrc:///qml/HomeScreen.qml:260:17: QML Image: Host www.openstreetmap.org not found
    qrc:///qml/HomeScreen.qml:260:17: QML Image: Host www.blogsmithmedia.com not found
    qrc:///qml/HomeScreen.qml:260:17: QML Image: Host duckduckgo.com not found
    qrc:///qml/HomeScreen.qml:260:17: QML Image: Host www.topgear.com not found
    

    I will continue on this path, and report back. Fingers crossed!

  • Adam,

    Thank you very much for looking into this and I am glad to hear that you are able to proceed further. This is very interesting information. QT enablement is fairly basic and "as-is" in the SDK, so this information is very helpful! I am wondering if something changed in QT 5.9 (there seem to be quite a few changes). In any case, this is very helpul information and thanks again for sharing this with us.

    Regards

    Hemant