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" # 'TSPA.txt' might not be the best file to md5sum LIC_FILES_CHKSUM = "file://TSPA.txt;md5=c0d5d9c1e38b41677144c4e24d6ddee1" -PR = "r18" +PR = "r19" -COMPATIBLE_MACHINE = "(omap3|ti816x)" +COMPATIBLE_MACHINE = "(omap3|ti816x|ti33x)" DEPENDS = "virtual/libx11 libxau libxdmcp" @@ -29,6 +29,7 @@ ES2LOCATION ?= "${S}/gfx_rel_es2.x" ES3LOCATION ?= "${S}/gfx_rel_es3.x" ES5LOCATION ?= "${S}/gfx_rel_es5.x" ES6LOCATION ?= "${S}/gfx_rel_es6.x" +ES8LOCATION ?= "${S}/gfx_rel_es8.x" do_configure() { # Attempt to fix up the worst offenders for file permissions @@ -158,22 +159,28 @@ do_install () { # The ES2.x, ES3.x, ES5.x and ES6.x CPUs have different SGX hardware, so we need to install multiple sets of userspace + install -d ${D}${libdir}/ES8.0 install -d ${D}${libdir}/ES6.0 install -d ${D}${libdir}/ES5.0 install -d ${D}${libdir}/ES3.0 install -d ${D}${libdir}/ES2.0 + install -d ${D}${bindir}/ES8.0 install -d ${D}${bindir}/ES6.0 install -d ${D}${bindir}/ES5.0 install -d ${D}${bindir}/ES3.0 install -d ${D}${bindir}/ES2.0 - cp -pPR ${ES2LOCATION}/lib*${IMGPV} ${D}${libdir}/ES2.0/ - cp ${ES2LOCATION}/p[dv]* ${D}${bindir}/ES2.0/ + if [ -e ${ES2LOCATION} ] ; then + cp -pPR ${ES2LOCATION}/lib*${IMGPV} ${D}${libdir}/ES2.0/ + cp ${ES2LOCATION}/p[dv]* ${D}${bindir}/ES2.0/ + fi - cp -pPR ${D}${libdir}/lib*${IMGPV} ${D}${libdir}/ES3.0/ - cp ${D}${bindir}/p[dv]* ${D}${bindir}/ES3.0 + if [ -e ${ES3LOCATION} ] ; then + cp -pPR ${ES3LOCATION}/lib*${IMGPV} ${D}${libdir}/ES3.0/ + cp ${ES3LOCATION}/p[dv]* ${D}${bindir}/ES3.0 + fi if [ -e ${ES5LOCATION} ] ; then cp -pPR ${ES5LOCATION}/lib*${IMGPV} ${D}${libdir}/ES5.0/ @@ -185,6 +192,11 @@ do_install () { cp ${ES6LOCATION}/p[dv]* ${D}${bindir}/ES6.0/ fi + if [ -e ${ES8LOCATION} ] ; then + cp -pPR ${ES8LOCATION}/lib*${IMGPV} ${D}${libdir}/ES8.0/ + cp ${ES8LOCATION}/p[dv]* ${D}${bindir}/ES8.0/ + fi + rm ${D}${bindir}/ES*/*.h ${D}${bindir}/ES*/pdsasm ${D}${bindir}/pdsasm -f || true install -d ${D}${prefix}/share/applications @@ -272,8 +284,6 @@ FILES_${PN}-x11wsegl-es8 = "${libdir}/ES8*/libpvrPVR2D_X11WSEGL.so.*" RRECOMMENDS_${PN}-x11wsegl = " ${PN}-x11wsegl-es2 ${PN}-x11wsegl-es3 ${PN}-x11wsegl-es5 ${PN}-x11wsegl-es6 ${PN}-x11wsegl-es8" CONFFILES_${PN} = "${sysconfdir}/powervr.ini" -# 'cputype' uses /etc/init.d/functions -RRECOMMENDS_${PN} += "initscripts" FILES_${PN} = "${sysconfdir} ${libdir}/lib*.so.* ${libdir}/ES*/* ${bindir}/pvrsrvinit ${bindir}/cputype ${bindir}/*/*" 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 @@ #!/bin/sh -. /etc/init.d/functions + +machine_id() { # return the machine ID + awk 'BEGIN { FS=": " } /Hardware/ \ + { gsub(" ", "_", $2); print tolower($2) } ' /dev/null 2>&1 +if [ "$?" == "1" ] +then + # looks like there is no display, so let's exit + exit 0 +fi + BITSPERPIXEL="$(fbset | grep geom | awk '{print $6}')" YRES="$(fbset | grep geom | awk '{print $3}')" @@ -28,7 +37,7 @@ if [ "$BITSPERPIXEL" = "32" ] ; then fi # Try to enable triple buffering when there's enough VRAM -fbset -vyres $(expr $YRES \* 3) +fbset -vyres $(expr $YRES \* 3) sgxprepare () { echo Starting PVR @@ -39,11 +48,11 @@ sgxprepare () { pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3` bc_maj=`grep "bc" /proc/devices | cut -b1,2,3` - if [ -e /dev/pvrsrvkm ] ; then + if [ -e /dev/pvrsrvkm ] ; then rm -f /dev/pvrsrvkm fi - mknod /dev/pvrsrvkm c $pvr_maj 0 + mknod /dev/pvrsrvkm c $pvr_maj 0 chmod 666 /dev/pvrsrvkm touch /etc/powervr-esrev @@ -56,7 +65,7 @@ sgxfinish () { echo -n "Starting SGX fixup for" echo " ES${ES_REVISION}.x" cp -a /usr/lib/ES${ES_REVISION}.0/* /usr/lib - cp -a /usr/bin/ES${ES_REVISION}.0/* /usr/bin + cp -a /usr/bin/ES${ES_REVISION}.0/* /usr/bin echo "${ES_REVISION}" > /etc/powervr-esrev fi /usr/bin/pvrsrvinit @@ -72,6 +81,16 @@ case $CPUTYPE in ES_REVISION="$(devmem2 0x50000014 | sed -e s:0x00010205:5: -e s:0x00010201:3: -e s:0x00010003:2: | tail -n1 | awk -F': ' '{print $2}')" + sgxfinish + ;; +"TI33XX") + sgxprepare + + devmem2 0x44e01104 w 0x0 > /dev/null + devmem2 0x44e00904 w 0x2 > /dev/null + + ES_REVISION="$(devmem2 0x56000014 | sed -e s:0x00010205:8: | tail -n1 | awk -F': ' '{print $2}')" + sgxfinish ;; "TI816x") @@ -89,5 +108,3 @@ case $CPUTYPE in echo No SGX hardware, not starting PVR ;; esac - -