Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: "John Willis" <John.Willis@Distant-earth.com>
To: <openembedded-devel@lists.openembedded.org>
Subject: [PATCH] Update libgles-omap3 packages to use a cleaned up init script.
Date: Fri, 6 Mar 2009 20:22:15 -0000	[thread overview]
Message-ID: <036901c99e99$3ee48b80$bcada280$@Willis@Distant-earth.com> (raw)

Update to libgles-omap3 init script to respect stop/start/restart etc.

Signed-off-by: David-John Willis <John.Willis@Distant-earth.com>
---
 packages/powervr-drivers/libgles-omap3/rc.pvr      |   72
+++++++++++++++----
 .../powervr-drivers/libgles-omap3_3.00.00.01.bb    |    2 +-
 .../powervr-drivers/libgles-omap3_3.00.00.05.bb    |    2 +-
 .../powervr-drivers/libgles-omap3_3.00.00.06.bb    |    2 +-
 4 files changed, 60 insertions(+), 18 deletions(-)
 mode change 100644 => 100755
packages/powervr-drivers/libgles-omap3_3.00.00.01.bb
 mode change 100644 => 100755
packages/powervr-drivers/libgles-omap3_3.00.00.05.bb

diff --git a/packages/powervr-drivers/libgles-omap3/rc.pvr
b/packages/powervr-drivers/libgles-omap3/rc.pvr
index 244f480..83c4414 100755
--- a/packages/powervr-drivers/libgles-omap3/rc.pvr
+++ b/packages/powervr-drivers/libgles-omap3/rc.pvr
@@ -1,24 +1,66 @@
 #!/bin/sh
 
-#rmmod bc_example
-rmmod omaplfb
-rmmod pvrsrvkm
+DESC="SGX driver"
+NAME="PVRSRV"
 
-insmod $(busybox find /lib/modules/$(uname -r) -name "pvrsrvkm.ko")
-#modprobe bc_example
-modprobe omaplfb
 
-pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3`
+d_stop() {
+	if [ -e /dev/pvrsrvkm ] ; then 
+		rm -f /dev/pvrsrvkm
+	fi
 
-if [ -e /dev/pvrsrvkm ] ; then 
-	rm -f /dev/pvrsrvkm
-fi
+	if `grep -q pvrsrv /proc/modules` ; then
+		#rmmod bc_example
+		rmmod omaplfb
+		rmmod pvrsrvkm
+	fi
+}
 
-mknod /dev/pvrsrvkm c $pvr_maj 0 
-chmod 666 /dev/pvrsrvkm
+d_start() {
+	if `grep -q pvrsrv /proc/modules` ; then
+		echo " ... already started."
+		exit 1
+	fi
 
-/usr/bin/pvrsrvinit
+	insmod $(busybox find /lib/modules/$(uname -r) -name "pvrsrvkm.ko")
+	#modprobe bc_example
+	modprobe omaplfb
 
-# Set SGX to full speed
-devmem2 0x48004b40 w 0
+	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
diff --git a/packages/powervr-drivers/libgles-omap3_3.00.00.01.bb
b/packages/powervr-drivers/libgles-omap3_3.00.00.01.bb
old mode 100644
new mode 100755
index 1f7adfe..70094a7
--- a/packages/powervr-drivers/libgles-omap3_3.00.00.01.bb
+++ b/packages/powervr-drivers/libgles-omap3_3.00.00.01.bb
@@ -2,7 +2,7 @@ require libgles-omap3.inc
 
 SGXPV = "3_00_00_01"
 
-PR = "r7"
+PR = "r8"
 
 # Quality control is really poor on these SDKs, so hack around the latest
madness:
 FILES_${PN} += "${libdir}/*.so"
diff --git a/packages/powervr-drivers/libgles-omap3_3.00.00.05.bb
b/packages/powervr-drivers/libgles-omap3_3.00.00.05.bb
old mode 100644
new mode 100755
index 814ca04..da3e970
--- a/packages/powervr-drivers/libgles-omap3_3.00.00.05.bb
+++ b/packages/powervr-drivers/libgles-omap3_3.00.00.05.bb
@@ -2,7 +2,7 @@ require libgles-omap3.inc
 
 # Not released yet
 DEFAULT_PREFERENCE = "-1"
-PR = "r3"
+PR = "r4"
 
 SGXPV = "3_00_00_05"
 IMGPV = "1.2.12.838"
diff --git a/packages/powervr-drivers/libgles-omap3_3.00.00.06.bb
b/packages/powervr-drivers/libgles-omap3_3.00.00.06.bb
index cc8ddca..6484d23 100755
--- a/packages/powervr-drivers/libgles-omap3_3.00.00.06.bb
+++ b/packages/powervr-drivers/libgles-omap3_3.00.00.06.bb
@@ -2,7 +2,7 @@ require libgles-omap3.inc
 
 # Not released yet
 #DEFAULT_PREFERENCE = "-1"
-PR = "r7"
+PR = "r8"
 
 SGXPV = "3_00_00_06"
 IMGPV = "1.3.13.1397"
-- 
1.6.0.5






                 reply	other threads:[~2009-03-06 20:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='036901c99e99$3ee48b80$bcada280$@Willis@Distant-earth.com' \
    --to=john.willis@distant-earth.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox