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.

SGX driver am335x

UPDATE: see last post, I'm using another ti-sdk and graphics sdk because otherwise the sgx drivers wouldn't load.

Hi,

I have a board based on the am335x EVM and I managed to port U-boot and linux. My version of u-boot is 2013.01 of the ti-sdk (psp06.00.00.00) and I'm using the arago linux distro from the TI board port labs ( kernel 3.2 ). I was trying to get some example opengl Qt apps working but when i try to run them, it said I had to install SGX support.

From my understanding, these drivers are included in the Graphics SDK from TI.
I downloaded this, the version I have is Graphics_SDK_4_10_00_01. I edited the Rules.make file :

#Rules.make

################# 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=$(SDK_INSTALL_DIR)/graphics
HOME=/home/laurens
# Set Toolchain path (ex /home/user/toolchain/arago-2011.09/armv7a)
#CSTOOL_DIR=$(LINUX_DEVKIT_PATH)
CSTOOL_DIR=/home/laurens/ti-sdk-am335x-evm/linux-devkit/sysroots/armv7ahf-vfp-neon-3.2-oe-linux-gnueabi/
# 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/laurens/ti-sdk-am335x-evm/targetNFS/lib/modules/3.2.0-g2b92769-dirty/build
# Set Target filesystem path ( ex /home/user/targetfs )

#Install dir is the sd card rootfs partition
TARGETFS_INSTALL_DIR=/media/laurens/rootfs
# Set installation folder
GRAPHICS_INSTALL_DIR=$(HOME)/Graphics_SDK_4_10_00_01

I ran the commands:

make BUILD=debug OMAPES=8.x FBDEV=no all_km

sudo make BUILD=debug OMAPES=8.x FBDEV=no install_km

I included the FBDEV=no option becauses this solved the following error:

/home/laurens/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb_linux.c:134:27: fatal error: omapfb/omapfb.h: No such file or directory

Now these commands run without errors.

The problem (maybe I'm overlooking something before these steps, I don't know) is when I try to install them on my board. This is when I run the am335xdemo script.

root@am335x-evm:/etc/init.d# ./335x-demo
0x10205
debug8.x
installing 8.x SGX debug 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-g2b92769-dirty/extra/pvrsrvkm.ko
kernel module omaplfb.ko -> /lib/modules/3.2.0-g2b92769-dirty/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.

Module pvrsrvkm failed to load. Retrying.
Running /sbin/depmod
[  142.819213] Disabling lock debugging due to kernel taint
[  142.849304] PVR: PVRCore_Init
[  142.855102] PVR: PVRCore_Init: major device 251
./rc.pvr: line 34: /usr/local/bin/pvrsrvctl: No such file or directory
root@am335x-evm:/etc/init.d# lsmod
Module                  Size  Used by
pvrsrvkm              484224  0
g_mass_storage         37863  0

When I reboot my board I get this when booting the kernel:

