powertop: enable 1.13
authorGrazvydas Ignotas <notasas@gmail.com>
Fri, 18 Jul 2014 00:21:20 +0000 (03:21 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Fri, 18 Jul 2014 00:21:20 +0000 (03:21 +0300)
..from some old git, with patch
2.x wants newer autoconf :(

recipes/powertop/files/perf_event_open_arm.patch [new file with mode: 0644]
recipes/powertop/powertop_git.bb

diff --git a/recipes/powertop/files/perf_event_open_arm.patch b/recipes/powertop/files/perf_event_open_arm.patch
new file mode 100644 (file)
index 0000000..f60d86f
--- /dev/null
@@ -0,0 +1,18 @@
+diff --git a/perf.c b/perf.c
+index e565b77..b7f5c9e 100644
+--- a/perf.c
++++ b/perf.c
+@@ -48,9 +48,12 @@
+ #ifdef __i386__
+ #define __NR_perf_event_open  336
+ #endif
+-#if __x86_64__
++#ifdef __x86_64__
+ #define __NR_perf_event_open  298
+ #endif
++#ifdef __arm__
++#define __NR_perf_event_open    (__NR_SYSCALL_BASE+364)
++#endif
+ #endif
+ static int perf_fd = -1;
index 7cfe90f..c2b7077 100644 (file)
@@ -1,5 +1,5 @@
 # requires kernel 2.6.31+ headers with perf_event_open syscall
-DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE = "-1"
 
 require recipes/powertop/powertop.inc
 
@@ -8,7 +8,10 @@ PV = "1.13"
 PR = "${INC_PR}.0"
 PR_append = "+gitr${SRCPV}"
 
-SRC_URI = "git://gitorious.org/meego-developer-tools/powertop.git;protocol=git"
+SRC_URI = "git://gitorious.org/meego-developer-tools/powertop.git;protocol=git \
+          file://perf_event_open_arm.patch;patch=1 \
+         "
+
 S = "${WORKDIR}/git"
 
 CFLAGS += "-DVERSION=\\"${PV}\\" -Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int"