diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2012-01-04 15:55:29 +0100 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2012-01-26 10:01:47 +0100 |
commit | 5a0cf7c32c54199314f65d404c856501ec0f37a2 (patch) | |
tree | d1368d038a87bdbf70f06525b25dc2f36a9a8f3f /recipes-graphics/libgles | |
parent | 98ea84b1f847b49ad0df6d125ea90247cfb3500c (diff) | |
download | meta-ti-5a0cf7c32c54199314f65d404c856501ec0f37a2.tar.gz |
libgles-omap3: merge in updates from arago
* ES3.x do_install fix
* AM335x support
And one non-arago fix: break dependency on 'initscripts' package
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'recipes-graphics/libgles')
-rw-r--r-- | recipes-graphics/libgles/libgles-omap3.inc | 26 | ||||
-rwxr-xr-x | recipes-graphics/libgles/libgles-omap3/cputype | 10 | ||||
-rwxr-xr-x | recipes-graphics/libgles/libgles-omap3/rc.pvr | 29 |
3 files changed, 49 insertions, 16 deletions
diff --git a/recipes-graphics/libgles/libgles-omap3.inc b/recipes-graphics/libgles/libgles-omap3.inc index dc0185a1..0a05a0be 100644 --- a/recipes-graphics/libgles/libgles-omap3.inc +++ b/recipes-graphics/libgles/libgles-omap3.inc | |||
@@ -3,9 +3,9 @@ LICENSE = "proprietary-binary" | |||
3 | # 'TSPA.txt' might not be the best file to md5sum | 3 | # 'TSPA.txt' might not be the best file to md5sum |
4 | LIC_FILES_CHKSUM = "file://TSPA.txt;md5=c0d5d9c1e38b41677144c4e24d6ddee1" | 4 | LIC_FILES_CHKSUM = "file://TSPA.txt;md5=c0d5d9c1e38b41677144c4e24d6ddee1" |
5 | 5 | ||
6 | PR = "r18" | 6 | PR = "r19" |
7 | 7 | ||
8 | COMPATIBLE_MACHINE = "(omap3|ti816x)" | 8 | COMPATIBLE_MACHINE = "(omap3|ti816x|ti33x)" |
9 | 9 | ||
10 | DEPENDS = "virtual/libx11 libxau libxdmcp" | 10 | DEPENDS = "virtual/libx11 libxau libxdmcp" |
11 | 11 | ||
@@ -29,6 +29,7 @@ ES2LOCATION ?= "${S}/gfx_rel_es2.x" | |||
29 | ES3LOCATION ?= "${S}/gfx_rel_es3.x" | 29 | ES3LOCATION ?= "${S}/gfx_rel_es3.x" |
30 | ES5LOCATION ?= "${S}/gfx_rel_es5.x" | 30 | ES5LOCATION ?= "${S}/gfx_rel_es5.x" |
31 | ES6LOCATION ?= "${S}/gfx_rel_es6.x" | 31 | ES6LOCATION ?= "${S}/gfx_rel_es6.x" |
32 | ES8LOCATION ?= "${S}/gfx_rel_es8.x" | ||
32 | 33 | ||
33 | do_configure() { | 34 | do_configure() { |
34 | # Attempt to fix up the worst offenders for file permissions | 35 | # Attempt to fix up the worst offenders for file permissions |
@@ -158,22 +159,28 @@ do_install () { | |||
158 | 159 | ||
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 | # 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 | ||
162 | install -d ${D}${libdir}/ES8.0 | ||
161 | install -d ${D}${libdir}/ES6.0 | 163 | install -d ${D}${libdir}/ES6.0 |
162 | install -d ${D}${libdir}/ES5.0 | 164 | install -d ${D}${libdir}/ES5.0 |
163 | install -d ${D}${libdir}/ES3.0 | 165 | install -d ${D}${libdir}/ES3.0 |
164 | install -d ${D}${libdir}/ES2.0 | 166 | install -d ${D}${libdir}/ES2.0 |
165 | 167 | ||
168 | install -d ${D}${bindir}/ES8.0 | ||
166 | install -d ${D}${bindir}/ES6.0 | 169 | install -d ${D}${bindir}/ES6.0 |
167 | install -d ${D}${bindir}/ES5.0 | 170 | install -d ${D}${bindir}/ES5.0 |
168 | install -d ${D}${bindir}/ES3.0 | 171 | install -d ${D}${bindir}/ES3.0 |
169 | install -d ${D}${bindir}/ES2.0 | 172 | install -d ${D}${bindir}/ES2.0 |
170 | 173 | ||
171 | 174 | ||
172 | cp -pPR ${ES2LOCATION}/lib*${IMGPV} ${D}${libdir}/ES2.0/ | 175 | if [ -e ${ES2LOCATION} ] ; then |
173 | cp ${ES2LOCATION}/p[dv]* ${D}${bindir}/ES2.0/ | 176 | cp -pPR ${ES2LOCATION}/lib*${IMGPV} ${D}${libdir}/ES2.0/ |
177 | cp ${ES2LOCATION}/p[dv]* ${D}${bindir}/ES2.0/ | ||
178 | fi | ||
174 | 179 | ||
175 | cp -pPR ${D}${libdir}/lib*${IMGPV} ${D}${libdir}/ES3.0/ | 180 | if [ -e ${ES3LOCATION} ] ; then |
176 | cp ${D}${bindir}/p[dv]* ${D}${bindir}/ES3.0 | 181 | cp -pPR ${ES3LOCATION}/lib*${IMGPV} ${D}${libdir}/ES3.0/ |
182 | cp ${ES3LOCATION}/p[dv]* ${D}${bindir}/ES3.0 | ||
183 | fi | ||
177 | 184 | ||
178 | if [ -e ${ES5LOCATION} ] ; then | 185 | if [ -e ${ES5LOCATION} ] ; then |
179 | cp -pPR ${ES5LOCATION}/lib*${IMGPV} ${D}${libdir}/ES5.0/ | 186 | cp -pPR ${ES5LOCATION}/lib*${IMGPV} ${D}${libdir}/ES5.0/ |
@@ -185,6 +192,11 @@ do_install () { | |||
185 | cp ${ES6LOCATION}/p[dv]* ${D}${bindir}/ES6.0/ | 192 | cp ${ES6LOCATION}/p[dv]* ${D}${bindir}/ES6.0/ |
186 | fi | 193 | fi |
187 | 194 | ||
195 | if [ -e ${ES8LOCATION} ] ; then | ||
196 | cp -pPR ${ES8LOCATION}/lib*${IMGPV} ${D}${libdir}/ES8.0/ | ||
197 | cp ${ES8LOCATION}/p[dv]* ${D}${bindir}/ES8.0/ | ||
198 | fi | ||
199 | |||
188 | rm ${D}${bindir}/ES*/*.h ${D}${bindir}/ES*/pdsasm ${D}${bindir}/pdsasm -f || true | 200 | rm ${D}${bindir}/ES*/*.h ${D}${bindir}/ES*/pdsasm ${D}${bindir}/pdsasm -f || true |
189 | 201 | ||
190 | install -d ${D}${prefix}/share/applications | 202 | install -d ${D}${prefix}/share/applications |
@@ -272,8 +284,6 @@ FILES_${PN}-x11wsegl-es8 = "${libdir}/ES8*/libpvrPVR2D_X11WSEGL.so.*" | |||
272 | RRECOMMENDS_${PN}-x11wsegl = " ${PN}-x11wsegl-es2 ${PN}-x11wsegl-es3 ${PN}-x11wsegl-es5 ${PN}-x11wsegl-es6 ${PN}-x11wsegl-es8" | 284 | RRECOMMENDS_${PN}-x11wsegl = " ${PN}-x11wsegl-es2 ${PN}-x11wsegl-es3 ${PN}-x11wsegl-es5 ${PN}-x11wsegl-es6 ${PN}-x11wsegl-es8" |
273 | 285 | ||
274 | CONFFILES_${PN} = "${sysconfdir}/powervr.ini" | 286 | CONFFILES_${PN} = "${sysconfdir}/powervr.ini" |
275 | # 'cputype' uses /etc/init.d/functions | ||
276 | RRECOMMENDS_${PN} += "initscripts" | ||
277 | 287 | ||
278 | FILES_${PN} = "${sysconfdir} ${libdir}/lib*.so.* ${libdir}/ES*/* ${bindir}/pvrsrvinit ${bindir}/cputype ${bindir}/*/*" | 288 | FILES_${PN} = "${sysconfdir} ${libdir}/lib*.so.* ${libdir}/ES*/* ${bindir}/pvrsrvinit ${bindir}/cputype ${bindir}/*/*" |
279 | 289 | ||
diff --git a/recipes-graphics/libgles/libgles-omap3/cputype b/recipes-graphics/libgles/libgles-omap3/cputype index 27f411d0..4448c300 100755 --- a/recipes-graphics/libgles/libgles-omap3/cputype +++ b/recipes-graphics/libgles/libgles-omap3/cputype | |||
@@ -1,11 +1,17 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | . /etc/init.d/functions | 2 | |
3 | machine_id() { # return the machine ID | ||
4 | awk 'BEGIN { FS=": " } /Hardware/ \ | ||
5 | { gsub(" ", "_", $2); print tolower($2) } ' </proc/cpuinfo | ||
6 | } | ||
3 | 7 | ||
4 | if [ "$(machine_id)" = "ti8168evm" ] ; then | 8 | if [ "$(machine_id)" = "ti8168evm" ] ; then |
5 | echo TI816x | 9 | echo TI816x |
10 | elif [ "$(machine_id)" = "am335xevm" ] ; then | ||
11 | echo TI33XX | ||
6 | else | 12 | else |
7 | devmem2 0x4800244c | \ | 13 | devmem2 0x4800244c | \ |
8 | grep 'Read at address' | \ | 14 | grep 'Read at address' | \ |
9 | sed -e 's/.*): //' | \ | 15 | sed -e 's/.*): //' | \ |
10 | sed -e 's/0x00005C00/OMAP3503/' -e 's/0x00001C00/OMAP3515/' -e 's/0x00004C00/OMAP3525/' -e 's/0x00000C00/OMAP3530/' | 16 | sed -e 's/0x00005C00/OMAP3503/' -e 's/0x00001C00/OMAP3515/' -e 's/0x00004C00/OMAP3525/' -e 's/0x00000C00/OMAP3530/' -e 's/0x00005E00/OMAP3503/' -e 's/0x00001E00/OMAP3515/' -e 's/0x00004E00/OMAP3525/' -e 's/0x00000E00/OMAP3530/' -e 's/0x00000CC0/OMAP3530/' |
11 | fi | 17 | fi |
diff --git a/recipes-graphics/libgles/libgles-omap3/rc.pvr b/recipes-graphics/libgles/libgles-omap3/rc.pvr index d32f9e4c..07efa663 100755 --- a/recipes-graphics/libgles/libgles-omap3/rc.pvr +++ b/recipes-graphics/libgles/libgles-omap3/rc.pvr | |||
@@ -1,6 +1,15 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | PATH=$PATH:/usr/sbin | 2 | PATH=$PATH:/usr/sbin |
3 | 3 | ||
4 | # Check if an fb device is available. If not then just go ahead and | ||
5 | # exit because we have no display. | ||
6 | fbset > /dev/null 2>&1 | ||
7 | if [ "$?" == "1" ] | ||
8 | then | ||
9 | # looks like there is no display, so let's exit | ||
10 | exit 0 | ||
11 | fi | ||
12 | |||
4 | BITSPERPIXEL="$(fbset | grep geom | awk '{print $6}')" | 13 | BITSPERPIXEL="$(fbset | grep geom | awk '{print $6}')" |
5 | YRES="$(fbset | grep geom | awk '{print $3}')" | 14 | YRES="$(fbset | grep geom | awk '{print $3}')" |
6 | 15 | ||
@@ -28,7 +37,7 @@ if [ "$BITSPERPIXEL" = "32" ] ; then | |||
28 | fi | 37 | fi |
29 | 38 | ||
30 | # Try to enable triple buffering when there's enough VRAM | 39 | # Try to enable triple buffering when there's enough VRAM |
31 | fbset -vyres $(expr $YRES \* 3) | 40 | fbset -vyres $(expr $YRES \* 3) |
32 | 41 | ||
33 | sgxprepare () { | 42 | sgxprepare () { |
34 | echo Starting PVR | 43 | echo Starting PVR |
@@ -39,11 +48,11 @@ sgxprepare () { | |||
39 | pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3` | 48 | pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3` |
40 | bc_maj=`grep "bc" /proc/devices | cut -b1,2,3` | 49 | bc_maj=`grep "bc" /proc/devices | cut -b1,2,3` |
41 | 50 | ||
42 | if [ -e /dev/pvrsrvkm ] ; then | 51 | if [ -e /dev/pvrsrvkm ] ; then |
43 | rm -f /dev/pvrsrvkm | 52 | rm -f /dev/pvrsrvkm |
44 | fi | 53 | fi |
45 | 54 | ||
46 | mknod /dev/pvrsrvkm c $pvr_maj 0 | 55 | mknod /dev/pvrsrvkm c $pvr_maj 0 |
47 | chmod 666 /dev/pvrsrvkm | 56 | chmod 666 /dev/pvrsrvkm |
48 | 57 | ||
49 | touch /etc/powervr-esrev | 58 | touch /etc/powervr-esrev |
@@ -56,7 +65,7 @@ sgxfinish () { | |||
56 | echo -n "Starting SGX fixup for" | 65 | echo -n "Starting SGX fixup for" |
57 | echo " ES${ES_REVISION}.x" | 66 | echo " ES${ES_REVISION}.x" |
58 | cp -a /usr/lib/ES${ES_REVISION}.0/* /usr/lib | 67 | cp -a /usr/lib/ES${ES_REVISION}.0/* /usr/lib |
59 | cp -a /usr/bin/ES${ES_REVISION}.0/* /usr/bin | 68 | cp -a /usr/bin/ES${ES_REVISION}.0/* /usr/bin |
60 | echo "${ES_REVISION}" > /etc/powervr-esrev | 69 | echo "${ES_REVISION}" > /etc/powervr-esrev |
61 | fi | 70 | fi |
62 | /usr/bin/pvrsrvinit | 71 | /usr/bin/pvrsrvinit |
@@ -74,6 +83,16 @@ case $CPUTYPE in | |||
74 | 83 | ||
75 | sgxfinish | 84 | sgxfinish |
76 | ;; | 85 | ;; |
86 | "TI33XX") | ||
87 | sgxprepare | ||
88 | |||
89 | devmem2 0x44e01104 w 0x0 > /dev/null | ||
90 | devmem2 0x44e00904 w 0x2 > /dev/null | ||
91 | |||
92 | ES_REVISION="$(devmem2 0x56000014 | sed -e s:0x00010205:8: | tail -n1 | awk -F': ' '{print $2}')" | ||
93 | |||
94 | sgxfinish | ||
95 | ;; | ||
77 | "TI816x") | 96 | "TI816x") |
78 | sgxprepare | 97 | sgxprepare |
79 | 98 | ||
@@ -89,5 +108,3 @@ case $CPUTYPE in | |||
89 | echo No SGX hardware, not starting PVR | 108 | echo No SGX hardware, not starting PVR |
90 | ;; | 109 | ;; |
91 | esac | 110 | esac |
92 | |||
93 | |||