All of lore.kernel.org
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Rodrigo Vivi <rodrigo.vivi@openbossa.org>,
	Francisco Alecrim <francisco.alecrim@openbossa.org>
Subject: [PATCH 1/2] dspgw-utils: Adding DSP Gateway Utilities package
Date: Fri, 27 Aug 2010 01:11:53 -0700	[thread overview]
Message-ID: <1282896714-3167-2-git-send-email-raj.khem@gmail.com> (raw)
In-Reply-To: <1282896714-3167-1-git-send-email-raj.khem@gmail.com>

From: Willer Moreira <willer.moreira@openbossa.org>

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@openbossa.org>
Signed-off-by: Francisco Alecrim <francisco.alecrim@openbossa.org>
Signed-off-by: Willer Moreira <willer.moreira@openbossa.org>
---
 recipes/dspgw-utils/dspgw-utils_3.3.1.bb   |   43 ++++++++++++
 recipes/dspgw-utils/files/dsp              |   96 ++++++++++++++++++++++++++++
 recipes/dspgw-utils/files/dsp.rules        |    6 ++
 recipes/dspgw-utils/files/yytext_ptr.patch |   11 +++
 4 files changed, 156 insertions(+), 0 deletions(-)
 create mode 100644 recipes/dspgw-utils/dspgw-utils_3.3.1.bb
 create mode 100644 recipes/dspgw-utils/files/dsp
 create mode 100644 recipes/dspgw-utils/files/dsp.rules
 create mode 100644 recipes/dspgw-utils/files/yytext_ptr.patch

