diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-kernel/latencytop | |
download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-kernel/latencytop')
3 files changed, 116 insertions, 0 deletions
diff --git a/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch b/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch new file mode 100644 index 0000000000..7848ccf2ae --- /dev/null +++ b/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | linux: sysfs: use tracing_on as tracing_enabled is deprecated | ||
2 | |||
3 | tracing_enabled use in the kernel is being deprecated as per commit | ||
4 | 6752ab4a9c30 [tracing: Deprecate tracing_enabled for tracing_on] in | ||
5 | the linux mainline kernel. tracing_enabled use will generate a warning | ||
6 | and may no longer function as expected, therefore move to use tracing_on. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Dennis Hall <dennis.hall@windriver.com> | ||
11 | |||
12 | Index: latencytop-0.5/fsync.c | ||
13 | =================================================================== | ||
14 | --- latencytop-0.5.orig/fsync.c 2012-08-03 10:45:49.000000000 -0400 | ||
15 | +++ latencytop-0.5/fsync.c 2012-08-03 10:48:39.000000000 -0400 | ||
16 | @@ -149,19 +149,19 @@ | ||
17 | * cd /sys/kernel/debug/tracing | ||
18 | * echo fsync > current_tracer | ||
19 | * echo ftrace_printk > iter_ctrl | ||
20 | - * echo 1 > tracing_enabled | ||
21 | + * echo 1 > tracing_on | ||
22 | */ | ||
23 | ret = system("/bin/mount -t debugfs none /sys/kernel/debug/"); | ||
24 | if (!ret) | ||
25 | return -1; | ||
26 | write_to_file("/sys/kernel/debug/tracing/current_tracer", "fsync"); | ||
27 | write_to_file("/sys/kernel/debug/tracing/iter_ctrl", "ftrace_printk"); | ||
28 | - write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "1"); | ||
29 | + write_to_file("/sys/kernel/debug/tracing/tracing_on", "1"); | ||
30 | } | ||
31 | |||
32 | int disable_fsync_tracer(void) | ||
33 | { | ||
34 | - write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "0"); | ||
35 | + write_to_file("/sys/kernel/debug/tracing/tracing_on", "0"); | ||
36 | } | ||
37 | |||
38 | |||
39 | @@ -339,8 +339,8 @@ | ||
40 | if (curduration > 5) | ||
41 | curduration = 5; | ||
42 | /* clear the ftrace buffer */ | ||
43 | - write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "0"); | ||
44 | - write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "1"); | ||
45 | + write_to_file("/sys/kernel/debug/tracing/tracing_on", "0"); | ||
46 | + write_to_file("/sys/kernel/debug/tracing/tracing_on", "1"); | ||
47 | key = select(1, &rfds, NULL, NULL, &end); | ||
48 | parse_ftrace(); | ||
49 | print_global_list(); | ||
diff --git a/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch b/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch new file mode 100644 index 0000000000..0cf217fa0b --- /dev/null +++ b/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | diff --git a/Makefile.orig b/Makefile | ||
2 | index 16a2369..fa797a2 100644 | ||
3 | --- a/Makefile.orig | ||
4 | +++ b/Makefile | ||
5 | @@ -1,10 +1,11 @@ | ||
6 | -# FIXME: Use autoconf ? | ||
7 | -HAS_GTK_GUI = 1 | ||
8 | +# Upstream-Status: Inappropriate [configuration] | ||
9 | +# Signed-off-by: Jack Mitchell <jack.mitchell@dbbroadcast.co.uk> | ||
10 | |||
11 | DESTDIR = | ||
12 | SBINDIR = /usr/sbin | ||
13 | XCFLAGS = -W -g `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare | ||
14 | -LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncursesw | ||
15 | +LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncurses | ||
16 | +CC ?= gcc | ||
17 | |||
18 | OBJS= latencytop.o text_display.o translate.o fsync.o | ||
19 | |||
20 | @@ -26,16 +27,17 @@ endif | ||
21 | |||
22 | # We write explicity this "implicit rule" | ||
23 | %.o : %.c | ||
24 | - gcc -c $(CFLAGS) $(XCFLAGS) $< -o $@ | ||
25 | + $(CC) -c $(CFLAGS) $(XCFLAGS) $< -o $@ | ||
26 | |||
27 | latencytop: $(OBJS) latencytop.h Makefile | ||
28 | - gcc $(CFLAGS) $(OBJS) $(LDF) -o latencytop | ||
29 | + $(CC) $(CFLAGS) $(OBJS) $(LDF) -o latencytop | ||
30 | |||
31 | clean: | ||
32 | rm -f *~ latencytop DEADJOE *.o | ||
33 | |||
34 | install: latencytop | ||
35 | mkdir -p $(DESTDIR)/usr/share/latencytop | ||
36 | + mkdir -p $(DESTDIR)/$(SBINDIR) | ||
37 | install -m 0644 latencytop.trans $(DESTDIR)/usr/share/latencytop/latencytop.trans | ||
38 | install -m 0644 *.png $(DESTDIR)/usr/share/latencytop/ | ||
39 | install -m 0755 latencytop $(DESTDIR)$(SBINDIR)/ | ||
diff --git a/meta/recipes-kernel/latencytop/latencytop_0.5.bb b/meta/recipes-kernel/latencytop/latencytop_0.5.bb new file mode 100644 index 0000000000..e910a96f43 --- /dev/null +++ b/meta/recipes-kernel/latencytop/latencytop_0.5.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | SUMMARY = "Linux tool for measuring and fixing latency" | ||
2 | HOMEPAGE = "http://www.latencytop.org/" | ||
3 | |||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://latencytop.c;endline=23;md5=ee9ea9b1415356e5734adad4a87dc7fa" | ||
6 | |||
7 | DEPENDS = "virtual/libintl ncurses glib-2.0" | ||
8 | |||
9 | PR = "r3" | ||
10 | |||
11 | SRC_URI = "http://www.latencytop.org/download/latencytop-${PV}.tar.gz \ | ||
12 | file://latencytop-makefile.patch \ | ||
13 | file://latencytop-fsync.patch" | ||
14 | |||
15 | SRC_URI[md5sum] = "73bb3371c6ee0b0e68e25289027e865c" | ||
16 | SRC_URI[sha256sum] = "9e7f72fbea7bd918e71212a1eabaad8488d2c602205d2e3c95d62cd57e9203ef" | ||
17 | |||
18 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" | ||
19 | |||
20 | PACKAGECONFIG[x11] = ",,gtk+" | ||
21 | |||
22 | EXTRA_OEMAKE_X = "${@bb.utils.contains('PACKAGECONFIG', 'x11', 'HAS_GTK_GUI=1', '', d)}" | ||
23 | |||
24 | CFLAGS += "${LDFLAGS}" | ||
25 | |||
26 | do_install() { | ||
27 | oe_runmake install DESTDIR=${D} ${EXTRA_OEMAKE_X} | ||
28 | } | ||