diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2011-05-30 09:17:56 +0200 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-05-30 09:26:22 +0200 |
commit | 1098ec32632ecf44560d92d7a7ee747d3a566cc6 (patch) | |
tree | a5f7b2196549f951d61c09df519395a110e91b7f /recipes-graphics | |
parent | 3fd522b60e7184b19be7af7101b22888845b2a67 (diff) | |
download | meta-ti-1098ec32632ecf44560d92d7a7ee747d3a566cc6.tar.gz |
libgles-omap3: add 4.03.00.02
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'recipes-graphics')
-rw-r--r-- | recipes-graphics/libgles/libgles-omap3.inc | 280 | ||||
-rw-r--r-- | recipes-graphics/libgles/libgles-omap3/99-bufferclass.rules | 7 | ||||
-rwxr-xr-x | recipes-graphics/libgles/libgles-omap3/cputype | 11 | ||||
-rwxr-xr-x | recipes-graphics/libgles/libgles-omap3/rc.pvr | 93 | ||||
-rw-r--r-- | recipes-graphics/libgles/libgles-omap3/sample.desktop | 8 | ||||
-rw-r--r-- | recipes-graphics/libgles/libgles-omap3_4.03.00.02.bb | 30 |
6 files changed, 429 insertions, 0 deletions
diff --git a/recipes-graphics/libgles/libgles-omap3.inc b/recipes-graphics/libgles/libgles-omap3.inc new file mode 100644 index 00000000..2868fabe --- /dev/null +++ b/recipes-graphics/libgles/libgles-omap3.inc | |||
@@ -0,0 +1,280 @@ | |||
1 | DESCRIPTION = "libGLES for the omap3" | ||
2 | LICENSE = "proprietary-binary" | ||
3 | # 'TSPA.txt' might not be the best file to md5sum | ||
4 | LIC_FILES_CHKSUM = "file://TSPA.txt;md5=c0d5d9c1e38b41677144c4e24d6ddee1" | ||
5 | |||
6 | PR = "r15" | ||
7 | |||
8 | COMPATIBLE_MACHINE = "(omap3|ti816x)" | ||
9 | |||
10 | DEPENDS = "virtual/libx11 libxau libxdmcp" | ||
11 | |||
12 | PROVIDES += "virtual/egl" | ||
13 | |||
14 | SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/${SGXPV}/exports/OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin \ | ||
15 | file://cputype \ | ||
16 | file://rc.pvr \ | ||
17 | file://sample.desktop \ | ||
18 | file://99-bufferclass.rules \ | ||
19 | " | ||
20 | |||
21 | S = "${WORKDIR}/OMAP35x_Graphics_SDK_${SGXPV}" | ||
22 | |||
23 | # Logic to unpack installjammer file | ||
24 | TI_BIN_UNPK_CMDS="Y: qY:workdir:Y" | ||
25 | require ../../recipes-ti/includes/ti-eula-unpack.inc | ||
26 | |||
27 | BINLOCATION ?= "${S}/gfx_rel" | ||
28 | ES2LOCATION ?= "${S}/gfx_rel_es2.x" | ||
29 | ES3LOCATION ?= "${S}/gfx_rel_es3.x" | ||
30 | ES5LOCATION ?= "${S}/gfx_rel_es5.x" | ||
31 | ES6LOCATION ?= "${S}/gfx_rel_es6.x" | ||
32 | |||
33 | do_configure() { | ||
34 | # Attempt to fix up the worst offenders for file permissions | ||
35 | for i in $(find ${S} -name "*.h") $(find ${S} -name "*.c") $(find ${S} -name "Make*") ; do | ||
36 | chmod 0644 $i | ||
37 | done | ||
38 | |||
39 | # Attempt to create proper library softlinks | ||
40 | for sofile in $(find ${S} -name "lib*Open*.so") $(find ${S} -name "lib*srv*.so") $(find ${S} -name "lib*gl*.so") $(find ${S} -name "libpvr*.so") $(find ${S} -name "lib*GL*.so"); do | ||
41 | if [ "$(readlink -n ${sofile})" = "" ] ; then | ||
42 | mv $sofile ${sofile}.${IMGPV} | ||
43 | ln -sf $(basename ${sofile}.${IMGPV}) ${sofile} | ||
44 | ln -sf $(basename ${sofile}.${IMGPV}) ${sofile}$(echo ${IMGPV} | awk -F. '{print "." $1}') | ||
45 | ln -sf $(basename ${sofile}.${IMGPV}) ${sofile}$(echo ${IMGPV} | awk -F. '{print "." $1 "." $2}') | ||
46 | fi | ||
47 | done | ||
48 | |||
49 | # Due to recursive make PLAT_* isn't always passed down correctly, so use sed to fix those | ||
50 | for mak in $(find ${S} -name "*.mak") ; do | ||
51 | sed -i -e s:arm-none-linux-gnueabi-:${TARGET_PREFIX}:g $mak | ||
52 | done | ||
53 | |||
54 | # clear out old stuff | ||
55 | find Binaries/ | xargs rm -f || true | ||
56 | } | ||
57 | |||
58 | # Force in GNU_HASH and paths to libs | ||
59 | TARGET_CC_ARCH += " ${TARGET_LINK_HASH_STYLE} -Wl,-rpath-link,${BINLOCATION} -L${BINLOCATION} \ | ||
60 | -L${STAGING_DIR_TARGET}${libdir} -Wl,-rpath-link,${STAGING_DIR_TARGET}${libdir}" | ||
61 | PARALLEL_MAKE = "" | ||
62 | |||
63 | do_compile() { | ||
64 | export X11ROOT="${STAGING_DIR_HOST}/usr" | ||
65 | export TOOLCHAIN="${TOOLCHAIN_PATH}" | ||
66 | export PLATFORM="LinuxOMAP3" | ||
67 | |||
68 | export PLAT_CC="${CC}" | ||
69 | export PLAT_CPP="${CXX}" | ||
70 | export PLAR_AR="${AR}" | ||
71 | |||
72 | mkdir -p ${S}/demos/raw | ||
73 | mkdir -p ${S}/demos/x11 | ||
74 | |||
75 | # Rebuild demos for both Raw and X11 | ||
76 | for X11BUILD in 0 1 ; do | ||
77 | for demo in ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Demos/* ; do | ||
78 | cd $demo/OGLES/Build/LinuxGeneric | ||
79 | oe_runmake Common=1 PLATFORM=$PLATFORM X11BUILD=$X11BUILD | ||
80 | rm $demo/OGLES/Build/LinuxOMAP3/Release*/*.o | ||
81 | install -m 0755 $demo/OGLES/Build/LinuxOMAP3/ReleaseX11/* ${S}/demos/x11 || true | ||
82 | sed -e s:NAME:$(basename $demo): \ | ||
83 | -e s:EXEC:${bindir}/SGX/demos/X11/$(basename $demo/OGLES/Build/LinuxOMAP3/ReleaseX11/*): \ | ||
84 | ${WORKDIR}/sample.desktop > ${WORKDIR}/$(basename $demo).desktop | ||
85 | install -m 0755 $demo/OGLES/Build/LinuxOMAP3/ReleaseRaw/* ${S}/demos/raw || true | ||
86 | done | ||
87 | for demo in ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Demos/* ; do | ||
88 | cd $demo/OGLES2/Build/LinuxGeneric | ||
89 | oe_runmake Common=1 PLATFORM=$PLATFORM X11BUILD=$X11BUILD | ||
90 | rm -f $demo/OGLES2/Build/LinuxOMAP3/Release*/*.o | ||
91 | install -m 0755 $demo/OGLES2/Build/LinuxOMAP3/ReleaseX11/* ${S}/demos/x11 || true | ||
92 | sed -e s:NAME:$(basename $demo): \ | ||
93 | -e s:EXEC:${bindir}/SGX/demos/X11/$(basename $demo/OGLES2/Build/LinuxOMAP3/ReleaseX11/*): \ | ||
94 | ${WORKDIR}/sample.desktop > ${WORKDIR}/$(basename $demo).desktop | ||
95 | install -m 0755 $demo/OGLES2/Build/LinuxOMAP3/ReleaseRaw/* ${S}/demos/raw || true | ||
96 | done | ||
97 | done | ||
98 | |||
99 | mkdir -p ${S}/trainingcourses/raw | ||
100 | mkdir -p ${S}/trainingcourses/x11 | ||
101 | |||
102 | find ${S} -name "*_org" -delete | ||
103 | |||
104 | # Build OGLES2 Trainingcourses for both Raw and X11 | ||
105 | for X11BUILD in 0 1 ; do | ||
106 | for training in ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/TrainingCourse/* ; do | ||
107 | if [ -e $training/OGLES2/Build/LinuxGeneric/Makefile ] ; then | ||
108 | cd $training/OGLES2/Build/LinuxGeneric | ||
109 | fi | ||
110 | |||
111 | if [ -e $training/OGLES2/Build/LinuxOMAP3/Makefile ] ; then | ||
112 | cd $training/OGLES2/Build/LinuxOMAP3 | ||
113 | fi | ||
114 | |||
115 | oe_runmake Common=1 PLATFORM=$PLATFORM X11BUILD=$X11BUILD | ||
116 | rm -f $training/OGLES2/Build/LinuxOMAP3/Release*/*.o | ||
117 | install -m 0755 $training/OGLES2/Build/LinuxOMAP3/ReleaseX11/* ${S}/trainingcourses/x11 || true | ||
118 | install -m 0755 $training/OGLES2/Build/LinuxOMAP3/ReleaseRaw/* ${S}/trainingcourses/raw || true | ||
119 | done | ||
120 | done | ||
121 | |||
122 | } | ||
123 | |||
124 | do_install () { | ||
125 | install -d ${D}${libdir} | ||
126 | cp -pPR ${BINLOCATION}/*.so* ${D}${libdir} | ||
127 | install -m 0644 ${BINLOCATION}/*.a ${D}${libdir} | ||
128 | |||
129 | install -d ${D}${bindir}/ | ||
130 | install -m 0755 ${WORKDIR}/cputype ${D}${bindir}/ | ||
131 | |||
132 | install -m 0755 ${BINLOCATION}/*_test ${D}${bindir}/ | ||
133 | install -m 0755 ${BINLOCATION}/gl* ${D}${bindir}/ | ||
134 | install -m 0755 ${BINLOCATION}/p[dv]* ${D}${bindir}/ | ||
135 | install -m 0755 ${BINLOCATION}/xgles1test1 ${D}${bindir}/ | ||
136 | |||
137 | install -m 0755 ${BINLOCATION}/freedesktop/kdrive/usr/X11R6_SGX/bin/Xsgx ${D}${bindir}/|| true | ||
138 | |||
139 | install -d ${D}${includedir} | ||
140 | cp -pPR ${S}/GFX_Linux_KM/include4 ${D}${includedir}/ | ||
141 | cp -pPR ${S}/GFX_Linux_KM/services4 ${D}${includedir}/ | ||
142 | |||
143 | cp -pPR ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include/* ${D}${includedir}/ | ||
144 | cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include/* ${D}${includedir}/ | ||
145 | cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/LinuxOMAP3/Include/GLES/* ${D}${includedir}/GLES/ || true | ||
146 | cp -pPr ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/LinuxOMAP3/Include/GLES/* ${D}${includedir}/GLES2/ || true | ||
147 | cp -pPr ${S}/GFX_Linux_SDK/OVG/SDKPackage/Builds/OVG/Include/v* ${D}${includedir}/ || true | ||
148 | cp -pPr ${S}/GFX_Linux_SDK/OVG/SDKPackage/Builds/OVG/Include/V* ${D}${includedir}/ || true | ||
149 | cp -pPr ${S}/include/*.h ${D}${includedir} || true | ||
150 | cp -pPr ${S}/include/wsegl/*.h ${D}${includedir} || true | ||
151 | |||
152 | install -d ${D}${sysconfdir}/init.d/ | ||
153 | cp -pP ${WORKDIR}/rc.pvr ${D}${sysconfdir}/init.d/pvr-init | ||
154 | |||
155 | install -d ${D}${sysconfdir} | ||
156 | echo "[default]" > ${D}${sysconfdir}/powervr.ini | ||
157 | echo "WindowSystem=libpvrPVR2D_FRONTWSEGL.so.1" >> ${D}${sysconfdir}/powervr.ini | ||
158 | |||
159 | # The ES2.x, ES3.x, ES5.x and ES6.x CPUs have different SGX hardware, so we need to install multiple sets of userspace | ||
160 | |||
161 | install -d ${D}${libdir}/ES6.0 | ||
162 | install -d ${D}${libdir}/ES5.0 | ||
163 | install -d ${D}${libdir}/ES3.0 | ||
164 | install -d ${D}${libdir}/ES2.0 | ||
165 | |||
166 | install -d ${D}${bindir}/ES6.0 | ||
167 | install -d ${D}${bindir}/ES5.0 | ||
168 | install -d ${D}${bindir}/ES3.0 | ||
169 | install -d ${D}${bindir}/ES2.0 | ||
170 | |||
171 | |||
172 | cp -pPR ${ES2LOCATION}/lib*${IMGPV} ${D}${libdir}/ES2.0/ | ||
173 | cp ${ES2LOCATION}/p[dv]* ${D}${bindir}/ES2.0/ | ||
174 | |||
175 | cp -pPR ${D}${libdir}/lib*${IMGPV} ${D}${libdir}/ES3.0/ | ||
176 | cp ${D}${bindir}/p[dv]* ${D}${bindir}/ES3.0 | ||
177 | |||
178 | if [ -e ${ES5LOCATION} ] ; then | ||
179 | cp -pPR ${ES5LOCATION}/lib*${IMGPV} ${D}${libdir}/ES5.0/ | ||
180 | cp ${ES5LOCATION}/p[dv]* ${D}${bindir}/ES5.0/ | ||
181 | fi | ||
182 | |||
183 | if [ -e ${ES6LOCATION} ] ; then | ||
184 | cp -pPR ${ES6LOCATION}/lib*${IMGPV} ${D}${libdir}/ES6.0/ | ||
185 | cp ${ES6LOCATION}/p[dv]* ${D}${bindir}/ES6.0/ | ||
186 | fi | ||
187 | |||
188 | rm ${D}${bindir}/ES*/*.h ${D}${bindir}/ES*/pdsasm ${D}${bindir}/pdsasm -f || true | ||
189 | |||
190 | install -d ${D}${prefix}/share/applications | ||
191 | cp ${WORKDIR}/*.desktop ${D}${prefix}/share/applications | ||
192 | rm ${D}${prefix}/share/applications/sample.desktop | ||
193 | |||
194 | install -d ${D}${bindir}/SGX/demos/X11/ | ||
195 | install -d ${D}${bindir}/SGX/demos/Raw/ | ||
196 | install -m 0755 ${S}/demos/x11/* ${D}${bindir}/SGX/demos/X11/ | ||
197 | install -m 0755 ${S}/demos/raw/* ${D}${bindir}/SGX/demos/Raw/ | ||
198 | |||
199 | install -d ${D}${bindir}/SGX/trainingcourses/Raw | ||
200 | install -d ${D}${bindir}/SGX/trainingcourses/X11 | ||
201 | install -m 0755 ${S}/trainingcourses/x11/* ${D}${bindir}/SGX/trainingcourses/X11/ | ||
202 | install -m 0755 ${S}/trainingcourses/raw/* ${D}${bindir}/SGX/trainingcourses/Raw/ | ||
203 | |||
204 | # Delete objects and linker scripts hidden between the headers | ||
205 | find ${D} -name "*.o" -delete | ||
206 | find ${D} -name "*.o.cmd" -delete | ||
207 | |||
208 | install -d ${D}${sysconfdir}/udev/rules.d | ||
209 | install -m 0644 ${WORKDIR}/99-bufferclass.rules ${D}${sysconfdir}/udev/rules.d/ | ||
210 | |||
211 | } | ||
212 | |||
213 | PACKAGES =+ "${PN}-rawdemos \ | ||
214 | ${PN}-x11demos \ | ||
215 | ${PN}-rawtrainingcourses \ | ||
216 | ${PN}-x11trainingcourses \ | ||
217 | " | ||
218 | |||
219 | PACKAGES += "xserver-kdrive-powervrsgx \ | ||
220 | ${PN}-tests " | ||
221 | |||
222 | PACKAGES =+ "${PN}-blitwsegl ${PN}-flipwsegl ${PN}-frontwsegl ${PN}-linuxfbwsegl ${PN}-x11wsegl" | ||
223 | |||
224 | FILES_${PN}-blitwsegl = "${libdir}/libpvrPVR2D_BLITWSEGL.so.* ${libdir}/*/libpvrPVR2D_BLITWSEGL.so.*" | ||
225 | FILES_${PN}-flipwsegl = "${libdir}/libpvrPVR2D_FLIPWSEGL.so.* ${libdir}/*/libpvrPVR2D_FLIPWSEGL.so.*" | ||
226 | FILES_${PN}-frontwsegl = "${libdir}/libpvrPVR2D_FRONTWSEGL.so.* ${libdir}/*/libpvrPVR2D_FRONTWSEGL.so.*" | ||
227 | FILES_${PN}-linuxfbwsegl = "${libdir}/libpvrPVR2D_LINUXFBWSEGL.so.* ${libdir}/*/libpvrPVR2D_LINUXFBWSEGL.so.*" | ||
228 | FILES_${PN}-x11wsegl = "${libdir}/libpvrPVR2D_X11WSEGL.so* ${libdir}/*/libpvrPVR2D_X11WSEGL.so*" | ||
229 | |||
230 | CONFFILES_${PN} = "${sysconfdir}/powervr.ini" | ||
231 | |||
232 | FILES_${PN} = "${sysconfdir} ${libdir}/lib*.so.* ${libdir}/ES*/* ${bindir}/pvrsrvinit ${bindir}/cputype ${bindir}/*/*" | ||
233 | FILES_xserver-kdrive-powervrsgx = "${bindir}/Xsgx" | ||
234 | FILES_${PN}-tests = "${bindir}/*" | ||
235 | FILES_${PN}-dbg = "${libdir}/.debug/* ${bindir}/.debug/* \ | ||
236 | ${libdir}/ES*/.debug ${bindir}/*/.debug\ | ||
237 | ${bindir}/SGX/demos/*/.debug/* \ | ||
238 | ${bindir}/SGX/trainingcourses/*/.debug/* \ | ||
239 | " | ||
240 | |||
241 | FILES_${PN}-rawdemos = "${bindir}/SGX/demos/Raw/*" | ||
242 | FILES_${PN}-x11demos = "${bindir}/SGX/demos/X11/* ${prefix}/share/applications " | ||
243 | RRECOMMENDS_${PN}-x11demos = "${PN}-x11wsegl" | ||
244 | |||
245 | FILES_${PN}-rawtrainingcourses = "${bindir}/SGX/trainingcourses/Raw/*" | ||
246 | FILES_${PN}-x11trainingcourses = "${bindir}/SGX/trainingcourses/X11/*" | ||
247 | RRECOMMENDS_${PN}-x11trainingcourses = "${PN}-x11wsegl" | ||
248 | |||
249 | # The libs need the kernel-modules | ||
250 | RRECOMMENDS_${PN} = "omap3-sgx-modules" | ||
251 | |||
252 | # The initscript calls fbset, cputype calls devmem2 | ||
253 | RDEPENDS_${PN} += "fbset devmem2" | ||
254 | |||
255 | #HACK! These are binaries, so we can't guarantee that LDFLAGS match :( | ||
256 | INSANE_SKIP_${PN} = True | ||
257 | INSANE_SKIP_${PN}-blitwsegl = True | ||
258 | INSANE_SKIP_${PN}-flipwsegl = True | ||
259 | INSANE_SKIP_${PN}-frontwsegl = True | ||
260 | INSANE_SKIP_${PN}-linuxfbwsegl = True | ||
261 | INSANE_SKIP_${PN}-x11wsegl = True | ||
262 | INSANE_SKIP_${PN}-tests = True | ||
263 | INSANE_SKIP_xserver-kdrive-powervrsgx = True | ||
264 | |||
265 | # Quality control is really poor on these SDKs, so hack around the latest madness: | ||
266 | FILES_${PN} += "${libdir}/*.so " | ||
267 | FILES_${PN}-dev = "${includedir}" | ||
268 | |||
269 | inherit update-rc.d | ||
270 | |||
271 | INITSCRIPT_NAME = "pvr-init" | ||
272 | INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ." | ||
273 | |||
274 | # Append to update-rc.d postinst | ||
275 | pkg_postinst_${PN}_append() { | ||
276 | rm -f /etc/powervr-esrev | ||
277 | |||
278 | ln -sf /usr/lib/libXdmcp.so.6.0.0 /usr/lib/libXdmcp.so.0 | ||
279 | ln -sf /usr/lib/libXau.so.6.0.0 /usr/lib/libXau.so.0 | ||
280 | } | ||
diff --git a/recipes-graphics/libgles/libgles-omap3/99-bufferclass.rules b/recipes-graphics/libgles/libgles-omap3/99-bufferclass.rules new file mode 100644 index 00000000..780423b9 --- /dev/null +++ b/recipes-graphics/libgles/libgles-omap3/99-bufferclass.rules | |||
@@ -0,0 +1,7 @@ | |||
1 | # Give everyone access to bufferclass nodes and make a compatibility symlink for the first one | ||
2 | SUBSYSTEM=="bccat", MODE="0666" | ||
3 | KERNEL=="bccat0", SYMLINK+="bc_cat", MODE="0666" | ||
4 | |||
5 | # Give everyone access to v4l nodes | ||
6 | SUBSYSTEM=="video4linux", MODE="0666" | ||
7 | |||
diff --git a/recipes-graphics/libgles/libgles-omap3/cputype b/recipes-graphics/libgles/libgles-omap3/cputype new file mode 100755 index 00000000..27f411d0 --- /dev/null +++ b/recipes-graphics/libgles/libgles-omap3/cputype | |||
@@ -0,0 +1,11 @@ | |||
1 | #!/bin/sh | ||
2 | . /etc/init.d/functions | ||
3 | |||
4 | if [ "$(machine_id)" = "ti8168evm" ] ; then | ||
5 | echo TI816x | ||
6 | else | ||
7 | devmem2 0x4800244c | \ | ||
8 | grep 'Read at address' | \ | ||
9 | sed -e 's/.*): //' | \ | ||
10 | sed -e 's/0x00005C00/OMAP3503/' -e 's/0x00001C00/OMAP3515/' -e 's/0x00004C00/OMAP3525/' -e 's/0x00000C00/OMAP3530/' | ||
11 | fi | ||
diff --git a/recipes-graphics/libgles/libgles-omap3/rc.pvr b/recipes-graphics/libgles/libgles-omap3/rc.pvr new file mode 100755 index 00000000..d32f9e4c --- /dev/null +++ b/recipes-graphics/libgles/libgles-omap3/rc.pvr | |||
@@ -0,0 +1,93 @@ | |||
1 | #!/bin/sh | ||
2 | PATH=$PATH:/usr/sbin | ||
3 | |||
4 | BITSPERPIXEL="$(fbset | grep geom | awk '{print $6}')" | ||
5 | YRES="$(fbset | grep geom | awk '{print $3}')" | ||
6 | |||
7 | CPUTYPE="$(cputype)" | ||
8 | |||
9 | if [ "$1" = "" ]; then | ||
10 | echo PVR-INIT: Please use start, stop, or restart. | ||
11 | exit 1 | ||
12 | fi | ||
13 | |||
14 | if [ "$1" = "stop" -o "$1" = "restart" ]; then | ||
15 | echo Stopping PVR | ||
16 | rmmod bufferclass_ti | ||
17 | rmmod omaplfb 2>/dev/null | ||
18 | rmmod pvrsrvkm 2>/dev/null | ||
19 | fi | ||
20 | |||
21 | if [ "$1" = "stop" ]; then | ||
22 | exit 0 | ||
23 | fi | ||
24 | |||
25 | # Set RGBA ordering to something the drivers like | ||
26 | if [ "$BITSPERPIXEL" = "32" ] ; then | ||
27 | fbset -rgba 8/16,8/8,8/0,8/24 | ||
28 | fi | ||
29 | |||
30 | # Try to enable triple buffering when there's enough VRAM | ||
31 | fbset -vyres $(expr $YRES \* 3) | ||
32 | |||
33 | sgxprepare () { | ||
34 | echo Starting PVR | ||
35 | insmod $(busybox find /lib/modules/$(uname -r) -name "pvrsrvkm.ko") | ||
36 | modprobe omaplfb | ||
37 | modprobe bufferclass_ti | ||
38 | |||
39 | pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3` | ||
40 | bc_maj=`grep "bc" /proc/devices | cut -b1,2,3` | ||
41 | |||
42 | if [ -e /dev/pvrsrvkm ] ; then | ||
43 | rm -f /dev/pvrsrvkm | ||
44 | fi | ||
45 | |||
46 | mknod /dev/pvrsrvkm c $pvr_maj 0 | ||
47 | chmod 666 /dev/pvrsrvkm | ||
48 | |||
49 | touch /etc/powervr-esrev | ||
50 | |||
51 | SAVED_ESREVISION="$(cat /etc/powervr-esrev)" | ||
52 | } | ||
53 | |||
54 | sgxfinish () { | ||
55 | if [ "${ES_REVISION}" != "${SAVED_ESREVISION}" ] ; then | ||
56 | echo -n "Starting SGX fixup for" | ||
57 | echo " ES${ES_REVISION}.x" | ||
58 | cp -a /usr/lib/ES${ES_REVISION}.0/* /usr/lib | ||
59 | cp -a /usr/bin/ES${ES_REVISION}.0/* /usr/bin | ||
60 | echo "${ES_REVISION}" > /etc/powervr-esrev | ||
61 | fi | ||
62 | /usr/bin/pvrsrvinit | ||
63 | } | ||
64 | |||
65 | case $CPUTYPE in | ||
66 | "OMAP3530") | ||
67 | sgxprepare | ||
68 | |||
69 | devmem2 0x48004B48 w 0x2 > /dev/null | ||
70 | devmem2 0x48004B10 w 0x1 > /dev/null | ||
71 | devmem2 0x48004B00 w 0x2 > /dev/null | ||
72 | |||
73 | ES_REVISION="$(devmem2 0x50000014 | sed -e s:0x00010205:5: -e s:0x00010201:3: -e s:0x00010003:2: | tail -n1 | awk -F': ' '{print $2}')" | ||
74 | |||
75 | sgxfinish | ||
76 | ;; | ||
77 | "TI816x") | ||
78 | sgxprepare | ||
79 | |||
80 | devmem2 0x48180F04 w 0x0 > /dev/null | ||
81 | devmem2 0x48180900 w 0x2 > /dev/null | ||
82 | devmem2 0x48180920 w 0x2 > /dev/null | ||
83 | |||
84 | ES_REVISION="$(devmem2 0x56000014 | sed -e s:0x00010205:6: -e s:0x00010201:3: -e s:0x00010003:2: | tail -n1 | awk -F': ' '{print $2}')" | ||
85 | |||
86 | sgxfinish | ||
87 | ;; | ||
88 | *) | ||
89 | echo No SGX hardware, not starting PVR | ||
90 | ;; | ||
91 | esac | ||
92 | |||
93 | |||
diff --git a/recipes-graphics/libgles/libgles-omap3/sample.desktop b/recipes-graphics/libgles/libgles-omap3/sample.desktop new file mode 100644 index 00000000..6bacac92 --- /dev/null +++ b/recipes-graphics/libgles/libgles-omap3/sample.desktop | |||
@@ -0,0 +1,8 @@ | |||
1 | [Desktop Entry] | ||
2 | Name=NAME Demo | ||
3 | Comment=OGLES Demo | ||
4 | Exec=EXEC | ||
5 | Icon=star | ||
6 | Type=Application | ||
7 | Categories=Graphics; | ||
8 | |||
diff --git a/recipes-graphics/libgles/libgles-omap3_4.03.00.02.bb b/recipes-graphics/libgles/libgles-omap3_4.03.00.02.bb new file mode 100644 index 00000000..f605ec0f --- /dev/null +++ b/recipes-graphics/libgles/libgles-omap3_4.03.00.02.bb | |||
@@ -0,0 +1,30 @@ | |||
1 | BINLOCATION_omap3 = "${S}/gfx_rel_es3.x" | ||
2 | BINLOCATION_ti816x = "${S}/gfx_rel_es6.x" | ||
3 | |||
4 | ES2LOCATION = "${S}/gfx_rel_es2.x" | ||
5 | ES3LOCATION = "${S}/gfx_rel_es3.x" | ||
6 | ES5LOCATION = "${S}/gfx_rel_es5.x" | ||
7 | ES6LOCATION = "${S}/gfx_rel_es6.x" | ||
8 | |||
9 | require libgles-omap3.inc | ||
10 | |||
11 | # download required binary distribution from: | ||
12 | # http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest/index_FDS.html | ||
13 | # see libgles-omap3.inc for detailed installation instructions | ||
14 | |||
15 | SGXPV = "4_03_00_02" | ||
16 | IMGPV = "1.6.16.3977" | ||
17 | BINFILE := "Graphics_SDK_setuplinux_${SGXPV}.bin" | ||
18 | |||
19 | SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/${SGXPV}/exports/Graphics_SDK_setuplinux_${SGXPV}.bin \ | ||
20 | file://cputype \ | ||
21 | file://rc.pvr \ | ||
22 | file://sample.desktop \ | ||
23 | file://99-bufferclass.rules \ | ||
24 | " | ||
25 | |||
26 | SRC_URI[md5sum] = "ff8c1f2b8e4cb42f4ced6a613b081ada" | ||
27 | SRC_URI[sha256sum] = "cdb0bd3964e107733d632aa8224e0537b05c1ffac34befc036423458c8d75255" | ||
28 | |||
29 | S = "${WORKDIR}/Graphics_SDK_${SGXPV}" | ||
30 | |||