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.

Linux/AM3358: Can't load graphic drivers

Part Number: AM3358
Other Parts Discussed in Thread: DA8XX, UKERNEL, TPS65218

Tool/software: Linux

Hi,

After many research on the forums, I have found plenty of build, git commits, but no direct answer to my question.

I have an AM3358 chip and I want to get the OpenGL ( egl ) working. So I tried to install the gfx drivers and the sgx drivers ... I'm having trouble with both so

First question : Do I need ti-gfx AND ti-sgx-km packages ???

2nd question : How do I make it work :) ?

I just downloaded the kernel 4.9 from the newest SDK ( 4.00 ) for am335x. Its added to my buildroot build sequence, it builds fine.

I added TI-SGX-... from that same SDK and added it as a custom package in buildroot ( instead of the other ti-sgx-km ). The build works great, but it can't load .

PVR:(Error): OpenServices: drmOpen failed [120, /pvr_bridge_u.c]
PVR:(Error): PVRSRVInitSrvConnect: PVRSRVConnect failed [2572, /bridged_pvr_glue.c]
PVR:(Error): SrvInit: PVRSRVInitSrvConnect failed (4) [37, /srvinit.c]
PVR:(Error): main: SrvInit failed (4) [47, /pvrsrvinit.c]

I'd like to know what i'm missing here. 

