diff options
-rw-r--r-- | recipes-extended/irqbalance/irqbalance/add-initscript.patch | 47 | ||||
-rw-r--r-- | recipes-extended/irqbalance/irqbalance_1.0.4.bb | 39 |
2 files changed, 86 insertions, 0 deletions
diff --git a/recipes-extended/irqbalance/irqbalance/add-initscript.patch b/recipes-extended/irqbalance/irqbalance/add-initscript.patch new file mode 100644 index 00000000..46a75a86 --- /dev/null +++ b/recipes-extended/irqbalance/irqbalance/add-initscript.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | irqbalance: add basic init script | ||
2 | |||
3 | The upstream irqbalance release package does not contain an | ||
4 | init script so we create a basic one here. | ||
5 | |||
6 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
7 | --- | ||
8 | Index: irqbalance-0.56/irqbalance.init | ||
9 | =================================================================== | ||
10 | --- /dev/null | ||
11 | +++ irqbalance-0.56/irqbalance.init | ||
12 | @@ -0,0 +1,35 @@ | ||
13 | +#!/bin/sh | ||
14 | +# | ||
15 | +# Copyright (c) 2012 Wind River Systems, Inc. | ||
16 | +# | ||
17 | +### BEGIN INIT INFO | ||
18 | +# Provides: irqbalance | ||
19 | +# Required-Start: | ||
20 | +# Required-Stop: | ||
21 | +# Default-Start: 2 3 4 5 | ||
22 | +# Default-Stop: 0 1 6 | ||
23 | +# Short-Description: IRQ allocation daemon | ||
24 | +### END INIT INFO | ||
25 | + | ||
26 | +case "$1" in | ||
27 | + start) | ||
28 | + echo -n "Starting irqbalance: " | ||
29 | + start-stop-daemon -S -b -n irqbalance -a /usr/sbin/irqbalance | ||
30 | + echo "done" | ||
31 | + ;; | ||
32 | + stop) | ||
33 | + echo -n "Shutting down irqbalance: " | ||
34 | + start-stop-daemon -K -n irqbalance | ||
35 | + echo "done" | ||
36 | + ;; | ||
37 | + restart) | ||
38 | + $0 stop | ||
39 | + $0 start | ||
40 | + ;; | ||
41 | + *) | ||
42 | + echo "Usage: $0 {start | stop | restart}" >&2 | ||
43 | + exit 1 | ||
44 | + ;; | ||
45 | +esac | ||
46 | + | ||
47 | +exit 0 | ||
diff --git a/recipes-extended/irqbalance/irqbalance_1.0.4.bb b/recipes-extended/irqbalance/irqbalance_1.0.4.bb new file mode 100644 index 00000000..aa9941c5 --- /dev/null +++ b/recipes-extended/irqbalance/irqbalance_1.0.4.bb | |||
@@ -0,0 +1,39 @@ | |||
1 | # | ||
2 | # Copyright (C) 2013 Wind River Systems, Inc. | ||
3 | # | ||
4 | SUMMARY = "IRQ allocation daemon" | ||
5 | DESCRIPTION = "A daemon to balance interrupts across multiple CPUs, \ | ||
6 | which can lead to better performance and IO balance on SMP systems." | ||
7 | |||
8 | HOMEPAGE = "http://code.google.com/p/irqbalance/" | ||
9 | BUGTRACKER = "http://code.google.com/p/irqbalance/issues/list" | ||
10 | |||
11 | LICENSE = "GPLv2" | ||
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
13 | file://irqbalance.c;beginline=6;endline=8;md5=b94e153694672307b503b1bc87dc9e24 \ | ||
14 | " | ||
15 | |||
16 | DEPENDS = "glib-2.0" | ||
17 | SRC_URI = "http://irqbalance.googlecode.com/files/irqbalance-${PV}.tar.bz2 \ | ||
18 | file://add-initscript.patch \ | ||
19 | " | ||
20 | |||
21 | SRC_URI[md5sum] = "f7ca283c46331db73f27e686a643dcfb" | ||
22 | SRC_URI[sha256sum] = "15725edf4a6f20258620cbd05ebf02d0c25aadd5ffa4871ef8507c9215021c43" | ||
23 | |||
24 | INITSCRIPT_NAME = "irqbalanced" | ||
25 | INITSCRIPT_PARAMS = "defaults" | ||
26 | |||
27 | inherit autotools | ||
28 | inherit update-rc.d | ||
29 | |||
30 | EXTRA_OECONF = "--program-transform-name= \ | ||
31 | --with-sysroot=${STAGING_DIR_TARGET} \ | ||
32 | " | ||
33 | |||
34 | do_install () { | ||
35 | oe_runmake 'DESTDIR=${D}' install | ||
36 | install -d ${D}${sysconfdir}/init.d | ||
37 | cat ${S}/irqbalance.init | sed -e's,/usr/sbin,${sbindir},g' > ${D}${sysconfdir}/init.d/irqbalanced | ||
38 | chmod 755 ${D}${sysconfdir}/init.d/irqbalanced | ||
39 | } | ||