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.

AM335x SDK 6.0.0.0 and Graphics SDK 4.10.0.1

Expert 1935 points
Other Parts Discussed in Thread: DA8XX

Hello,

My AM335x EVM boots the SDK 6.0.0.0 and I added the Graphics SDK 4.10.0.1. I followed the instructions in:

http://processors.wiki.ti.com/index.php/Graphics_SDK_Quick_installation_and_user_guide

but can't get the OGLES demos to work.

To get the new kernel modules to load, I had to remove the default ones from the SDK (in lilib/modules/3.2.0/kernel/drivers/gpu/pvr/b/modules/3.2.0/kernel/drivers/gpu/pvr/) (the find command in the script will otherwise report two .ko modules per call)

I also tried building with PM_RUINTIME=1 as described here:

http://e2e.ti.com/support/arm/sitara_arm/f/791/t/284135.aspx

but it doesn't change anything.

The output of gfx_check.sh (from http://processors.wiki.ti.com/index.php/SGXDbg ) is:

root@am335x-evm:~# ./gfx_check.sh

WSEGL settings
[default]
WindowSystem=libpvrPVR2D_FRONTWSEGL.so
#WindowSystem=libpvrPVR2D_FLIPWSEGL.so

------
ARM CPU information
Processor    : ARMv7 Processor rev 2 (v7l)
BogoMIPS    : 718.02
Features    : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls
CPU implementer    : 0x41
CPU architecture: 7
CPU variant    : 0x3
CPU part    : 0xc08
CPU revision    : 2

Hardware    : am335xevm
Revision    : 0000
Serial        : 0000000000000000
------
SGX driver information
Version SGX_DDK_Linux_CustomerTI sgxddk 1.10@2359475 (release) /home/lf/ti/Graphics_SDK_4_10_00_01/GFX_Linux_KM
System Version String: None
------
Framebuffer settings

mode "800x480-62"
    # D: 30.000 MHz, H: 32.433 kHz, V: 61.895 Hz
    geometry 800 480 800 960 32
    timings 33333 39 39 29 13 47 2
    rgba 8/16,8/8,8/0,8/24
endmode

Frame buffer device information:
    Name        : DA8xx FB Drv
    Address     : 0x8f400000
    Size        : 3072000
    Type        : PACKED PIXELS
    Visual      : TRUECOLOR
    XPanStep    : 0
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 3200
    Accelerator : No
------
Rotation settings
0
------
Kernel Module information
Module                  Size  Used by
g_mass_storage         37599  0
bufferclass_ti          5200  0
omaplfb                10943  0
pvrsrvkm              170290  2 omaplfb,bufferclass_ti
wl12xx_sdio             3986  0
------
Boot settings
console=ttyO0,115200n8 mem=256M vram=50M root=/dev/mmcblk0p2 ro rootfstype=ext3 rootwait ip=none
------
Linux Kernel version
Linux am335x-evm 3.2.0 #2 Wed Oct 16 14:14:46 CEST 2013 armv7l GNU/Linux
root@am335x-evm:~#

Running the demo does not print any output:

root@am335x-evm:~# /opt/gfxsdkdemos/ogles/OGLESSkybox
root@am335x-evm:~#

strace gives a lot of output when searching for the libs but terminates with:

open("/usr/lib/libGLES_CM.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\330<\0\0004\0\0\0"..., 512) = 512
lseek(3, 428036, SEEK_SET)              = 428036
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1000) = 1000
lseek(3, 427712, SEEK_SET)              = 427712
read(3, "A2\0\0\0aeabi\0\1(\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\3\f"..., 51) = 51
exit_group(1)                           = ?
+++ exited with 1 +++
root@am335x-evm:~#

Shouldn't the combination SDK 6.0.0.0 & Graphics SDK 4.10.0.1 work?

Regards,