diff --git a/recipes/dspgw-utils/dspgw-utils_3.3.1.bb b/recipes/dspgw-utils/dspgw-utils_3.3.1.bb
new file mode 100644
index 0000000..08e11b6
--- /dev/null
+++ b/recipes/dspgw-utils/dspgw-utils_3.3.1.bb
@@ -0,0 +1,43 @@
+DESCRIPTION = "DSP Gateway Utilities"
+HOMEPAGE = "http://dspgateway.sourceforge.net"
+LICENSE = "GPL"
+DEPENDS = "bison flex udev"
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/dspgateway/dspgw-${PV}-arm.tar.bz2 \
+           file://yytext_ptr.patch;patch=1 \
+           file://dsp \
+           file://dsp.rules "
+
+S = "${WORKDIR}/dspgw-${PV}-arm/src/utils"
+
+CFLAGS += "-g -Wall -I${WORKDIR}/dspgw-${PV}-arm/include"
+
+inherit update-rc.d
+
+INITSCRIPT_NAME = "dsp"
+INITSCRIPT_PARAMS = "defaults"
+
+# Skipping...
+do_configure () {
+}
+
+# Skipping...
+do_stage () {
+}
+
+do_compile () {
+        cd ${S}/dsp_dld/arm && oe_runmake
+        cd ${S}/dspctl && oe_runmake
+}
+
+do_install () {
+        install -d ${D}${sbindir}
+        install -d ${D}${sysconfdir}/init.d
+        install -d ${D}${sysconfdir}/udev/rules.d
+        install -m 0655 ${S}/dspctl/dspctl ${D}${sbindir}
+        install -m 0655 ${S}/dsp_dld/arm/dsp_dld ${D}${sbindir}
+        install -m 0655 ${S}/dsp_dld/arm/dld_client ${D}${sbindir}
+        install -m 0755 ${WORKDIR}/dsp ${D}${sysconfdir}/init.d
+        install -m 0755 ${WORKDIR}/dsp.rules ${D}${sysconfdir}/udev/rules.d/
+}
diff --git a/recipes/dspgw-utils/files/dsp b/recipes/dspgw-utils/files/dsp
new file mode 100644
index 0000000..4387d60
--- /dev/null
+++ b/recipes/dspgw-utils/files/dsp
@@ -0,0 +1,96 @@
+#!/bin/sh
+# DSP Gateway init script
+# Copyright (C) 2007 INdT.
+# @author Abner Jose de Faria Silva <abner.silva@indt.org.br>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+set -e
+
+DESC="DSP Gateway"
+
+DAEMON=/usr/sbin/dsp_dld
+DSPCTL=/usr/sbin/dspctl
+DSPCONF=/lib/dsp/dsp_dld_avs.conf
+
+DAEMONPARAM="-p --disable-restart -c $DSPCONF"
+
+KMEMRESERVE=360000
+
+PIDDIR=/var/run/dsp
+PIDFILE=$PIDDIR/pid
+
+test -x "$DAEMON" || exit 0
+test -x "$DSPCTL" || exit 0
+test -e "$DSPCONF" || exit 0
+
+start_dsp()
+{
+    if [ ! -d "$PIDDIR" ]; then
+        mkdir -p "$PIDDIR"
+    fi
+
+    if [ -e "$PIDFILE" ]; then
+        TMP=/proc/$(cat $PIDFILE)
+        if [ -d "$TMP" -a "$(readlink -f $TMP/exe)" = "$DAEMON" ]; then
+            echo "$DESC is already running."
+            return
+        else
+            echo "Removing old PID file $PIDFILE."
+            rm -f "$PIDFILE"
+        fi
+    fi
+
+    echo -n "Starting $DESC: "
+
+    $DSPCTL kmem_reserve $KMEMRESERVE
+    start-stop-daemon --start --quiet -b --make-pidfile --pidfile "$PIDFILE" \
+    --exec "$DAEMON" -- $DAEMONPARAM
+
+    echo "done."
+}
+
+stop_dsp()
+{
+    echo -n "Stopping $DESC: "
+
+    $DSPCTL kmem_release
+    start-stop-daemon --stop --quiet --name $(basename "$DAEMON") \
+    --pidfile "$PIDFILE"
+    rm -f "$PIDFILE"
+
+    echo "done."
+}
+
+case "$1" in
+    start)
+        start_dsp
+        ;;
+    stop)
+        stop_dsp
+        ;;
+    restart|force-reload)
+        stop_dsp
+        start_dsp
+        ;;
+    *)
+        echo "Usage: $(basename $0) {start|stop|restart|force-reload}" >&2
+        exit 1
+        ;;
+esac
+
+echo ""
+
+exit 0
diff --git a/recipes/dspgw-utils/files/dsp.rules b/recipes/dspgw-utils/files/dsp.rules
new file mode 100644
index 0000000..ae01361
--- /dev/null
+++ b/recipes/dspgw-utils/files/dsp.rules
@@ -0,0 +1,6 @@
+# dsp dev
+KERNEL=="dspctl",    NAME="dspctl/ctl"
+KERNEL=="dspmem",    NAME="dspctl/mem", MODE="0640", GROUP="kmem"
+KERNEL=="dsptwch",   NAME="dspctl/twch", MODE="0640"
+KERNEL=="dsperr",    NAME="dspctl/err", MODE="0440"
+KERNEL=="dsptask[0-9]*", MODE="0666"
diff --git a/recipes/dspgw-utils/files/yytext_ptr.patch b/recipes/dspgw-utils/files/yytext_ptr.patch
new file mode 100644
index 0000000..cf17c1d
--- /dev/null
+++ b/recipes/dspgw-utils/files/yytext_ptr.patch
@@ -0,0 +1,11 @@
+--- utils/dsp_dld/arm/dld_cmd_spec.l	2006-09-08 02:57:22.000000000 -0300
++++ utils/dsp_dld/arm/dld_cmd_spec.l.fixed	2007-10-09 16:46:28.000000000 -0300
+@@ -180,6 +180,8 @@
+ 	return(1);
+ }
+ 
++#define yytext_ptr yytext
++
+ void comment(void)
+ {
+ 	char c, c1;
-- 
1.7.1




  reply	other threads:[~2010-08-27  8:12 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-27  8:11 [PATCH 0/2] Step forward in 'bitbake world' Khem Raj
2010-08-27  8:11 ` Khem Raj [this message]
2010-08-27  8:33   ` [PATCH 1/2] dspgw-utils: Adding DSP Gateway Utilities package Frans Meulenbroeks
2010-08-27  8:11 ` [PATCH 2/2] recipes: Update recipes to get 'bitbake world' parse and calculate runqueue successfully Khem Raj
2010-08-27  9:40   ` Frans Meulenbroeks
2010-08-27 15:36     ` Khem Raj
2010-08-27 11:08   ` Koen Kooi
2010-08-27 11:51     ` Eric Bénard
2010-08-27 11:58     ` Frans Meulenbroeks
2010-08-27 12:13     ` Andrea Adami
2010-08-27 12:16       ` Frans Meulenbroeks
2010-08-27 13:15       ` Andrea Adami
2010-08-27 15:23       ` Tom Rini
2010-08-27 15:33       ` Khem Raj
2010-08-27 12:32     ` Elena of Valhalla
2010-08-27 15:31     ` Khem Raj
2010-08-28 10:27       ` Koen Kooi
2010-08-28 11:51         ` Frans Meulenbroeks
2010-08-28 12:40           ` Frans Meulenbroeks
2010-08-28 20:38             ` Khem Raj
2010-08-29  1:07             ` Mike Westerhof
2010-08-29  9:01               ` Khem Raj
2010-08-29 13:19               ` Frans Meulenbroeks
2010-08-30  5:33                 ` Frans Meulenbroeks
2010-08-30  8:23               ` Koen Kooi
2010-08-30 21:09               ` Tom Rini
2010-08-28 13:19           ` Philip Balister
2010-08-28 14:39             ` Chris Larson
2010-08-28 14:56               ` Koen Kooi
2010-08-28 15:49                 ` Chris Larson
2010-08-29 11:14                 ` Frans Meulenbroeks
2010-08-28 15:03               ` Philip Balister
2010-08-28 15:44                 ` Chris Larson
2010-08-29 10:25                   ` Frans Meulenbroeks
2010-08-28 20:32         ` Khem Raj

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=1282896714-3167-2-git-send-email-raj.khem@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=francisco.alecrim@openbossa.org \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=rodrigo.vivi@openbossa.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 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.