Thanks

  • The software team have been notified. They will respond here.
  • Hi,

    First question : Do I need ti-gfx AND ti-sgx-km packages ???

    Yes, you need both. You can find the user space libraries in the software manifest in the Docs folder in linux sdk.  Download them from the link it is pointed there & use make install to add them to your filesystem.

    2nd question : How do I make it work :) ?

    You can rebuild the kernel modules as described here: https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/INSTALL

    Then you should install the sgx libraries from your first question. Then copy the kernel driver in your newly create sdk (with all the user space libraries) & once you boot your board, just insmod the sgx driver. 

    Best Regards, 
    Yordan

  • As I said earlier, it's able to build and I have the right defines. Once I want to install the module, I get the error :
    PVR:(Error): OpenServices: drmOpen failed [120, /pvr_bridge_u.c]
    PVR:(Error): PVRSRVInitSrvConnect: PVRSRVConnect failed [2572, /bridged_pvr_glue.c]
    PVR:(Error): SrvInit: PVRSRVInitSrvConnect failed (4) [37, /srvinit.c]
    PVR:(Error): main: SrvInit failed (4) [47, /pvrsrvinit.c]
  • Can you attach the complete boot log?
  • I rolled back to my Buildroot original version. Kernel 4.4 ans the ti-sgx that comes with buildroot ( with a slight modification in a header path )


    [ 15.662060] bus: 'platform': add driver pvrsrvkm
    [ 15.664046] device class 'pvr': registering
    [ 15.664374] device: 'pvrsrvkm': device_add
    [ 15.664608] PM: Adding info for No Bus:pvrsrvkm
    [ 15.687103] omapdrm_pvr: exports duplicate symbol PVRGetBufferClassJTable (owned by pvrsrvkm)
    [ 15.706849] omapdrm_pvr: exports duplicate symbol PVRGetBufferClassJTable (owned by pvrsrvkm)
    [ 15.737040] omapdrm_pvr: exports duplicate symbol PVRGetBufferClassJTable (owned by pvrsrvkm)
    [ 15.755986] omapdrm_pvr: exports duplicate symbol PVRGetBufferClassJTable (owned by pvrsrvkm)
    [ 55.022989] random: nonblocking pool is initialized

    on the userspace :
    $ pvrsrvinit
    pvrsrvinit: error while loading shared libraries: libgbm.so.2: cannot open shared object file: No such file or directory

    I guess I now have to find those gbm libraries !?
    I still don't think the module is properly mounted tho, it shows in lsmod
  • Seems you have the module already loaded. You have to install libgbm2 package on your board.
    root@am335x-evm:~# opkg search /usr/lib/libgbm.so.2.0.0
    libgbm2 - 10.0.0-r0.tisdk0.0

  • Ok, I resolved one problem with the 24 bits that was unsupported by the pvrsrvkm

    Now the omapfb can't load. Could it be because there's already a fb0 driver in my /dev ans I already have a hook on the framebuffer ????

    [  216.728138] PVR: PVRCore_Init
    [  216.746621] PVR: PVRCore_Init: major device 246
    $ dmesg | tail
    [   17.139591] PM: Adding info for No Bus:gpio116
    [   17.144110] device: 'gpio117': device_add
    [   17.144496] PM: Adding info for No Bus:gpio117
    [   76.586220] random: nonblocking pool is initialized
    [  216.728138] PVR: PVRCore_Init
    [  216.742747] bus: 'platform': add driver pvrsrvkm
    [  216.746621] PVR: PVRCore_Init: major device 246
    [  216.772156] device class 'pvr': registering
    [  216.774955] device: 'pvrsrvkm': device_add
    [  216.775225] PM: Adding info for No Bus:pvrsrvkm
    $ insmod omaplfb.ko
    [  415.597232] PVR_K:(Error): PVRSRVRegisterDCDeviceKM: Going to SysAcquireData [364, home/sbenoit/tor019-os-vizi25/buildroot/board/tornatech/custom-packages/ti-gfx/ti-gfx/GFX_Linux_KM/services4/srvkm/common/deviceclass.c]
    [  415.647576] PVR_K:(Fatal): Debug assertion failed! [220, home/sbenoit/tor019-os-vizi25/buildroot/board/tornatech/custom-packages/ti-gfx/ti-gfx/GFX_Linux_KM/services4/system/include/syscommon.h]
    [  415.689121] ------------[ cut here ]------------
    [  415.693983] Kernel BUG at bf005c44 [verbose debug info unavailable]
    [  415.700530] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
    [  415.706623] Modules linked in: omaplfb(O+) pvrsrvkm(O)
    [  415.712024] CPU: 0 PID: 1022 Comm: insmod Tainted: G        W  O    4.4.56 #3
    [  415.719474] Hardware name: Generic AM33XX (Flattened Device Tree)
    [  415.725836] task: de09a080 ti: de0a4000 task.ti: de0a4000
    [  415.731902] PC is at PVRSRVRegisterDCDeviceKM+0x84/0x364 [pvrsrvkm]
    [  415.738641] LR is at PVRSRVRegisterDCDeviceKM+0x84/0x364 [pvrsrvkm]
    [  415.745188] pc : [<bf005c44>]    lr : [<bf005c44>]    psr: 600c0013
    [  415.745188] sp : de0a5db8  ip : 00000000  fp : 00000020
    [  415.757172] r10: 0012c000  r9 : 00000001  r8 : 00000000
    [  415.762626] r7 : d6c50000  r6 : bf08e380  r5 : 00000000  r4 : d3b4dc00
    [  415.769441] r3 : 00000000  r2 : 00000000  r1 : 00000001  r0 : 00000001
    [  415.776257] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
    [  415.783706] Control: 10c5387d  Table: 93ce4019  DAC: 00000051
    [  415.789705] Process insmod (pid: 1022, stack limit = 0xde0a4218)
    [  415.795976] Stack: (0xde0a5db8 to 0xde0a6000)
    [  415.800526] 5da0:                                                       00000000 bf08e380
    [  415.809069] 5dc0: d3b4dc04 d3b4dcc4 00000000 0012c000 00000000 de0a5dc8 d3b4dc00 bf08cc68
    [  415.817611] 5de0: 00000000 c4978eb1 c48aff5c d3dc6100 c48aff5c c48b39f0 c48b39f0 d3dc6100
    [  415.826153] 5e00: bf091000 00000000 00000001 2c239fe8 bf08e188 bf091008 c48b39f0 c0009930
    [  415.834695] 5e20: 00000000 00000001 00000000 60010013 024000c0 024000c0 0000000c c008d7e8
    [  415.843238] 5e40: c49232f8 c4978eb1 024000c0 c00a84b0 d3dc6400 c0153fc8 c4978eb1 c009088c
    [  415.851780] 5e60: c497a470 c07bdc04 d3dc6040 bf08e140 bf08e140 c4979fe8 d3dc6400 bf08e140
    [  415.860322] 5e80: d3dc6040 2c239fe8 bf08e188 c010cf80 c49232f8 c4979fe8 c4978dbb c4979fe8
    [  415.868864] 5ea0: c07bdc04 c00d3668 bf08e14c 00007fff bf08e140 c00d0a88 c5152de8 bf08e298
    [  415.877406] 5ec0: c48b098c bf08e354 e0e3d52c bf08e14c 00000000 c07bf524 e0dee000 0004f57c
    [  415.885947] 5ee0: 00001c3e 00000000 00000001 00000000 00000000 00000000 00000000 00000000
    [  415.894489] 5f00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    [  415.903031] 5f20: 00000000 00000000 00000280 00000000 00000003 000c4008 0000017b c000fa84
    [  415.911573] 5f40: de0a4000 00000000 00000000 c00d4058 c2dee000 e0dee000 0004f57c e0e3ce74
    [  415.920115] 5f60: e0e3ccac e0e2b4cc 000023a8 00002bf8 00000000 00000000 00000000 0000164c
    [  415.928657] 5f80: 0000002b 0000002c 00000013 00000017 00000010 00000000 000c4008 be9aee31
    [  415.937198] 5fa0: 00000002 c000f8e0 000c4008 be9aee31 00000003 000c4008 00000000 be9aee31
    [  415.945740] 5fc0: 000c4008 be9aee31 00000002 0000017b be9aee31 00000000 b6f86000 00000000
    [  415.954282] 5fe0: be9aeb68 be9aeb58 00026660 b6ee5880 600c0010 00000003 00000000 00000000
    [  415.963039] [<bf005c44>] (PVRSRVRegisterDCDeviceKM [pvrsrvkm]) from [<bf08cc68>] (OMAPLFBInit+0x32c/0x600 [omaplfb])
    [  415.974055] [<bf08cc68>] (OMAPLFBInit [omaplfb]) from [<bf091008>] (OMAPLFB_Init+0x8/0x2c [omaplfb])
    [  415.983615] [<bf091008>] (OMAPLFB_Init [omaplfb]) from [<c0009930>] (do_one_initcall+0x80/0x1e0)
    [  415.992806] [<c0009930>] (do_one_initcall) from [<c010cf80>] (do_init_module+0x5c/0x38c)
    [  416.001265] [<c010cf80>] (do_init_module) from [<c00d3668>] (load_module+0x1af0/0x22fc)
    [  416.009628] [<c00d3668>] (load_module) from [<c00d4058>] (SyS_finit_module+0x7c/0x90)
    [  416.017812] [<c00d4058>] (SyS_finit_module) from [<c000f8e0>] (ret_fast_syscall+0x0/0x1c)
    [  416.026355] Code: e3a020dc e59f12b0 e3a00001 eb00685d (e7f001f2)
    [  416.032726] ---[ end trace b1842f7f78f2f0aa ]---
    

  • Update :
    I build the da8xx_fb driver and tilcdc ad module, unloaded them then I was able to go further with this module. But the omapfb is stuck at

    $ insmod omaplfb.ko
    [ 80.958423] omaplfb: Unknown symbol register_vsync_cb (err 0)
    [ 80.964832] omaplfb: Unknown symbol unregister_vsync_cb (err 0)
    [ 80.976297] omaplfb: Unknown symbol register_vsync_cb (err 0)
    [ 80.982822] omaplfb: Unknown symbol unregister_vsync_cb (err 0)
    insmod: can't insert 'omaplfb.ko': unknown symbol in module, or unknown parameter
  • These symbols were last used in Processor SDK 1.00.03 kernel 3.14.43.
  • After some tests, I need to get those symbols exported by tilcdc.
    Then, I still get the PVR_K:(Error): PVRSRVRegisterDCDeviceKM: Going to SysAcquireData [364, home/sbenoit/tor019-os-vizi25/buildroot/board/tornatech/custom-packages/ti-gfx/ti-gfx/GFX_Linux_KM/services4/srvkm/common/deviceclass.c]

    when trying to load omaplfb.ko from the driver KM
  • Hi,

    Can you check this:
    processors.wiki.ti.com/.../SGXDbg

    Best Regards,
    Yordan
  • Hi Yordan,

    Why both, ti-gfx and ti-sgx, are required?

    Thanks!

    Stefan

  • Hello Stefan,

    Depending on the installed kernel driver, you will need to choose the proper one.

    Best regards,
    Kemal

  • Hello Kemal,

    I've a similar problem:

    After starting a Qt5 application I get following messages:
    PVR:(Error): Couldn't load WS module libpvrQWSWSEGL.so.1 [0, ]
    PVR:(Error): Couldn't load WS module libpvrws_WAYLAND.so [0, ]
    [  352.662698] PVR_K:(Error): BridgedDispatchKM: Driver initialisation not completed yet.
    PVR:(Error): PVRSRVBridgeCall: Failed to access device.  Function ID:3223086849 (strerror returns no value.). [0, ]
    PVR:(Error): PVRSRVEnumerateDevices: BridgeCall failed [0, ]
    PVR:(Error): PVRSRVConnect: Unable to enumerate devices. [0, ]
    PVR:(Error): Couldn't connect to services [0, ]
    Could not initialize egl display
    Aborted (core dumped)


    Output of gfx_check.sh:
    # ./gfx_check.sh
    WSEGL settings
    [default]
    #WindowSystem=libpvrws_WAYLAND
    WindowSystem=libpvrQWSWSEGL.so.1
    ------
    ARM CPU information
    processor       : 0
    model name      : ARMv7 Processor rev 2 (v7l)
    BogoMIPS        : 996.14
    Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32
    CPU implementer : 0x41
    CPU architecture: 7
    CPU variant     : 0x3
    CPU part        : 0xc08
    CPU revision    : 2

    Hardware        : Generic AM33XX (Flattened Device Tree)
    Revision        : 0000
    Serial          : 0000000000000000
    ------
    SGX driver information
    Version SGX_DDK sgxddk MAIN@3699939 (release) omap_linux
    System Version String: None
    ------
    Framebuffer settings
    ------
    Rotation settings
    0
    ------
    Kernel Module information
    Module                  Size  Used by
    musb_dsps               9734  0
    musb_hdrc              87490  1 musb_dsps
    udc_core               19322  1 musb_hdrc
    phy_am335x              2372  1
    phy_generic             5372  1 phy_am335x
    phy_am335x_control      2873  1 phy_am335x
    usbcore               201611  1 musb_hdrc
    usb_common              4737  5 phy_am335x,udc_core,musb_hdrc,musb_dsps,usbcore
    pvrsrvkm              403512  0
    ti_am335x_adc           6837  0
    pm33xx                  6433  0
    ecb                     1909  0
    sha256_generic         10178  0
    hmac                    2735  0
    md5                     2219  0
    sha1_generic            2864  0
    sha1_arm_neon           6261  0
    sha1_arm                3862  1 sha1_arm_neon
    wkup_m3_ipc             8176  1 pm33xx
    wkup_m3_rproc           3670  1
    remoteproc             28453  2 wkup_m3_rproc,wkup_m3_ipc
    virtio                  7614  1 remoteproc
    virtio_ring            15324  1 remoteproc
    ti_emif_sram            5663  1 pm33xx
    omap_aes_driver        19334  0
    omap_sham              21950  0
    crypto_engine           7162  1 omap_aes_driver
    omap_rng                4759  0
    rng_core                7392  1 omap_rng
    musb_am335x             1426  0
    rtc_omap                9662  0
    omap_wdt                4634  0
    ti_am335x_tscadc        6162  1 ti_am335x_adc
    sch_fq_codel            8987  1
    ------
    Boot settings
    console=ttyO0,115200n8 root=PARTUUID=00000000-02 rw rootfstype=ext3 rootwait
    ------
    Linux Kernel version
    Linux buildroot 4.9.51 #1 PREEMPT Thu Sep 28 16:52:59 CEST 2017 armv7l GNU/Linux

    I built it with TI linux kernel 4.9.51, ti-sgk-um (ti-img-sgx/1.14.3699939) and ti-sgx-km (ti-img-sgx/1.14.3699939/k4.9).
    In ti-sgx-km.mk PRODUCT_NAME is set to ti335x.


    I don't want to use wayland (libwayland-server.so and libgbm.so.2).
    I've temporarily fixed the following errors
    : error while loading shared libraries: libgbm.so.2: cannot open shared object file: No such file or directory
    : error while loading shared libraries: libwayland-server.so.0: cannot open shared object file: No such file or directory
    by copying both libraries into /usr/lib.

    Thank you!

    Stefan

  • After changing of "WindowSystem=libpvrQWSWSEGL.so.1" to "WindowSystem=libpvrDRMWSEGL.so" in powervr.ini, I get following messages:
    [ 821.301005] PVR_K:(Error): BridgedDispatchKM: Driver initialisation not completed yet.
    PVR:(Error): PVRSRVBridgeCall: Failed to access device. Function ID:3223086849 (strerror returns no value.). [0, ]
    PVR:(Error): PVRSRVEnumerateDevices: BridgeCall failed [0, ]
    PVR:(Error): PVRSRVConnect: Unable to enumerate devices. [0, ]
    PVR:(Error): Couldn't connect to services [0, ]
    Could not initialize egl display
    Aborted (core dumped)
  • In my case, I didn't get much help from TI ... they always refer us to that wiki page with missing documentation. There's no straight information on when to use GFX and when to use SGX.

    For the kernel 4.9 I suppose you are using the SKG-KM and SGX-UM driver from the good driver branch. In my case, I had to put printk on every line of the lcd driver to realise that there was a bad value in our device tree. The smallest mistake will make the driver fail to mount.

    Good luck !

  • Can you post the exact steps you use to create that build with buildroot? Then I will tell you what exactly went wrong.
  • I've downloaded buildroot-2017.08

    make menuconfig
    - use linaro toolchain 2017.02
    - use systemd
    - kernel: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git; branch=ti-linux-4.9.y
    - config: modified tisdk_am335x-evm_defconfig
    - dts: modified am335x-boneblack.dts
    - select ti-sgx-km and ti-sgx-um (added current ti git-repo and branch for both, see prior post)
    - select Qt5: qt5base, gui module, opengl support (opengl es 2.0+), eglfs support, default graphical platform (eglfs), dbus module, qt5declarative, quick module, qt5quickcontrols, ...

    It works with PROCESSOR-SDK-LINUX-AM335X 03.02.00.05, but it uses too much memory!
    Now, I work with buildroot to get a minimal, memory-efficient linux system.

    Thanks!
  • Can you attach the modified tisdk_am335x-evm_defconfig ?
  • If I run /etc/init.d/rc.pvr I get following messages:
    # ./rc.pvr start
    [ 61.052230] [drm] Initialized pvr 1.14.3699939 20110701 on minor 1
    [ 61.089833] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
    PVR:(Error): PVRSRVDetectPlaform: Unknown platform: AM335X
    . [0[ 61.100968] PVR_K:(Error): BridgedDispatchKM: Initialisation failed. Driver unusable.
    , ]
    PVR:(Error): LoaduKernelProgram : SGX ukernel program Device Addr: 0xe400000 invalid alignment [0, ]
    PVR:(Error): SetupuKernel : Failed to load uKernel programs [0, ]
    PVR:(Error): SrvInit: Initialisation for device of class 0, type 7, index 0, failed (1) [0, ]
    PVR:(Error): PVRSRVBridgeCall: Failed to access device. Function ID:3223086862 (strerror returns no value.). [0, ]
    /usr/bin/pvrsrvctl: SrvInit failed (already initialized?) (err=PVRSRV_ERROR_OUT_OF_MEMORY - Unable to allocate required memory)

    It's a platform issue...?
  • The buildroot config of ti-sgx-um is also outdated. Attached is the modified ti-sgx-um.mk

    /cfs-file/__key/communityserver-discussions-components-files/791/3324.ti_2D00_sgx_2D00_um.mk.txt

    I've modified the defconfig file to kernel 4.9.51 (see attachment).

    /cfs-file/__key/communityserver-discussions-components-files/791/tisdk_5F00_am335x_2D00_evm_5F00_defconfig.txt

    After that I get following messages, if I run /etc/init.d/rc.pvr:

    # ./rc.pvr start
    [   63.480157] [drm] Initialized pvr 1.14.3699939 20110701 on minor 1
    [   63.525657] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
    Loaded PowerVR consumer services.

    If I run my application, I get... :
    QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
    EGL library doesn't support Emulator extensions
    Aborted (core dumped)


    Output of gfx_check.sh:
    # ./gfx_check.sh
    WSEGL settings
    [default]
    #WindowSystem=libpvrws_WAYLAND.so
    WindowSystem=libpvrDRMWSEGL.so
    ------
    ARM CPU information
    processor       : 0
    model name      : ARMv7 Processor rev 2 (v7l)
    BogoMIPS        : 996.14
    Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32
    CPU implementer : 0x41
    CPU architecture: 7
    CPU variant     : 0x3
    CPU part        : 0xc08
    CPU revision    : 2

    Hardware        : Generic AM33XX (Flattened Device Tree)
    Revision        : 0000
    Serial          : 0000000000000000
    ------
    SGX driver information
    Version SGX_DDK sgxddk MAIN@3699939 (release) omap_linux
    System Version String: SGX revision = 125
    ------
    Framebuffer settings
    ------
    Rotation settings
    0
    ------
    Kernel Module information
    Module                  Size  Used by
    bc_example              7262  0
    pvrsrvkm              403384  1 bc_example
    musb_dsps               9734  0
    musb_hdrc              97898  1 musb_dsps
    udc_core               19602  1 musb_hdrc
    phy_am335x              2372  1
    cppi41                  9493  30
    phy_am335x_control      2873  1 phy_am335x
    phy_generic             5372  1 phy_am335x
    usbcore               201945  1 musb_hdrc
    ti_am335x_adc           6837  0
    kfifo_buf               3163  1 ti_am335x_adc
    industrialio           46956  2 ti_am335x_adc,kfifo_buf
    usb_common              4737  5 phy_am335x,udc_core,musb_hdrc,musb_dsps,usbcore
    omap_rng                4759  0
    rng_core                7392  1 omap_rng
    pwm_tiehrpwm            5318  0
    rtc_omap                9662  0
    musb_am335x             1426  0
    omap_wdt                4634  0
    ti_am335x_tscadc        6162  1 ti_am335x_adc
    tps65218_pwrbutton      2870  0
    ------
    Boot settings
    console=ttyO0,115200n8 root=PARTUUID=00000000-02 rw rootfstype=ext3 rootwait
    ------
    Linux Kernel version
    Linux buildroot 4.9.51 #1 PREEMPT Mon Oct 2 16:31:06 CEST 2017 armv7l GNU/Linux


    Thanks!

  • Try exporting "export QT_QPA_PLATFORM=eglfs"
  • Hi Kemal,

    Thanks!

    Unfortunately, it doesn't work.

  • If you export QT_QPA_EGLFS_INTEGRATION the "EGL library doesn't support Emulator extensions" error should be missed. Can you try?
    export QT_QPA_EGLFS_INTEGRATION=none
  • Hi Kemal,

    Thanks!

    Solution:
    - Create and add package BR2_PACKAGE_TI_SGX_LIBGBM (git://git.ti.com/glsdk/libgbm.git)
    - BR2_PACKAGE_WAYLAND=y (pvrsrvctl needs libwayland-server.so.0)
    - BR2_PACKAGE_LIBDRM=y, BR2_PACKAGE_LIBDRM_OMAP=y

    - ti-sgx-um.mk:
    Add lines
        mkdir -p $(TARGET_DIR)/lib/gbm
        ln -sf ../libpvrGBMWSEGL.so.1.14.3699939 $(TARGET_DIR)/lib/gbm/gbm_pvr.so
    to TI_SGX_UM_INSTALL_CONF

    - qt5base.mk:
    ...
    # Uses libgbm from mesa3d
    ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
    QT5BASE_CONFIGURE_OPTS += -kms -gbm
    QT5BASE_DEPENDENCIES += mesa3d
    else ifeq ($(BR2_PACKAGE_TI_SGX_UM),y)
    QT5BASE_CONFIGURE_OPTS += -kms -gbm
    else
    QT5BASE_CONFIGURE_OPTS += -no-kms
    endif
    ...
    ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
    QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS)      += Qt5EglFsKmsSupport
    endif
    ifeq ($(BR2_PACKAGE_TI_SGX_UM),y)
    QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS)      += Qt5EglFsKmsSupport
    endif
    else
    QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS)      += Qt5EglDeviceIntegration
    endif

    - export QT_QPA_EGLFS_INTEGRATION=none


    BR
    Stefan

  • Can you share your BR2_PACKAGE_TI_SGX_LIBGBM .mk file?
  • Thank you Stefan. That confirms that I am building those correctly. Can you also attach your buildroot defconfig? I must have something set wrong there.
  • Here is what I have so far for a buildroot defconfig

    BR2_arm=y
    BR2_cortex_a8=y
    # BR2_STRIP_strip is not set
    BR2_GLOBAL_PATCH_DIR="board/beaglebone/patches"
    BR2_TOOLCHAIN_EXTERNAL=y
    BR2_INIT_SYSTEMD=y
    BR2_TARGET_GENERIC_GETTY_PORT="ttyO0"
    BR2_ROOTFS_OVERLAY="board/beaglebone/filesystem"
    BR2_ROOTFS_POST_IMAGE_SCRIPT="board/beaglebone/post-image.sh"
    BR2_LINUX_KERNEL=y
    BR2_LINUX_KERNEL_CUSTOM_GIT=y
    BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.ti.com/processor-sdk/processor-sdk-linux.git"
    BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="e3a80a1c5ca778adac34bdc5900f232ec13c4506"
    BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"
    BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/beaglebone/tisdk_am335x.frag"
    BR2_LINUX_KERNEL_DTS_SUPPORT=y
    BR2_LINUX_KERNEL_USE_CUSTOM_DTS=y
    BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/beaglebone/am335x-boneblack.dts"
    BR2_PACKAGE_TI_KMSCUBE=y
    BR2_PACKAGE_TI_SGX_DEMOS=y
    BR2_PACKAGE_TI_SGX_KM=y
    BR2_PACKAGE_TI_SGX_UM=y
    BR2_PACKAGE_TI_GBM=y
    BR2_PACKAGE_WAYLAND=y
    BR2_TARGET_ROOTFS_EXT2=y
    BR2_TARGET_ROOTFS_EXT2_4=y
    BR2_TARGET_ROOTFS_EXT2_SIZE="350M"
    BR2_TARGET_UBOOT=y
    BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
    BR2_TARGET_UBOOT_CUSTOM_VERSION=y
    BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.09.01"
    BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am335x_evm"
    BR2_TARGET_UBOOT_NEEDS_DTC=y
    # BR2_TARGET_UBOOT_FORMAT_BIN is not set
    BR2_TARGET_UBOOT_FORMAT_IMG=y
    BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
    BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="spl/u-boot-spl.bin"
    BR2_TARGET_UBOOT_SPL=y
    BR2_TARGET_UBOOT_SPL_NAME="MLO"
    BR2_PACKAGE_HOST_DOSFSTOOLS=y
    BR2_PACKAGE_HOST_GENIMAGE=y
    BR2_PACKAGE_HOST_MTOOLS=y
    BR2_PACKAGE_HOST_PKGCONF=y

  • Also, are you able to run the kmscube demo? That is where I'm getting stuck, specifically with libgbm throwing a segmentation fault.
  • I figured out the problem.

    My build environment was automatically adding the following compiler flags. Removing these fixed the problem.

    -D_LARGEFILE_SOURCE
    -D_LARGEFILE64_SOURCE
    -D_FILE_OFFSET_BITS=64

  • Hi,

    I use this TI linux kernel repo: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git

    BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git"
    BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="ti-linux-4.9.y"

    I don't know the difference to git://git.ti.com/processor-sdk/processor-sdk-linux.git