diff options
author | Steve Sakoman <steve@sakoman.com> | 2009-09-02 22:34:51 -0700 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2009-09-03 10:33:47 +0200 |
commit | 94c2e1f513e1571e56f3729d1439d71eb4d7148b (patch) | |
tree | 4fdfd677bcf88ea3967fbea9623eba443b8fcec4 /recipes/powervr-drivers/libgles-omap3/rc.pvr | |
parent | ae751ce3cd3e186aa0b167de1c5634e1ee98ef7a (diff) |
libgles-omap3: detect cpu type and don't load modules if no SGX hardware
Diffstat (limited to 'recipes/powervr-drivers/libgles-omap3/rc.pvr')
-rwxr-xr-x | recipes/powervr-drivers/libgles-omap3/rc.pvr | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/recipes/powervr-drivers/libgles-omap3/rc.pvr b/recipes/powervr-drivers/libgles-omap3/rc.pvr index 244f480f2c..20b5167b4c 100755 --- a/recipes/powervr-drivers/libgles-omap3/rc.pvr +++ b/recipes/powervr-drivers/libgles-omap3/rc.pvr @@ -1,24 +1,30 @@ #!/bin/sh -#rmmod bc_example -rmmod omaplfb -rmmod pvrsrvkm +CPUTYPE="$(cputype)" -insmod $(busybox find /lib/modules/$(uname -r) -name "pvrsrvkm.ko") -#modprobe bc_example -modprobe omaplfb +if ( $CPUTYPE == "OMAP3530"); then -pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3` + rmmod omaplfb + rmmod pvrsrvkm -if [ -e /dev/pvrsrvkm ] ; then - rm -f /dev/pvrsrvkm -fi + insmod $(busybox find /lib/modules/$(uname -r) -name "pvrsrvkm.ko") + + modprobe omaplfb + + pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3` -mknod /dev/pvrsrvkm c $pvr_maj 0 -chmod 666 /dev/pvrsrvkm + if [ -e /dev/pvrsrvkm ] ; then + rm -f /dev/pvrsrvkm + fi -/usr/bin/pvrsrvinit + mknod /dev/pvrsrvkm c $pvr_maj 0 + chmod 666 /dev/pvrsrvkm -# Set SGX to full speed -devmem2 0x48004b40 w 0 + /usr/bin/pvrsrvinit + + # Set SGX to full speed + devmem2 0x48004b40 w 0 +else + echo No SGX hardware, not starting pvrsinit +fi |