PowerVR init script
PATCH 1/1 PowerVR init script
Hello,
Please review the attached patch which lets the PowerVR init script handle start, stop and restart.
Thanks,
John
From d57fb40126807a028f4dd66505c1739c77aa1e9b Mon Sep 17 00:00:00 2001
From: John Faith <jfaith@dr-laptop.(none)>
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.
--- recipes/powervr-drivers/libgles-omap3/rc.pvr | 22 ++++++++++++++++++---- 1 files changed, 18 insertions(+), 4 deletions(-)
recipes/powervr-drivers/libgles-omap3/rc.pvr +18 -4
@@ -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`
Signature · 1 line
1.5.4.3
Quoted 3 lines · John Faith
Hello,
Please review the attached patch which lets the PowerVR init script handle start, stop and restart.
Why did you replace the modprobe with insmod? insmod is waaaaaay more fragile than modprobe.
regards,
Koen
Quoted 7 lines · Koen Kooi
Quoted 4 lines · John Faith
Hello,
Please review the attached patch which lets the PowerVR init script handle start, stop and restart.
Quoted 8 lines
Why did you replace the modprobe with insmod? insmod is waaaaaay more fragile than modprobe.
regards,
Koen
Using the insmod the same way as done for pvrsrvkm.ko worked in my environment, but I guess that's not the right general solution even though it also uses 'find'. I wonder why insmod is in the script to begin with, assuming depmod was run.
,
John
Quoted 3 lines
Hello,
Please review the attached patch which lets the PowerVR init script handle start, stop and restart.
Hi John,
I could have sworn I pushed this as a patch some time ago but it must have got lost.
This is the PowerVR init script we have been using for some time without issue on the Beagle and Pandora.
It supports start/stop/restart/force-reload and modprobes the modules rather than the insmod/find combo.
Other than that it is comparable to your patch.
One other note is that you will need to bump the PR on the libgles-omap3_* recipes (esp. 3.00.00.06 as that is the one in common use) so that the new script gets baked in.
Regards,
John Willis
Quoted 16 lines · John Willis
Quoted 4 lines
Hello,
Please review the attached patch which lets the PowerVR init script handle start, stop and restart.Hi John,
I could have sworn I pushed this as a patch some time ago but it must have got lost.
This is the PowerVR init script we have been using for some time without issue on the Beagle and Pandora.It supports start/stop/restart/force-reload and modprobes the modules rather than the insmod/find combo.
Other than that it is comparable to your patch.
Quoted 8 lines
One other note is that you will need to bump the PR on the libgles-omap3_* recipes (esp. 3.00.00.06 as that is the one in common use) so that the new script gets baked in.
Regards,
John Willis
Hi John,
Your script works for me if I use insmod instead of modprobe, since it seems that the default arago-base-image busybox does not have depmod enabled. Also the devmem2 package was not enabled, but that's easy to fix.
It looks like you submitted a patch 2009-03-06. Did you get any feedback?
Thanks!
,
John
Quoted 15 lines · John Faith
Quoted 14 lines · John Willis
Quoted 3 lines
Hello,
Please review the attached patch which lets the PowerVR init script handle start, stop and restart.I could have sworn I pushed this as a patch some time ago but it must have got lost.
This is the PowerVR init script we have been using for some time without issue on the Beagle and Pandora.It supports start/stop/restart/force-reload and modprobes the modules rather
than the insmod/find combo.
Other than that it is comparable to your patch.
Quoted 7 lines
Quoted 3 lines
One other note is that you will need to bump the PR on the libgles-omap3_* recipes (esp. 3.00.00.06 as that is the one in common use) so that the new script gets baked in.
Hi John,
Your script works for me if I use insmod instead of modprobe, since it seems that the default arago-base-image busybox does not have depmod
John,
That is an outdated info - arago-base-image now includes full module-init-tools with depmod:
http://arago-project.org/files/releases/2009.05-rc1/images/arago/arago-base-image-glibc-ipk-2009.05-arago-testlab/installed-packages.txt
Quoted 3 lines
enabled. Also the devmem2 package was not enabled, but that's easy to fix.
It looks like you submitted a patch 2009-03-06. Did you get any feedback?
Signature · 1 line
Denys