diff options
Diffstat (limited to 'meta-linaro/recipes-kernel/gator')
-rwxr-xr-x | meta-linaro/recipes-kernel/gator/gator/gator.init | 48 | ||||
-rw-r--r-- | meta-linaro/recipes-kernel/gator/gator_git.bb | 33 |
2 files changed, 81 insertions, 0 deletions
diff --git a/meta-linaro/recipes-kernel/gator/gator/gator.init b/meta-linaro/recipes-kernel/gator/gator/gator.init new file mode 100755 index 0000000..11ac345 --- /dev/null +++ b/meta-linaro/recipes-kernel/gator/gator/gator.init | |||
@@ -0,0 +1,48 @@ | |||
1 | #!/bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: gatord | ||
4 | # Required-Start: $local_fs | ||
5 | # Required-Stop: $local_fs | ||
6 | # Default-Start: 2 3 4 5 | ||
7 | # Default-Stop: 0 1 6 | ||
8 | # Short-Description: Starts gatord | ||
9 | # Description: Starts the Gator Daemon for ARM DS5 | ||
10 | ### END INIT INFO | ||
11 | |||
12 | PATH=/sbin:/usr/sbin:/bin:/usr/bin | ||
13 | |||
14 | DESC="Gator" | ||
15 | NAME="gatord" | ||
16 | GATOR=`which $NAME` | ||
17 | |||
18 | . /etc/init.d/functions || exit 1 | ||
19 | |||
20 | # Exit if the package is not installed | ||
21 | [ -x "$GATOR" ] || exit 0 | ||
22 | |||
23 | case "$1" in | ||
24 | start) | ||
25 | echo -n "Starting $DESC: $NAME... " | ||
26 | depmod -a||true | ||
27 | modprobe gator | ||
28 | start-stop-daemon -S -b -x $GATOR -- $GATOR_ARGS | ||
29 | echo "done." | ||
30 | ;; | ||
31 | stop) | ||
32 | echo -n "Stopping $DESC: $NAME... " | ||
33 | start-stop-daemon -K -x $GATOR | ||
34 | echo "done." | ||
35 | ;; | ||
36 | restart) | ||
37 | echo "Restarting $DESC: $NAME... " | ||
38 | $0 stop | ||
39 | $0 start | ||
40 | echo "done." | ||
41 | ;; | ||
42 | *) | ||
43 | echo "Usage: $0 {start|stop|restart}" | ||
44 | exit 1 | ||
45 | ;; | ||
46 | esac | ||
47 | |||
48 | exit 0 | ||
diff --git a/meta-linaro/recipes-kernel/gator/gator_git.bb b/meta-linaro/recipes-kernel/gator/gator_git.bb new file mode 100644 index 0000000..1c8431b --- /dev/null +++ b/meta-linaro/recipes-kernel/gator/gator_git.bb | |||
@@ -0,0 +1,33 @@ | |||
1 | SUMMARY = "DS-5 Gator daemon" | ||
2 | DESCRIPTION = "Target-side daemon gathering data for ARM Streamline Performance Analyzer." | ||
3 | |||
4 | LICENSE = "GPL-2" | ||
5 | LIC_FILES_CHKSUM = "file://driver/LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
6 | |||
7 | SRCREV = "bc8a84cf0b138a2951679581453da7bd93003db6" | ||
8 | PV = "5.19+git${SRCPV}" | ||
9 | |||
10 | SRC_URI = "git://git.linaro.org/arm/ds5/gator.git;protocol=http;branch=linaro \ | ||
11 | file://gator.init" | ||
12 | |||
13 | S = "${WORKDIR}/git" | ||
14 | |||
15 | inherit update-rc.d | ||
16 | |||
17 | EXTRA_OEMAKE = "'CFLAGS=${CFLAGS} ${TARGET_CC_ARCH} -DETCDIR=\"${sysconfdir}\"' \ | ||
18 | 'LDFLAGS=${LDFLAGS} ${TARGET_CC_ARCH}' 'CROSS_COMPILE=${TARGET_PREFIX}' \ | ||
19 | 'CXXFLAGS=${CXXFLAGS} ${TARGET_CC_ARCH} -fno-rtti'" | ||
20 | |||
21 | do_compile() { | ||
22 | # The regular makefile tries to be 'smart' by hardcoding ABI assumptions, let's use the clean makefile for everything. | ||
23 | cp ${S}/daemon/Makefile_aarch64 ${S}/daemon/Makefile | ||
24 | oe_runmake -C daemon CC='${CC}' CXX='${CXX}' | ||
25 | } | ||
26 | |||
27 | do_install() { | ||
28 | install -D -p -m0755 daemon/gatord ${D}/${sbindir}/gatord | ||
29 | install -D -p -m0755 ${WORKDIR}/gator.init ${D}/${sysconfdir}/init.d/gator | ||
30 | } | ||
31 | |||
32 | INITSCRIPT_NAME = "gator" | ||
33 | INITSCRIPT_PARAMS = "defaults 66" | ||