libgles omap3: use insmod in initscript instead of modprobe to avoid segfault
authorKoen Kooi <koen@openembedded.org>
Sun, 4 Jan 2009 16:09:50 +0000 (17:09 +0100)
committerKoen Kooi <koen@openembedded.org>
Sun, 4 Jan 2009 16:09:50 +0000 (17:09 +0100)
packages/powervr-drivers/libgles-omap3/rc.pvr [new file with mode: 0755]
packages/powervr-drivers/libgles-omap3_1.0.bb

diff --git a/packages/powervr-drivers/libgles-omap3/rc.pvr b/packages/powervr-drivers/libgles-omap3/rc.pvr
new file mode 100755 (executable)
index 0000000..7c23603
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+rmmod bc_example
+rmmod omaplfb
+rmmod pvrsrvkm
+
+insmod $(find /lib/modules/$(uname -r) -name "pvrsrvkm.ko")
+modprobe -f bc_example
+modprobe -f omaplfb
+
+pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3`
+
+if [ -e /dev/pvrsrvkm ] ; then 
+       rm -f /dev/pvrsrvkm
+fi
+
+mknod /dev/pvrsrvkm c $pvr_maj 0 
+
+/usr/bin/pvrsrvinit
+
index 8656ec0..c709232 100644 (file)
@@ -1,9 +1,11 @@
 DESCRIPTION = "libGLES for the omap3"
 LICENCE = "proprietary-binary"
-PR = "r4"
+PR = "r5"
 
 # Put "OMAP35x_Graphics_SDK_setuplinux_3_00_00_01.bin" in the same directory as this recipe
-SRC_URI = "file://OMAP35x_Graphics_SDK_setuplinux_3_00_00_01.bin"
+SRC_URI = "file://OMAP35x_Graphics_SDK_setuplinux_3_00_00_01.bin \
+           file://rc.pvr \
+          "
 
 S = "${WORKDIR}/OMAP35x_Graphics_SDK_3_00_00_01"
 
@@ -57,7 +59,7 @@ do_install () {
        cp -pPR ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include/* ${D}${includedir}/
        
        install -d ${D}${sysconfdir}/init.d/
-       cp -pP ${S}/gfx_rel/rc.pvr ${D}${sysconfdir}/init.d/pvr-init
+       cp -pP ${WORKDIR}/rc.pvr ${D}${sysconfdir}/init.d/pvr-init
 }
 
 do_stage () {