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.

DRA726: yocto question

Part Number: DRA726

I am creating a yocto based on  SDK rev 5, currently using version 3.04

The newly created image boots correctly except that weston is not working

I then noticed this in packagegroup-arago-tisdk-multimedia.bb

ACCEL_FW_append_dra7xx-evm = " \
    ${@bb.utils.contains('MACHINE_FEATURES', 'mmip', 'ipumm-fw', '', d)} \
    vis \
"

It is not likely the cause for this problem as I don't see the EGL libraries

I have  "require conf/machine/include/dra7xx.inc" in my actia-gd.conf file
which has "require conf/machine/include/omap-a15.inc"
which has :

MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet sgx mmip dsp"

What am I missing? I followed Brad's seminar close so I thought I took care of everything.

My machine is not dra7xx-evm, I call it actia-gd and distro named actia,  we have a custom board

Since our board differs a lot from the evm I need to customize both u-boot and the kernel. Much the same as with 3.04

My challenge once I get this to work is to get the analog cameras to work with cal.c where major modifications have been made since the kernel in rev 3.03

We use an intersil device with 4 cameras mutliplexed on the CSI port

This is the log for weston

Date: 2019-11-22 UTC
[23:01:08.578] weston 2.0.0
               http://wayland.freedesktop.org
               Bug reports to: bugs.freedesktop.org/enter_bug.cgi
               Build: 1.99.94-2-g4c4f13d configure.ac: bump to version 2.0.0 for the official release (2017-02-24 16:19:03 -0800)
[23:01:08.578] Command line: weston --idle-time=0
[23:01:08.578] OS: Linux, 4.14.79-actia-g3438de3474, #1 SMP PREEMPT Fri Nov 22 23:51:14 UTC 2019, armv7l
[23:01:08.579] Using config file '/etc//weston.ini'
[23:01:08.595] Output repaint window is 7 ms maximum.
[23:01:08.597] Loading module '/usr/lib/libweston-2/drm-backend.so'
[23:01:08.607] initializing drm backend
[23:01:08.614] using /dev/dri/card0
[23:01:08.616] Loading module '/usr/lib/libweston-2/gl-renderer.so'
failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object file: No such file or directory
failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No such file or directory
loaded module : gbm_pvr.so
found valid GBM backend : gbm_pvr.so
[23:01:08.652] warning: either no EGL_EXT_platform_base support or specific platform support; falling back to eglGetDisplay.
[23:01:08.657] failed to initialize display
[23:01:08.657] EGL error state: EGL_BAD_ALLOC (0x3003)
[23:01:08.657] failed to initialize egl
[23:01:08.683] fatal: failed to create compositor backend
PVR:(Error): OpenServices: PVRDRMOpenRender failed [0, ]
PVR:(Error): PVRSRVConnect: Unable to open connection. [0, ]
PVR:(Error): Couldn't connect to services [0, ]


What does the PLATFORMLIST definition do?

PLATFORMLIST_append_dra7xx-evm = " \
        tda3xx-evm \
"

Michel Catudal

