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/trace-cmd | |
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/trace-cmd')
7 files changed, 227 insertions, 0 deletions
diff --git a/meta/recipes-kernel/trace-cmd/kernelshark/kernelshark-fix-syntax-error-of-shell.patch b/meta/recipes-kernel/trace-cmd/kernelshark/kernelshark-fix-syntax-error-of-shell.patch new file mode 100644 index 0000000000..faef049fec --- /dev/null +++ b/meta/recipes-kernel/trace-cmd/kernelshark/kernelshark-fix-syntax-error-of-shell.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | kernelshark: fix syntax error of shell | ||
2 | |||
3 | Delete "<<<" syntax of bash in Makefile, else we would get following error: | ||
4 | |||
5 | Syntax error: redirection unexpected | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Chong Lu <Chong.Lu@windriver.com> | ||
10 | --- | ||
11 | Makefile | 3 +-- | ||
12 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/Makefile b/Makefile | ||
15 | index c1fa906..be84415 100644 | ||
16 | --- a/Makefile | ||
17 | +++ b/Makefile | ||
18 | @@ -89,8 +89,7 @@ endif | ||
19 | |||
20 | # $(call test-build, snippet, ret) -> ret if snippet compiles | ||
21 | # -> empty otherwise | ||
22 | -test-build = $(if $(shell $(CC) -o /dev/null -c -x c - > /dev/null 2>&1 \ | ||
23 | - <<<'$1' && echo y), $2) | ||
24 | +test-build = $(if $(shell echo '$1' |$(CC) -o /dev/null -c -x c - > /dev/null 2>&1 && echo y), $2) | ||
25 | |||
26 | # have udis86 disassembler library? | ||
27 | udis86-flags := $(call test-build,\#include <udis86.h>,-DHAVE_UDIS86 -ludis86) | ||
28 | -- | ||
29 | 1.7.9.5 | ||
30 | |||
diff --git a/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb b/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb new file mode 100644 index 0000000000..28412c72d3 --- /dev/null +++ b/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb | |||
@@ -0,0 +1,26 @@ | |||
1 | SUMMARY = "Graphical trace viewer for Ftrace" | ||
2 | LICENSE = "GPLv2" | ||
3 | |||
4 | require trace-cmd.inc | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ | ||
7 | file://kernel-shark.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e" | ||
8 | |||
9 | DEPENDS = "gtk+ libxml2" | ||
10 | RDEPENDS_${PN} = "trace-cmd" | ||
11 | |||
12 | SRC_URI_append = "file://kernelshark-fix-syntax-error-of-shell.patch" | ||
13 | |||
14 | EXTRA_OEMAKE = "'CC=${CC}' 'AR=${AR}' 'prefix=${prefix}' gui" | ||
15 | |||
16 | do_compile_prepend() { | ||
17 | # Make sure the recompile is OK | ||
18 | rm -f ${B}/.*.d | ||
19 | } | ||
20 | |||
21 | do_install() { | ||
22 | oe_runmake CC="${CC}" AR="${AR}" prefix="${prefix}" DESTDIR="${D}" install_gui | ||
23 | rm ${D}${bindir}/trace-cmd | ||
24 | rm -rf ${D}${datadir}/trace-cmd | ||
25 | rmdir ${D}${datadir} | ||
26 | } | ||
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd.inc b/meta/recipes-kernel/trace-cmd/trace-cmd.inc new file mode 100644 index 0000000000..fb8c5fa7f7 --- /dev/null +++ b/meta/recipes-kernel/trace-cmd/trace-cmd.inc | |||
@@ -0,0 +1,14 @@ | |||
1 | SRCREV = "7055ffd37beeb44714e86a4abc703f7e175a0db5" | ||
2 | PR = "r3" | ||
3 | PV = "1.2+git${SRCPV}" | ||
4 | |||
5 | inherit pkgconfig pythonnative | ||
6 | |||
7 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/trace-cmd:" | ||
8 | |||
9 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git \ | ||
10 | file://addldflags.patch \ | ||
11 | file://make-docs-optional.patch \ | ||
12 | file://blktrace-api-compatibility.patch \ | ||
13 | " | ||
14 | S = "${WORKDIR}/git" | ||
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/addldflags.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/addldflags.patch new file mode 100644 index 0000000000..14730db905 --- /dev/null +++ b/meta/recipes-kernel/trace-cmd/trace-cmd/addldflags.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | trace-cmd: Cross-compile fixes for LDFLAGS and include path | ||
2 | |||
3 | Add ability for the Makefile to respect LDFLAGS. | ||
4 | Also remove hardcoded /usr/local/include include path. | ||
5 | |||
6 | Upstream-Status: Accepted [Post 1.2: 5f576e9af7ad706774d9764a9ae3989376797c0e] | ||
7 | |||
8 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
9 | Signed-off-by: Darren Hart <dvhart@linux.intel.com> | ||
10 | |||
11 | --- | ||
12 | Makefile | 7 ++++--- | ||
13 | 1 file changed, 4 insertions(+), 3 deletions(-) | ||
14 | |||
15 | Index: git/Makefile | ||
16 | =================================================================== | ||
17 | --- git.orig/Makefile | ||
18 | +++ git/Makefile | ||
19 | @@ -202,12 +202,13 @@ export Q VERBOSE | ||
20 | TRACECMD_VERSION = $(TC_VERSION).$(TC_PATCHLEVEL).$(TC_EXTRAVERSION) | ||
21 | KERNELSHARK_VERSION = $(KS_VERSION).$(KS_PATCHLEVEL).$(KS_EXTRAVERSION) | ||
22 | |||
23 | -INCLUDES = -I. -I/usr/local/include $(CONFIG_INCLUDES) | ||
24 | +INCLUDES = -I. $(CONFIG_INCLUDES) | ||
25 | |||
26 | include features.mk | ||
27 | |||
28 | # Set compile option CFLAGS if not set elsewhere | ||
29 | CFLAGS ?= -g -Wall | ||
30 | +LDFLAGS ?= | ||
31 | |||
32 | ifndef NO_PTRACE | ||
33 | ifneq ($(call try-cc,$(SOURCE_PTRACE),),y) | ||
34 | @@ -251,7 +252,7 @@ do_fpic_compile = \ | ||
35 | |||
36 | do_app_build = \ | ||
37 | ($(print_app_build) \ | ||
38 | - $(CC) $^ -rdynamic -o $@ $(CONFIG_LIBS) $(LIBS)) | ||
39 | + $(CC) $^ -rdynamic -o $@ $(LDFLAGS) $(CONFIG_LIBS) $(LIBS)) | ||
40 | |||
41 | do_compile_shared_library = \ | ||
42 | ($(print_shared_lib_compile) \ | ||
43 | @@ -263,7 +264,7 @@ do_compile_plugin_obj = \ | ||
44 | |||
45 | do_plugin_build = \ | ||
46 | ($(print_plugin_build) \ | ||
47 | - $(CC) $(CFLAGS) -shared -nostartfiles -o $@ $<) | ||
48 | + $(CC) $(CFLAGS) $(LDFLAGS) -shared -nostartfiles -o $@ $<) | ||
49 | |||
50 | do_build_static_lib = \ | ||
51 | ($(print_static_lib_build) \ | ||
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/blktrace-api-compatibility.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/blktrace-api-compatibility.patch new file mode 100644 index 0000000000..0789e9fdf7 --- /dev/null +++ b/meta/recipes-kernel/trace-cmd/trace-cmd/blktrace-api-compatibility.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | trace-cmd: Add blktrace_api compatibility for TC_BARRIER | ||
2 | |||
3 | Newer kernels replace TC_BARRIER with TC_FLUSH. Ensure trace-cmd | ||
4 | can build regardless of the linux-kernel-headers version. | ||
5 | |||
6 | Upstream-Status: Innapropriate [Stop gap] | ||
7 | |||
8 | Signed-off-by: Darren Hart <dvhart@linux.intel.com> | ||
9 | |||
10 | diff --git a/plugin_blk.c b/plugin_blk.c | ||
11 | index 9327b17..c8e5e1c 100644 | ||
12 | --- a/plugin_blk.c | ||
13 | +++ b/plugin_blk.c | ||
14 | @@ -44,6 +44,15 @@ struct blk_data { | ||
15 | unsigned short pdu_len; | ||
16 | }; | ||
17 | |||
18 | +/* | ||
19 | + * Newer kernels don't define BLK_TC_BARRIER and have replaced it with | ||
20 | + * BLK_TC_FLUSH. In this case, define it here and report FLUSHES as BARRIERS as | ||
21 | + * a workaround, as described in: | ||
22 | + * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=c09c47caedc9854d59378d6e34c989e51cfdd2b4 | ||
23 | + */ | ||
24 | +#ifndef BLK_TC_BARRIER | ||
25 | +#define BLK_TC_BARRIER 1<<2 | ||
26 | +#endif | ||
27 | static void fill_rwbs(char *rwbs, int action, unsigned int bytes) | ||
28 | { | ||
29 | int i = 0; | ||
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/make-docs-optional.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/make-docs-optional.patch new file mode 100644 index 0000000000..8402426c5f --- /dev/null +++ b/meta/recipes-kernel/trace-cmd/trace-cmd/make-docs-optional.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | Disable building docs until we have asciidocs available as a recipe. | ||
2 | |||
3 | Upstream-Status: Inappropriate [Account for missing dependency, the lazy way] | ||
4 | |||
5 | Signed-off-by: Darren Hart <dvhart@linux.intel.com> | ||
6 | |||
7 | --- | ||
8 | Makefile | 8 ++++++-- | ||
9 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
10 | |||
11 | Index: git/Makefile | ||
12 | =================================================================== | ||
13 | --- git.orig/Makefile | ||
14 | +++ git/Makefile | ||
15 | @@ -327,7 +327,9 @@ TARGETS = $(CMD_TARGETS) $(GUI_TARGETS) | ||
16 | # If you want kernelshark, then do: make gui | ||
17 | ### | ||
18 | |||
19 | -all: all_cmd doc show_gui_make | ||
20 | +# Make doc optional | ||
21 | +#all: all_cmd doc show_gui_make | ||
22 | +all: all_cmd show_gui_make | ||
23 | |||
24 | all_cmd: $(CMD_TARGETS) | ||
25 | |||
26 | @@ -503,7 +505,9 @@ install_python: $(PYTHON_SO_INSTALL) $(P | ||
27 | install_cmd: all_cmd install_plugins install_python | ||
28 | $(Q)$(call do_install,trace-cmd,$(bindir_SQ)) | ||
29 | |||
30 | -install: install_cmd install_doc | ||
31 | +# Make doc optional | ||
32 | +#install: install_cmd install_doc | ||
33 | +install: install_cmd | ||
34 | @echo "Note: to install the gui, type \"make install_gui\"" | ||
35 | |||
36 | install_gui: install_cmd gui | ||
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd_2.3.2.bb b/meta/recipes-kernel/trace-cmd/trace-cmd_2.3.2.bb new file mode 100644 index 0000000000..a4d5382aaf --- /dev/null +++ b/meta/recipes-kernel/trace-cmd/trace-cmd_2.3.2.bb | |||
@@ -0,0 +1,41 @@ | |||
1 | SUMMARY = "User interface to Ftrace" | ||
2 | LICENSE = "GPLv2 & LGPLv2.1" | ||
3 | |||
4 | require trace-cmd.inc | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ | ||
7 | file://trace-cmd.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e \ | ||
8 | file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff \ | ||
9 | file://trace-input.c;beginline=5;endine=8;md5=dafd8a1cade30b847a8686dd3628cea4 \ | ||
10 | " | ||
11 | SRCREV = "79e08f8edb38c4c5098486caaa87ca90ba00f547" | ||
12 | |||
13 | PV = "2.3.2+git${SRCPV}" | ||
14 | |||
15 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;protocol=git;branch=trace-cmd-stable-v2.3 \ | ||
16 | " | ||
17 | |||
18 | EXTRA_OEMAKE = "\ | ||
19 | 'prefix=${prefix}' \ | ||
20 | 'bindir=${bindir}' \ | ||
21 | 'man_dir=${mandir}' \ | ||
22 | 'html_install=${datadir}/kernelshark/html' \ | ||
23 | 'img_install=${datadir}/kernelshark/html/images' \ | ||
24 | \ | ||
25 | 'bindir_relative=${@oe.path.relative(prefix, bindir)}' \ | ||
26 | 'libdir=${@oe.path.relative(prefix, libdir)}' \ | ||
27 | \ | ||
28 | NO_PYTHON=1 \ | ||
29 | " | ||
30 | |||
31 | FILES_${PN}-dbg += "${libdir}/trace-cmd/plugins/.debug" | ||
32 | |||
33 | do_compile_prepend() { | ||
34 | # Make sure the recompile is OK | ||
35 | rm -f ${B}/.*.d | ||
36 | } | ||
37 | |||
38 | do_install() { | ||
39 | oe_runmake DESTDIR="${D}" install | ||
40 | } | ||
41 | |||