Letux Kernel

Issue 325: Add SGX drivers

Reported by Nikolaus Schaller, Feb 7, 2012

should go similar to

http://pandorawiki.org/Debian_On_SD#SGX_Drivers

Comment 1 by Nikolaus Schaller, Feb 27, 2012

I tried on a GTA04A3 with DM3730 (ES5) and Linux 2.6.32 according to 
the description linked above:

mkdir -p /rtmp	# on rootfs (SD card)
cd /rtmp
wget http://sources.buildroot.net/devmem2.c
gcc devmem2.c -o /usr/bin/devmem2
wget -c 
http://www.stuckiegamez.co.uk/apps/pandora/Debian/GFX_4_00_00_01_libs
.tar.gz
wget -c 
http://www.stuckiegamez.co.uk/apps/pandora/Debian/GFX_Linux_SDK.tar.g
z
tar -zxvf GFX_4_00_00_01_libs.tar.gz
chmod +x ./install-SGX.sh
./install-SGX.sh
rm /devmem2_0.0-0ubuntu1_armel.deb 
cd /usr/lib
ln -sf ES5.0/* .
cd /rtmp
tar -zxvf OGLES.tar.gz
tar -zxvf GFX_Linux_SDK.tar.gz
cd GFX_Linux_SDK
tar -zxvf OGLES.tar.gz
cd OGLES/SDKPackage/Binaries/CommonX11/Demos/EvilSkull
depmod -a omaplfb
rm -f /etc/powervr-esrev
/etc/init.d/pvr restart
./OGLESEvilSkull

It reports

gta04:# /etc/init.d/pvr restart
Stopping PVR
Starting PVR
FATAL: Module omaplfb not found.
FATAL: Module bufferclass_ti not found.
mknod: missing operand after `0'
Try `mknod --help' for more information.
chmod: cannot access `/dev/pvrsrvkm': No such file or directory

Which means we need two more modules:
omaplfb
bufferclass_ti

Comment 2 by Nikolaus Schaller, Feb 27, 2012

For some problems we should also refer to

http://processors.wiki.ti.com/index.php/Graphics_SDK_Quick_installati
on_and_user_guide

Comment 3 by Nikolaus Schaller, Sep 5, 2012

Finally here is a HOW-TO that compiles (but has not yet been 
tested!):

1. download 
"OMAP35x_Android_Graphics_SDK_setuplinux_3_01_00_03.bin" 
from http://gitorious.org/rowboat/ti_android_sgx_sdk/trees/master
2. use an i86 Linux PC to run and unpack
3. mkdir -p drivers/gpu/pvr
4. copy include4 and services4 from the SDK/GFX_Linux_KM to 
drivers/gpu/pvr
5. add "source drivers/gpu/pvr/Kconfig" to 
drivers/video/Kconfig (see code link below)
5. append "obj-y			+= pvr/" to drivers/gpu/Makefile
6. add drivers/gpu/pvr/Makefile and drivers/gpu/pvr/Kconfig
7. menuconfig Device Drivers / Graphics support / PowerVR SGX (as 
'*' because 'M' does not compile for untracked reasons)
8. compile

The full tree that compiles can be found at:

http://git.goldelico.com/?p=gta04-kernel.git;a=tree;f=drivers/gpu/pvr
Status: Started

Comment 4 by Nikolaus Schaller, Sep 5, 2012

The latest 3_01_00_10.bin can be downloaded from here:

http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dv
sdk/DVSDK_3_00/latest/index_FDS.html

Comment 5 by Nikolaus Schaller, Sep 6, 2012

This was again the wrong link. The 
http://gitorious.org/rowboat/ti_android_sgx_sdk/trees/master is an 
Android kernel compatible variant that compiles, loads but does not 
work.

The correct location for download (Graphics SDK link): 
http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dv
sdk/DVSDK_3_00/latest/index_FDS.html

Comment 6 by Nikolaus Schaller, Sep 6, 2012

Another "feature" we should add to the code (if possible) 
is to dynamically move the OMAP3430 vs. 3630 distinction to runtime.

Currently we have to compile either

services4/system/omap3430/sysconfig.o \
	services4/system/omap3430/sysutils.o

or

services4/system/omap3630/sysconfig.o \
	services4/system/omap3630/sysutils.o

and get two different kernels or module sets for OMAP3530 vs. 
DM3730. Well, the GTA04 uses almost everywhere the DM3730 but there 
are 2 or 3 boards with OMAP3530.

By making a diff on this code it should be possible to make a 
generic one by using the runtime-CPU detection function 

cpu_is_omap3630()

to define common sysconfig/sysutils.

Note: this will NOT eliminate the need to install different user 
space libs which take care of other differences in the SGX530 V2 vs. 
V3. But it makes life a little easier if there were only one kernel 
for all of them.

Created: 7 years 10 months ago by Nikolaus Schaller

Updated: 7 years 2 months ago

Status: Fixed

Labels:
Type:Defect
Priority:Critical