Starting PVR
[   16.185485] Disabling lock debugging due to kernel taint
[   16.215515] PVR: PVRCore_Init
[   16.221405] PVR: PVRCore_Init: major device 251
[   16.563354] PVR_K:(Fatal): Debug assertion failed! [220, home/laurens/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/system/include/syscommon.h]
[   16.577056] ------------[ cut here ]------------
[   16.581878] kernel BUG at /home/laurens/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/system/include/syscommon.h:220!
[   16.593017] Internal error: Oops - undefined instruction: 0 [#1]
[   16.599304] Modules linked in: omaplfb(O+) pvrsrvkm(O)
[   16.604675] CPU: 0    Tainted: G           O  (3.2.0-g2b92769-dirty #1)
[   16.611755] PC is at PVRSRVRegisterDCDeviceKM+0x6c/0x340 [pvrsrvkm]
[   16.618316] LR is at console_unlock+0x168/0x1f4
[   16.623016] pc : [<bf005d14>]    lr : [<c003e568>]    psr: 60000013
[   16.623046] sp : de39be20  ip : de39bc60  fp : de39be4c
[   16.635009] r10: bf08f0e4  r9 : bf08f0bc  r8 : bf08f39c
[   16.640441] r7 : 00000100  r6 : 00000000  r5 : bf090ab8  r4 : de05da00
[   16.647247] r3 : 20000013  r2 : 00000001  r1 : 00000000  r0 : 0000009a
[   16.654052] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   16.661499] Control: 10c5387d  Table: 9e39c019  DAC: 00000015
[   16.667480] Process modprobe (pid: 1413, stack limit = 0xde39a2f0)
[   16.673950] Stack: (0xde39be20 to 0xde39c000)
[   16.678466] be20: bf090984 bf090ab8 de05da04 de05da7c 00000000 de39be40 00000000 de39be30
[   16.687011] be40: de39be8c de39be50 bf08faf8 bf005cb4 c01cc150 de313010 de313000 00000004
[   16.695556] be60: 00000000 bf090984 bf090984 c06488c0 de39a000 0000001c c0069754 bf093000
[   16.704071] be80: de39be9c de39be90 bf093010 bf08f9cc de39bef4 de39bea0 c000876c bf09300c
[   16.712615] bea0: de39bec4 de39beb0 00000002 00000000 df6c7d00 e0919000 de39bee4 de39bec8
[   16.721130] bec0: bf090984 bf090984 de0dab00 bf090984 bf090984 de0dab00 00000001 0000001c
[   16.729675] bee0: c0069754 0000071f de39bfa4 de39bef8 c006abec c0008650 bf090990 c001a654
[   16.738220] bf00: 00000000 c0069854 e091b11c e091e284 00000000 bf0909cc df6d7f40 c0587fd0
[   16.746734] bf20: 00000000 00000000 00000000 00000000 00000000 00000000 e0919000 0000741b
[   16.755279] bf40: e091ddac e091dc72 e091fcfc de08d6c0 00001ac0 00001ff0 00000000 00000000
[   16.763793] bf60: 0000001e 0000001f 0000000f 0000000d 0000000c 00000000 00000002 00021dd8
[   16.772338] bf80: 00000000 00021d90 00000080 c00148e8 de39a000 00000000 00000000 de39bfa8
[   16.780853] bfa0: c0014740 c006a814 00021dd8 00000000 4030a000 0000741b 4002d230 00000002
[   16.789398] bfc0: 00021dd8 00000000 00021d90 00000080 00021ea0 0000741b 4002d230 00000000
[   16.797912] bfe0: 44baf5a0 beddc980 40025b24 44baf5b0 80000010 4030a000 5f6d656d 61746164
[   16.806457] Backtrace:
[   16.809082] [<bf005ca8>] (PVRSRVRegisterDCDeviceKM+0x0/0x340 [pvrsrvkm]) from [<bf08faf8>] (OMAPLFBInit+0x138/0x2ac [omaplfb])
[   16.820983] [<bf08f9c0>] (OMAPLFBInit+0x0/0x2ac [omaplfb]) from [<bf093010>] (OMAPLFB_Init+0x10/0x34 [omaplfb])
[   16.831512] [<bf093000>] (OMAPLFB_Init+0x0/0x34 [omaplfb]) from [<c000876c>] (do_one_initcall+0x128/0x1a8)
[   16.841583] [<c0008644>] (do_one_initcall+0x0/0x1a8) from [<c006abec>] (sys_init_module+0x3e4/0x1b68)
[   16.851226] [<c006a808>] (sys_init_module+0x0/0x1b68) from [<c0014740>] (ret_fast_syscall+0x0/0x30)
[   16.860656] Code: e3a020dc e30a3974 e34b3f04 eb006a62 (e7f001f2)
[   16.867095] ---[ end trace a877506ba0314898 ]---
/etc/rc5.d/S30pvr-init: line 42:  1413 Segmentation fault      modprobe omaplfb
FATAL: Module bufferclass_ti not found.
[   18.032562] Unhandled fault: external abort on non-linefetch (0x1018) at 0x40161014
Starting SGX fixup for ES.x
cp: can't stat '/usr/lib/ES.0/*': No such file or directory
cp: can't stat '/usr/bin/ES.0/*': No such file or directory

I saw it couldn't find the bufferclass_ti module so I tried to load it in manually:

root@am335x-evm:/opt/gfxlibraries/gfx_dbg_es8.x# insmod bufferclass_ti.ko
[   88.301788] PVR_K:(Fatal): Debug assertion failed! [220, home/laurens/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/system/include/syscommon.h]
[   88.315490] ------------[ cut here ]------------
[   88.320312] kernel BUG at /home/laurens/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/system/include/syscommon.h:220!
[   88.331481] Internal error: Oops - undefined instruction: 0 [#2]
[   88.337738] Modules linked in: bufferclass_ti(O+) g_mass_storage omaplfb(O+) pvrsrvkm(O)
[   88.346191] CPU: 0    Tainted: G      D    O  (3.2.0-g2b92769-dirty #1)
[   88.353271] PC is at PVRSRVRegisterBCDeviceKM+0x6c/0x330 [pvrsrvkm]
[   88.359832] LR is at console_unlock+0x168/0x1f4
[   88.364562] pc : [<bf006250>]    lr : [<c003e568>]    psr: 60000013
[   88.364562] sp : de1d5e38  ip : de1d5c78  fp : de1d5e64
[   88.376525] r10: bf0a6fa4  r9 : 00000000  r8 : bf00a398
[   88.381988] r7 : df23ee40  r6 : bf0a6cac  r5 : bf0a6fa4  r4 : 00000000
[   88.388793] r3 : 20000013  r2 : 00000001  r1 : 00000000  r0 : 0000009a
[   88.395599] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   88.403045] Control: 10c5387d  Table: 9f70c019  DAC: 00000015
[   88.409027] Process insmod (pid: 1541, stack limit = 0xde1d42f0)
[   88.415283] Stack: (0xde1d5e38 to 0xde1d6000)
[   88.419830] 5e20:                                                       00000000 bf0a6fa4
[   88.428375] 5e40: df23ee44 df23ee60 00000000 de1d5e58 00000000 de1d5e48 de1d5e9c de1d5e68
[   88.436889] 5e60: bf0a9228 bf0061f0 bf0a6cac 00000000 00000000 bf0a6e70 bf0a6e70 c06488c0
[   88.445434] 5e80: de1d4000 0000001c c0069754 bf0a9000 de1d5ef4 de1d5ea0 c000876c bf0a900c
[   88.453948] 5ea0: de1d5ec4 de1d5eb0 00000002 00000000 df6c7880 e0933000 de1d5ee4 de1d5ec8
[   88.462493] 5ec0: bf0a6e70 bf0a6e70 de32a380 bf0a6e70 bf0a6e70 de32a380 00000001 0000001c
[   88.471008] 5ee0: c0069754 0000036f de1d5fa4 de1d5ef8 c006abec c0008650 bf0a6e7c c001a654
[   88.479553] 5f00: 00000000 c0069854 e0934800 e09378d0 00000000 bf0a6eb8 de19fec0 c0587fd0
[   88.488098] 5f20: 00000000 00000000 00000000 00000000 00000000 00000000 e0933000 0000619f
[   88.496612] 5f40: e0937420 e09372f9 e0938e30 de3629c0 00000fdc 0000126c 00000000 00000000
[   88.505157] 5f60: 0000001d 0000001e 0000000e 0000000b 00000009 00000000 00000002 44bffb08
[   88.513671] 5f80: 00000000 00021d98 00000080 c00148e8 de1d4000 00000000 00000000 de1d5fa8
[   88.522216] 5fa0: c0014740 c006a814 44bffb08 00000000 4016a000 0000619f 401d5230 00000002
[   88.530731] 5fc0: 44bffb08 00000000 00021d98 00000080 00021088 0000619f 401d5230 00000000
[   88.539276] 5fe0: 44baf5a0 be8cdbd8 401cdb24 44baf5b0 80000010 4016a000 00000000 00000000
[   88.547790] Backtrace:
[   88.550415] [<bf0061e4>] (PVRSRVRegisterBCDeviceKM+0x0/0x330 [pvrsrvkm]) from [<bf0a9228>] (bc_cat_init+0x228/0x2f0 [bufferclass_ti])
[   88.562957] [<bf0a9000>] (bc_cat_init+0x0/0x2f0 [bufferclass_ti]) from [<c000876c>] (do_one_initcall+0x128/0x1a8)
[   88.573669] [<c0008644>] (do_one_initcall+0x0/0x1a8) from [<c006abec>] (sys_init_module+0x3e4/0x1b68)
[   88.583282] [<c006a808>] (sys_init_module+0x0/0x1b68) from [<c0014740>] (ret_fast_syscall+0x0/0x30)
[   88.592742] Code: e3a020dc e30a3974 e34b3f04 eb006913 (e7f001f2)
[   88.599151] ---[ end trace a877506ba0314899 ]---
Segmentation fault
root@am335x-evm:/opt/gfxlibraries/gfx_dbg_es8.x# lsmod
Module                  Size  Used by
bufferclass_ti          8467  1
g_mass_storage         37863  0
omaplfb                13867  1
pvrsrvkm              484224  2 omaplfb,bufferclass_ti

But this didn't solve the problem and I find it weird the module is loaded. I found these posts:

http://e2e.ti.com/support/embedded/linux/f/354/t/298853.aspx , http://e2e.ti.com/support/embedded/linux/f/354/t/298853.aspx , http://e2e.ti.com/support/arm/sitara_arm/f/791/p/275648/964119.aspx

These state I have to build the drivers with the PM_RUNTIME=1 option if I have the SGX HWMOD support enabled in the kernel. I'm not sure I have this but I tried building the modules with PM_RUNTIME=1, they built without error but the problem persists when I try to load them on my board.

One of the posts stated I have to patch the kernel with:

https://gitorious.org/rowboat/kernel/commit/d3ab5e87304b45dc594351ed091a6ae451f40de7?format=patch

but I have the feeling this is not for the arago linux distro, since I don't have any of the structs or functions who are altered in the patch.

Is there another patch for the arago distro or wouldn't this solve the problem?

I don't know if this is related to my problem but another strange thing that happens is when I reboot my board after I ran the am335x-evm demo script, my lcd seems to stop working, I can't get the matrix app to show up or any other Qt application ( simple hello world ).

Thanks in advance and my apologies for the long post.

  • Hi Laurens,

    You shouldn't just use FBDEV=no to workaround your compile error. Instead you should find out why the omapfb.h file is missing.

    I'm assuming the omapfb.h file is this one:

    ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/drivers/video/omap2/omapfb/omapfb.h

    Perhaps the path to the AM335x SDK isn't correct.

    Here is the Graphics SDK user guide if you haven't found it yet: http://processors.wiki.ti.com/index.php/Graphics_SDK_Quick_installation_and_user_guide

    Best regards,
    Miroslav

  • Well, I'm using the arago linux distro of the board port labs so am I right than that this :

    -sdk-am335x-evm/board-support/board-port-labs/sitara-board-port-linux/drivers/video/omap2/omapfb

    is the omapfb.h file I have to use?

    But I don't quite understand how my path to the sdk is incorrect. I used the Graphics SDK user guide to alter the Rules.make so my paths in this file are wrong then? I think I'm not fully understanding the meaning of these variables....

    HOME is my home folder right? As in /home/laurens(my user name)? My KERNEL_INSTALL_DIR is like the KDIR in a Makefile, the one that points to the linux headers (via the build soft link), or am I wrong? And I thought that the GRAPHICS_INSTALL_DIR had to point to the Graphics SDK top directory.

    Correct me if I'm wrong with any of this.

  • Laurens, the KERNEL_INSTALL_DIR variable should, in your case, be set to:

    KERNEL_INSTALL_DIR=/home/laurens/ti-sdk-am335x-evm/board-support/board-port-labs/sitara-board-port-linux

    It's the path to the kernel sources.

    Best regards,
    Miroslav

  • I see, thanks for the clarification. I set the KERNEL_INSTALL_DIR to:

    KERNEL_INSTALL_DIR=/home/laurens/ti-sdk-am335x-evm/board-support/board-port-labs/sitara-board-port-linux

    It then said it could'nt find the generated/ directory, I forgot I build the kernel in a separate directory with the O= option in make:

    /home/laurens/ti-sdk-am335x-evm/board-support/board-port-labs/sitara-board-port-linux/am335x_evm/

    But when I set the KERNEL_INSTALL_DIR to this directory, it still gave the error:

    /home/laurens/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb_linux.c:134:27: fatal error: omapfb/omapfb.h: No such file or directory

    I then recompiled the kernel in the sitara-board-port-linux directory, without the "O=" option in make, and then it compiled fine. My question is : Why is this? Why can't I point the KERNEL_INSTALL_DIR to the kernel sources in the seperate directory am335x_evm?

    Many thanks for the help.

    The modules compiled fine now but when I run the 335x-demo script it still gives errors. I logged my output here in 3 stages:

    /////////////////////////////////BEGIN AM335xDEMO
    
    root@am335x-evm:/opt/gfxsdkdemos# ./335x-demo 
    0x10205
    debug8.x
    installing 8.x SGX debug 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-g2b92769-dirty/extra/pvrsrvkm.ko
    kernel module omaplfb.ko -> /lib/modules/3.2.0-g2b92769-dirty/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.
    
    Module pvrsrvkm failed to load. Retrying.
    Running /sbin/depmod
    [  127.252075] Disabling lock debugging due to kernel taint
    [  127.282287] PVR: PVRCore_Init
    [  127.288299] PVR: PVRSRVDriverProbe(pDevice=bf077710)
    [  127.293731] PVR: EnableSystemClocks: Enabling System Clocks
    [  127.299621] PVR_K:(Error): EnableSsystemClocks: Couldn't get SGX Functional Clock [720, home/laurens/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/system/ti335x/sysutils_linux.c]
    [  127.316375] PVR_K:(Error): SysInitialise: Failed to Enable system clocks (176) [481, home/laurens/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/system/ti335x/sysconfig.c]
    [  127.332458] PVR: PVRCore_Init: major device 251
    ./rc.pvr: line 34: /usr/local/bin/pvrsrvctl: No such file or directory
    root@am335x-evm:/opt/gfxsdkdemos# 
    
    /////////////////////////////////END AM335xDEMO
    
    /////////////////////////////////BEGIN STARTUP
    
    Starting thttpd.
    Starting PVR
    [   16.022460] Disabling lock debugging due to kernel taint
    [   16.052337] PVR: PVRCore_Init
    [   16.058319] PVR: PVRSRVDriverProbe(pDevice=bf067710)
    [   16.063720] PVR: EnableSystemClocks: Enabling System Clocks
    [   16.069610] PVR_K:(Error): EnableSsystemClocks: Couldn't get SGX Functional Clock [720, home/laurens/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/system/ti335x/sysutils_linux.c]
    [   16.086364] PVR_K:(Error): SysInitialise: Failed to Enable system clocks (176) [481, home/laurens/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/system/ti335x/sysconfig.c]
    [   16.102447] PVR: PVRCore_Init: major device 251
    [   16.558990] omaplfb: OMAPLFBInitFBDev: Device 0: Unknown FB format
    [   16.565551] PVR_K:(Fatal): Debug assertion failed! [220, home/laurens/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/system/include/syscommon.h]
    [   16.579193] ------------[ cut here ]------------
    [   16.584014] kernel BUG at /home/laurens/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/system/include/syscommon.h:220!
    [   16.595153] Internal error: Oops - undefined instruction: 0 [#1]
    [   16.601440] Modules linked in: omaplfb(O+) pvrsrvkm(O)
    [   16.606811] CPU: 0    Tainted: G           O  (3.2.0-g2b92769-dirty #1)
    [   16.613891] PC is at PVRSRVRegisterDCDeviceKM+0x6c/0x340 [pvrsrvkm]
    [   16.620422] LR is at console_unlock+0x168/0x1f4
    [   16.625152] pc : [<bf005d14>]    lr : [<c003e568>]    psr: 60000013
    [   16.625152] sp : df329e20  ip : df329c60  fp : df329e4c
    [   16.637145] r10: bf08f428  r9 : bf08f1e0  r8 : bf08f094
    [   16.642578] r7 : bf08f0a8  r6 : bf08f0bc  r5 : bf0910c8  r4 : de054600
    [   16.649383] r3 : 20000013  r2 : 00000001  r1 : 00000000  r0 : 0000009a
    [   16.656188] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
    [   16.663635] Control: 10c5387d  Table: 9f698019  DAC: 00000015
    [   16.669616] Process modprobe (pid: 1406, stack limit = 0xdf3282f0)
    [   16.676086] Stack: (0xdf329e20 to 0xdf32a000)
    [   16.680633] 9e20: c0413034 de054600 de054604 de05467c 00000000 00000000 00000000 df329e30
    [   16.689147] 9e40: df329e8c df329e50 bf08fd50 bf005cb4 c01cc150 df6c3010 df6c3000 00000004
    [   16.697692] 9e60: 00000000 bf090f94 bf090f94 c06488c0 df328000 0000001c c0069754 bf093000
    [   16.706207] 9e80: df329e9c df329e90 bf093010 bf08fa10 df329ef4 df329ea0 c000876c bf09300c
    [   16.714752] 9ea0: df329ec4 df329eb0 00000002 00000000 df6c73c0 e0919000 df329ee4 df329ec8
    [   16.723297] 9ec0: bf090f94 bf090f94 df71ae40 bf090f94 bf090f94 df71ae40 00000001 0000001c
    [   16.731811] 9ee0: c0069754 000007ed df329fa4 df329ef8 c006abec c0008650 bf090fa0 c001a654
    [   16.740356] 9f00: 00000000 c0069854 e091b92c e091e9dc 00000000 bf090fdc df238440 c0587fd0
    [   16.748870] 9f20: 00000000 00000000 00000000 00000000 00000000 00000000 e0919000 00007e79
    [   16.757415] 9f40: e091e504 e091e3cb e092068c df35b280 000020d0 00002660 00000000 00000000
    [   16.765930] 9f60: 0000001e 0000001f 0000000f 0000000d 0000000c 00000000 00000002 00021f88
    [   16.774475] 9f80: 00000000 00021d90 00000080 c00148e8 df328000 00000000 00000000 df329fa8
    [   16.783020] 9fa0: c0014740 c006a814 00021f88 00000000 402a4000 00007e79 40138230 00000002
    [   16.791534] 9fc0: 00021f88 00000000 00021d90 00000080 00021e90 00007e79 40138230 00000000
    [   16.800079] 9fe0: 44baf5a0 beb43980 40130b24 44baf5b0 80000010 402a4000 000ec02c 000480a4
    [   16.808593] Backtrace: 
    [   16.811218] [<bf005ca8>] (PVRSRVRegisterDCDeviceKM+0x0/0x340 [pvrsrvkm]) from [<bf08fd50>] (OMAPLFBInit+0x34c/0x57c [omaplfb])
    [   16.823120] [<bf08fa04>] (OMAPLFBInit+0x0/0x57c [omaplfb]) from [<bf093010>] (OMAPLFB_Init+0x10/0x34 [omaplfb])
    [   16.833648] [<bf093000>] (OMAPLFB_Init+0x0/0x34 [omaplfb]) from [<c000876c>] (do_one_initcall+0x128/0x1a8)
    [   16.843750] [<c0008644>] (do_one_initcall+0x0/0x1a8) from [<c006abec>] (sys_init_module+0x3e4/0x1b68)
    [   16.853363] [<c006a808>] (sys_init_module+0x0/0x1b68) from [<c0014740>] (ret_fast_syscall+0x0/0x30)
    [   16.862823] Code: e3a020dc e30a3a8c e34b3f04 eb006a62 (e7f001f2) 
    [   16.869232] ---[ end trace faabe9b409137569 ]---
    /etc/rc5.d/S30pvr-init: line 42:  1406 Segmentation fault      modprobe omaplfb
    FATAL: Module bufferclass_ti not found.
    [   17.323516] Unhandled fault: external abort on non-linefetch (0x1018) at 0x400b0014
    Starting SGX fixup for ES.x
    cp: can't stat '/usr/lib/ES.0/*': No such file or directory
    cp: can't stat '/usr/bin/ES.0/*': No such file or directory
    Starting Lighttpd Web Server: lighttpd.
    2013-06-25 23:13:14: (log.c.166) server started 
    
    
    /////////////////////////////////END STARTUP
    
    ////////////////////////////////BEGIN MANUAL INSMOD
    root@am335x-evm:/opt/gfxlibraries/gfx_dbg_es8.x# insmod bufferclass_ti.ko 
    [  440.121917] PVR_K:(Fatal): Debug assertion failed! [220, home/laurens/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/system/include/syscommon.h]
    [  440.135650] ------------[ cut here ]------------
    [  440.140472] kernel BUG at /home/laurens/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/system/include/syscommon.h:220!
    [  440.151611] Internal error: Oops - undefined instruction: 0 [#2]
    [  440.157897] Modules linked in: bufferclass_ti(O+) g_mass_storage omaplfb(O+) pvrsrvkm(O)
    [  440.166351] CPU: 0    Tainted: G      D    O  (3.2.0-g2b92769-dirty #1)
    [  440.173431] PC is at PVRSRVRegisterBCDeviceKM+0x6c/0x330 [pvrsrvkm]
    [  440.179992] LR is at console_unlock+0x168/0x1f4
    [  440.184692] pc : [<bf006250>]    lr : [<c003e568>]    psr: 60000013
    [  440.184722] sp : de03de38  ip : de03dc78  fp : de03de64
    [  440.196685] r10: bf0a6fa4  r9 : 00000000  r8 : bf00a398
    [  440.202117] r7 : df722d80  r6 : bf0a6cac  r5 : bf0a6fa4  r4 : 00000000
    [  440.208923] r3 : 20000013  r2 : 00000001  r1 : 00000000  r0 : 0000009a
    [  440.215728] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
    [  440.223175] Control: 10c5387d  Table: 9e050019  DAC: 00000015
    [  440.229187] Process insmod (pid: 1742, stack limit = 0xde03c2f0)
    [  440.235443] Stack: (0xde03de38 to 0xde03e000)
    [  440.239990] de20:                                                       00000000 bf0a6fa4
    [  440.248504] de40: df722d84 df722da0 00000000 de03de58 00000000 de03de48 de03de9c de03de68
    [  440.257049] de60: bf0a9228 bf0061f0 bf0a6cac 00000000 00000000 bf0a6e70 bf0a6e70 c06488c0
    [  440.265563] de80: de03c000 0000001c c0069754 bf0a9000 de03def4 de03dea0 c000876c bf0a900c
    [  440.274108] dea0: de03dec4 de03deb0 00000002 00000000 df6ec340 e094d000 de03dee4 de03dec8
    [  440.282653] dec0: bf0a6e70 bf0a6e70 de1e9cc0 bf0a6e70 bf0a6e70 de1e9cc0 00000001 0000001c
    [  440.291168] dee0: c0069754 0000036f de03dfa4 de03def8 c006abec c0008650 bf0a6e7c c001a654
    [  440.299713] df00: 00000000 c0069854 e094e800 e0951818 00000000 bf0a6eb8 df043ac0 c0587fd0
    [  440.308227] df20: 00000000 00000000 00000000 00000000 00000000 00000000 e094d000 000060e7
    [  440.316772] df40: e0951368 e0951242 e0952d78 df23a340 00000fdc 0000126c 00000000 00000000
    [  440.325317] df60: 0000001d 0000001e 0000000e 0000000b 00000009 00000000 00000002 44bffb08
    [  440.333831] df80: 00000000 00021d98 00000080 c00148e8 de03c000 00000000 00000000 de03dfa8
    [  440.342376] dfa0: c0014740 c006a814 44bffb08 00000000 40066000 000060e7 40174230 00000002
    [  440.350921] dfc0: 44bffb08 00000000 00021d98 00000080 00021088 000060e7 40174230 00000000
    [  440.359436] dfe0: 44baf5a0 be9c5bc8 4016cb24 44baf5b0 80000010 40066000 00000000 00000000
    [  440.367980] Backtrace: 
    [  440.370574] [<bf0061e4>] (PVRSRVRegisterBCDeviceKM+0x0/0x330 [pvrsrvkm]) from [<bf0a9228>] (bc_cat_init+0x228/0x2f0 [bufferclass_ti])
    [  440.383117] [<bf0a9000>] (bc_cat_init+0x0/0x2f0 [bufferclass_ti]) from [<c000876c>] (do_one_initcall+0x128/0x1a8)
    [  440.393829] [<c0008644>] (do_one_initcall+0x0/0x1a8) from [<c006abec>] (sys_init_module+0x3e4/0x1b68)
    [  440.403472] [<c006a808>] (sys_init_module+0x0/0x1b68) from [<c0014740>] (ret_fast_syscall+0x0/0x30)
    [  440.412902] Code: e3a020dc e30a3a8c e34b3f04 eb006913 (e7f001f2) 
    [  440.419342] ---[ end trace faabe9b40913756a ]---
    Segmentation fault
    root@am335x-evm:/opt/gfxlibraries/gfx_dbg_es8.x# lsmod
    Module                  Size  Used by
    bufferclass_ti          8467  1 
    g_mass_storage         37599  0 
    omaplfb                16024  1 
    pvrsrvkm              485132  2 omaplfb,bufferclass_ti
    root@am335x-evm:/opt/gfxlibraries/gfx_dbg_es8.x# 
    
    ////////////////////////////////END MANUAL INSMOD
    

    I logged when I ran the 335x-demo script, I logged when I rebooted the board after I ran the demo script. In the second log I noticed it still couldn't find some module so I logged when I tried to insert it manually but I think this gives the same error when booting up.

    Guessing from the output. It seems it can't find a SGX Functional Clock? I logged the gfx_check.sh script too:

    root@am335x-evm:/media/sda2/home/root# ./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 (debug) /home/laurens/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 1024 24
        timings 33333 39 39 29 13 47 2
        rgba 8/0,8/8,8/16,0/0
    endmode
    
    Frame buffer device information:
        Name        : DA8xx FB Drv
        Address     : 0x9f400000
        Size        : 2457600
        Type        : PACKED PIXELS
        Visual      : TRUECOLOR
        XPanStep    : 0
        YPanStep    : 1
        YWrapStep   : 0
        LineLength  : 2400
        Accelerator : No
    ------
    Rotation settings
    0
    ------
    Kernel Module information
    Module                  Size  Used by
    bufferclass_ti          8467  1 
    g_mass_storage         37599  0 
    omaplfb                16024  1 
    pvrsrvkm              485132  2 omaplfb,bufferclass_ti
    ------
    Boot settings
    console=ttyO0,115200n8 root=/dev/mmcblk0p2 ro rootfstype=ext3 rootwait ip=none
    ------
    Linux Kernel version
    Linux am335x-evm 3.2.0-g2b92769-dirty #1 Thu Feb 20 14:01:30 CET 2014 armv7l GNU/Linux
    root@am335x-evm:/media/sda2/home/root# 
    
    

    This was after I manually loaded bufferclass module so it lists in the kernel modules now but normally it isn't loaded.

  • I tried reinstalling the SGX drivers with the hard float graphics package as suggested in the post:

    http://e2e.ti.com/support/arm/sitara_arm/f/791/p/297965/1041715.aspx

    I'm also compiling with PM_RUNTIME=1.

    I'm getting another error message now:

    //////////////////////////////////////////////335x-demo OUTPUT
    root@am335x-evm:~# /etc/init.d/335x-demo 
    0x10205
    debug8.x
    installing 8.x SGX debug user libraries
    
    Installing PowerVR Consumer/Embedded DDK 'sgxddk_1.10@2359475' on target
    
    File system installation root is /
    
    Uninstalling existing version sgxddk_1.10@2359475
    Uninstallation completed.
    boot script rc.pvr -> /etc/init.d/rc.pvr
    kernel module pvrsrvkm.ko -> /lib/modules/3.2.0-g2b92769-dirty/extra/pvrsrvkm.ko
    kernel module omaplfb.ko -> /lib/modules/3.2.0-g2b92769-dirty/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.
    
    Module pvrsrvkm failed to load. Retrying.
    Running /sbin/depmod
    [   41.446472] Disabling lock debugging due to kernel taint
    [   41.476593] PVR: PVRCore_Init
    [   41.482421] PVR: PVRCore_Init: major device 251
    ./rc.pvr: line 34: /usr/local/bin/pvrsrvctl: No such file or directory
    root@am335x-evm:~# lsmod
    Module                  Size  Used by
    pvrsrvkm              484224  0 
    g_mass_storage         37599  0 
    root@am335x-evm:~# ls -la /usr/local/bin/pvrsrvctl 
    -rwxr-xr-x    1 root     root         62518 Jun 26 01:17 /usr/local/bin/pvrsrvctl
    root@am335x-evm:~#
    
    
    
    
    
    /////////////////////////////////////////////////////REBOOT BOARD
    
    
    Starting PVR
    [   16.040374] Disabling lock debugging due to kernel taint
    [   16.070495] PVR: PVRCore_Init
    [   16.076324] PVR: PVRCore_Init: major device 251
    [   16.109375] omaplfb: OMAPLFBInitFBDev: Device 0: Unknown FB format
    [   16.115936] PVR_K:(Fatal): Debug assertion failed! [220, home/laurens/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/system/include/syscommon.h]
    [   16.129577] ------------[ cut here ]------------
    [   16.134399] kernel BUG at /home/laurens/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/system/include/syscommon.h:220!
    [   16.145538] Internal error: Oops - undefined instruction: 0 [#1]
    [   16.151824] Modules linked in: omaplfb(O+) pvrsrvkm(O)
    [   16.157196] CPU: 0    Tainted: G           O  (3.2.0-g2b92769-dirty #1)
    [   16.164276] PC is at PVRSRVRegisterDCDeviceKM+0x6c/0x340 [pvrsrvkm]
    [   16.170837] LR is at console_unlock+0x168/0x1f4
    [   16.175567] pc : [<bf005d14>]    lr : [<c003e568>]    psr: 60000013
    [   16.175567] sp : df223e20  ip : df223c60  fp : df223e4c
    [   16.187530] r10: bf08f428  r9 : bf08f1e0  r8 : bf08f094
    [   16.192993] r7 : bf08f0a8  r6 : bf08f0bc  r5 : bf0910c8  r4 : de000600
    [   16.199798] r3 : 20000013  r2 : 00000001  r1 : 00000000  r0 : 0000009a
    [   16.206604] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
    [   16.214050] Control: 10c5387d  Table: 9e098019  DAC: 00000015
    [   16.220031] Process modprobe (pid: 1407, stack limit = 0xdf2222f0)
    [   16.226470] Stack: (0xdf223e20 to 0xdf224000)
    [   16.231018] 3e20: c04121bc de000600 de000604 de00067c 00000000 00000000 00000000 df223e30
    [   16.239562] 3e40: df223e8c df223e50 bf08fd50 bf005cb4 c01cc150 de24b010 de24b000 00000004
    [   16.248107] 3e60: 00000000 bf090f94 bf090f94 c0648700 df222000 0000001c c0069754 bf093000
    [   16.256622] 3e80: df223e9c df223e90 bf093010 bf08fa10 df223ef4 df223ea0 c000876c bf09300c
    [   16.265167] 3ea0: df223ec4 df223eb0 00000002 00000000 de103500 e0919000 df223ee4 df223ec8
    [   16.273712] 3ec0: bf090f94 bf090f94 df71c400 bf090f94 bf090f94 df71c400 00000001 0000001c
    [   16.282226] 3ee0: c0069754 000007ed df223fa4 df223ef8 c006abec c0008650 bf090fa0 c001a654
    [   16.290771] 3f00: 00000000 c0069854 e091b92c e091e9dc 00000000 bf090fdc df731840 c0587c08
    [   16.299316] 3f20: 00000000 00000000 00000000 00000000 00000000 00000000 e0919000 00007e79
    [   16.307830] 3f40: e091e504 e091e3cb e092068c df2834c0 000020d0 00002660 00000000 00000000
    [   16.316375] 3f60: 0000001e 0000001f 0000000f 0000000d 0000000c 00000000 00000002 00021f88
    [   16.324920] 3f80: 00000000 00021d90 00000080 c00148e8 df222000 00000000 00000000 df223fa8
    [   16.333435] 3fa0: c0014740 c006a814 00021f88 00000000 40359000 00007e79 40196230 00000002
    [   16.341979] 3fc0: 00021f88 00000000 00021d90 00000080 00021e90 00007e79 40196230 00000000
    [   16.350524] 3fe0: 44baf5a0 bed67980 4018eb24 44baf5b0 80000010 40359000 0003bc88 000a132b
    [   16.359039] Backtrace: 
    [   16.361663] [<bf005ca8>] (PVRSRVRegisterDCDeviceKM+0x0/0x340 [pvrsrvkm]) from [<bf08fd50>] (OMAPLFBInit+0x34c/0x57c [omaplfb])
    [   16.373565] [<bf08fa04>] (OMAPLFBInit+0x0/0x57c [omaplfb]) from [<bf093010>] (OMAPLFB_Init+0x10/0x34 [omaplfb])
    [   16.384124] [<bf093000>] (OMAPLFB_Init+0x0/0x34 [omaplfb]) from [<c000876c>] (do_one_initcall+0x128/0x1a8)
    [   16.394195] [<c0008644>] (do_one_initcall+0x0/0x1a8) from [<c006abec>] (sys_init_module+0x3e4/0x1b68)
    [   16.403839] [<c006a808>] (sys_init_module+0x0/0x1b68) from [<c0014740>] (ret_fast_syscall+0x0/0x30)
    [   16.413269] Code: e3a020dc e30a3974 e34b3f04 eb006a62 (e7f001f2) 
    [   16.419708] ---[ end trace 05cfd791e8bc2441 ]---
    /etc/rc5.d/S30pvr-init: line 42:  1407 Segmentation fault      modprobe omaplfb
    FATAL: Module bufferclass_ti not found.
    [   17.207397] Unhandled fault: external abort on non-linefetch (0x1018) at 0x40158014
    Starting SGX fixup for ES.x
    cp: can't stat '/usr/lib/ES.0/*': No such file or directory
    cp: can't stat '/usr/bin/ES.0/*': No such file or directory
    Starting Lighttpd Web Server: lighttpd.
    
    
    ///////////////////////////////lsmod OUTPUT AFTER REBOOT
    root@am335x-evm:~# lsmod
    Module                  Size  Used by
    g_mass_storage         37599  0 
    omaplfb                16024  1 
    pvrsrvkm              484224  1 omaplfb
    root@am335x-evm:~# 
    ///////////////////////////////////
    
    


    Now it can't find the file /usr/local/bin/pvrsrvctl. I checked ,as you can see in the log, and the file is there.

    When I reboot the board it says something about an unknown FB format and it still can't find the module bufferclass_ti.

    Also I noticed the drivers are installed in /lib/modules/3.2.0/kernel/drivers/gpu/pvr, but my other modules like g_mass_storage,.... are installed in /lib/modules/ 3.2.0-g2b92769-dirty/kernel/drivers. Is this normal or is this part of the problem?

  • I found where the error : "Unknown FB format" came from. It is thrown in the file :

    <Graphics_SDK_4_10_00_01_hardfp-top-directory>/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb_displayclass.c

    It is related to the bits_per_pixel I assume. The driver is only defined for bits_per_pixel=16 or 32. My screen has 24 bits_per_pixel. Does this mean the driver won't work with my screen or can I enter an extra else statement with var.bits_per_pixel == 24 ?

  • I tried editing the omaplf_displayclass.c file to support 24 bits_per_pixel but no luck. It still says "Unknown FB format". But I tried digging into the error it gave when I ran the 335x-demo script to install the drivers:

    ./rc.pvr: line 34: /usr/local/bin/pvrsrvctl: No such file or directory

    I came across this post http://e2e.ti.com/support/arm/sitara_arm/f/791/p/318242/1109340.aspx and tried the following command:

    root@am335x-evm:/usr/local/bin# arm-linux-gnueabihf-readelf -l /usr/local/bin/pvrsrvctl | grep "program interpreter"
          [Requesting program interpreter: /lib/ld-linux.so.3]
    root@am335x-evm:/usr/local/bin# ls -al /lib | grep ld
    -rwxr-xr-x    1 root     root         98800 Jun 25 21:46 ld-2.15.so
    lrwxrwxrwx    1 root     root            10 Jun 25 23:14 ld-linux-armhf.so.3 -> ld-2.15.so
    root@am335x-evm:/usr/local/bin#

    It seems I'm missing some libraries ? Any explanation as to why these are not included ? Am I using the wrong make arguments or something like that? Or is ld-linux-armhf.so.3 the right one but for some reason it has the wrong name?

  • I made a soft link to the ld-2.15.so :

    root@am335x-evm:~# ln -s /lib/ld-2.15.so  /lib/ld-linux.so.3

    Now when I run the am335x-demo script, it doesn't give any errors.

    root@am335x-evm:~# /etc/init.d/335x-demo
    0x10205
    debug8.x
    installing 8.x SGX debug user libraries

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

    File system installation root is /

    Uninstalling existing version sgxddk_1.10@2359475
    Uninstallation completed.
    boot script rc.pvr -> /etc/init.d/rc.pvr
    kernel module pvrsrvkm.ko -> /lib/modules/3.2.0-g2b92769-dirty/extra/pvrsrvkm.ko
    kernel module omaplfb.ko -> /lib/modules/3.2.0-g2b92769-dirty/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.

    root@am335x-evm:~#

    But after I ran this, the lcd stops working, the matrix app crashes and when I reboot the board, the LCD won't show anything.

    When the board boots, everything is fine , it even finds the right bits_per_pixel.

    I added  sgx_init(); in the am335x_evm_init function in board-am335xevm.c and the sgx_init function is:

    static void sgx_init(){
    
        if(omap3_has_sgx()){
            am33xx_gpu_init();
        }
    }

    I got these from the patch https://gitorious.org/rowboat/kernel/commit/d3ab5e87304b45dc594351ed091a6ae451f40de7?format=patch . I'm still compiling with PM_RUNTIME=1.

    But it still can't find the bufferclass_ti.ko module at boot:

    Starting PVR
    [   17.577819] Disabling lock debugging due to kernel taint
    [   17.607788] PVR: PVRCore_Init
    [   17.613555] PVR: PVRSRVDriverProbe(pDevice=df070800)
    [   17.618896] PVR: EnableSystemClocks: Enabling System Clocks
    [   17.624847] PVR: GPTIMER11 clock is 26MHz
    [   17.629669] PVR: PVRCore_Init: major device 251
    [   17.653289] omaplfb: bitsperpixel==24FATAL: Module bufferclass_ti not found.
    Starting Lighttpd Web Server: lighttpd.

    And the module is there:

    root@am335x-evm:/lib/modules/3.2.0/kernel/drivers/gpu/pvr# ls
    bufferclass_ti.ko  omaplfb.ko         pvrsrvkm.ko

    But when I try to load it in, it still gives an error:


    root@am335x-evm:/lib/modules/3.2.0/kernel/drivers/gpu/pvr# lsmod
    Module                  Size  Used by
    g_mass_storage         37599  0
    omaplfb                11171  0
    pvrsrvkm              484224  1 omaplfb

    root@am335x-evm:/lib/modules/3.2.0/kernel/drivers/gpu/pvr# insmod bufferclass_ti.ko
    [   76.341278] bufferclass_ti: disagrees about version of symbol PVRGetBufferClassJTable
    [   76.349487] bufferclass_ti: Unknown symbol PVRGetBufferClassJTable (err -22)
    Error: could not insert module bufferclass_ti.ko: Invalid parameters
    root@am335x-evm:/lib/modules/3.2.0/kernel/drivers/gpu/pvr#


    I read that a possible cause to this is the absence of an entry of PVRGetBufferClassJTable in the Module.symvers file but when I check this in ~/Graphics_SDK_4_10_00_01/GFX_Linux_KM/Module.symvers:

    0xb3d66bc8    PVRGetBufferClassJTable    /home/laurens/Graphics_SDK_4_10_00_01/GFX_Linux_KM/pvrsrvkm    EXPORT_SYMBOL

    The entry is there, so I am lost as to what could be causing the error and why the LCD stops working after I run the 335-demo script.

  • EDIT:

    I tried loading in the LCD driver as module and then the SGX drivers but it doesn't giva any errors, the lcd driver finds the screen but I don't see anything. And after I load in the sgx drivers, still nothing.

  • I managed to get the drivers to load in but I'm getting a new error. I'll try to explain what I did so far:


    I downloaded the ti-sdk-am335x-evm-05.07.00.00 and the graphics SDK-04-09-00-01. I adjusted the linux kernel from the ti-sdk to my board.

    I used the cross compiler in the ti-sdk-am335x-evm-05.07.00.00 to compile the kernel and the drivers and the hellogl_es2 qt example. I also used the corresponding filesystem of this sdk, this had the ld-linux.so.3 link and ld-12.2.so library in /lib, unlike the ti-sdk-06.00.00.00.

    This way, the sgx drivers could find the right libraries. When I run the 335x-demo script, The modules load fine:

    root@am335x-evm:~# /etc/init.d/335x-demo 
    0x10205
    debug8.x
    installing 8.x SGX debug user libraries
    
    Installing PowerVR Consumer/Embedded DDK 'sgxddk_1.9@2188537' 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.9.2188537
    shared library libusc.so -> /usr/lib/libusc.so.1.9.2188537
    shared library libGLESv2.so -> /usr/lib/libGLESv2.so.1.9.2188537
    shared library libglslcompiler.so -> /usr/lib/libglslcompiler.so.1.9.2188537
    shared library libIMGegl.so -> /usr/lib/libIMGegl.so.1.9.2188537
    shared library libEGL.so -> /usr/lib/libEGL.so.1.9.2188537
    shared library libpvr2d.so -> /usr/lib/libpvr2d.so.1.9.2188537
    shared library libpvrPVR2D_BLITWSEGL.so -> /usr/lib/libpvrPVR2D_BLITWSEGL.so.1.9.2188537
    shared library libpvrPVR2D_FLIPWSEGL.so -> /usr/lib/libpvrPVR2D_FLIPWSEGL.so.1.9.2188537
    shared library libpvrPVR2D_FRONTWSEGL.so -> /usr/lib/libpvrPVR2D_FRONTWSEGL.so.1.9.2188537
    shared library libpvrPVR2D_LINUXFBWSEGL.so -> /usr/lib/libpvrPVR2D_LINUXFBWSEGL.so.1.9.2188537
    shared library libpvrEWS_WSEGL.so -> /usr/lib/libpvrEWS_WSEGL.so.1.9.2188537
    shared library libsrv_um.so -> /usr/lib/libsrv_um.so.1.9.2188537
    shared library libsrv_init.so -> /usr/lib/libsrv_init.so.1.9.2188537
    shared library libPVRScopeServices.so -> /usr/lib/libPVRScopeServices.so.1.9.2188537
    shared library libews.so -> /usr/lib/libews.so.1.9.2188537
    binary pvrsrvctl -> /usr/local/bin/pvrsrvctl
    binary sgx_init_test -> /usr/local/bin/sgx_init_test
    binary ews_server -> /usr/local/bin/ews_server
    binary ews_server_es2 -> /usr/local/bin/ews_server_es2
    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
    binary gles1test1 -> /usr/local/bin/gles1test1
    binary gles2test1 -> /usr/local/bin/gles2test1
    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
    binary eglinfo -> /usr/local/bin/eglinfo
    binary ews_test_gles1 -> /usr/local/bin/ews_test_gles1
    binary ews_test_gles2 -> /usr/local/bin/ews_test_gles2
    shader ews_test_gles2_main.vert -> /usr/local/bin/ews_test_gles2_main.vert
    shader ews_test_gles2_main.frag -> /usr/local/bin/ews_test_gles2_main.frag
    shader ews_test_gles2_pp.vert -> /usr/local/bin/ews_test_gles2_pp.vert
    shader ews_test_gles2_pp.frag -> /usr/local/bin/ews_test_gles2_pp.frag
    binary ews_test_swrender -> /usr/local/bin/ews_test_swrender
    
    Installation complete!
    You may now reboot your target.
    
    Module pvrsrvkm failed to load. Retrying.
    Running /sbin/depmod
    [   76.863281] PVR: PVRCore_Init
    [   76.868804] PVR: PVRSRVDriverProbe(pDevice=bf07a680)
    [   76.874237] PVR: EnableSystemClocks: Enabling System Clocks
    [   76.880126] PVR: GPTIMER11 clock is 26MHz
    [   76.884857] PVR: PVRCore_Init: major device 251
    [   77.624359] PVR: Installing MISR with cookie bf07d550
    [   77.629852] PVR: Installing device LISR SGX ISR on IRQ 37 with cookie df378e80
    [   77.638305] PVR: SysFinalise: Version string: SGX revision = 1.2.5
    PVR: 
    PVR: Memory Stats
    PVR: ------------
    PVR: 
    PVR: High Water Mark = 0 bytes
    [   77.655517] omaplfb: OMAPLFBInitFBDev: Device 0: Unknown FB format
    Loaded PowerVR consumer services.
    root@am335x-evm:~# lsmod
    Module                  Size  Used by
    omaplfb                10803  0 
    pvrsrvkm              480486  1 omaplfb
    g_mass_storage         37599  0 
    wl12xx_sdio             3890  0 
    root@am335x-evm:~# /etc/init.d/matrix-gui-2.0 start
    /home/root
    Removing stale PID file /var/run/matrix-gui-2.0.pid.
    Starting Matrix GUI application.
    root@am335x-evm:~#
    

    The format error it gives was because I have a 24 bits per pixel screen and this is not supported in the omaplfb_displayclass file, I edited this by adding the following code in the file:

    	
    	else if(psLINFBInfo->var.bits_per_pixel == 24)
    	{
    		if((psLINFBInfo->var.red.length == 8) &&
    			(psLINFBInfo->var.green.length == 8) && 
    			(psLINFBInfo->var.blue.length == 8) && 
    			(psLINFBInfo->var.red.offset == 0) &&
    			(psLINFBInfo->var.green.offset == 8) && 
    			(psLINFBInfo->var.blue.offset == 16) && 
    			(psLINFBInfo->var.red.msb_right == 0))
    		{   printk(KERN_INFO DRIVER_PREFIX ": 24 bits per pixel gekozen \n");
    			//psPVRFBInfo->ePixelFormat = PVRSRV_PIXEL_FORMAT_RGB8888;
    			psPVRFBInfo->ePixelFormat = PVRSRV_PIXEL_FORMAT_BGR888; //welke is juist?
    			printk(KERN_INFO DRIVER_PREFIX ": 24 bits per pixel ingesteld \n");
    		}
    		else
    		{   printk(KERN_INFO DRIVER_PREFIX ": 24 bits per pixel gekozen \n");
    			printk(KERN_INFO DRIVER_PREFIX ": %s: Device %u: Unknown FB format\n", __FUNCTION__, uiFBDevID);
    		}
    	}
    	
    	
    	

    When it reboots all is well:

    Starting PVR
    [   15.724761] PVR: PVRCore_Init
    [   15.730255] PVR: PVRSRVDriverProbe(pDevice=bf06a680)
    [   15.735656] PVR: EnableSystemClocks: Enabling System Clocks
    [   15.741577] PVR: GPTIMER11 clock is 26MHz
    [   15.746276] PVR: PVRCore_Init: major device 251
    [   15.776031] omaplfb: OMAPLFBInitFBDev: Device 0: Unknown FB format
    FATAL: Module bufferclass_ti not found.
    [   15.936859] PVR: Installing MISR with cookie bf06d550
    [   15.942962] PVR: Installing device LISR SGX ISR on IRQ 37 with cookie df3ee080
    [   15.951416] PVR: SysFinalise: Version string: SGX revision = 1.2.5
    PVR: 
    PVR: Memory Stats
    PVR: ------------
    PVR: 
    PVR: High Water Mark = 0 bytes
    Starting Lighttpd Web Server: lighttpd.
    
    

    But when I run eglinfo, it says something about egl_not_initialized:

    root@am335x-evm:/media/sda1# /usr/local/bin/eglinfo 
    PVR: Hint: Setting WindowSystem to libpvrPVR2D_FRONTWSEGL.so
    PVR:(Error): PVRSRVMetricsTimeNow: using (potentially) low resolution timer [95, /pvr_metrics.c]
    PVR: 
    PVR: Memory Stats
    PVR: ------------
    PVR: 
    PVR: High Water Mark = 4144 bytes
    PVR: 
    PVR: 4144 bytes still allocated in 1 allocations
    PVR: 
    PVR: 1   -  4144 bytes at 0x15cf0 - eurasiacon/imgegl/tls.c:32
    PVR: 
    PVR:(Warning): PVR2DEnumerateDevices: display device name too long, truncating [142, /pvr2dinit.c]
    PVR: 
    PVR: Memory Stats
    PVR: ------------
    PVR: 
    PVR: High Water Mark = 4144 bytes
    PVR: 
    PVR: 4144 bytes still allocated in 1 allocations
    PVR: 
    PVR: 1   -  4144 bytes at 0x15cf0 - eurasiacon/imgegl/tls.c:32
    PVR: 
    PVR:(Error): ConvertPVRSRVPixelFormatToPVR2D: Invalid format 4 [64, /pvr2dmode.c]
    PVR:(Error): PVR2DGetDeviceInfo: Invalid primary pixel format [155, /pvr2dmode.c]
    PVR: 
    PVR: Memory Stats
    PVR: ------------
    PVR: 
    PVR: High Water Mark = 4144 bytes
    PVR: 
    PVR: 4144 bytes still allocated in 1 allocations
    PVR: 
    PVR: 1   -  4144 bytes at 0x15cf0 - eurasiacon/imgegl/tls.c:32
    PVR: 
    PVR:(Warning): HW Recovery stats: Host: 0 	 uKernel: 0 [130, /sgxrender_context.c]
    PVR: 
    PVR: Memory Stats
    PVR: ------------
    PVR: 
    PVR: High Water Mark = 4144 bytes
    PVR: 
    PVR: 4144 bytes still allocated in 1 allocations
    PVR: 
    PVR: 1   -  4144 bytes at 0x15cf0 - eurasiacon/imgegl/tls.c:32
    PVR: 
    Unable to initialise egl
        egl error 'EGL_NOT_INITIALIZED' (0x3001)
    PVR: 
    root@am335x-evm:/media/sda1# 
    
    

    I used the cross compiler of ti-sdk-05.07.00.00 to compile the hello_gles2 because then It selected the right libraries:

        7-sdk m335x-evm:/media/sdb1# arm-arago-linux-gnueabi-readelf -l hellogl_es2_05-07
    
    Elf file type is EXEC (Executable file)
    Entry point 0xc6d0
    There are 8 program headers, starting at offset 52
    
    Program Headers:
      Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
      EXIDX          0x00dbbc 0x00015bbc 0x00015bbc 0x00368 0x00368 R   0x4
      PHDR           0x000034 0x00008034 0x00008034 0x00100 0x00100 R E 0x4
      INTERP         0x000134 0x00008134 0x00008134 0x00013 0x00013 R   0x1
          [Requesting program interpreter: /lib/ld-linux.so.3]
      LOAD           0x000000 0x00008000 0x00008000 0x0df24 0x0df24 R E 0x8000
      LOAD           0x00e000 0x0001e000 0x0001e000 0x004c8 0x0057c RW  0x8000
      DYNAMIC        0x00e010 0x0001e010 0x0001e010 0x00150 0x00150 RW  0x4
      NOTE           0x000148 0x00008148 0x00008148 0x00020 0x00020 R   0x4
      GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x4
    
     Section to Segment mapping:
      Segment Sections...
       00     .ARM.exidx 
       01     
       02     .interp 
       03     .interp .note.ABI-tag .hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .ARM.extab .ARM.exidx 
       04     .init_array .fini_array .jcr .dynamic .got .data .bss 
       05     .dynamic 
       06     .note.ABI-tag 
       07     
    root@am335x-evm:/media/sdb1# 
    
    

    But when I run the application, it can't find a suitable PVR2D pixel format:

    root@am335x-evm:/media/sda1# ./hellogl_es2_05-07-sdk -qws -display powervr
    PVR: Hint: Setting WindowSystem to libpvrPVR2D_FRONTWSEGL.so
    PVR:(Error): PVRSRVMetricsTimeNow: using (potentially) low resolution timer [95, /pvr_metrics.c]
    PVR: 
    PVR: Memory Stats
    PVR: ------------
    PVR: 
    PVR: High Water Mark = 4144 bytes
    PVR: 
    PVR: 4144 bytes still allocated in 1 allocations
    PVR: 
    PVR: 1   -  4144 bytes at 0x2abc0 - eurasiacon/imgegl/tls.c:32
    PVR: 
    PVR:(Warning): PVR2DEnumerateDevices: display device name too long, truncating [142, /pvr2dinit.c]
    PVR: 
    PVR: Memory Stats
    PVR: ------------
    PVR: 
    PVR: High Water Mark = 4144 bytes
    PVR: 
    PVR: 4144 bytes still allocated in 1 allocations
    PVR: 
    PVR: 1   -  4144 bytes at 0x2abc0 - eurasiacon/imgegl/tls.c:32
    PVR: 
    PVR:(Error): ConvertPVRSRVPixelFormatToPVR2D: Invalid format 4 [64, /pvr2dmode.c]
    PVR:(Error): PVR2DGetDeviceInfo: Invalid primary pixel format [155, /pvr2dmode.c]
    PVR: 
    PVR: Memory Stats
    PVR: ------------
    PVR: 
    PVR: High Water Mark = 4144 bytes
    PVR: 
    PVR: 4144 bytes still allocated in 1 allocations
    PVR: 
    PVR: 1   -  4144 bytes at 0x2abc0 - eurasiacon/imgegl/tls.c:32
    PVR: 
    PVR:(Warning): HW Recovery stats: Host: 0 	 uKernel: 0 [130, /sgxrender_context.c]
    PVR: 
    PVR: Memory Stats
    PVR: ------------
    PVR: 
    PVR: High Water Mark = 4144 bytes
    PVR: 
    PVR: 4144 bytes still allocated in 1 allocations
    PVR: 
    PVR: 1   -  4144 bytes at 0x2abc0 - eurasiacon/imgegl/tls.c:32
    PVR: 
    Could not initialize EGL display - are the drivers loaded?
    PVR: 
    PVR: Memory Stats
    PVR: ------------
    PVR: 
    PVR: High Water Mark = 4144 bytes
    PVR: 
    PVR: 4144 bytes still allocated in 1 allocations
    PVR: 
    PVR: 1   -  4144 bytes at 0x2abc0 - eurasiacon/imgegl/tls.c:32
    PVR: 
    PVR:(Warning): PVR2DEnumerateDevices: display device name too long, truncating [142, /pvr2dinit.c]
    PVR: 
    PVR: Memory Stats
    PVR: ------------
    PVR: 
    PVR: High Water Mark = 4144 bytes
    PVR: 
    PVR: 4144 bytes still allocated in 1 allocations
    PVR: 
    PVR: 1   -  4144 bytes at 0x2abc0 - eurasiacon/imgegl/tls.c:32
    PVR: 
    PVR:(Error): ConvertPVRSRVPixelFormatToPVR2D: Invalid format 4 [64, /pvr2dmode.c]
    PVR:(Error): PVR2DGetDeviceInfo: Invalid primary pixel format [155, /pvr2dmode.c]
    /dev/fb0: could not find a suitable PVR2D pixel format
    powervr: driver cannot connect
    Aborted
    root@am335x-evm:/media/sda1# 
    
    

    Anyone have any ideas what could be wrong?

  • I managed to get opengl to work.

    I used the following resources:

     the filesystem and cross compiler from ti-sdk-am335x-06.00.00.00

     The kernel from ti-sdk-am335x-05.07.00.00 ( I had already ported this one and not the ti-sdk-am335x-06.00.00.00  kernel, it should normally work to with this kernel but I didn't have the time to apply the necessary changes to this one so this will be for a later time)

     the graphics sdk 04.09.00.01-hf, I also edited the Rules.make file :

    #Rules.make

    ################# 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/laurens

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

    # 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/laurens/ti-sdk-am335x-evm-05.07.00.00/board-support/linux-3.2.0-psp04.06.00.10

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

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

    I then compiled the kernel (see ti wiki guide) and graphics sdk, Graphics sdk commands:

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

    The board still gave the error:

    /dev/fb0: could not find a suitable PVR2D pixel format

    But I found the error in this file, which is part of Qt on the target device :

    https://qt.gitorious.org/qt/qt-gberg/source/01fa23555b7af91806dc77b8abb194ae72ad6362:src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.c

    My lcd screen has 24 bits per pixel and this is not supported by default. So I altered my board-am335xevm.c file in the kernel source to get the lcd to work with 16 bit per pixel by altering the lcd_cfg struct and the disp_panel struct:

    static const struct display_panel disp_panel = {
        WVGA,
        16,//EDIT VOOR SGX DRIVERS
        16,
        COLOR_ACTIVE,
    };

    static struct lcd_ctrl_config lcd_cfg = {
        &disp_panel,
        .ac_bias        = 255,
        .ac_bias_intrpt        = 0,
        .dma_burst_sz        = 16,
        .bpp            = 16, //EDIT VOOR SGX DRIVERS

    I also altered the /etc/powervr.ini file on my target device to :

    [default]
    WindowSystem=libpvrQWSWSEGL.so.1

    This way Qt applications can use opengl.


    I recompiled the kernel and graphics sdk and now the opengl Qt applications work fine but the colours are wrong. Red and blue are mixed. I could fix this by changing the colours in the da8xx-fb.c lcd driver and then adding support for 24 bits per pixel in Qt ( extra if instruction in pvrqwsdrawable.c in qt-everywhere) and recompile Qt for my target device but this is not the main issue at the moment.