libgles-omap3: try to support multiple drivers
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 3 Mar 2013 15:56:56 +0000 (17:56 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 3 Mar 2013 15:56:56 +0000 (17:56 +0200)
recipes/powervr-drivers/libgles-omap3.inc
recipes/powervr-drivers/libgles-omap3/rc.pvr
recipes/powervr-drivers/libgles-omap3_4.00.00.01.bb

index 3a6d243..8e94f23 100644 (file)
@@ -251,6 +251,7 @@ INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ."
 # Append to update-rc.d postinst
 pkg_postinst_${PN}_append() {
 rm -f /etc/powervr-esrev
+rm -f /etc/powervr-kmodver
 
 ln -sf /usr/lib/libXdmcp.so.6.0.0 /usr/lib/libXdmcp.so.0 
 ln -sf /usr/lib/libXau.so.6.0.0 /usr/lib/libXau.so.0
index be77bc7..91404c9 100755 (executable)
@@ -31,9 +31,13 @@ fi
 fbset -vyres $(expr $YRES \* 3) 
 
        echo Starting PVR
-       insmod /lib/modules/$(uname -r)/kernel/drivers/gpu/pvr/pvrsrvkm.ko
-       insmod /lib/modules/$(uname -r)/kernel/drivers/gpu/pvr/omaplfb.ko
-       bc_ko="/lib/modules/$(uname -r)/kernel/drivers/gpu/pvr/bufferclass_ti.ko"
+
+       if test -f /etc/powervr-kmodver; then
+               version=`cat /etc/powervr-kmodver`
+       fi
+       insmod /lib/modules/$(uname -r)/kernel/drivers/gpu/pvr/$version/pvrsrvkm.ko
+       insmod /lib/modules/$(uname -r)/kernel/drivers/gpu/pvr/$version/omaplfb.ko
+       bc_ko="/lib/modules/$(uname -r)/kernel/drivers/gpu/pvr/$version/bufferclass_ti.ko"
        if test -f "$bc_ko"; then
                insmod $bc_ko
        fi
@@ -72,5 +76,12 @@ fbset -vyres $(expr $YRES \* 3)
                cp -a /usr/lib/ES${ES_REVISION}.0/* /usr/lib
                cp -a /usr/bin/ES${ES_REVISION}.0/* /usr/bin    
                echo "${ES_REVISION}" > /etc/powervr-esrev
+               sync
+       fi
+       if test -x /usr/bin/pvrsrvinit; then
+               /usr/bin/pvrsrvinit
+       elif test -x /usr/bin/pvrsrvctl; then
+               /usr/bin/pvrsrvctl --start --no-module
+       else
+               echo "Error: missing /usr/bin/pvrsrv* or bad permissions"
        fi
-       /usr/bin/pvrsrvinit
index e15f547..9f9c141 100644 (file)
@@ -10,7 +10,7 @@ require libgles-omap3.inc
 # http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest/index_FDS.html
 # see libgles-omap3.inc for detailed installation instructions
 
-PR = "r7"
+PR = "r8"
 
 SGXPV = "4_00_00_01"
 IMGPV = "1.4.14.2616"