* [PATCH] PowerVR init script
@ 2009-05-26 19:57 John Faith
2009-05-26 21:13 ` Koen Kooi
2009-05-27 9:11 ` John Willis
0 siblings, 2 replies; 6+ messages in thread
From: John Faith @ 2009-05-26 19:57 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 130 bytes --]
Hello,
Please review the attached patch which lets the PowerVR init script
handle start, stop and restart.
Thanks,
John
[-- Attachment #2: 0001-OMAP35x-PowerVR-init-script-allow-start-stop-rest.patch --]
[-- Type: text/x-diff, Size: 1422 bytes --]
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.
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] PowerVR init script
2009-05-26 19:57 [PATCH] PowerVR init script John Faith
@ 2009-05-26 21:13 ` Koen Kooi
2009-05-26 21:55 ` John Faith
2009-05-27 9:11 ` John Willis
1 sibling, 1 reply; 6+ messages in thread
From: Koen Kooi @ 2009-05-26 21:13 UTC (permalink / raw)
To: openembedded-devel
On 26-05-09 21:57, John Faith wrote:
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] PowerVR init script
2009-05-26 21:13 ` Koen Kooi
@ 2009-05-26 21:55 ` John Faith
0 siblings, 0 replies; 6+ messages in thread
From: John Faith @ 2009-05-26 21:55 UTC (permalink / raw)
To: openembedded-devel@lists.openembedded.org
Koen Kooi wrote:
> On 26-05-09 21:57, John Faith wrote:
>
>> 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
>
>
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] PowerVR init script
2009-05-26 19:57 [PATCH] PowerVR init script John Faith
2009-05-26 21:13 ` Koen Kooi
@ 2009-05-27 9:11 ` John Willis
2009-05-27 15:28 ` John Faith
1 sibling, 1 reply; 6+ messages in thread
From: John Willis @ 2009-05-27 9:11 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 689 bytes --]
> 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
[-- Attachment #2: rc.pvr --]
[-- Type: application/octet-stream, Size: 989 bytes --]
#!/bin/sh
DESC="PowerVR SGX driver"
NAME="PVRSRV"
d_stop() {
if [ -e /dev/pvrsrvkm ] ; then
rm -f /dev/pvrsrvkm
fi
if `grep -q pvrsrv /proc/modules` ; then
rmmod omaplfb 2>/dev/null
rmmod pvrsrvkm 2>/dev/null
fi
}
d_start() {
if `grep -q pvrsrv /proc/modules` ; then
echo " ... already started."
exit 1
fi
modprobe pvrsrvkm
modprobe omaplfb
pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3`
mknod /dev/pvrsrvkm c $pvr_maj 0
chmod 666 /dev/pvrsrvkm
/usr/bin/pvrsrvinit
# Set SGX to full speed
# Temp fix to OMAP clocks are sorted.
devmem2 0x48004b40 w 0
}
case "$1" in
start)
echo -n "Starting $DESC: $NAME"
d_start
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
d_stop
echo "."
;;
restart|force-reload)
echo -n "Restarting $DESC: $NAME"
d_stop
sleep 1
d_start
echo "."
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] PowerVR init script
2009-05-27 9:11 ` John Willis
@ 2009-05-27 15:28 ` John Faith
2009-05-27 18:19 ` Denys Dmytriyenko
0 siblings, 1 reply; 6+ messages in thread
From: John Faith @ 2009-05-27 15:28 UTC (permalink / raw)
To: openembedded-devel@lists.openembedded.org
John Willis wrote:
>> 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
>
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] PowerVR init script
2009-05-27 15:28 ` John Faith
@ 2009-05-27 18:19 ` Denys Dmytriyenko
0 siblings, 0 replies; 6+ messages in thread
From: Denys Dmytriyenko @ 2009-05-27 18:19 UTC (permalink / raw)
To: openembedded-devel
On Wed, May 27, 2009 at 08:28:17AM -0700, John Faith wrote:
> John Willis wrote:
>>> 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.
>>
>> 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
> 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?
--
Denys
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-05-27 19:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-26 19:57 [PATCH] PowerVR init script John Faith
2009-05-26 21:13 ` Koen Kooi
2009-05-26 21:55 ` John Faith
2009-05-27 9:11 ` John Willis
2009-05-27 15:28 ` John Faith
2009-05-27 18:19 ` Denys Dmytriyenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.