Lo2

  • There is more amiss:

    root@am335x-evm:~# /usr/local/bin/pvrsrvctl
    -sh: /usr/local/bin/pvrsrvctl: No such file or directory
    root@am335x-evm:~#

    root@am335x-evm:~# strace /usr/local/bin/pvrsrvctl
    execve("/usr/local/bin/pvrsrvctl", ["/usr/local/bin/pvrsrvctl"], [/* 17 vars */]) = -1 ENOENT (No such file or directory)
    write(2, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory
    ) = 40
    exit_group(1)                           = ?
    +++ exited with 1 +++
    root@am335x-evm:~#

    root@am335x-evm:~# ls -la /usr/local/bin/pvrsrvctl
    -rwxr-xr-x    1 root     root          5112 Jun 25 23:11 /usr/local/bin/pvrsrvctl

    More info:

    root@am335x-evm:~# lsmod
    Module                  Size  Used by
    bufferclass_ti          5060  0
    omaplfb                10943  0
    pvrsrvkm              170290  2 omaplfb,bufferclass_ti
    g_mass_storage         37599  0
    wl12xx_sdio             3986  0
    root@am335x-evm:~# cat /proc/pvr/version
    Version SGX_DDK_Linux_CustomerTI sgxddk 1.10@2359475 (release) /home/lf/ti/Graphics_SDK_4_10_00_01/GFX_Linux_KM
    System Version String: None
    root@am335x-evm:~# cat /proc/pvr/nodes
    Registered nodes
    Addr     Type     Class    Index Ref pvDev     Size Res
    cf3ee7c0 ?9       buffer      2   1  ce511d00   28    (null)
    cf3ee8c0 ?9       buffer      2   1  ce511f00   28    (null)
    cf3ee9c0 ?9       buffer      2   1  ce427240   28    (null)
    cf3eeac0 ?9       buffer      2   1  ce427440   28    (null)
    cf3eebc0 ?9       buffer      2   1  ce427640   28    (null)
    cf3eecc0 ?9       buffer      2   1  ce427840   28    (null)
    cf3eedc0 ?9       buffer      2   1  ce427a40   28    (null)
    cf3eeec0 ?9       buffer      2   1  ce427c40   28    (null)
    cf7081c0 ?9       buffer      2   1  ce427e40   28    (null)
    cf7086c0 ?9       buffer      2   1  cf75e180   28    (null)
    cf35c080 ?9       display     1   1  cf2adbc0   56    (null)
    cf7082c0 ?7       3D          0   1  cf3d9000    0  ce0c5a80
    root@am335x-evm:~#

    What is happening here?

  • Hi,

    You seem to have missed running 335x-demo script as mentioned in user guide -

    http://processors.wiki.ti.com/index.php/Graphics_SDK_Quick_installation_and_user_guide#Step_2_:_soc_demo_script_verification

    This will take care of installing pvrsrvctl & other required graphics librraries, also insert the SGX driver kernel modules(pvrsrvkm, omaplfb).

    You need to follow 3 steps below-

    //On your linux PC/Build machine

    Build command - make BUILD=release OMAPES=8.x PM_RUNTIME=1 all_km (assuming you have the kernel sources with SGX hwmod patch.

    You can refer to http://e2e.ti.com/support/arm/sitara_arm/f/791/p/275648/964119.aspx

    http://e2e.ti.com/support/arm/sitara_arm/f/791/p/283259/989629.aspx

    Install command - sudo make BUILD=release OMAPES=8.x PM_RUNTIME=1 install

    Once you have done build & install commands as above, now on EVM Linux command prompt when it boots up, issue below command -

    /etc/init.d/335x-demo

    Thanks,

    Prathap.

     

     

  • Hello Prathap,

    I've ran the /etc/init.d/335x-demo script, but it also causes an error when launched (by calling rc.pvr) and it does not install the new bufferclass_ti.ko module.

    Here's what I did:

    create SDcard from the ti-sdk-am335x-06.00.00.00 using the prebuilt images

    boot EVM, by default the following modules are loaded:
    root@am335x-evm:~# lsmod
    Module                  Size  Used by
    g_mass_storage         37599  0
    bufferclass_ti          5060  0
    omaplfb                11075  0
    pvrsrvkm              170641  2 omaplfb,bufferclass_ti
    wl12xx_sdio             3986  0

    The modules are located here:
    /lib/modules/3.2.0/kernel/drivers/gpu/pvr/pvrsrvkm.ko
    /lib/modules/3.2.0/kernel/drivers/gpu/pvr/omaplfb.ko
    /lib/modules/3.2.0/kernel/drivers/gpu/pvr/bufferclass_ti.ko


    Back on my build host, building the Graphics SDK 4.10.0.1:
    Rules.mk:
    ################# FIELDS MODIFIABLE BY THE USER ###############################
    ############### All the fields below are MANDATORY ############################

    #By default all below variables have been initialized with equivalent AMSDK variables
    # Change them to appropriate paths as per your machine/build environment paths.
    # Set home area (ex /home/user/)
    HOME=/home/lf/ti/

    # Set Toolchain path (ex /home/user/toolchain/arago-2011.09/armv7a)
    CSTOOL_DIR=/home/lf/ti/ti-sdk-am335x-06.00.00.00-evm/linux-devkit/sysroots/i686-arago-linux/usr/bin/

    # Set Tool chain prefix (ex arm-arago-linux-gnueabi- )
    CSTOOL_PREFIX=arm-linux-gnueabihf-

    # Set kernel installation path ( ex /home/user/linux-04.00.01.13 )
    KERNEL_INSTALL_DIR=/home/lf/ti/ti-sdk-am335x-06.00.00.00-evm/board-support/linux-3.2.0-psp04.06.00.11/

    # Set Target filesystem path ( ex /home/user/targetfs )
    TARGETFS_INSTALL_DIR=/media/rootfs

    # Set installation folder
    GRAPHICS_INSTALL_DIR=$(HOME)/Graphics_SDK_4_10_00_01

    ############### All the fields below are OPTIONAL ############################
    ############### BEST SUGGESTED TO LEAVE THE BELOW AS IS ############################

    # Below is just an optional define given only to enable users who want to pass additional compiler/link flags.
    # Only update the below options if you exactly know about the additional flag to be added & also are sure that its supported with your toolchain.
    # Otherwise its best suggested to leave the below as is ie empty

    # Add additional Compiler flags below only if required (Please read above comments)
    EXTRA_CFLAGS?=
    # Add additional Linker flags below only if required (Please read above comments)
    EXTRA_LFLAGS?=

    export EXTRA_CFLAGS
    export EXTRA_LFLAGS

    Note: I haven't changed the CFLAGS.

    make BUILD=release OMAPES=8.x  PM_RUNTIME=1 all
    [wait]
    sudo make BUILD=release OMAPES=8.x  PM_RUNTIME=1 install

    in the ti-SDK, build kernel and copy uImage to SDcard too.

    Booting the EVM again, to run the /etc/init.d/335x-demo script:
    root@am335x-evm:~#  /etc/init.d/335x-demo
    0x10205
    release8.x
    installing 8.x SGX release user libraries

    Installing PowerVR Consumer/Embedded DDK 'sgxddk_1.10@2359475' on target

    File system installation root is /

    Nothing to un-install.
    boot script rc.pvr -> /etc/init.d/rc.pvr
    kernel module pvrsrvkm.ko -> /lib/modules/3.2.0/extra/pvrsrvkm.ko
    kernel module omaplfb.ko -> /lib/modules/3.2.0/extra/omaplfb.ko
    shared library libGLES_CM.so -> /usr/lib/libGLES_CM.so.1.10.2359475
    shared library libusc.so -> /usr/lib/libusc.so.1.10.2359475
    shared library libGLESv2.so -> /usr/lib/libGLESv2.so.1.10.2359475
    shared library libglslcompiler.so -> /usr/lib/libglslcompiler.so.1.10.2359475
    shared library libIMGegl.so -> /usr/lib/libIMGegl.so.1.10.2359475
    shared library libEGL.so -> /usr/lib/libEGL.so.1.10.2359475
    shared library libpvr2d.so -> /usr/lib/libpvr2d.so.1.10.2359475
    shared library libpvrPVR2D_BLITWSEGL.so -> /usr/lib/libpvrPVR2D_BLITWSEGL.so.1.10.2359475
    shared library libpvrPVR2D_FLIPWSEGL.so -> /usr/lib/libpvrPVR2D_FLIPWSEGL.so.1.10.2359475
    shared library libpvrPVR2D_FRONTWSEGL.so -> /usr/lib/libpvrPVR2D_FRONTWSEGL.so.1.10.2359475
    shared library libpvrPVR2D_LINUXFBWSEGL.so -> /usr/lib/libpvrPVR2D_LINUXFBWSEGL.so.1.10.2359475
    shared library libsrv_um.so -> /usr/lib/libsrv_um.so.1.10.2359475
    shared library libsrv_init.so -> /usr/lib/libsrv_init.so.1.10.2359475
    shared library libPVRScopeServices.so -> /usr/lib/libPVRScopeServices.so.1.10.2359475
    binary pvrsrvctl -> /usr/local/bin/pvrsrvctl
    binary sgx_init_test -> /usr/local/bin/sgx_init_test
    binary services_test -> /usr/local/bin/services_test
    binary sgx_blit_test -> /usr/local/bin/sgx_blit_test
    binary sgx_clipblit_test -> /usr/local/bin/sgx_clipblit_test
    binary sgx_flip_test -> /usr/local/bin/sgx_flip_test
    binary sgx_render_flip_test -> /usr/local/bin/sgx_render_flip_test
    binary pvr2d_test -> /usr/local/bin/pvr2d_test
    shader glsltest1_vertshader.txt -> /usr/local/bin/glsltest1_vertshader.txt
    shader glsltest1_fragshaderA.txt -> /usr/local/bin/glsltest1_fragshaderA.txt
    shader glsltest1_fragshaderB.txt -> /usr/local/bin/glsltest1_fragshaderB.txt

    Installation complete!
    You may now reboot your target.

    ./rc.pvr: line 34: /usr/local/bin/pvrsrvctl: No such file or directory
    root@am335x-evm:~#

    which terminates with a remakable error: /usr/local/bin/pvrsrvctl: No such file or directory
    The binary is present:
    root@am335x-evm:~# ls -la /usr/local/bin/pvrsrvctl
    -rwxr-xr-x    1 root     root          5112 Jun 25 23:13 /usr/local/bin/pvrsrvctl
    but launching it will fail:
    root@am335x-evm:~# /usr/local/bin/pvrsrvctl
    -sh: /usr/local/bin/pvrsrvctl: No such file or directory
    root@am335x-evm:~#

    Reboot EVM, the PVR does not start:
    Starting PVR
    [   16.890045] pvrsrvkm: Unknown parameter `/lib/modules/3.2.0/extra/pvrsrvkm.ko'
    Error: could not insert module /lib/modules/3.2.0/kernel/drivers/gpu/pvr/pvrsrvkm.ko: Unknown symbol in module
    Could not find pvrsrvkm driver

    This comes from the /etc/init.d/pvr-init, sgxprepare:
    sgxprepare () {
        echo Starting PVR
        insmod $(busybox find /lib/modules/$(uname -r) -name "pvrsrvkm.ko")
    Caused by a find that reports two pvrsrvkm.ko module: the one from the EVM rootfs and the other from the graphics SDK:
    root@am335x-evm:~# find /lib/modules/3.2.0/ -name pvrsrvkm.ko  
    /lib/modules/3.2.0/kernel/drivers/gpu/pvr/pvrsrvkm.ko
    /lib/modules/3.2.0/extra/pvrsrvkm.ko
    root@am335x-evm:~#

    Why is the new bufferclass_ti.ko module build by the graphics SDK but not installed?
    root@am335x-evm:~# ls -la /lib/modules/3.2.0/extra/
    drwxr-sr-x    2 root     root          4096 Jun 25 23:13 .
    drwxr-sr-x    5 root     root          4096 Jun 25 23:13 ..
    -rw-r--r--    1 root     root         32385 Jun 25 23:13 omaplfb.ko
    -rw-r--r--    1 root     root       2596328 Jun 25 23:13 pvrsrvkm.ko
    root@am335x-evm:~#

    My fix is rename the following three kernel modules:
    /lib/modules/3.2.0/kernel/drivers/gpu/pvr/pvrsrvkm.ko
    /lib/modules/3.2.0/kernel/drivers/gpu/pvr/omaplfb.ko
    /lib/modules/3.2.0/kernel/drivers/gpu/pvr/bufferclass_ti.ko

    Also remove the modules in .../extra/

    and copy the new kernel module to the directory:
    root@am335x-evm:~# cp /opt/gfxlibraries/gfx_rel_es8.x/*.ko /lib/modules/3.2.0/kernel/drivers/gpu/pvr/

    Reboot the EVM.

    PVR starts:
    Starting thttpd.
    Starting PVR
    Starting Lighttpd Web Server: lighttpd.

    modules are loaded:
    am335x-evm login: root
    root@am335x-evm:~# lsmod
    Module                  Size  Used by
    g_mass_storage         37599  0
    bufferclass_ti          5060  0
    omaplfb                10943  0
    pvrsrvkm              170290  2 omaplfb,bufferclass_ti
    wl12xx_sdio             3986  0
    root@am335x-evm:~#

    looks ok, but I still can't launch any demo

    Why?

    Best regards,

    Lo2

  • Hi,

    I  just built the graphics sdk successfully and thought this link might be of use to you.

    http://processors.wiki.ti.com/index.php/SGXDbg

    Also try setting your targetNFS directory as target installation directory and then later create sdcard image with targetNFS as root directory.

    I think kernel image and sdcard has to be done anew after graphics sdk build. I think this makes sure that usermode and kernel binaries has no mismatches.

    I get message bufferclass_ti is not loaded but ogles demos work fine and also qt5 with eglfs works fine.

    Ram

  • Hi Ram,

    I've mentioned the link in my first post already, there's also the output of the check script.

    I've got the impression that dlopen fails, and that's the reason why the bninaries don't run.

    Which compiler / tool chain do you use?

    Could you please post the output of readelf -A of libEGL.so and one of the demos?

    If one follows the wiki instructions you will end up with non working binaries.

    Regards,

    Lo2

  • Hi,

    From the build logs you have shared, looks like you are using hardfloat tool chain -

    arm-linux-gnueabihf-

    Are you ensuring you are using the hardfp graphics SDK release below?

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest//exports/Graphics_SDK_setuplinux_4_10_00_01_hardfp_minimal_demos.bin


    Thanks,

    Prathap.

  • Hi Prathap,

    thanks for the link, that was exactly what I needed: the closed source libraries in an armhf (VFP_args) version!

    The latest SDK uses the armhf toolchain too, btw.

    Regards,

    Lo2

  • Hi Prathap,

    I am getting the below error when I tried running the when I tried running one of the demos.

    ./OGLES2Coverflow
    Can't open remote control input device (/dev/ttyS1)
    Exit message has been set to: "PVRShell: Unable to initialise EGL
    ".
    PVRShell: EGL Error (EGL_BAD_ALLOC)
    InitAPI failed!
    PVRShell: Unable to initialise EGL

    Please advise.