From 4924c154711cb60d45702c8ba880977a9742ea13 Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Fri, 18 Jul 2014 03:21:20 +0300 Subject: [PATCH] powertop: enable 1.13 ..from some old git, with patch 2.x wants newer autoconf :( --- .../powertop/files/perf_event_open_arm.patch | 18 ++++++++++++++++++ recipes/powertop/powertop_git.bb | 7 +++++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 recipes/powertop/files/perf_event_open_arm.patch diff --git a/recipes/powertop/files/perf_event_open_arm.patch b/recipes/powertop/files/perf_event_open_arm.patch new file mode 100644 index 0000000000..f60d86f00e --- /dev/null +++ b/recipes/powertop/files/perf_event_open_arm.patch @@ -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; diff --git a/recipes/powertop/powertop_git.bb b/recipes/powertop/powertop_git.bb index 7cfe90fe81..c2b7077e0c 100644 --- a/recipes/powertop/powertop_git.bb +++ b/recipes/powertop/powertop_git.bb @@ -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" -- 2.39.5