>From d57fb40126807a028f4dd66505c1739c77aa1e9b Mon Sep 17 00:00:00 2001 From: John Faith Date: Tue, 26 May 2009 11:53:39 -0700 Subject: [PATCH] OMAP35x PowerVR init script: allow start, stop, restart Init scripts should handle start, stop and restart. Also ignore stderr on rmmod. Signed-off-by: john@soundmetrics.com --- recipes/powervr-drivers/libgles-omap3/rc.pvr | 22 ++++++++++++++++++---- 1 files changed, 18 insertions(+), 4 deletions(-) diff --git a/recipes/powervr-drivers/libgles-omap3/rc.pvr b/recipes/powervr-drivers/libgles-omap3/rc.pvr index 244f480..6964c7d 100755 --- a/recipes/powervr-drivers/libgles-omap3/rc.pvr +++ b/recipes/powervr-drivers/libgles-omap3/rc.pvr @@ -1,12 +1,26 @@ #!/bin/sh -#rmmod bc_example -rmmod omaplfb -rmmod pvrsrvkm +if [ "$1" = "" ]; then + echo PVR-INIT: Please use start, stop, or restart. + exit 1 +fi + +if [ "$1" = "stop" -o "$1" = "restart" ]; then + echo Stopping PVR + #rmmod bc_example + rmmod omaplfb 2>/dev/null + rmmod pvrsrvkm 2>/dev/null +fi + +if [ "$1" = "stop" ]; then + exit 0 +fi +echo Starting PVR insmod $(busybox find /lib/modules/$(uname -r) -name "pvrsrvkm.ko") #modprobe bc_example -modprobe omaplfb +#modprobe omaplfb +insmod $(busybox find /lib/modules/$(uname -r) -name "omaplfb.ko") pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3` -- 1.5.4.3