libgles-omap3-es23: use correct kernel module for cc/rebirth
authorGrazvydas Ignotas <notasas@gmail.com>
Thu, 11 Dec 2014 22:33:01 +0000 (00:33 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Thu, 11 Dec 2014 22:33:01 +0000 (00:33 +0200)
also cleanup pre/post-install commands

recipes/powervr-drivers/files/rc.pvr
recipes/powervr-drivers/libgles-omap3-es23_4.00.00.01.bb
recipes/powervr-drivers/libgles-omap3.inc

index fe4bd4c..20252c5 100755 (executable)
@@ -99,15 +99,20 @@ fbset -vyres $(expr $YRES \* 3)
                for lib in /usr/lib/ES${ES_REVISION}.0/*.so*; do
                        install_lib $lib
                done
-               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
-               sync
-               touch /etc/powervr-kmodver
-               oldkmod=`cat /etc/powervr-kmodver`
-               if [ "${sdkver}" != "${oldkmod}" ]; then
-                       echo "Switching driver to ${sdkver}"
-                       echo "${sdkver}" > /etc/powervr-kmodver
+
+               # if /etc/powervr-kmodver is available, trust it, else figure out something
+               if ! test -e /etc/powervr-kmodver; then
+                       touch /etc/powervr-kmodver
+                       # for 1.4.14.2616 there are 2 incompatible modules,
+                       # assume the default one, which is selected by empty powervr-kmodver
+                       if [ "${sdkver}" != "1.4.14.2616" ]; then
+                               echo "Switching driver to ${sdkver}"
+                               echo "${sdkver}" > /etc/powervr-kmodver
+                       fi
                fi
+               sync
        fi
 
        load_driver
index b69e21f..5079634 100644 (file)
@@ -6,7 +6,7 @@ ES5LOCATION = "none"
 
 require libgles-omap3.inc
 
-PR = "r4"
+PR = "r5"
 
 SGXPV = "4_00_00_01"
 IMGPV = "1.4.14.2616"
index c9b9135..74257a7 100644 (file)
@@ -248,16 +248,13 @@ inherit update-rc.d
 INITSCRIPT_NAME = "pvr-init"
 INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ."
 
-# Append to update-rc.d postinst
-pkg_postinst_${PN}_prepend() {
+pkg_preinst_${PN}_prepend() {
 rm -f /etc/powervr-esrev
 rm -f /etc/powervr-kmodver
+}
 
+# Append to update-rc.d postinst
+pkg_postinst_${PN}_prepend() {
 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
-
-# as postinst_prepend doesn't seem to put this before update-rc.d,
-# we need this lame hack to apply ES lib fixup
-/etc/init.d/pvr-init stop
-/etc/init.d/pvr-init start
 }