Skip to contentSkip to conversation

ti-xsgx-ddk-um: add shell file xorg to start/stop Xorg

PATCH In review Eric Ruei 2 participants 2 messages Oct 6, 2017 – Oct 9, 2017

lore
Share & tools
lore

Eric Ruei

author
#0 lore raw

PATCH 1/1 ti-xsgx-ddk-um: add shell file xorg to start/stop Xorg

---
 recipes-graphics/libgles/ti-xsgx-ddk-um/xorg       | 40 ++++++++++++++++++++++
 .../libgles/ti-xsgx-ddk-um_1.15.4564147.bb         |  5 ++-
 2 files changed, 44 insertions(+), 1 deletion(-)
 create mode 100644 recipes-graphics/libgles/ti-xsgx-ddk-um/xorg
recipes-graphics/libgles/ti-xsgx-ddk-um/xorg new file +40 -0
new file mode 100644
index 0000000..9c036d4
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+x_start()
+{
+
+	# Start the X Server. 
+	#
+	/usr/local/XSGX/bin/X -config /usr/local/XSGX/etc/xorg.conf > /dev/null 2>&1 &
+
+	echo "Starting Xorg"
+	return 0;
+}
+
+x_stop()
+{
+
+
+	# Stop the X Server.
+	#
+	[ -f /tmp/.X0-lock ] && read XPID < /tmp/.X0-lock && [ -n "$XPID" ] && kill $XPID && while [ -e /proc/$XPID ] ; do sleep 1; done
+
+	echo "Stopping Xorg"
+	return 0;
+}
+
+
+# Deal with the type of invocation we get.
+#
+case "$1" in
+start)
+	x_start
+	;;
+stop)
+    x_stop
+	;;
+*)
+	echo "$0: unknown argument $1." >&2;
+	;;
+esac
+
recipes-graphics/libgles/ti-xsgx-ddk-um_1.15.4564147.bb +4 -1
index c959e14..6434869 100644
@@ -10,6 +10,8 @@ BRANCH = "ti-img-sgx/${PV}"
 SRC_URI = "git://git.ti.com/processor-sdk/omap5-sgx-ddk-um-linux-x11-experimental.git;protocol=git;branch=${BRANCH}"
 SRCREV = "c00eb002f624cddac4956c901314c07d83a13260"
 
+SRC_URI += " file://xorg"
+
 # There's only hardfp version available
 python __anonymous() {
     tunes = bb.data.getVar("TUNE_FEATURES", d, 1)
@@ -31,7 +33,7 @@ INITSCRIPT_PARAMS = "defaults 8"
 
 inherit update-rc.d
 
-PR = "r0"
+PR = "r1"
 PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2 omap5-xsgx-ddk-um-linux"
 
 DEPENDS += "udev"
@@ -54,6 +56,7 @@ S = "${WORKDIR}/git"
 
 do_install () {
     oe_runmake install DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT}
+    install -m 0644 ${WORKDIR}/xorg ${D}${sysconfdir}/init.d/
 }
 
 SYSROOT_DIRS_append = "/usr/local"
Signature · 1 line
1.9.1
#1 lore raw

I have pushed this to the morty-x11-experimental branch.

Quoted 83 lines · Eric Ruei
---
  recipes-graphics/libgles/ti-xsgx-ddk-um/xorg       | 40 ++++++++++++++++++++++
  .../libgles/ti-xsgx-ddk-um_1.15.4564147.bb         |  5 ++-
  2 files changed, 44 insertions(+), 1 deletion(-)

create mode 100644 recipes-graphics/libgles/ti-xsgx-ddk-um/xorg

recipes-graphics/libgles/ti-xsgx-ddk-um/xorg new file +40 -0
new file mode 100644
index 0000000..9c036d4
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+x_start()
+{
+
+	# Start the X Server.
+	#
+	/usr/local/XSGX/bin/X -config /usr/local/XSGX/etc/xorg.conf > /dev/null 2>&1 &
+
+	echo "Starting Xorg"
+	return 0;
+}
+
+x_stop()
+{
+
+
+	# Stop the X Server.
+	#
+	[ -f /tmp/.X0-lock ] && read XPID < /tmp/.X0-lock && [ -n "$XPID" ] && kill $XPID && while [ -e /proc/$XPID ] ; do sleep 1; done
+
+	echo "Stopping Xorg"
+	return 0;
+}
+
+
+# Deal with the type of invocation we get.
+#
+case "$1" in
+start)
+	x_start
+	;;
+stop)
+    x_stop
+	;;
+*)
+	echo "$0: unknown argument $1." >&2;
+	;;
+esac
+
recipes-graphics/libgles/ti-xsgx-ddk-um_1.15.4564147.bb +4 -1
index c959e14..6434869 100644
@@ -10,6 +10,8 @@ BRANCH = "ti-img-sgx/${PV}"
  SRC_URI = "git://git.ti.com/processor-sdk/omap5-sgx-ddk-um-linux-x11-experimental.git;protocol=git;branch=${BRANCH}"
  SRCREV = "c00eb002f624cddac4956c901314c07d83a13260"
 
+SRC_URI += " file://xorg"
+
  # There's only hardfp version available
  python __anonymous() {
      tunes = bb.data.getVar("TUNE_FEATURES", d, 1)
@@ -31,7 +33,7 @@ INITSCRIPT_PARAMS = "defaults 8"
 
  inherit update-rc.d
 
-PR = "r0"
+PR = "r1"
  PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2 omap5-xsgx-ddk-um-linux"
 
  DEPENDS += "udev"
@@ -54,6 +56,7 @@ S = "${WORKDIR}/git"
 
  do_install () {
      oe_runmake install DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT}
+    install -m 0644 ${WORKDIR}/xorg ${D}${sysconfdir}/init.d/
  }
 
  SYSROOT_DIRS_append = "/usr/local"