ACTIA Corp

  • Hi Michel,

    -1-

    Let me start responding to you by asking you if your generated filesystem has the "/usr/bin/pvrsrvinit" and then is there the systemd service that starts this automatically? If these two things are not present then you are likely to run into this issue.

    -2-

    Could you please manually run "pvrsrvinit" and then try to launch weston? 

    Please make sure that that the actia-gd is closely resembling the dra7xx-evm and including the necessary dependencies.

    Please share the feedback on both the questions.

    Regards

    Karthik

  • Correction, I do have the EGL libraries

    rroot@actia-gd:/var/log# dir /usr/lib/*GL*
    lrwxrwxrwx    1 root     root            22 Nov 25 13:50 /usr/lib/libEGL.so -> libEGL.so.1.14.3699939
    lrwxrwxrwx    1 root     root            22 Nov 25 13:50 /usr/lib/libEGL.so.1 -> libEGL.so.1.14.3699939
    -rw-r--r--    1 root     root          6580 Nov 22 23:02 /usr/lib/libEGL.so.1.14.3699939
    lrwxrwxrwx    1 root     root            26 Nov 25 13:50 /usr/lib/libGLES_CM.so -> libGLES_CM.so.1.14.3699939
    lrwxrwxrwx    1 root     root            26 Nov 25 13:50 /usr/lib/libGLES_CM.so.1 -> libGLES_CM.so.1.14.3699939
    -rw-r--r--    1 root     root        425456 Nov 22 23:02 /usr/lib/libGLES_CM.so.1.14.3699939
    lrwxrwxrwx    1 root     root            25 Nov 25 13:50 /usr/lib/libGLESv2.so -> libGLESv2.so.1.14.3699939
    lrwxrwxrwx    1 root     root            25 Nov 25 13:50 /usr/lib/libGLESv2.so.1 -> libGLESv2.so.1.14.3699939
    -rw-r--r--    1 root     root        437592 Nov 22 23:02 /usr/lib/libGLESv2.so.1.14.3699939
    lrwxrwxrwx    1 root     root            25 Nov 25 13:50 /usr/lib/libGLESv2.so.2 -> libGLESv2.so.1.14.3699939
    -rw-r--r--    1 root     root          1485 Nov 25 13:55 /usr/lib/libQt5OpenGL.prl
    lrwxrwxrwx    1 root     root            21 Nov 25 13:54 /usr/lib/libQt5OpenGL.so -> libQt5OpenGL.so.5.9.7
    lrwxrwxrwx    1 root     root            21 Nov 25 13:54 /usr/lib/libQt5OpenGL.so.5 -> libQt5OpenGL.so.5.9.7
    lrwxrwxrwx    1 root     root            21 Nov 25 13:54 /usr/lib/libQt5OpenGL.so.5.9 -> libQt5OpenGL.so.5.9.7
    -rwxr-xr-x    1 root     root        270536 Nov 25 13:54 /usr/lib/libQt5OpenGL.so.5.9.7
    -rw-r--r--    1 root     root          1500 Nov 25 13:55 /usr/lib/libQt5OpenGLExtensions.prl
    lrwxrwxrwx    1 root     root            30 Nov 25 13:50 /usr/lib/libpvrDRMWSEGL.so -> libpvrDRMWSEGL.so.1.14.3699939
    lrwxrwxrwx    1 root     root            30 Nov 25 13:50 /usr/lib/libpvrDRMWSEGL.so.1 -> libpvrDRMWSEGL.so.1.14.3699939
    -rw-r--r--    1 root     root         17136 Nov 22 23:02 /usr/lib/libpvrDRMWSEGL.so.1.14.3699939
    lrwxrwxrwx    1 root     root            30 Nov 25 13:50 /usr/lib/libpvrGBMWSEGL.so -> libpvrGBMWSEGL.so.1.14.3699939
    lrwxrwxrwx    1 root     root            30 Nov 25 13:50 /usr/lib/libpvrGBMWSEGL.so.1 -> libpvrGBMWSEGL.so.1.14.3699939
    -rw-r--r--    1 root     root         19500 Nov 22 23:02 /usr/lib/libpvrGBMWSEGL.so.1.14.3699939


    [[0;1;32m●[[0m weston.service
       Loaded: loaded (/etc/init.d/weston; generated; vendor preset: enabled)
       Active: [[0;1;32mactive (exited)[[0m since Fri 2019-11-22 23:01:08 UTC; 3 days ago
         Docs: man:systemd-sysv-generator(8)
      Process: 993 ExecStart=/etc/init.d/weston start (code=exited, status=0/SUCCESS)
        Tasks: 0 (limit: 4915)
       CGroup: /system.slice/weston.service

    Nov 22 23:01:08 actia-gd systemd[1]: Starting weston.service...
    Nov 22 23:01:08 actia-gd systemd[1]: Started weston.service.

    Michel Catudal

    ACTIA Cort

  • root@actia-gd:/var/log# pvrsrvinit
    -sh: pvrsrvinit: command not found

    Michel

  • rc.pvr has

           if ! /usr/bin/pvrsrvctl --start --no-module; then return; fi

    Here is something interesting

    root@actia-gd:/etc/init.d# pvrsrvctl --restart
    Failed to load /lib/modules/4.4.84/extra/pvrsrvkm.ko: No such file or directory
    root@actia-gd:/etc/init.d# uname -r
    4.14.79-actia-g3438de3474

    Michel

  • root@actia-gd:~# /etc/init.d/rc.pvr stop
    rmmod: ERROR: Module bc_example is not currently loaded
    Warning: Could not unload bc_example
    Unloaded PowerVR consumer services.

    root@actia-gd:~# /etc/init.d/rc.pvr start
    PVR:(Error): OpenServices: PVRDRMOpenRender failed [0, ]
    PVR:(Error): PVRSRVInitSrvConnect: PVRSRVConnect failed [0, ]
    PVR:(Error): SrvInit: PVRSRVInitSrvConnect failed (4) [0, ]
    /usr/bin/pvrsrvctl: SrvInit failed (already initialized?) (err=PVRSRV_ERROR_INIT_FAILURE)

    If I do a modprobe bc_example I get this

    [   63.622297] Unable to handle kernel NULL pointer dereference at virtual address 00000000
    [   63.630431] pgd = ed628000
    [   63.662047] [00000000] *pgd=bbe5b835
    [   63.665653] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
    [   63.671075] Modules linked in: bc_example(O+) pvrsrvkm(O) usbhid xhci_plat_hcd xhci_hcd usbcore rpmsg_rpc dwc3 udc_core usb_common sha512_generic sha512_arm sha256_generic sha1_generic sha1_arm_neon sha1_arm md5 snd_soc_simple_card snd_soc_simple_card_utils cbc aes_arm_bs crypto_simd panel_dpi pwm_bl backlight cryptd xfrm_user xfrm4_tunnel ipcomp xfrm_ipcomp omap_remoteproc virtio_rpmsg_bus rpmsg_core remoteproc omap_aes_driver esp4 omap_sham ah4 omap_wdt af_key xfrm_algo phy_omap_usb2 ti_vpe ti_sc ti_csc ti_vpdma dwc3_omap mwifiex_sdio mwifiex cfg80211 omap_des des_generic crypto_engine omap_crypto st_acc33_i2c st_acc33 egalax_ts noa1305 mcp4018 at24 snd_soc_tlv320aic3x sch_fq_codel gdbserverproxy(O) cryptodev(O) cmemk(O)
    [   63.735631] CPU: 0 PID: 1058 Comm: modprobe Tainted: G           O    4.14.79-actia-g3438de3474 #1
    [   63.744628] Hardware name: Generic DRA72X (Flattened Device Tree)
    [   63.750747] task: ed680e00 task.stack: ed686000
    [   63.755371] PC is at AllocateDeviceID+0xc/0x84 [pvrsrvkm]
    [   63.760847] LR is at PVRSRVRegisterBCDeviceKM+0x1a4/0x240 [pvrsrvkm]
    [   63.767229] pc : [<bf437fdc>]    lr : [<bf4424e0>]    psr: 400f0013
    [   63.773521] sp : ed687d38  ip : ed687d48  fp : ed687d44
    [   63.778767] r10: ed63cea4  r9 : 00000000  r8 : 00000000
    [   63.784013] r7 : ee7923c0  r6 : 00000002  r5 : 00000000  r4 : 00000000
    [   63.790567] r3 : ed596d00  r2 : ed596d00  r1 : ed596d08  r0 : 00000000
    [   63.797123] Flags: nZcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
    [   63.804288] Control: 10c5387d  Table: ad62806a  DAC: 00000051
    [   63.810058] Process modprobe (pid: 1058, stack limit = 0xed686210)
    [   63.816263] Stack: (0xed687d38 to 0xed688000)
    [   63.820639] 7d20:                                                       ed687d74 ed687d48
    [   63.828853] 7d40: bf4424e0 bf437fdc ed6a6240 ed596d00 00000001 ee7923c0 bf4a3280 00000000
    [   63.837067] 7d60: ed63cdc0 00000001 ed687d94 ed687d78 bf4a12a4 bf442348 bf4a3288 bf4a205c
    [   63.845282] 7d80: bf4a6000 ed63cdc0 ed687da4 ed687d98 bf4a15e0 bf4a1180 ed687dc4 ed687da8
    [   63.853496] 7da0: bf4a60d0 bf4a15dc bf4a205c c0c42a80 ffffe000 00000000 ed687e34 ed687dc8
    [   63.861711] 7dc0: c0101a7c bf4a600c ffffe000 ee520340 efd2f880 ef001e40 ffffe000 00069b50
    [   63.869924] 7de0: 00000000 ed63cea4 ed687e24 ed687df8 c0225e3c c0225a3c 00000001 f2c78000
    [   63.878138] 7e00: ed687e34 ed687e10 c0226f84 c0230b00 bf4a30c0 bf4a30c0 00000001 ed63ce80
    [   63.886352] 7e20: ed63cdc0 00000001 ed687e5c ed687e38 c01b1bb8 c0101a3c ed687e5c ed687e48
    [   63.894566] 7e40: ed687f40 00000001 ed63ce80 bf4a30c0 ed687f1c ed687e60 c01b0a4c c01b1b5c
    [   63.902779] 7e60: bf4a30cc 00007fff bf4a30c0 c01adae8 00000000 c0987278 c0987250 bf4a31d4
    [   63.910993] 7e80: c09873a0 c0a09a30 bf4a31f0 c08047e0 bf4a31c0 00000000 bf4a3108 bf4a30c0
    [   63.919207] 7ea0: ed84d240 ed687f34 ed687eec ed687eb8 c023df3c 00000000 00000000 00000000
    [   63.927421] 7ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    [   63.935634] 7ee0: 00000000 00000000 00000000 00000000 7fffffff 00000000 00000003 000281f0
    [   63.943848] 7f00: 0000017b c0107f64 ed686000 0000017b ed687fa4 ed687f20 c01b1200 c01aeb4c
    [   63.952061] 7f20: 7fffffff 00000000 00000003 00000000 00000000 f2c78000 00003280 00000000
    [   63.960274] 7f40: f2c793ce f2c78000 00003280 f2c7af38 f2c7ae70 f2c7a4f4 00003000 000034a0
    [   63.968487] 7f60: 00000000 00000000 00000000 00001ce4 00000012 00000013 0000000d 0000000a
    [   63.976701] 7f80: 00000009 00000000 00000000 00000000 00000001 00000000 00000000 ed687fa8
    [   63.984915] 7fa0: c0107d60 c01b1168 00000000 00000001 00000003 000281f0 00000000 0003be50
    [   63.993128] 7fc0: 00000000 00000001 00000000 0000017b 00000000 00000000 00000000 0003c040
    [   64.001342] 7fe0: bea29908 bea298f8 0001f888 b6ec6a82 800b0030 00000003 00000000 00000000
    [   64.009551] Backtrace:
    [   64.012125] [<bf437fd0>] (AllocateDeviceID [pvrsrvkm]) from [<bf4424e0>] (PVRSRVRegisterBCDeviceKM+0x1a4/0x240 [pvrsrvkm])
    [   64.023283] [<bf44233c>] (PVRSRVRegisterBCDeviceKM [pvrsrvkm]) from [<bf4a12a4>] (BC_Example_Register+0x130/0x150 [bc_example])
    [   64.034813]  r8:00000001 r7:ed63cdc0 r6:00000000 r5:bf4a3280 r4:ee7923c0
    [   64.041555] [<bf4a1174>] (BC_Example_Register [bc_example]) from [<bf4a15e0>] (BC_Example_Init+0x10/0x20 [bc_example])
    [   64.052297]  r7:ed63cdc0 r6:bf4a6000 r5:bf4a205c r4:bf4a3288
    [   64.057990] [<bf4a15d0>] (BC_Example_Init [bc_example]) from [<bf4a60d0>] (BC_Example_ModInit+0xd0/0x1000 [bc_example])
    [   64.068831] [<bf4a6000>] (BC_Example_ModInit [bc_example]) from [<c0101a7c>] (do_one_initcall+0x4c/0x170)
    [   64.078438]  r5:00000000 r4:ffffe000
    [   64.082035] [<c0101a30>] (do_one_initcall) from [<c01b1bb8>] (do_init_module+0x68/0x1f8)
    [   64.090161]  r8:00000001 r7:ed63cdc0 r6:ed63ce80 r5:00000001 r4:bf4a30c0
    [   64.096894] [<c01b1b50>] (do_init_module) from [<c01b0a4c>] (load_module+0x1f0c/0x24ac)
    [   64.104932]  r7:bf4a30c0 r6:ed63ce80 r5:00000001 r4:ed687f40
    [   64.110618] [<c01aeb40>] (load_module) from [<c01b1200>] (SyS_finit_module+0xa4/0xbc)
    [   64.118483]  r10:0000017b r9:ed686000 r8:c0107f64 r7:0000017b r6:000281f0 r5:00000003
    [   64.126344]  r4:00000000
    [   64.128893] [<c01b115c>] (SyS_finit_module) from [<c0107d60>] (ret_fast_syscall+0x0/0x54)
    [   64.137105]  r6:00000000 r5:00000001 r4:00000000
    [   64.141744] Code: eafffff2 e1a0c00d e92dd800 e24cb004 (e590c000)

    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.665653] Internal error: Oops: 17 [#1] PREEMPT SMP ARM


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.810058] Process modprobe (pid: 1058, stack limit = 0xed686210)


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.816263] Stack: (0xed687d38 to 0xed688000)


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.820639] 7d20:                                                       ed687d74 ed687d48


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.828853] 7d40: bf4424e0 bf437fdc ed6a6240 ed596d00 00000001 ee7923c0 bf4a3280 00000000


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.837067] 7d60: ed63cdc0 00000001 ed687d94 ed687d78 bf4a12a4 bf442348 bf4a3288 bf4a205c


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.845282] 7d80: bf4a6000 ed63cdc0 ed687da4 ed687d98 bf4a15e0 bf4a1180 ed687dc4 ed687da8


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.853496] 7da0: bf4a60d0 bf4a15dc bf4a205c c0c42a80 ffffe000 00000000 ed687e34 ed687dc8


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.861711] 7dc0: c0101a7c bf4a600c ffffe000 ee520340 efd2f880 ef001e40 ffffe000 00069b50


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.869924] 7de0: 00000000 ed63cea4 ed687e24 ed687df8 c0225e3c c0225a3c 00000001 f2c78000


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.878138] 7e00: ed687e34 ed687e10 c0226f84 c0230b00 bf4a30c0 bf4a30c0 00000001 ed63ce80


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.886352] 7e20: ed63cdc0 00000001 ed687e5c ed687e38 c01b1bb8 c0101a3c ed687e5c ed687e48


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.894566] 7e40: ed687f40 00000001 ed63ce80 bf4a30c0 ed687f1c ed687e60 c01b0a4c c01b1b5c


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.902779] 7e60: bf4a30cc 00007fff bf4a30c0 c01adae8 00000000 c0987278 c0987250 bf4a31d4


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.910993] 7e80: c09873a0 c0a09a30 bf4a31f0 c08047e0 bf4a31c0 00000000 bf4a3108 bf4a30c0


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.919207] 7ea0: ed84d240 ed687f34 ed687eec ed687eb8 c023df3c 00000000 00000000 00000000


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.927421] 7ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.935634] 7ee0: 00000000 00000000 00000000 00000000 7fffffff 00000000 00000003 000281f0


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.943848] 7f00: 0000017b c0107f64 ed686000 0000017b ed687fa4 ed687f20 c01b1200 c01aeb4c


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:40 UTC):

    kernel[711]: [   63.952061] 7f20: 7fffffff 00000000 00000003 00000000 00000000 f2c78000 00003280 00000000


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:41 UTC):

    kernel[711]: [   63.960274] 7f40: f2c793ce f2c78000 00003280 f2c7af38 f2c7ae70 f2c7a4f4 00003000 000034a0


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:41 UTC):

    kernel[711]: [   63.968487] 7f60: 00000000 00000000 00000000 00001ce4 00000012 00000013 0000000d 0000000a


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:41 UTC):

    kernel[711]: [   63.976701] 7f80: 00000009 00000000 00000000 00000000 00000001 00000000 00000000 ed687fa8


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:41 UTC):

    kernel[711]: [   63.984915] 7fa0: c0107d60 c01b1168 00000000 00000001 00000003 000281f0 00000000 0003be50


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:41 UTC):

    kernel[711]: [   63.993128] 7fc0: 00000000 00000001 00000000 0000017b 00000000 00000000 00000000 0003c040


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:41 UTC):

    kernel[711]: [   64.001342] 7fe0: bea29908 bea298f8 0001f888 b6ec6a82 800b0030 00000003 00000000 00000000


    Broadcast message from systemd-journald@actia-gd (Tue 2019-11-26 22:06:41 UTC):

    kernel[711]: [   64.141744] Code: eafffff2 e1a0c00d e92dd800 e24cb004 (e590c000)

    [   64.963894] ---[ end trace b813010c3c099bc4 ]---
    Segmentation fault

    Michel

  • HI Michel,

    The errors

    PVR:(Error): OpenServices: PVRDRMOpenRender failed [0, ]
    PVR:(Error): PVRSRVConnect: Unable to open connection. [0, ]
    PVR:(Error): Couldn't connect to services [0, ]

    conclude that one module pvrsrvkm.ko is not inserted.  Please make sure two modules pvrsrvkm.ko and bc_example.ko are built and copied to /lig/modules/4.14.xxx/extra  

    Please refer the recipe for sgx-km

    http://arago-project.org/git/?p=meta-ti.git;a=blob;f=recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.14.3699939.bb;h=24d8d1d2e8530c728ae45a23ca1e9e80e1435dac;hb=refs/heads/rocko

    2) With these two modules available, rc.pvr init script should be able to load the pvr 

    Weston will be launched successfully with this.

    Can you please check if you have copied both the kos ?

    Thanks

    RamPrasad

  • RamPrasad,

    root@actia-gd:~# dir /lib/modules/4.14.79-actia-g3438de3474/extra/
    drwxr-xr-x    2 root     root          4096 Nov 26 22:21 .
    drwxr-xr-x    4 root     root          4096 Nov 26 17:34 ..
    -rw-r--r--    1 root     root         12928 Nov 25 19:20 bc_example.ko
    -rwxr-xr-x    1 root     root         44708 Nov 25 17:26 cmemk.ko
    -rw-r--r--    1 root     root         56580 Nov 25 15:28 cryptodev.ko
    -rw-r--r--    1 root     root         13196 Nov 25 17:56 debugss_kmodule.ko
    -rw-r--r--    1 root     root        229436 Nov 25 19:17 galcore.ko
    -rw-r--r--    1 root     root         11236 Nov 25 17:56 gdbserverproxy.ko
    -rw-r--r--    1 root     root        343096 Nov 25 19:20 pvrsrvkm.ko

    root@actia-gd:~# lsmod | grep bc_example
    root@actia-gd:~# lsmod | grep pvrsrvkm
    pvrsrvkm              413696  0

    root@actia-gd:~# modinfo pvrsrvkm
    filename:       /lib/modules/4.14.79-actia-g3438de3474/extra/pvrsrvkm.ko
    license:        Dual MIT/GPL
    author:         Imagination Technologies Ltd. <gpl-support@imgtec.com>
    license:        Dual MIT/GPL
    author:         Imagination Technologies Ltd. <gpl-support@imgtec.com>
    srcversion:     533BB7E5866E52F63B9ACCB
    alias:          of:N*T*Cti,dra7-sgx544C*
    alias:          of:N*T*Cti,dra7-sgx544
    depends:
    name:           pvrsrvkm
    vermagic:       4.14.79-actia-g3438de3474 SMP preempt mod_unload modversions ARMv7 p2v8
    parm:           gPVRDebugLevel:Sets the level of debug output (default 0x7) (uint)

    root@actia-gd:~# modinfo bc_example
    filename:       /lib/modules/4.14.79-actia-g3438de3474/extra/bc_example.ko
    license:        Dual MIT/GPL
    author:         Imagination Technologies Ltd. <gpl-support@imgtec.com>
    srcversion:     533BB7E5866E52F63B9ACCB
    depends:        pvrsrvkm
    name:           bc_example
    vermagic:       4.14.79-actia-g3438de3474 SMP preempt mod_unload modversions ARMv7 p2v8

    Michel Catudal

    ACTIA Corp

  • RamPrasad

    It still crashes when trying to load bc_example

    root@actia-gd:~# modprobe bc_example
    [   66.702955] Unable to handle kernel NULL pointer dereference at virtual address 00000000
    [   66.733411] pgd = ed6a4000
    [   66.736136] [00000000] *pgd=be0e2835
    [   66.739735] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
    [   66.745157] Modules linked in: bc_example(O+) pvrsrvkm(O) sha512_generic sha512_arm sha256_generic sha1_generic sha1_arm_neon sha1_arm md5 cbc usbhid aes_arm_bs crypto_simd cryptd xfrm_user xfrm4_tunnel ipcomp xfrm_ipcomp esp4 ah4 af_key xfrm_algo xhci_plat_hcd xhci_hcd usbcore rpmsg_rpc dwc3 udc_core usb_common snd_soc_simple_card snd_soc_simple_card_utils panel_dpi pwm_bl backlight omap_remoteproc virtio_rpmsg_bus rpmsg_core remoteproc omap_aes_driver omap_sham omap_wdt phy_omap_usb2 ti_vpe ti_sc ti_csc ti_vpdma dwc3_omap mwifiex_sdio mwifiex cfg80211 omap_des des_generic st_acc33_i2c st_acc33 crypto_engine omap_crypto egalax_ts mcp4018 noa1305 snd_soc_tlv320aic3x at24 sch_fq_codel gdbserverproxy(O) cryptodev(O) cmemk(O)
    [   66.809713] CPU: 0 PID: 1089 Comm: modprobe Tainted: G           O    4.14.79-actia-g3438de3474 #1
    [   66.818710] Hardware name: Generic DRA72X (Flattened Device Tree)
    [   66.824829] task: ed6c0700 task.stack: ed6e2000
    [   66.829451] PC is at AllocateDeviceID+0xc/0x84 [pvrsrvkm]
    [   66.834928] LR is at PVRSRVRegisterBCDeviceKM+0x1a4/0x240 [pvrsrvkm]
    [   66.841308] pc : [<bf420fdc>]    lr : [<bf42b4e0>]    psr: 40070013
    [   66.847601] sp : ed6e3d38  ip : ed6e3d48  fp : ed6e3d44
    [   66.852847] r10: ed6b3ca4  r9 : 00000000  r8 : 00000000
    [   66.858094] r7 : ee4f6cc0  r6 : 00000002  r5 : 00000000  r4 : 00000000
    [   66.864648] r3 : ed5d9700  r2 : ed5d9700  r1 : ed5d9708  r0 : 00000000
    [   66.871203] Flags: nZcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
    [   66.878369] Control: 10c5387d  Table: ad6a406a  DAC: 00000051
    [   66.884138] Process modprobe (pid: 1089, stack limit = 0xed6e2210)
    [   66.890344] Stack: (0xed6e3d38 to 0xed6e4000)
    [   66.894719] 3d20:                                                       ed6e3d74 ed6e3d48
    [   66.902934] 3d40: bf42b4e0 bf420fdc ed6b3200 ed5d9700 00000001 ee4f6cc0 bf48c280 00000000
    [   66.911149] 3d60: ed6b3fc0 00000001 ed6e3d94 ed6e3d78 bf48a2a4 bf42b348 bf48c288 bf48b05c
    [   66.919364] 3d80: bf48f000 ed6b3fc0 ed6e3da4 ed6e3d98 bf48a5e0 bf48a180 ed6e3dc4 ed6e3da8
    [   66.927579] 3da0: bf48f0d0 bf48a5dc bf48b05c 014000c0 ffffe000 00000000 ed6e3e34 ed6e3dc8
    [   66.935792] 3dc0: c0101a7c bf48f00c c0216c7c c03fb214 ed6e3df4 ed6e3de0 c0216ecc c0216c68
    [   66.944006] 3de0: ed6b3800 00000000 ed6b3fc0 f312a000 00000001 00000004 ed6b3fc0 f312a000
    [   66.952221] 3e00: ed6e3e34 ed6e3e10 c0226f84 c0230b00 bf48c0c0 bf48c0c0 00000001 ed6b3c80
    [   66.960435] 3e20: ed6b3fc0 00000001 ed6e3e5c ed6e3e38 c01b1bb8 c0101a3c ed6e3e5c ed6e3e48
    [   66.968649] 3e40: ed6e3f40 00000001 ed6b3c80 bf48c0c0 ed6e3f1c ed6e3e60 c01b0a4c c01b1b5c
    [   66.976863] 3e60: bf48c0cc 00007fff bf48c0c0 c01adae8 00000000 c0985ed4 c0985eac bf48c1d4
    [   66.985077] 3e80: c0985ffc c0a02090 bf48c1f0 c08047e0 bf48c1c0 00000000 bf48c108 bf48c0c0
    [   66.993290] 3ea0: ee4f6300 ed6e3f34 ed6e3eec ed6e3eb8 c023df3c 00000000 00000000 00000000
    [   67.001503] 3ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    [   67.009717] 3ee0: 00000000 00000000 00000000 00000000 7fffffff 00000000 00000003 000281f0
    [   67.017932] 3f00: 0000017b c0107f64 ed6e2000 0000017b ed6e3fa4 ed6e3f20 c01b1200 c01aeb4c
    [   67.026146] 3f20: 7fffffff 00000000 00000003 00000000 00000000 f312a000 00003240 00000000
    [   67.034361] 3f40: f312b39a f312a000 00003240 f312cef8 f312ce30 f312c4b4 00003000 000034a0
    [   67.042575] 3f60: 00000000 00000000 00000000 00001ce4 00000012 00000013 0000000d 0000000a
    [   67.050788] 3f80: 00000009 00000000 00000000 00000000 00000001 00000000 00000000 ed6e3fa8
    [   67.059002] 3fa0: c0107d60 c01b1168 00000000 00000001 00000003 000281f0 00000000 0003be50
    [   67.067215] 3fc0: 00000000 00000001 00000000 0000017b 00000000 00000000 00000000 0003c040
    [   67.075429] 3fe0: be94f908 be94f8f8 0001f888 b6f3ea82 800b0030 00000003 00000000 00000000
    [   67.083638] Backtrace:
    [   67.086213] [<bf420fd0>] (AllocateDeviceID [pvrsrvkm]) from [<bf42b4e0>] (PVRSRVRegisterBCDeviceKM+0x1a4/0x240 [pvrsrvkm])
    [   67.097366] [<bf42b33c>] (PVRSRVRegisterBCDeviceKM [pvrsrvkm]) from [<bf48a2a4>] (BC_Example_Register+0x130/0x150 [bc_example])
    [   67.108895]  r8:00000001 r7:ed6b3fc0 r6:00000000 r5:bf48c280 r4:ee4f6cc0
    [   67.115637] [<bf48a174>] (BC_Example_Register [bc_example]) from [<bf48a5e0>] (BC_Example_Init+0x10/0x20 [bc_example])
    [   67.126378]  r7:ed6b3fc0 r6:bf48f000 r5:bf48b05c r4:bf48c288
    [   67.132073] [<bf48a5d0>] (BC_Example_Init [bc_example]) from [<bf48f0d0>] (BC_Example_ModInit+0xd0/0x1000 [bc_example])
    [   67.142913] [<bf48f000>] (BC_Example_ModInit [bc_example]) from [<c0101a7c>] (do_one_initcall+0x4c/0x170)
    [   67.152521]  r5:00000000 r4:ffffe000
    [   67.156116] [<c0101a30>] (do_one_initcall) from [<c01b1bb8>] (do_init_module+0x68/0x1f8)
    [   67.164241]  r8:00000001 r7:ed6b3fc0 r6:ed6b3c80 r5:00000001 r4:bf48c0c0
    [   67.170976] [<c01b1b50>] (do_init_module) from [<c01b0a4c>] (load_module+0x1f0c/0x24ac)
    [   67.179014]  r7:bf48c0c0 r6:ed6b3c80 r5:00000001 r4:ed6e3f40
    [   67.184701] [<c01aeb40>] (load_module) from [<c01b1200>] (SyS_finit_module+0xa4/0xbc)
    [   67.192566]  r10:0000017b r9:ed6e2000 r8:c0107f64 r7:0000017b r6:000281f0 r5:00000003
    [   67.200427]  r4:00000000
    [   67.202975] [<c01b115c>] (SyS_finit_module) from [<c0107d60>] (ret_fast_syscall+0x0/0x54)
    [   67.211187]  r6:00000000 r5:00000001 r4:00000000
    [   67.215827] Code: eafffff2 e1a0c00d e92dd800 e24cb004 (e590c000)

    Broadcast message from systemd-journald@actia-gd (Wed 2019-11-27 16:17:00 UTC):


    Michel

  • Hi Michel,

    Can you execute these 3 instructions in this order and check?

    modprobe pvrsrvkkm

    pvrsrvctl --start --no-module

    modprobe bc_example

    Thanks

    RamPrasad

  • RamPrasad,

    I was off Thursday and Friday for the Thanksgiving holiday.

    root@actia-gd:~# pvrsrvctl --start --no-module
    PVR:(Error): OpenServices: PVRDRMOpenRender failed [0, ]
    PVR:(Error): PVRSRVInitSrvConnect: PVRSRVConnect failed [0, ]
    PVR:(Error): SrvInit: PVRSRVInitSrvConnect failed (4) [0, ]
    pvrsrvctl: SrvInit failed (already initialized?) (err=PVRSRV_ERROR_INIT_FAILURE)

    I get the same kind of crash when I do the modprobe bc_example

    If I move the modules somewhere else and reboot I get different results

    I moved the modules back to the extra directory

    root@actia-gd:/lib/modules# pvrsrvctl --start --no-module
    PVR:(Error): OpenServices: PVRDRMOpenRender failed [0, ]
    PVR:(Error): PVRSRVInitSrvConnect: PVRSRVConnect failed [0, ]
    PVR:(Error): SrvInit: PVRSRVInitSrvConnect failed (4) [0, ]
    pvrsrvctl: SrvInit failed (already initialized?) (err=PVRSRV_ERROR_INIT_FAILURE)

    root@actia-gd:/lib/modules# modprobe bc_example
    modprobe: FATAL: Module bc_example not found in directory /lib/modules/4.14.79-actia-ge669d52447

    root@actia-gd:/lib/modules/4.14.79-actia-ge669d52447/extra# dir
    drwxrwxr-x    2 1000     pulse         4096 Dec  2 13:43 .
    drwxrwxr-x    4 1000     pulse         4096 Dec  2 13:42 ..
    -rw-rw-r--    1 1000     pulse        12984 Nov 27 22:02 bc_example.ko
    -rw-rw-r--    1 1000     pulse        56588 Nov 27 22:02 cryptodev.ko
    -rw-rw-r--    1 1000     pulse       345276 Nov 27 22:02 pvrsrvkm.ko
    root@actia-gd:/lib/modules/4.14.79-actia-ge669d52447/extra# insmod bc_example.ko
    [  232.246762] bc_example: Unknown symbol PVRGetBufferClassJTable (err 0)
    insmod: ERROR: could not insert module bc_example.ko: Unknown symbol in module

    Michel Catudal

    ACTIA Corp

  • Hi Michel,

    Does modprobe pvrsrvkm.ko works without any error?

    Can you try to build the sgx modules once from installer and give a try?

    The path for the sgx-km is here board-support/external-linux-kernel-modules/omap5-sgx-ddk-linux/ 

    Thanks

    RamPrasad