SGX graphics drivers on TI AM335X Starter Kit


Hi there,

I'm trying to port an Android 4.0.4 based system (B2G/Firefox OS) to the AM335x Starter Kit. For those who are unfamiliar with this system
it is quite strongly based on Android, including the unmodified Android kernel.

I am able to build the DevKit ICS 4.0.3 system from manifest/source although interestingly I was never able to get the graphics subsystem to
work - I didn't pay much attention to this at the time and it is possibly unrelated to the current issues.

I seem to be able to produce a good 3.2.x kernel using the same source and config as the DevKit ICS 4.0.3. I've introduced changes to the
vender/ti/am335x_sk repo to allow lunch integration in order to make use of the B2G/Firefox build infrastructure. init.rc gets modified to
import the bringup of the b2g main process and is otherwise materially unmodified (I removed some services that are android specific and
also change permissions on some of the B2G directory structure, at least I don't think anything I've done is material!).

As a separate build step I compile and install the sgx driver from this commit: 30ccc340030ef2f46cfd0a69fb0ac6106cbf4634 from the rowboat
repo.

If I bring up the system with the pvr service disabled (just so I can see the output - it does seem to exit cleanly according to dmesg
during normal boot) I see this:

root@android:/ # /system/bin/sgx/rc.pvr start
/dev/mem opened.
Memory mapped at address 0x40154000.
Value at address 0x44E01104 (0x40154104): 0x0
Written 0x0; readback 0x0
/dev/mem opened.
Memory mapped at address 0x40196000.
Value at address 0x44E00904 (0x40196904): 0x70000
Written 0x2; readback 0x2
Loaded PowerVR consumer services.
root@android:/ #

So it looks like the build of devmem2 and the kernel modules was sucessful but then again, I'd expect that as we are running and building
against an identical kernel to the DevKit ICS 4.0.3 . lsmod shows this:

root@android:/ # lsmod
omaplfb 11478 0 - Live 0xbf033000 (O)
pvrsrvkm 167341 5 omaplfb, Live 0xbf000000 (O)


I've attached the seemingly correct output of sgx_init_test. The advice in the SGX DBg pages says to run the gfx_check.sh script but for me that wouldn't make much sense as:

1) There is no /etc/powervr.ini as per the Dev Kit but I did try and set WindowSystem=libpvrPVR2D_FRONTWSEGL.so but it didn't seem to have
any effect...

2) cat /proc/pvr/version yields:

root@android:/ # cat /proc/pvr/version
Version blaze_android_sgx_ogles1_ogles2_GPL sgxddk 18 1.8@789263 (release) omap4430_android
System Version String: SGX revision = 1.2.5

3) fbset -i , well, there is no /dev/fb0 device! Is this correct?


When I strace framebuffer_test, the interesting bit is:

access("/vendor/lib/hw/gralloc.am335xevm.so", R_OK) = -1 ENOENT (No such file or directory)
access("/system/lib/hw/gralloc.am335xevm.so", R_OK) = -1 ENOENT (No such file or directory)
access("/vendor/lib/hw/gralloc.am335xevm_sk.so", R_OK) = -1 ENOENT (No such file or directory)
access("/system/lib/hw/gralloc.am335xevm_sk.so", R_OK) = -1 ENOENT (No such file or directory)
access("/vendor/lib/hw/gralloc.omap3.so", R_OK) = -1 ENOENT (No such file or directory)
access("/system/lib/hw/gralloc.omap3.so", R_OK) = 0
open("/etc/powervr.ini", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("powervr.ini", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/etc/powervr.ini", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("powervr.ini", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/etc/powervr.ini", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("powervr.ini", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
brk(0xf000) = 0xf000
open("/dev/graphics/fb0", O_RDWR|O_LARGEFILE) = 5
ioctl(5, 0x4600, 0xbec279a8) = 0
close(5) = 0
ioctl(4, 0xc01c6730, 0xbec278ac) = 0
open("/dev/log/main", O_WRONLY|O_LARGEFILE) = 5
open("/dev/log/radio", O_WRONLY|O_LARGEFILE) = 6
open("/dev/log/events", O_WRONLY|O_LARGEFILE) = 7
open("/dev/log/system", O_WRONLY|O_LARGEFILE) = 9
writev(5, [{"6", 1}, {"FramebufferNativeWindow", 24}, {"couldn't open framebuffer HAL (B"..., 44}], 3) = 69
--- SIGSEGV (Segmentation fault) @ 0 (18) ---
open("/dev/log/main", O_WRONLY|O_LARGEFILE) = 10
writev(10, [{"7", 1}, {"libc", 5}, {"Fatal signal 11 (SIGSEGV) at 0x0"..., 49}], 3) = 55
SYS_224(0x37, 0xbec27720, 0x3, 0x38) = 666
socket(PF_UNIX, SOCK_STREAM, 0) = 11
connect(11, {sa_family=AF_UNIX, path=@android:debuggerd}, 20) = 0
write(11, "2322", 4) = 4
read(11, 0xbec277dc, 1) = ? ERESTARTSYS (To be restarted)
--- SIGCONT (Continue) @ 0 (0) ---
read(11, "232", 1) = 1
close(11) = 0
sigaction(SIGSEGV, {SIG_DFL}, {0x400b1f4d, [], SA_RESTART|SA_SIGINFO}, 0) = 0
rt_sigreturn(0x400b1f4d) = 0
--- SIGSEGV (Segmentation fault) @ 0 (18) ---
+++ killed by SIGSEGV +++


I see that most of the userland binaries are pre-compiled, framebuffer_test has a dynamic section that shows me:

0x00000001 (NEEDED) Shared library: [libc.so]
0x00000001 (NEEDED) Shared library: [libdl.so]
0x00000001 (NEEDED) Shared library: [libcutils.so]
0x00000001 (NEEDED) Shared library: [libui.so]
0x00000001 (NEEDED) Shared library: [libhardware.so]
0x0000000f (RPATH) Library rpath: [/system/lib]


Am I seeing a binary incompatibility between libc (and others) on Android 4.0.3 vs. 4.0.4 ? If so then how can I get hold of suitable
userland driver shared objects and test binaries?

If there's a more suitable mailing list or support pathway then please let me know and I'll redirect my request accordingly.

Appreciate any help.

it s seem to be a question for meta insider forum bro ?

it s seem to be a question for meta insider forum bro ?


I'm sorry but I'm not sure what the difference is. This is a question about PowerVR ddk/sdk

Hi Jsr___,



We provide a reference graphic driver to our customers, which they then modify and bring up for their hardware. As we do not have visibility of platform specific changes that may have been made, it is best to discuss issues like this with our customer directly (TI in this case).



At this point in time, we do not have a public guide or development kit for our graphics driver. We only provide driver support to companies that have licensed our reference driver DDK. If would would like to discuss DDK licensing costs with our sales team, I can connect you to them.



Regards,

Joe