diff options
Diffstat (limited to 'recipes-extended/irqbalance')
6 files changed, 186 insertions, 0 deletions
diff --git a/recipes-extended/irqbalance/irqbalance.inc b/recipes-extended/irqbalance/irqbalance.inc new file mode 100644 index 00000000..c20840df --- /dev/null +++ b/recipes-extended/irqbalance/irqbalance.inc | |||
@@ -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 | |||
18 | INITSCRIPT_NAME = "irqbalanced" | ||
19 | INITSCRIPT_PARAMS = "defaults" | ||
20 | |||
21 | inherit autotools update-rc.d pkgconfig | ||
22 | |||
23 | EXTRA_OECONF = "--program-transform-name= \ | ||
24 | " | ||
25 | |||
26 | # let the recipes or appends define options | ||
27 | # | ||
28 | PACKAGECONFIG ?= "" | ||
29 | |||
30 | # enable,disable,depends,rdepends | ||
31 | # | ||
32 | PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl," | ||
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 | } | ||
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/irqbalance-Add-status-and-reload-commands.patch b/recipes-extended/irqbalance/irqbalance/irqbalance-Add-status-and-reload-commands.patch new file mode 100644 index 00000000..d853d0b4 --- /dev/null +++ b/recipes-extended/irqbalance/irqbalance/irqbalance-Add-status-and-reload-commands.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | From dc7366896dd5a5bae82be4b11530bc9fdb7cbcdd Mon Sep 17 00:00:00 2001 | ||
2 | From: Yang Shi <yang.shi@windriver.com> | ||
3 | Date: Mon, 26 Aug 2013 10:58:02 -0700 | ||
4 | Subject: [PATCH] irqbalance: Add status and reload commands | ||
5 | |||
6 | Add status and reload commands for irqbalanced init script | ||
7 | |||
8 | Signed-off-by: Yang Shi <yang.shi@windriver.com> | ||
9 | --- | ||
10 | irqbalance.init | 12 +++++++++--- | ||
11 | 1 files changed, 9 insertions(+), 3 deletions(-) | ||
12 | |||
13 | diff --git a/irqbalance.init b/irqbalance.init | ||
14 | index d12d62c..f58bf55 100644 | ||
15 | --- a/irqbalance.init | ||
16 | +++ b/irqbalance.init | ||
17 | @@ -1,6 +1,6 @@ | ||
18 | #!/bin/sh | ||
19 | # | ||
20 | -# Copyright (c) 2012 Wind River Systems, Inc. | ||
21 | +# Copyright (c) 2013 Wind River Systems, Inc. | ||
22 | # | ||
23 | ### BEGIN INIT INFO | ||
24 | # Provides: irqbalance | ||
25 | @@ -11,6 +11,8 @@ | ||
26 | # Short-Description: IRQ allocation daemon | ||
27 | ### END INIT INFO | ||
28 | |||
29 | +. /etc/init.d/functions | ||
30 | + | ||
31 | case "$1" in | ||
32 | start) | ||
33 | echo -n "Starting irqbalance: " | ||
34 | @@ -22,12 +24,16 @@ case "$1" in | ||
35 | start-stop-daemon -K -n irqbalance | ||
36 | echo "done" | ||
37 | ;; | ||
38 | - restart) | ||
39 | + restart|reload) | ||
40 | $0 stop | ||
41 | $0 start | ||
42 | ;; | ||
43 | + status) | ||
44 | + status irqbalance | ||
45 | + echo "done" | ||
46 | + ;; | ||
47 | *) | ||
48 | - echo "Usage: $0 {start | stop | restart}" >&2 | ||
49 | + echo "Usage: $0 {start | stop | restart | reload | status}" >&2 | ||
50 | exit 1 | ||
51 | ;; | ||
52 | esac | ||
53 | -- | ||
54 | 1.7.5.4 | ||
55 | |||
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..33703f8b --- /dev/null +++ b/recipes-extended/irqbalance/irqbalance_1.0.4.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | # | ||
2 | # Copyright (C) 2013 Wind River Systems, Inc. | ||
3 | # | ||
4 | |||
5 | require irqbalance.inc | ||
6 | |||
7 | PR = "r1" | ||
8 | |||
9 | SRC_URI[md5sum] = "f7ca283c46331db73f27e686a643dcfb" | ||
10 | SRC_URI[sha256su] = "15725edf4a6f20258620cbd05ebf02d0c25aadd5ffa4871ef8507c9215021c43" | ||
11 | |||
12 | EXTRA_OECONF += "--with-sysroot=${STAGING_DIR_TARGET}" | ||
13 | |||
14 | SRC_URI = "http://irqbalance.googlecode.com/files/irqbalance-${PV}.tar.bz2 \ | ||
15 | file://add-initscript.patch \ | ||
16 | " | ||
diff --git a/recipes-extended/irqbalance/irqbalance_1.0.5.bb b/recipes-extended/irqbalance/irqbalance_1.0.5.bb new file mode 100644 index 00000000..49c3acd1 --- /dev/null +++ b/recipes-extended/irqbalance/irqbalance_1.0.5.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | # | ||
2 | # Copyright (C) 2013 Wind River Systems, Inc. | ||
3 | # | ||
4 | |||
5 | require irqbalance.inc | ||
6 | |||
7 | PR = "r0" | ||
8 | |||
9 | SRC_URI[md5sum] = "b6403fa067c96adce448a48c9993654d" | ||
10 | SRC_URI[sha256sum] = "1123e75224b9c0b63ac85892e920bc4a9c76211278ea3d5d4bcbbde44815685c" | ||
11 | |||
12 | SRC_URI = "http://irqbalance.googlecode.com/files/irqbalance-${PV}.tar.gz \ | ||
13 | file://add-initscript.patch \ | ||
14 | " | ||
diff --git a/recipes-extended/irqbalance/irqbalance_1.0.6.bb b/recipes-extended/irqbalance/irqbalance_1.0.6.bb new file mode 100644 index 00000000..fd08b73f --- /dev/null +++ b/recipes-extended/irqbalance/irqbalance_1.0.6.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | # | ||
2 | # Copyright (C) 2013 Wind River Systems, Inc. | ||
3 | # | ||
4 | |||
5 | require irqbalance.inc | ||
6 | |||
7 | PR = "r0" | ||
8 | |||
9 | SRC_URI[md5sum] = "b73b1a5a9e1c3c428ae39024c711e41e" | ||
10 | SRC_URI[sha256sum] = "95ac79992e6de501f613c781b0fc8aa17a4aaf6a3d865bb6e15ac6a46c6ab1fd" | ||
11 | |||
12 | SRC_URI = "http://irqbalance.googlecode.com/files/irqbalance-${PV}.tar.gz \ | ||
13 | file://add-initscript.patch \ | ||
14 | file://irqbalance-Add-status-and-reload-commands.patch \ | ||
15 | " | ||