diff options
Diffstat (limited to 'meta/recipes-kernel')
113 files changed, 6586 insertions, 0 deletions
diff --git a/meta/recipes-kernel/blktrace/blktrace/ldflags.patch b/meta/recipes-kernel/blktrace/blktrace/ldflags.patch new file mode 100644 index 0000000000..037d161340 --- /dev/null +++ b/meta/recipes-kernel/blktrace/blktrace/ldflags.patch | |||
@@ -0,0 +1,93 @@ | |||
1 | blktrace: obey LDFLAGS | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Christopher Larson <chris_larson@mentor.com> | ||
6 | |||
7 | the patch was imported from meta-mentor layer on yoctoproject git server | ||
8 | http://git.yoctoproject.org/cgit/cgit.cgi/meta-mentor as of commit id | ||
9 | aed463414e2e2bf8ca44ba54ee5973e7ed599e57 | ||
10 | |||
11 | Signed-off-by: Fahad Usman <fahad_usman@mentor.com> | ||
12 | --- | ||
13 | Makefile | 11 ++++++----- | ||
14 | btreplay/Makefile | 3 ++- | ||
15 | btt/Makefile | 3 ++- | ||
16 | 3 files changed, 10 insertions(+), 7 deletions(-) | ||
17 | |||
18 | --- git.orig/Makefile | ||
19 | +++ git/Makefile | ||
20 | @@ -1,5 +1,6 @@ | ||
21 | CC = gcc | ||
22 | CFLAGS = -Wall -O2 -g -W | ||
23 | +LDFLAGS = | ||
24 | ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 | ||
25 | PROGS = blkparse blktrace verify_blkparse blkrawverify blkiomon | ||
26 | LIBS = -lpthread | ||
27 | @@ -23,19 +24,19 @@ btreplay/btreplay: | ||
28 | $(CC) -o $*.o -c $(ALL_CFLAGS) $< | ||
29 | |||
30 | blkparse: blkparse.o blkparse_fmt.o rbtree.o act_mask.o | ||
31 | - $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) | ||
32 | + $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS) | ||
33 | |||
34 | blktrace: blktrace.o act_mask.o | ||
35 | - $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) | ||
36 | + $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) $(LDFLAGS) | ||
37 | |||
38 | verify_blkparse: verify_blkparse.o | ||
39 | - $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) | ||
40 | + $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS) | ||
41 | |||
42 | blkrawverify: blkrawverify.o | ||
43 | - $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) | ||
44 | + $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS) | ||
45 | |||
46 | blkiomon: blkiomon.o rbtree.o | ||
47 | - $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -lrt | ||
48 | + $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -lrt $(LDFLAGS) | ||
49 | |||
50 | $(PROGS): | depend | ||
51 | |||
52 | --- git.orig/btreplay/Makefile | ||
53 | +++ git/btreplay/Makefile | ||
54 | @@ -7,6 +7,7 @@ | ||
55 | |||
56 | CC = gcc | ||
57 | CFLAGS = -Wall -W -O2 -g | ||
58 | +LDFLAGS = | ||
59 | INCS = -I. -I.. -I../btt | ||
60 | OCFLAGS = -UCOUNT_IOS -UDEBUG -DNDEBUG | ||
61 | XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 | ||
62 | @@ -32,10 +33,10 @@ clean: docsclean | ||
63 | $(CC) $(CFLAGS) -c -o $*.o $< | ||
64 | |||
65 | btrecord: btrecord.o | ||
66 | - $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) | ||
67 | + $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS) | ||
68 | |||
69 | btreplay: btreplay.o | ||
70 | - $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) | ||
71 | + $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) $(LDFLAGS) | ||
72 | |||
73 | depend: | ||
74 | @$(CC) -MM $(CFLAGS) *.c 1> .depend | ||
75 | --- git.orig/btt/Makefile | ||
76 | +++ git/btt/Makefile | ||
77 | @@ -7,6 +7,7 @@ | ||
78 | |||
79 | CC = gcc | ||
80 | CFLAGS = -Wall -W -O2 -g | ||
81 | +LDFLAGS = | ||
82 | INCS = -I. -I.. | ||
83 | XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 | ||
84 | override CFLAGS += $(INCS) $(XCFLAGS) | ||
85 | @@ -38,7 +39,7 @@ clean: docsclean | ||
86 | $(CC) $(CFLAGS) -c -o $*.o $< | ||
87 | |||
88 | btt: $(OBJS) | ||
89 | - $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) | ||
90 | + $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) $(LDFLAGS) | ||
91 | |||
92 | ifneq ($(wildcard .depend),) | ||
93 | include .depend | ||
diff --git a/meta/recipes-kernel/blktrace/blktrace_git.bb b/meta/recipes-kernel/blktrace/blktrace_git.bb new file mode 100644 index 0000000000..7a329934b8 --- /dev/null +++ b/meta/recipes-kernel/blktrace/blktrace_git.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | SUMMARY = "Generates traces of I/O traffic on block devices" | ||
2 | LICENSE = "GPLv2" | ||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
4 | |||
5 | DEPENDS = "libaio" | ||
6 | |||
7 | SRCREV = "d6918c8832793b4205ed3bfede78c2f915c23385" | ||
8 | |||
9 | PR = "r6" | ||
10 | PV = "1.0.5+git${SRCPV}" | ||
11 | |||
12 | SRC_URI = "git://git.kernel.dk/blktrace.git \ | ||
13 | file://ldflags.patch" | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | |||
17 | EXTRA_OEMAKE = "\ | ||
18 | 'CC=${CC}' \ | ||
19 | 'CFLAGS=${CFLAGS}' \ | ||
20 | 'LDFLAGS=${LDFLAGS}' \ | ||
21 | " | ||
22 | PARALLEL_MAKE = "" | ||
23 | |||
24 | do_install() { | ||
25 | oe_runmake ARCH="${ARCH}" prefix=${prefix} \ | ||
26 | mandir=${mandir} DESTDIR=${D} install | ||
27 | } | ||
28 | |||
diff --git a/meta/recipes-kernel/cryptodev/cryptodev-linux_1.6.bb b/meta/recipes-kernel/cryptodev/cryptodev-linux_1.6.bb new file mode 100644 index 0000000000..43f58f311c --- /dev/null +++ b/meta/recipes-kernel/cryptodev/cryptodev-linux_1.6.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | require cryptodev_${PV}.inc | ||
2 | |||
3 | SUMMARY = "A /dev/crypto device driver header file" | ||
4 | |||
5 | do_compile() { | ||
6 | : | ||
7 | } | ||
8 | |||
9 | # Just install cryptodev.h which is the only header file needed to be exported | ||
10 | do_install() { | ||
11 | install -D ${S}/crypto/cryptodev.h ${D}${includedir}/crypto/cryptodev.h | ||
12 | } | ||
13 | |||
14 | ALLOW_EMPTY_${PN} = "1" | ||
15 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb b/meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb new file mode 100644 index 0000000000..df50e5a1c6 --- /dev/null +++ b/meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | require cryptodev_${PV}.inc | ||
2 | |||
3 | SUMMARY = "A /dev/crypto device driver kernel module" | ||
4 | |||
5 | inherit module | ||
6 | |||
7 | # Header file provided by a separate package | ||
8 | DEPENDS += "cryptodev-linux" | ||
9 | |||
10 | SRC_URI += " \ | ||
11 | file://0001-Disable-installing-header-file-provided-by-another-p.patch \ | ||
12 | file://0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch \ | ||
13 | " | ||
14 | |||
15 | EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' | ||
16 | |||
17 | RCONFLICTS_${PN} = "ocf-linux" | ||
18 | RREPLACES_${PN} = "ocf-linux" | ||
diff --git a/meta/recipes-kernel/cryptodev/cryptodev-tests_1.6.bb b/meta/recipes-kernel/cryptodev/cryptodev-tests_1.6.bb new file mode 100644 index 0000000000..efc41ae427 --- /dev/null +++ b/meta/recipes-kernel/cryptodev/cryptodev-tests_1.6.bb | |||
@@ -0,0 +1,23 @@ | |||
1 | require cryptodev_${PV}.inc | ||
2 | |||
3 | SUMMARY = "A test suite for /dev/crypto device driver" | ||
4 | |||
5 | DEPENDS += "openssl" | ||
6 | |||
7 | SRC_URI += " \ | ||
8 | file://0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch \ | ||
9 | file://0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch \ | ||
10 | " | ||
11 | |||
12 | EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' | ||
13 | |||
14 | do_compile() { | ||
15 | oe_runmake testprogs | ||
16 | } | ||
17 | |||
18 | do_install() { | ||
19 | oe_runmake install_tests | ||
20 | } | ||
21 | |||
22 | FILES_${PN}-dbg += "${bindir}/tests_cryptodev/.debug" | ||
23 | FILES_${PN} = "${bindir}/tests_cryptodev/*" | ||
diff --git a/meta/recipes-kernel/cryptodev/cryptodev_1.6.inc b/meta/recipes-kernel/cryptodev/cryptodev_1.6.inc new file mode 100644 index 0000000000..946faac7d2 --- /dev/null +++ b/meta/recipes-kernel/cryptodev/cryptodev_1.6.inc | |||
@@ -0,0 +1,11 @@ | |||
1 | HOMEPAGE = "http://cryptodev-linux.org/" | ||
2 | |||
3 | LICENSE = "GPLv2" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
5 | |||
6 | SRC_URI = "http://download.gna.org/cryptodev-linux/cryptodev-linux-${PV}.tar.gz" | ||
7 | |||
8 | SRC_URI[md5sum] = "eade38998313c25fd7934719cdf8a2ea" | ||
9 | SRC_URI[sha256sum] = "75f1425c8ea1f8cae523905a5a046a35092327a6152800b0b86efc4e56fb3e2f" | ||
10 | |||
11 | S = "${WORKDIR}/cryptodev-linux-${PV}" | ||
diff --git a/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch b/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch new file mode 100644 index 0000000000..cb871f6b44 --- /dev/null +++ b/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | From 1980a8f4779a955e73285e7a0d86549b69bea5c8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yu Zongchun <b40527@freescale.com> | ||
3 | Date: Sun, 28 Apr 2013 14:39:22 +0800 | ||
4 | Subject: [PATCH] Add the compile and install rules for cryptodev tests folder | ||
5 | |||
6 | This is required to install the cryptodev tests folder to rootfs | ||
7 | |||
8 | Signed-off-by: Yu Zongchun <b40527@freescale.com> | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | --- | ||
13 | Makefile | 6 ++++++ | ||
14 | tests/Makefile | 8 ++++++++ | ||
15 | 2 files changed, 14 insertions(+), 0 deletions(-) | ||
16 | |||
17 | diff --git a/Makefile b/Makefile | ||
18 | index 2be8825..4cbb865 100644 | ||
19 | --- a/Makefile | ||
20 | +++ b/Makefile | ||
21 | @@ -17,6 +17,9 @@ install: | ||
22 | @echo "Installing cryptodev.h in /usr/include/crypto ..." | ||
23 | @install -D crypto/cryptodev.h /usr/include/crypto/cryptodev.h | ||
24 | |||
25 | +install_tests: | ||
26 | + make -C tests install DESTDIR=$(PREFIX) | ||
27 | + | ||
28 | clean: | ||
29 | make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean | ||
30 | rm -f $(hostprogs) *~ | ||
31 | @@ -25,6 +28,9 @@ clean: | ||
32 | check: | ||
33 | KERNEL_DIR=$(KERNEL_DIR) make -C tests check | ||
34 | |||
35 | +testprogs: | ||
36 | + KERNEL_DIR=$(KERNEL_DIR) make -C tests testprogs | ||
37 | + | ||
38 | FILEBASE = cryptodev-linux-$(VERSION) | ||
39 | TMPDIR ?= /tmp | ||
40 | OUTPUT = $(FILEBASE).tar.gz | ||
41 | diff --git a/tests/Makefile b/tests/Makefile | ||
42 | index 87ca3c7..0488cf6 100644 | ||
43 | --- a/tests/Makefile | ||
44 | +++ b/tests/Makefile | ||
45 | @@ -19,6 +19,12 @@ example-async-hmac-objs := async_hmac.o | ||
46 | example-async-speed-objs := async_speed.o | ||
47 | example-hashcrypt-speed-objs := hashcrypt_speed.c | ||
48 | |||
49 | +install: | ||
50 | + install -d $(DESTDIR)/usr/bin/tests_cryptodev | ||
51 | + for bin in $(hostprogs); do \ | ||
52 | + install -m 755 $${bin} $(DESTDIR)/usr/bin/tests_cryptodev/; \ | ||
53 | + done | ||
54 | + | ||
55 | check: $(hostprogs) | ||
56 | ./cipher | ||
57 | ./hmac | ||
58 | @@ -28,6 +34,8 @@ check: $(hostprogs) | ||
59 | ./cipher-gcm | ||
60 | ./cipher-aead | ||
61 | |||
62 | +testprogs: $(hostprogs) | ||
63 | + | ||
64 | clean: | ||
65 | rm -f *.o *~ $(hostprogs) | ||
66 | |||
67 | -- | ||
68 | 1.7.5.4 | ||
69 | |||
diff --git a/meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch b/meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch new file mode 100644 index 0000000000..a580fc68e1 --- /dev/null +++ b/meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 8a884f55bd1527baa82fab68c186ba546273860c Mon Sep 17 00:00:00 2001 | ||
2 | From: Denys Dmytriyenko <denys@ti.com> | ||
3 | Date: Sun, 6 Apr 2014 19:51:39 -0400 | ||
4 | Subject: [PATCH] Disable installing header file provided by another package | ||
5 | |||
6 | Signed-off-by: Denys Dmytriyenko <denys@ti.com> | ||
7 | |||
8 | Upstream-Status: Inappropriate [ OE specific ] | ||
9 | --- | ||
10 | Makefile | 2 -- | ||
11 | 1 file changed, 2 deletions(-) | ||
12 | |||
13 | diff --git a/Makefile b/Makefile | ||
14 | index d66ef26..8e97c6a 100644 | ||
15 | --- a/Makefile | ||
16 | +++ b/Makefile | ||
17 | @@ -23,8 +23,6 @@ install: modules_install | ||
18 | |||
19 | modules_install: | ||
20 | make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules_install | ||
21 | - @echo "Installing cryptodev.h in $(PREFIX)/usr/include/crypto ..." | ||
22 | - @install -D crypto/cryptodev.h $(PREFIX)/usr/include/crypto/cryptodev.h | ||
23 | |||
24 | clean: | ||
25 | make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean | ||
26 | -- | ||
27 | 1.9.1 | ||
28 | |||
diff --git a/meta/recipes-kernel/cryptodev/files/0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch b/meta/recipes-kernel/cryptodev/files/0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch new file mode 100644 index 0000000000..f5ab8b4f96 --- /dev/null +++ b/meta/recipes-kernel/cryptodev/files/0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 47ff1eb9bb4f872c1d731b93d334ee5865bf3439 Mon Sep 17 00:00:00 2001 | ||
2 | From: Denys Dmytriyenko <denys@ti.com> | ||
3 | Date: Sun, 6 Apr 2014 22:16:30 -0400 | ||
4 | Subject: [PATCH] Fix tests Makefile usage of LDLIBS vs. LDFLAGS | ||
5 | |||
6 | Libraries must come after objects, as link order matters, especially | ||
7 | when using linker flags like -Wl,--as-needed. | ||
8 | |||
9 | Signed-off-by: Denys Dmytriyenko <denys@ti.com> | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | --- | ||
13 | tests/Makefile | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/tests/Makefile b/tests/Makefile | ||
17 | index cd202af..67c3c83 100644 | ||
18 | --- a/tests/Makefile | ||
19 | +++ b/tests/Makefile | ||
20 | @@ -39,5 +39,5 @@ testprogs: $(hostprogs) | ||
21 | clean: | ||
22 | rm -f *.o *~ $(hostprogs) | ||
23 | |||
24 | -${comp_progs}: LDFLAGS += -lssl -lcrypto | ||
25 | +${comp_progs}: LDLIBS += -lssl -lcrypto | ||
26 | ${comp_progs}: %: %.o openssl_wrapper.o | ||
27 | -- | ||
28 | 1.9.1 | ||
29 | |||
diff --git a/meta/recipes-kernel/cryptodev/files/0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch b/meta/recipes-kernel/cryptodev/files/0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch new file mode 100644 index 0000000000..c5c7ec75f9 --- /dev/null +++ b/meta/recipes-kernel/cryptodev/files/0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch | |||
@@ -0,0 +1,86 @@ | |||
1 | From 57b5544de80db85c8955499831fdaa30829db77a Mon Sep 17 00:00:00 2001 | ||
2 | From: Cosmin Paraschiv <cosmin.paraschiv@freescale.com> | ||
3 | Date: Thu, 23 Jan 2014 03:40:00 +0100 | ||
4 | Subject: [PATCH] In the 3.13-rc1 Linux kernel, the INIT_COMPLETION macro has | ||
5 | been replaced with an inline function, reinit_completion [1][2]. We are | ||
6 | currently using the 3.13-rc3 Linux kernel, which leads to the following | ||
7 | error: | ||
8 | |||
9 | cryptlib.c:279:2: error: implicit declaration of function 'INIT_COMPLETION' [-Werror=implicit-function-declaration] | ||
10 | INIT_COMPLETION(cdata->async.result->completion); | ||
11 | |||
12 | [1] https://github.com/torvalds/linux/commit/c32f74ab2872994bc8336ed367313da3139350ca | ||
13 | [2] https://github.com/torvalds/linux/commit/62026aedaacedbe1ffe94a3599ad4acd8ecdf587 | ||
14 | |||
15 | Signed-off-by: Cosmin Paraschiv <cosmin.paraschiv@freescale.com> | ||
16 | Reviewed-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
17 | Tested-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
18 | Signed-off-by: Horia Geanta <horia.geanta@freescale.com> | ||
19 | Signed-off-by: Phil Sutter <phil@nwl.cc> | ||
20 | |||
21 | Upstream-Status: Backport | ||
22 | --- | ||
23 | cryptlib.c | 8 ++++---- | ||
24 | cryptodev_int.h | 6 ++++++ | ||
25 | 2 files changed, 10 insertions(+), 4 deletions(-) | ||
26 | |||
27 | diff --git a/cryptlib.c b/cryptlib.c | ||
28 | index 54d5d41..a923c14 100644 | ||
29 | --- a/cryptlib.c | ||
30 | +++ b/cryptlib.c | ||
31 | @@ -217,7 +217,7 @@ ssize_t cryptodev_cipher_encrypt(struct cipher_data *cdata, | ||
32 | { | ||
33 | int ret; | ||
34 | |||
35 | - INIT_COMPLETION(cdata->async.result->completion); | ||
36 | + reinit_completion(&cdata->async.result->completion); | ||
37 | |||
38 | if (cdata->aead == 0) { | ||
39 | ablkcipher_request_set_crypt(cdata->async.request, | ||
40 | @@ -240,7 +240,7 @@ ssize_t cryptodev_cipher_decrypt(struct cipher_data *cdata, | ||
41 | { | ||
42 | int ret; | ||
43 | |||
44 | - INIT_COMPLETION(cdata->async.result->completion); | ||
45 | + reinit_completion(&cdata->async.result->completion); | ||
46 | if (cdata->aead == 0) { | ||
47 | ablkcipher_request_set_crypt(cdata->async.request, | ||
48 | (struct scatterlist *)src, dst, | ||
49 | @@ -351,7 +351,7 @@ ssize_t cryptodev_hash_update(struct hash_data *hdata, | ||
50 | { | ||
51 | int ret; | ||
52 | |||
53 | - INIT_COMPLETION(hdata->async.result->completion); | ||
54 | + reinit_completion(&hdata->async.result->completion); | ||
55 | ahash_request_set_crypt(hdata->async.request, sg, NULL, len); | ||
56 | |||
57 | ret = crypto_ahash_update(hdata->async.request); | ||
58 | @@ -363,7 +363,7 @@ int cryptodev_hash_final(struct hash_data *hdata, void* output) | ||
59 | { | ||
60 | int ret; | ||
61 | |||
62 | - INIT_COMPLETION(hdata->async.result->completion); | ||
63 | + reinit_completion(&hdata->async.result->completion); | ||
64 | ahash_request_set_crypt(hdata->async.request, NULL, output, 0); | ||
65 | |||
66 | ret = crypto_ahash_final(hdata->async.request); | ||
67 | diff --git a/cryptodev_int.h b/cryptodev_int.h | ||
68 | index 12dd5b1..188063d 100644 | ||
69 | --- a/cryptodev_int.h | ||
70 | +++ b/cryptodev_int.h | ||
71 | @@ -2,6 +2,12 @@ | ||
72 | #ifndef CRYPTODEV_INT_H | ||
73 | # define CRYPTODEV_INT_H | ||
74 | |||
75 | +#include <linux/version.h> | ||
76 | + | ||
77 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)) | ||
78 | +# define reinit_completion(x) INIT_COMPLETION(*(x)) | ||
79 | +#endif | ||
80 | + | ||
81 | #include <linux/init.h> | ||
82 | #include <linux/sched.h> | ||
83 | #include <linux/fs.h> | ||
84 | -- | ||
85 | 1.9.1 | ||
86 | |||
diff --git a/meta/recipes-kernel/dtc/dtc.inc b/meta/recipes-kernel/dtc/dtc.inc new file mode 100644 index 0000000000..95023b6e97 --- /dev/null +++ b/meta/recipes-kernel/dtc/dtc.inc | |||
@@ -0,0 +1,20 @@ | |||
1 | SUMMARY = "Device Tree Compiler" | ||
2 | DESCRIPTION = "The Device Tree Compiler is a tool used to manipulate the Open-Firmware-like device tree used by PowerPC kernels." | ||
3 | SECTION = "bootloader" | ||
4 | LICENSE = "GPLv2 | BSD" | ||
5 | DEPENDS = "flex-native bison-native" | ||
6 | |||
7 | inherit autotools-brokensep | ||
8 | |||
9 | SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git \ | ||
10 | file://make_install.patch \ | ||
11 | " | ||
12 | |||
13 | EXTRA_OEMAKE='PREFIX="${prefix}" LIBDIR="${libdir}"' | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | |||
17 | PACKAGES =+ "${PN}-misc" | ||
18 | FILES_${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff" | ||
19 | |||
20 | RDEPENDS_${PN}-misc += "bash" | ||
diff --git a/meta/recipes-kernel/dtc/dtc/make_install.patch b/meta/recipes-kernel/dtc/dtc/make_install.patch new file mode 100644 index 0000000000..1120617e7b --- /dev/null +++ b/meta/recipes-kernel/dtc/dtc/make_install.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | Index: git/Makefile | ||
4 | =================================================================== | ||
5 | --- git.orig/Makefile 2011-11-02 14:52:17.243104779 -0700 | ||
6 | +++ git/Makefile 2011-11-02 15:06:01.555104982 -0700 | ||
7 | @@ -161,8 +161,8 @@ | ||
8 | $(INSTALL) -d $(DESTDIR)$(BINDIR) | ||
9 | $(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR) | ||
10 | $(INSTALL) -d $(DESTDIR)$(LIBDIR) | ||
11 | - $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR) | ||
12 | - ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname) | ||
13 | + $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname) | ||
14 | + ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/$(notdir $(LIBFDT_lib)) | ||
15 | ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/libfdt.$(SHAREDLIB_EXT) | ||
16 | $(INSTALL) -m 644 $(LIBFDT_archive) $(DESTDIR)$(LIBDIR) | ||
17 | $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR) | ||
diff --git a/meta/recipes-kernel/dtc/dtc_git.bb b/meta/recipes-kernel/dtc/dtc_git.bb new file mode 100644 index 0000000000..0bd3acf6c0 --- /dev/null +++ b/meta/recipes-kernel/dtc/dtc_git.bb | |||
@@ -0,0 +1,11 @@ | |||
1 | require dtc.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
4 | file://libfdt/libfdt.h;beginline=3;endline=52;md5=fb360963151f8ec2d6c06b055bcbb68c" | ||
5 | |||
6 | SRCREV = "65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf" | ||
7 | PV = "1.4.0+git${SRCPV}" | ||
8 | |||
9 | S = "${WORKDIR}/git" | ||
10 | |||
11 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb new file mode 100644 index 0000000000..ce872354f2 --- /dev/null +++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb | |||
@@ -0,0 +1,23 @@ | |||
1 | SUMMARY = "Tools for managing Yocto Project style branched kernels" | ||
2 | LICENSE = "GPLv2" | ||
3 | LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=d8d1d729a70cd5f52972f8884b80743d" | ||
4 | |||
5 | DEPENDS = "git-native" | ||
6 | |||
7 | SRCREV = "23345b8846fe4bd167efdf1bd8a1224b2ba9a5ff" | ||
8 | PR = "r12" | ||
9 | PV = "0.2+git${SRCPV}" | ||
10 | |||
11 | inherit native | ||
12 | |||
13 | SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git" | ||
14 | S = "${WORKDIR}" | ||
15 | |||
16 | do_compile() { | ||
17 | : | ||
18 | } | ||
19 | |||
20 | do_install() { | ||
21 | cd ${S}/git | ||
22 | make DESTDIR=${D}${bindir} install | ||
23 | } | ||
diff --git a/meta/recipes-kernel/kexec/kexec-tools.inc b/meta/recipes-kernel/kexec/kexec-tools.inc new file mode 100644 index 0000000000..7e3b7adfc7 --- /dev/null +++ b/meta/recipes-kernel/kexec/kexec-tools.inc | |||
@@ -0,0 +1,28 @@ | |||
1 | SUMMARY = "Kexec fast reboot tools" | ||
2 | DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel" | ||
3 | AUTHOR = "Eric Biederman" | ||
4 | HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/" | ||
5 | SECTION = "kernel/userland" | ||
6 | LICENSE = "GPLv2" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \ | ||
8 | file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09" | ||
9 | DEPENDS = "zlib xz" | ||
10 | |||
11 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz" | ||
12 | |||
13 | inherit autotools-brokensep | ||
14 | |||
15 | COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|powerpc.*|mips.*)-(linux|freebsd.*)' | ||
16 | |||
17 | INSANE_SKIP_${PN} = "arch" | ||
18 | |||
19 | do_compile_prepend() { | ||
20 | # Remove the '*.d' file to make sure the recompile is OK | ||
21 | for dep in `find ${B} -type f -name '*.d'`; do | ||
22 | dep_no_d="`echo $dep | sed 's#.d$##'`" | ||
23 | # Remove file.d when there is a file.o | ||
24 | if [ -f "$dep_no_d.o" ]; then | ||
25 | rm -f $dep | ||
26 | fi | ||
27 | done | ||
28 | } | ||
diff --git a/meta/recipes-kernel/kexec/kexec-tools/kexec-tools-Refine-kdump-device_tree-sort.patch b/meta/recipes-kernel/kexec/kexec-tools/kexec-tools-Refine-kdump-device_tree-sort.patch new file mode 100644 index 0000000000..ab1fe96db2 --- /dev/null +++ b/meta/recipes-kernel/kexec/kexec-tools/kexec-tools-Refine-kdump-device_tree-sort.patch | |||
@@ -0,0 +1,82 @@ | |||
1 | kexec-tools: Refine kdump device_tree sort | ||
2 | |||
3 | The commit b02d735bf was to rearrange the device-tree entries, and | ||
4 | assumed that these entries are sorted in the ascending order. but | ||
5 | acctually when I was validating kexec and kdump, the order of | ||
6 | serial node still is changed. So the patch is to sort these entries | ||
7 | by the directory name in ascending order. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Yang Wei <Wei.Yang@windriver.com> | ||
12 | Signed-off-by: Chong Lu <Chong.Lu@windriver.com> | ||
13 | --- | ||
14 | kexec/arch/ppc/fs2dt.c | 13 ++++++++++--- | ||
15 | kexec/fs2dt.c | 13 ++++++++++--- | ||
16 | 2 files changed, 20 insertions(+), 6 deletions(-) | ||
17 | |||
18 | diff --git a/kexec/arch/ppc/fs2dt.c b/kexec/arch/ppc/fs2dt.c | ||
19 | index 4121c7d..cc04b04 100644 | ||
20 | --- a/kexec/arch/ppc/fs2dt.c | ||
21 | +++ b/kexec/arch/ppc/fs2dt.c | ||
22 | @@ -296,6 +296,9 @@ static int comparefunc(const void *dentry1, const void *dentry2) | ||
23 | { | ||
24 | char *str1 = (*(struct dirent **)dentry1)->d_name; | ||
25 | char *str2 = (*(struct dirent **)dentry2)->d_name; | ||
26 | + char* ptr1 = strchr(str1, '@'); | ||
27 | + char* ptr2 = strchr(str2, '@'); | ||
28 | + int len1, len2; | ||
29 | |||
30 | /* | ||
31 | * strcmp scans from left to right and fails to idetify for some | ||
32 | @@ -303,9 +306,13 @@ static int comparefunc(const void *dentry1, const void *dentry2) | ||
33 | * Therefore, we get the wrong sorted order like memory@10000000 and | ||
34 | * memory@f000000. | ||
35 | */ | ||
36 | - if (strchr(str1, '@') && strchr(str2, '@') && | ||
37 | - (strlen(str1) > strlen(str2))) | ||
38 | - return 1; | ||
39 | + if (ptr1 && ptr2) { | ||
40 | + len1 = ptr1 - str1; | ||
41 | + len2 = ptr2 - str2; | ||
42 | + if (!strncmp(str1, str2, len1 >len2 ? len1: len2) && | ||
43 | + (strlen(str1) > strlen(str2))) | ||
44 | + return 1; | ||
45 | + } | ||
46 | |||
47 | return strcmp(str1, str2); | ||
48 | } | ||
49 | diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c | ||
50 | index 5e6b98d..1c0345b 100644 | ||
51 | --- a/kexec/fs2dt.c | ||
52 | +++ b/kexec/fs2dt.c | ||
53 | @@ -475,6 +475,9 @@ static int comparefunc(const struct dirent **dentry1, | ||
54 | { | ||
55 | char *str1 = (*(struct dirent **)dentry1)->d_name; | ||
56 | char *str2 = (*(struct dirent **)dentry2)->d_name; | ||
57 | + char* ptr1 = strchr(str1, '@'); | ||
58 | + char* ptr2 = strchr(str2, '@'); | ||
59 | + int len1, len2; | ||
60 | |||
61 | /* | ||
62 | * strcmp scans from left to right and fails to idetify for some | ||
63 | @@ -482,9 +485,13 @@ static int comparefunc(const struct dirent **dentry1, | ||
64 | * Therefore, we get the wrong sorted order like memory@10000000 and | ||
65 | * memory@f000000. | ||
66 | */ | ||
67 | - if (strchr(str1, '@') && strchr(str2, '@') && | ||
68 | - (strlen(str1) > strlen(str2))) | ||
69 | - return 1; | ||
70 | + if (ptr1 && ptr2) { | ||
71 | + len1 = ptr1 - str1; | ||
72 | + len2 = ptr2 - str2; | ||
73 | + if (!strncmp(str1, str2, len1 >len2 ? len1: len2) && | ||
74 | + (strlen(str1) > strlen(str2))) | ||
75 | + return 1; | ||
76 | + } | ||
77 | |||
78 | return strcmp(str1, str2); | ||
79 | } | ||
80 | -- | ||
81 | 1.7.9.5 | ||
82 | |||
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.7.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.7.bb new file mode 100644 index 0000000000..f0ece0d45b --- /dev/null +++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.7.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | require kexec-tools.inc | ||
2 | export LDFLAGS = "-L${STAGING_LIBDIR}" | ||
3 | EXTRA_OECONF = " --with-zlib=yes" | ||
4 | |||
5 | SRC_URI += "file://kexec-tools-Refine-kdump-device_tree-sort.patch" | ||
6 | |||
7 | SRC_URI[md5sum] = "2309ba43981cb6d39d07ac3a9aac30ab" | ||
8 | SRC_URI[sha256sum] = "dde5c38be39882c6c91f0129647349c4e1943b077d3020af1970b481ee954eb0" | ||
9 | |||
10 | PACKAGES =+ "kexec kdump vmcore-dmesg" | ||
11 | |||
12 | ALLOW_EMPTY_${PN} = "1" | ||
13 | RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg" | ||
14 | |||
15 | FILES_kexec = "${sbindir}/kexec" | ||
16 | FILES_kdump = "${sbindir}/kdump" | ||
17 | FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg" | ||
diff --git a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb new file mode 100644 index 0000000000..ec20bf8d30 --- /dev/null +++ b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb | |||
@@ -0,0 +1,46 @@ | |||
1 | SUMMARY = "Wrapper script for the Linux kernel module dependency indexer" | ||
2 | LICENSE = "MIT" | ||
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
4 | |||
5 | INHIBIT_DEFAULT_DEPS = "1" | ||
6 | # The kernel and the staging dir for it is machine specific | ||
7 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
8 | |||
9 | # We need the following for the sstate code to process the wrapper | ||
10 | SSTATE_SCAN_FILES += "depmodwrapper" | ||
11 | |||
12 | do_install() { | ||
13 | install -d ${D}${bindir_crossscripts}/ | ||
14 | |||
15 | cat > ${D}${bindir_crossscripts}/depmodwrapper << EOF | ||
16 | #!/bin/sh | ||
17 | # Expected to be called as: depmodwrapper -a KERNEL_VERSION | ||
18 | if [ "\$1" != "-a" -o "\$2" != "-b" ]; then | ||
19 | echo "Usage: depmodwrapper -a -b rootfs KERNEL_VERSION" >&2 | ||
20 | exit 1 | ||
21 | fi | ||
22 | if [ ! -r ${STAGING_KERNEL_DIR}/kernel-abiversion ]; then | ||
23 | echo "Unable to read: ${STAGING_KERNEL_DIR}/kernel-abiversion" >&2 | ||
24 | else | ||
25 | kernelabi=\$(cat ${STAGING_KERNEL_DIR}/kernel-abiversion) | ||
26 | if [ "\$kernelabi" != "\$4" ]; then | ||
27 | echo "Error: Kernel version \$4 does not match kernel-abiversion (\$kernelabi)" >&2 | ||
28 | exit 1 | ||
29 | fi | ||
30 | fi | ||
31 | |||
32 | if [ ! -r ${STAGING_KERNEL_DIR}/System.map-\$4 ]; then | ||
33 | echo "Unable to read: ${STAGING_KERNEL_DIR}/System.map-\$4" >&2 | ||
34 | exec env depmod "\$1" "\$2" "\$3" "\$4" | ||
35 | else | ||
36 | exec env depmod "\$1" "\$2" "\$3" -F "${STAGING_KERNEL_DIR}/System.map-\$4" "\$4" | ||
37 | fi | ||
38 | EOF | ||
39 | chmod +x ${D}${bindir_crossscripts}/depmodwrapper | ||
40 | } | ||
41 | |||
42 | SYSROOT_PREPROCESS_FUNCS += "depmodwrapper_sysroot_preprocess" | ||
43 | |||
44 | depmodwrapper_sysroot_preprocess () { | ||
45 | sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} | ||
46 | } | ||
diff --git a/meta/recipes-kernel/kmod/kmod-native_git.bb b/meta/recipes-kernel/kmod/kmod-native_git.bb new file mode 100644 index 0000000000..f0e274ed79 --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod-native_git.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | # Copyright (C) 2012 Khem Raj <raj.khem@gmail.com> | ||
2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
3 | |||
4 | require kmod.inc | ||
5 | |||
6 | DEPENDS += "zlib-native" | ||
7 | |||
8 | inherit native | ||
9 | |||
10 | SRC_URI += "file://Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch \ | ||
11 | " | ||
12 | |||
13 | do_install_append (){ | ||
14 | for tool in depmod insmod lsmod modinfo modprobe rmmod | ||
15 | do | ||
16 | ln -s kmod ${D}${bindir}/$tool | ||
17 | done | ||
18 | } | ||
diff --git a/meta/recipes-kernel/kmod/kmod.inc b/meta/recipes-kernel/kmod/kmod.inc new file mode 100644 index 0000000000..dda74c85b6 --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod.inc | |||
@@ -0,0 +1,39 @@ | |||
1 | # Copyright (C) 2012 Khem Raj <raj.khem@gmail.com> | ||
2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
3 | |||
4 | SUMMARY = "Tools for managing Linux kernel modules" | ||
5 | DESCRIPTION = "kmod is a set of tools to handle common tasks with Linux kernel modules like \ | ||
6 | insert, remove, list, check properties, resolve dependencies and aliases." | ||
7 | HOMEPAGE = "http://packages.profusion.mobi/kmod/" | ||
8 | LICENSE = "GPL-2.0+ & LGPL-2.1+" | ||
9 | LICENSE_libkmod = "LGPL-2.1+" | ||
10 | SECTION = "base" | ||
11 | |||
12 | DEPENDS += "pkgconfig-native" | ||
13 | |||
14 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ | ||
15 | file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ | ||
16 | " | ||
17 | inherit autotools gtk-doc ptest | ||
18 | |||
19 | SRCREV = "ae58de0fcb4a6528dd365e23d383bbe2eaf2d566" | ||
20 | # Lookout for PV bump too when SRCREV is changed | ||
21 | PV = "18+git${SRCPV}" | ||
22 | |||
23 | SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \ | ||
24 | file://depmod-search.conf \ | ||
25 | file://run-ptest \ | ||
26 | file://ptest.patch \ | ||
27 | file://avoid_parallel_tests.patch \ | ||
28 | file://fix-O_CLOEXEC.patch \ | ||
29 | file://0001-Add-missing-O_CLOEXEC-in-kmod_module_get_size.patch \ | ||
30 | " | ||
31 | |||
32 | S = "${WORKDIR}/git" | ||
33 | |||
34 | EXTRA_AUTORECONF += "--install --symlink" | ||
35 | EXTRA_OECONF +="--enable-debug --enable-logging --enable-tools --disable-manpages --with-zlib" | ||
36 | |||
37 | do_configure_prepend () { | ||
38 | gtkdocize --docdir ${S}/libkmod/docs || touch ${S}/libkmod/docs/gtk-doc.make | ||
39 | } | ||
diff --git a/meta/recipes-kernel/kmod/kmod/0001-Add-missing-O_CLOEXEC-in-kmod_module_get_size.patch b/meta/recipes-kernel/kmod/kmod/0001-Add-missing-O_CLOEXEC-in-kmod_module_get_size.patch new file mode 100644 index 0000000000..77624ce151 --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod/0001-Add-missing-O_CLOEXEC-in-kmod_module_get_size.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From 74c26943f1228870022d116a1fda25be3a55a38e Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodriguez@opensuse.org> | ||
3 | Date: Wed, 18 Jun 2014 20:51:00 -0400 | ||
4 | Subject: [PATCH] Add missing O_CLOEXEC in kmod_module_get_size() | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
8 | --- | ||
9 | libkmod/libkmod-module.c | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c | ||
13 | index e3cc5a7..b81b451 100644 | ||
14 | --- a/libkmod/libkmod-module.c | ||
15 | +++ b/libkmod/libkmod-module.c | ||
16 | @@ -1783,7 +1783,7 @@ KMOD_EXPORT long kmod_module_get_size(const struct kmod_module *mod) | ||
17 | * loaded. | ||
18 | */ | ||
19 | snprintf(line, sizeof(line), "/sys/module/%s", mod->name); | ||
20 | - dfd = open(line, O_RDONLY); | ||
21 | + dfd = open(line, O_RDONLY|O_CLOEXEC); | ||
22 | if (dfd < 0) | ||
23 | return -errno; | ||
24 | |||
25 | -- | ||
26 | 1.8.3.1 | ||
27 | |||
diff --git a/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch b/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch new file mode 100644 index 0000000000..2320b92eba --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 0c4dbadc9db3cda1cfca64e44ea08c6e89919ea7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ting Liu <b28495@freescale.com> | ||
3 | Date: Tue, 10 Sep 2013 13:44:18 +0800 | ||
4 | Subject: [PATCH] Change to calling bswap_* instead of htobe* and be*toh | ||
5 | |||
6 | We can't use htobe* and be*toh functions because they are not | ||
7 | available on older versions of glibc, For example, shipped on Centos 5.5. | ||
8 | |||
9 | Change to directly calling bswap_* as defined in+byteswap.h. | ||
10 | |||
11 | Upstream-Status: Inappropriate | ||
12 | |||
13 | Signed-off-by: Ting Liu <b28495@freescale.com> | ||
14 | --- | ||
15 | libkmod/libkmod-signature.c | 3 ++- | ||
16 | 1 files changed, 2 insertions(+), 1 deletions(-) | ||
17 | |||
18 | diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c | ||
19 | index 6b80caa..3544a36 100644 | ||
20 | --- a/libkmod/libkmod-signature.c | ||
21 | +++ b/libkmod/libkmod-signature.c | ||
22 | @@ -19,6 +19,7 @@ | ||
23 | */ | ||
24 | |||
25 | #include <endian.h> | ||
26 | +#include <byteswap.h> | ||
27 | #include <stdint.h> | ||
28 | #include <stdlib.h> | ||
29 | #include <string.h> | ||
30 | @@ -121,7 +122,7 @@ bool kmod_module_signature_info(const struct kmod_file *file, struct kmod_signat | ||
31 | modsig->hash >= PKEY_HASH__LAST || | ||
32 | modsig->id_type >= PKEY_ID_TYPE__LAST) | ||
33 | return false; | ||
34 | - sig_len = be32toh(get_unaligned(&modsig->sig_len)); | ||
35 | + sig_len = bswap_32(get_unaligned(&modsig->sig_len)); | ||
36 | if (size < (off_t)(modsig->signer_len + modsig->key_id_len + sig_len)) | ||
37 | return false; | ||
38 | |||
39 | -- | ||
40 | 1.7.5.4 | ||
41 | |||
diff --git a/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch b/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch new file mode 100644 index 0000000000..4c37d44836 --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch | |||
@@ -0,0 +1,21 @@ | |||
1 | Avoid parallel-tests as it remove | ||
2 | buildtest-TESTS and runtest-TESTS targets required by ptest. | ||
3 | In automake 1.13.4 parallel-tests is assumed by defauls. | ||
4 | In order to have buildtest-TESTS and runtest-TESTS targets | ||
5 | serial-tests is now required | ||
6 | |||
7 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> | ||
8 | Upstream-Status: Inappropriate (disable feature incompatible with ptest) | ||
9 | |||
10 | diff -ruN a/configure.ac b/configure.ac | ||
11 | --- a/configure.ac 2013-09-02 15:05:18.662366800 +0200 | ||
12 | +++ b/configure.ac 2013-11-28 09:26:49.557066764 +0200 | ||
13 | @@ -8,7 +8,7 @@ | ||
14 | AC_CONFIG_SRCDIR([libkmod/libkmod.c]) | ||
15 | AC_CONFIG_AUX_DIR([build-aux]) | ||
16 | AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules | ||
17 | - tar-pax no-dist-gzip dist-xz subdir-objects color-tests parallel-tests]) | ||
18 | + tar-pax no-dist-gzip dist-xz subdir-objects color-tests serial-tests]) | ||
19 | AC_PROG_CC_STDC | ||
20 | AC_USE_SYSTEM_EXTENSIONS | ||
21 | AC_SYS_LARGEFILE | ||
diff --git a/meta/recipes-kernel/kmod/kmod/depmod-search.conf b/meta/recipes-kernel/kmod/kmod/depmod-search.conf new file mode 100644 index 0000000000..527c0bb6ee --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod/depmod-search.conf | |||
@@ -0,0 +1,6 @@ | |||
1 | # | ||
2 | # /etc/depmod.d/depmod.conf | ||
3 | # | ||
4 | |||
5 | search updates extramodules built-in | ||
6 | |||
diff --git a/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch b/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch new file mode 100644 index 0000000000..8161d6128d --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From bd43367eee868059770188fd9e9db38520dc6fff Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Wed, 22 Jan 2014 01:06:40 -0500 | ||
4 | Subject: [PATCH] libkmod/libkmod-internal.h: check whether O_CLOEXEC is | ||
5 | defined or not | ||
6 | |||
7 | O_CLOEXEC is introduced from Linux 2.6.23, so old kernel doesn't have | ||
8 | it, we need check before use. | ||
9 | |||
10 | This patch is much more like a workaround, since it may need fcntl() use | ||
11 | FD_CLOEXEC to replace. | ||
12 | |||
13 | This problem was reported by "Ting Liu <b28495@freescale.com>" | ||
14 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
15 | |||
16 | Upstream-Status: Pending | ||
17 | --- | ||
18 | libkmod/libkmod-internal.h | 4 ++++ | ||
19 | 1 file changed, 4 insertions(+) | ||
20 | |||
21 | diff --git a/libkmod/libkmod-internal.h b/libkmod/libkmod-internal.h | ||
22 | index 0180124..100b40f 100644 | ||
23 | --- a/libkmod/libkmod-internal.h | ||
24 | +++ b/libkmod/libkmod-internal.h | ||
25 | @@ -9,6 +9,10 @@ | ||
26 | #include "macro.h" | ||
27 | #include "libkmod.h" | ||
28 | |||
29 | +#ifndef O_CLOEXEC | ||
30 | +#define O_CLOEXEC 0 | ||
31 | +#endif | ||
32 | + | ||
33 | static _always_inline_ _printf_format_(2, 3) void | ||
34 | kmod_log_null(struct kmod_ctx *ctx, const char *format, ...) {} | ||
35 | |||
36 | -- | ||
37 | 1.7.10.4 | ||
38 | |||
diff --git a/meta/recipes-kernel/kmod/kmod/ptest.patch b/meta/recipes-kernel/kmod/kmod/ptest.patch new file mode 100644 index 0000000000..831dbcb909 --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod/ptest.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Add 'install-ptest' rule. | ||
2 | |||
3 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> | ||
4 | Upstream-Status: Pending | ||
5 | |||
6 | diff -ruN a/Makefile.am b/Makefile.am | ||
7 | --- a/Makefile.am 2013-07-12 17:11:05.278331557 +0200 | ||
8 | +++ b/Makefile.am 2013-07-12 17:14:27.033788016 +0200 | ||
9 | @@ -204,6 +204,16 @@ | ||
10 | |||
11 | distclean-local: $(DISTCLEAN_LOCAL_HOOKS) | ||
12 | |||
13 | +install-ptest: | ||
14 | + @$(MKDIR_P) $(DESTDIR)/testsuite | ||
15 | + @for file in $(TESTSUITE); do \ | ||
16 | + install $$file $(DESTDIR)/testsuite; \ | ||
17 | + done; | ||
18 | + @sed -e 's/^Makefile/_Makefile/' < Makefile > $(DESTDIR)/Makefile | ||
19 | + @$(MKDIR_P) $(DESTDIR)/tools | ||
20 | + @cp $(noinst_SCRIPTS) $(noinst_PROGRAMS) $(DESTDIR)/tools | ||
21 | + @cp -r testsuite/rootfs testsuite/.libs $(DESTDIR)/testsuite | ||
22 | + | ||
23 | # ------------------------------------------------------------------------------ | ||
24 | # custom release helpers | ||
25 | # ------------------------------------------------------------------------------ | ||
diff --git a/meta/recipes-kernel/kmod/kmod/run-ptest b/meta/recipes-kernel/kmod/kmod/run-ptest new file mode 100755 index 0000000000..598dd2cb5f --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod/run-ptest | |||
@@ -0,0 +1,5 @@ | |||
1 | #!/bin/sh | ||
2 | touch testsuite/stamp-rootfs | ||
3 | tar xf testmodule.tar | ||
4 | make -k runtest-TESTS 2>/dev/null| grep -e ^PASS -e ^FAIL | ||
5 | find testsuite -name *.ko -exec rm -f {} \; | ||
diff --git a/meta/recipes-kernel/kmod/kmod_git.bb b/meta/recipes-kernel/kmod/kmod_git.bb new file mode 100644 index 0000000000..08dd81569c --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod_git.bb | |||
@@ -0,0 +1,78 @@ | |||
1 | # Copyright (C) 2012 Khem Raj <raj.khem@gmail.com> | ||
2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
3 | |||
4 | require kmod.inc | ||
5 | |||
6 | DEPENDS += "zlib" | ||
7 | PROVIDES += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" | ||
8 | RPROVIDES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" | ||
9 | RCONFLICTS_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" | ||
10 | RREPLACES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" | ||
11 | |||
12 | # to force user to remove old module-init-tools and replace them with kmod variants | ||
13 | RCONFLICTS_libkmod2 += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" | ||
14 | |||
15 | # autotools set prefix to /usr, however we want them in /bin and /sbin | ||
16 | bindir = "${base_bindir}" | ||
17 | sbindir = "${base_sbindir}" | ||
18 | # libdir = "${base_libdir}" | ||
19 | |||
20 | do_install_append () { | ||
21 | install -dm755 ${D}${base_bindir} | ||
22 | install -dm755 ${D}${base_sbindir} | ||
23 | # add symlinks to kmod | ||
24 | ln -s ..${base_bindir}/kmod ${D}${base_bindir}/lsmod | ||
25 | for tool in insmod rmmod depmod modinfo modprobe; do | ||
26 | ln -s ..${base_bindir}/kmod ${D}${base_sbindir}/${tool} | ||
27 | done | ||
28 | # configuration directories | ||
29 | install -dm755 ${D}${base_libdir}/depmod.d | ||
30 | install -dm755 ${D}${base_libdir}/modprobe.d | ||
31 | install -dm755 ${D}${sysconfdir}/depmod.d | ||
32 | install -dm755 ${D}${sysconfdir}/modprobe.d | ||
33 | |||
34 | # install depmod.d file for search/ dir | ||
35 | install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${base_libdir}/depmod.d/search.conf" | ||
36 | |||
37 | if ${@base_contains('DISTRO_FEATURES', 'ptest', 'true', 'false', d)}; then | ||
38 | find testsuite -name *.ko -exec tar rf testmodule.tar {} \; | ||
39 | find testsuite -name *.ko -exec rm -f {} \; | ||
40 | fi | ||
41 | } | ||
42 | |||
43 | do_compile_prepend() { | ||
44 | sed -i 's/ac_pwd=/#ac_pwd=/' config.status ; sed -i "/#ac_pwd=/a\ac_pwd='.'" config.status | ||
45 | } | ||
46 | |||
47 | do_compile_ptest () { | ||
48 | oe_runmake buildtest-TESTS rootfs | ||
49 | } | ||
50 | |||
51 | do_install_ptest () { | ||
52 | install testmodule.tar ${D}${PTEST_PATH} | ||
53 | } | ||
54 | |||
55 | INSANE_SKIP_${PN}-ptest = "arch" | ||
56 | |||
57 | inherit update-alternatives | ||
58 | |||
59 | ALTERNATIVE_PRIORITY = "60" | ||
60 | |||
61 | ALTERNATIVE_kmod = "insmod modprobe rmmod modinfo bin-lsmod lsmod depmod" | ||
62 | |||
63 | ALTERNATIVE_LINK_NAME[insmod] = "${base_sbindir}/insmod" | ||
64 | ALTERNATIVE_LINK_NAME[modprobe] = "${base_sbindir}/modprobe" | ||
65 | ALTERNATIVE_LINK_NAME[rmmod] = "${base_sbindir}/rmmod" | ||
66 | ALTERNATIVE_LINK_NAME[modinfo] = "${base_sbindir}/modinfo" | ||
67 | ALTERNATIVE_LINK_NAME[bin-lsmod] = "${base_bindir}/lsmod" | ||
68 | |||
69 | ALTERNATIVE_LINK_NAME[lsmod] = "${base_sbindir}/lsmod" | ||
70 | ALTERNATIVE_TARGET[lsmod] = "${base_bindir}/lsmod.${BPN}" | ||
71 | |||
72 | ALTERNATIVE_LINK_NAME[depmod] = "${base_sbindir}/depmod" | ||
73 | |||
74 | PACKAGES =+ "libkmod ${PN}-bash-completion" | ||
75 | |||
76 | FILES_libkmod = "${base_libdir}/libkmod*${SOLIBS} ${libdir}/libkmod*${SOLIBS}" | ||
77 | FILES_${PN} += "${base_libdir}/depmod.d ${base_libdir}/modprobe.d" | ||
78 | FILES_${PN}-bash-completion = "${datadir}/bash-completion" | ||
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 | } | ||
diff --git a/meta/recipes-kernel/libpfm/libpfm4_4.3.0.bb b/meta/recipes-kernel/libpfm/libpfm4_4.3.0.bb new file mode 100644 index 0000000000..98852f6a9a --- /dev/null +++ b/meta/recipes-kernel/libpfm/libpfm4_4.3.0.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | SUMMARY = "Monitoring tools exploiting the performance monitoring events" | ||
2 | DESCRIPTION = "This package provides a library, called libpfm4 which is used to develop \ | ||
3 | monitoring tools exploiting the performance monitoring events such as those \ | ||
4 | provided by the Performance Monitoring Unit (PMU) of modern processors." | ||
5 | HOMEPAGE = "http://perfmon2.sourceforge.net/" | ||
6 | BUGTRACKER = "http://sourceforge.net/tracker/?group_id=144822&atid=759953&source=navbar" | ||
7 | |||
8 | LICENSE = "MIT" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=0de488f3bd4424e308e2e399cb99c788" | ||
10 | |||
11 | SECTION = "devel" | ||
12 | |||
13 | PR = "r1" | ||
14 | COMPATIBLE_HOST = "powerpc64" | ||
15 | |||
16 | SRC_URI = "http://downloads.sourceforge.net/project/perfmon2/libpfm4/libpfm-4.3.0.tar.gz" | ||
17 | |||
18 | SRC_URI[md5sum] = "0ab272dbdbb759b852ba8bd06db030ef" | ||
19 | SRC_URI[sha256sum] = "a23eb9affbff279e13563a39317c0ad71c4de28908d4243c8bc109138430cc3b" | ||
20 | |||
21 | EXTRA_OEMAKE = "DESTDIR=\"${D}\" PREFIX=\"${prefix}\" LIBDIR=\"${libdir}\" LDCONFIG=\"true\"" | ||
22 | EXTRA_OEMAKE_append_powerpc = " ARCH=\"powerpc\"" | ||
23 | EXTRA_OEMAKE_append_powerpc64 = " ARCH=\"powerpc\" BITMODE=\"64\"" | ||
24 | |||
25 | S = "${WORKDIR}/libpfm-${PV}" | ||
26 | |||
27 | do_install () { | ||
28 | oe_runmake install | ||
29 | } | ||
diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb new file mode 100644 index 0000000000..a107f804fa --- /dev/null +++ b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb | |||
@@ -0,0 +1,230 @@ | |||
1 | SUMMARY = "Firmware files for use with Linux kernel" | ||
2 | SECTION = "kernel" | ||
3 | # Notes: | ||
4 | # This is kind of a mess. Each bit of firmware has their own license. Some free | ||
5 | # some not. Leaving this as Proprietary for now, but this recipe should be probably | ||
6 | # be rethought out a bit more around how it deals with licenses. | ||
7 | |||
8 | LICENSE = "Proprietary" | ||
9 | |||
10 | LIC_FILES_CHKSUM = "file://LICENSE.radeon;md5=07b0c31777bd686d8e1609c6940b5e74\ | ||
11 | file://LICENSE.dib0700;md5=f7411825c8a555a1a3e5eab9ca773431 \ | ||
12 | file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \ | ||
13 | file://LICENCE.ralink-firmware.txt;md5=ab2c269277c45476fb449673911a2dfd \ | ||
14 | file://LICENCE.qla2xxx;md5=f5ce8529ec5c17cb7f911d2721d90e91 \ | ||
15 | file://LICENCE.iwlwifi_firmware;md5=8b938534f77ffd453690eb34ed84ae8b \ | ||
16 | file://LICENCE.i2400m;md5=14b901969e23c41881327c0d9e4b7d36 \ | ||
17 | file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13 \ | ||
18 | file://LICENCE.agere;md5=af0133de6b4a9b2522defd5f188afd31 \ | ||
19 | file://LICENCE.rtlwifi_firmware.txt;md5=00d06cfd3eddd5a2698948ead2ad54a5 \ | ||
20 | file://LICENCE.broadcom_bcm43xx;md5=3160c14df7228891b868060e1951dfbc \ | ||
21 | file://LICENCE.ti-connectivity;md5=186e7a43cf6c274283ad81272ca218ea \ | ||
22 | file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13 \ | ||
23 | file://LICENCE.via_vt6656;md5=e4159694cba42d4377a912e78a6e850f \ | ||
24 | file://LICENCE.Marvell;md5=9ddea1734a4baf3c78d845151f42a37a \ | ||
25 | " | ||
26 | |||
27 | SRCREV = "dec41bce44e0dff6a2c3358a958fadf22bf58858" | ||
28 | PE = "1" | ||
29 | PV = "0.0+git${SRCPV}" | ||
30 | |||
31 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git" | ||
32 | |||
33 | S = "${WORKDIR}/git" | ||
34 | |||
35 | inherit allarch update-alternatives | ||
36 | |||
37 | do_compile() { | ||
38 | : | ||
39 | } | ||
40 | |||
41 | do_install() { | ||
42 | install -d ${D}/lib/firmware/ | ||
43 | cp -r * ${D}/lib/firmware/ | ||
44 | |||
45 | # Avoid Makefile to be deplyed | ||
46 | rm ${D}/lib/firmware/Makefile | ||
47 | |||
48 | # Remove unbuild firmware which needs cmake and bash | ||
49 | rm ${D}/lib/firmware/carl9170fw -rf | ||
50 | |||
51 | # Remove pointless bash script | ||
52 | rm ${D}/lib/firmware/configure | ||
53 | |||
54 | # Libertas sd8686 | ||
55 | ln -sf libertas/sd8686_v9.bin ${D}/lib/firmware/sd8686.bin | ||
56 | ln -sf libertas/sd8686_v9_helper.bin ${D}/lib/firmware/sd8686_helper.bin | ||
57 | |||
58 | # fixup wl12xx location, after 2.6.37 the kernel searches a different location for it | ||
59 | ( cd ${D}/lib/firmware ; ln -sf ti-connectivity/* . ) | ||
60 | } | ||
61 | |||
62 | |||
63 | PACKAGES =+ "${PN}-ralink \ | ||
64 | ${PN}-radeon \ | ||
65 | ${PN}-marvell-license ${PN}-sd8686 ${PN}-sd8787 ${PN}-sd8797 \ | ||
66 | ${PN}-wl12xx ${PN}-wl18xx ${PN}-vt6656 \ | ||
67 | ${PN}-rtl-license ${PN}-rtl8192cu ${PN}-rtl8192ce ${PN}-rtl8192su \ | ||
68 | ${PN}-broadcom-license ${PN}-bcm4329 ${PN}-bcm4330 ${PN}-bcm4334 \ | ||
69 | ${PN}-atheros-license ${PN}-ar9170 ${PN}-ar3k ${PN}-ath6k ${PN}-ath9k \ | ||
70 | ${PN}-iwlwifi-license ${PN}-iwlwifi-6000g2a-5 ${PN}-iwlwifi-6000g2b-6 ${PN}-iwlwifi-7260-7 \ | ||
71 | ${PN}-iwlwifi-6000g2a-6 ${PN}-iwlwifi-135-6" | ||
72 | |||
73 | |||
74 | FILES_${PN}-atheros-license = "/lib/firmware/LICENCE.atheros_firmware" | ||
75 | |||
76 | LICENSE_${PN}-9170 = "Firmware-atheros_firmware" | ||
77 | FILES_${PN}-ar9170 = " \ | ||
78 | /lib/firmware/ar9170*.fw \ | ||
79 | " | ||
80 | RDEPENDS_${PN}-ar9170 += "${PN}-atheros-license" | ||
81 | |||
82 | LICENSE_${PN}-ar3k = "Firmware-atheros_firmware" | ||
83 | FILES_${PN}-ar3k = " \ | ||
84 | /lib/firmware/ar3k \ | ||
85 | " | ||
86 | RDEPENDS_${PN}-ath6k += "${PN}-atheros-license" | ||
87 | |||
88 | LICENSE_${PN}-ath6k = "Firmware-atheros_firmware" | ||
89 | FILES_${PN}-ath6k = " \ | ||
90 | /lib/firmware/ath6k \ | ||
91 | " | ||
92 | RDEPENDS_${PN}-ath6k += "${PN}-atheros-license" | ||
93 | |||
94 | LICENSE_${PN}-ath9k = "Firmware-atheros_firmware" | ||
95 | FILES_${PN}-ath9k = " \ | ||
96 | /lib/firmware/ar9271.fw \ | ||
97 | /lib/firmware/ar7010*.fw \ | ||
98 | /lib/firmware/htc_9271.fw \ | ||
99 | /lib/firmware/htc_7010.fw \ | ||
100 | " | ||
101 | RDEPENDS_${PN}-ath9k += "${PN}-atheros-license" | ||
102 | |||
103 | LICENSE_${PN}-ralink = "Firmware-ralink" | ||
104 | FILES_${PN}-ralink = " \ | ||
105 | /lib/firmware/rt*.bin \ | ||
106 | /lib/firmware/LICENCE.ralink-firmware.txt \ | ||
107 | " | ||
108 | |||
109 | LICENSE_${PN}-radeon = "Firmware-radeon" | ||
110 | FILES_${PN}-radeon = " \ | ||
111 | /lib/firmware/radeon \ | ||
112 | /lib/firmware/LICENCE.radeon \ | ||
113 | " | ||
114 | |||
115 | FILES_${PN}-marvell-license = "/lib/firmware/LICENCE.Marvell" | ||
116 | |||
117 | LICENSE_${PN}-sd8686 = "Firmware-Marvell" | ||
118 | FILES_${PN}-sd8686 = " \ | ||
119 | /lib/firmware/libertas/sd8686_v9* \ | ||
120 | /lib/firmware/sd8686* \ | ||
121 | " | ||
122 | RDEPENDS_${PN}-sd8686 += "${PN}-marvell-license" | ||
123 | |||
124 | LICENSE_${PN}-sd8787 = "Firmware-Marvell" | ||
125 | FILES_${PN}-sd8787 = " \ | ||
126 | /lib/firmware/mrvl/sd8787_uapsta.bin \ | ||
127 | " | ||
128 | RDEPENDS_${PN}-sd8787 += "${PN}-marvell-license" | ||
129 | |||
130 | LICENSE_${PN}-sd8797 = "Firmware-Marvell" | ||
131 | FILES_${PN}-sd8797 = " \ | ||
132 | /lib/firmware/mrvl/sd8797_uapsta.bin \ | ||
133 | " | ||
134 | RDEPENDS_${PN}-sd8797 += "${PN}-marvell-license" | ||
135 | |||
136 | FILES_${PN}-rtl-license = " \ | ||
137 | /lib/firmware/LICENCE.rtlwifi_firmware.txt \ | ||
138 | " | ||
139 | |||
140 | LICENSE_${PN}-rtl8192cu = "Firmware-rtlwifi" | ||
141 | FILES_${PN}-rtl8192cu = " \ | ||
142 | /lib/firmware/rtlwifi/rtl8192cufw.bin \ | ||
143 | " | ||
144 | RDEPENDS_${PN}-rtl8192cu += "${PN}-rtl-license" | ||
145 | |||
146 | LICENSE_${PN}-rtl8192ce = "Firmware-rtlwifi" | ||
147 | FILES_${PN}-rtl8192ce = " \ | ||
148 | /lib/firmware/rtlwifi/rtl8192cfw.bin \ | ||
149 | " | ||
150 | RDEPENDS_${PN}-rtl8192ce += "${PN}-rtl-license" | ||
151 | |||
152 | |||
153 | LICENSE_${PN}-rtl8192su = "Firmware-rtlwifi" | ||
154 | FILES_${PN}-rtl8192su = " \ | ||
155 | /lib/firmware/rtlwifi/rtl8712u.bin \ | ||
156 | " | ||
157 | |||
158 | LICENSE_${PN}-wl12xx = "Firmware-ti-connectivity" | ||
159 | FILES_${PN}-wl12xx = " \ | ||
160 | /lib/firmware/wl12* \ | ||
161 | /lib/firmware/TI* \ | ||
162 | /lib/firmware/ti-connectivity \ | ||
163 | " | ||
164 | |||
165 | LICENSE_${PN}-wl18xx = "Firmware-ti-connectivity" | ||
166 | FILES_${PN}-wl18xx = " \ | ||
167 | /lib/firmware/wl18* \ | ||
168 | /lib/firmware/TI* \ | ||
169 | /lib/firmware/ti-connectivity \ | ||
170 | " | ||
171 | |||
172 | LICENSE_${PN}-vt6656 = "Firmware-via_vt6656" | ||
173 | FILES_${PN}-vt6656 = " \ | ||
174 | /lib/firmware/vntwusb.fw \ | ||
175 | " | ||
176 | |||
177 | # WARNING: The ALTERNATIVE_* variables are not using ${PN} because of | ||
178 | # a bug in bitbake; when this is fixed and bitbake learns how to proper | ||
179 | # pass variable flags with expansion we can rework this patch. | ||
180 | |||
181 | ALTERNATIVE_LINK_NAME[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac-sdio.bin" | ||
182 | |||
183 | FILES_${PN}-broadcom-license = " \ | ||
184 | /lib/firmware/LICENCE.broadcom_bcm43xx \ | ||
185 | " | ||
186 | |||
187 | LICENSE_${PN}-bcm4329 = "Firmware-bcm4329" | ||
188 | FILES_${PN}-bcm4329 = " \ | ||
189 | /lib/firmware/brcm/brcmfmac4329-sdio.bin \ | ||
190 | " | ||
191 | RDEPENDS_${PN}-bcm4329 += "${PN}-broadcom-license" | ||
192 | ALTERNATIVE_linux-firmware-bcm4329 = "brcmfmac-sdio.bin" | ||
193 | ALTERNATIVE_TARGET_linux-firmware-bcm4329[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4329-sdio.bin" | ||
194 | |||
195 | LICENSE_${PN}-bcm4330 = "Firmware-bcm4330" | ||
196 | FILES_${PN}-bcm4330 = " \ | ||
197 | /lib/firmware/brcm/brcmfmac4330-sdio.bin \ | ||
198 | " | ||
199 | RDEPENDS_${PN}-bcm4330 += "${PN}-broadcom-license" | ||
200 | ALTERNATIVE_linux-firmware-bcm4330 = "brcmfmac-sdio.bin" | ||
201 | ALTERNATIVE_TARGET_linux-firmware-bcm4330[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4330-sdio.bin" | ||
202 | |||
203 | LICENSE_${PN}-bcm4334 = "Firmware-bcm4334" | ||
204 | FILES_${PN}-bcm4334 = " \ | ||
205 | /lib/firmware/brcm/brcmfmac4334-sdio.bin \ | ||
206 | " | ||
207 | RDEPENDS_${PN}-bcm4334 += "${PN}-broadcom-license" | ||
208 | ALTERNATIVE_linux-firmware-bcm4334 = "brcmfmac-sdio.bin" | ||
209 | ALTERNATIVE_TARGET_linux-firmware-bcm4334[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4334-sdio.bin" | ||
210 | |||
211 | RDEPENDS_${PN}-iwlwifi-6000g2a-5 = "${PN}-iwlwifi-license" | ||
212 | RDEPENDS_${PN}-iwlwifi-6000g2a-6 = "${PN}-iwlwifi-license" | ||
213 | RDEPENDS_${PN}-iwlwifi-6000g2b-6 = "${PN}-iwlwifi-license" | ||
214 | RDEPENDS_${PN}-iwlwifi-135-6 = "${PN}-iwlwifi-license" | ||
215 | RDEPENDS_${PN}-iwlwifi-7260-7 = "${PN}-iwlwifi-license" | ||
216 | |||
217 | FILES_${PN}-iwlwifi-license = "/lib/firmware/LICENCE.iwlwifi_firmware" | ||
218 | FILES_${PN}-iwlwifi-6000g2a-5 = "/lib/firmware/iwlwifi-6000g2a-5.ucode" | ||
219 | FILES_${PN}-iwlwifi-6000g2a-6 = "/lib/firmware/iwlwifi-6000g2a-6.ucode" | ||
220 | FILES_${PN}-iwlwifi-6000g2b-6 = "/lib/firmware/iwlwifi-6000g2b-6.ucode" | ||
221 | FILES_${PN}-iwlwifi-135-6 = "/lib/firmware/iwlwifi-135-6.ucode" | ||
222 | FILES_${PN}-iwlwifi-7260-7 = "/lib/firmware/iwlwifi-7260-7.ucode" | ||
223 | |||
224 | FILES_${PN} += "/lib/firmware/*" | ||
225 | |||
226 | # Make linux-firmware depend on all of the split-out packages. | ||
227 | python populate_packages_prepend () { | ||
228 | firmware_pkgs = oe.utils.packages_filter_out_system(d) | ||
229 | d.appendVar('RDEPENDS_linux-firmware', ' ' + ' '.join(firmware_pkgs)) | ||
230 | } | ||
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc new file mode 100644 index 0000000000..b18d09fd6c --- /dev/null +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc | |||
@@ -0,0 +1,73 @@ | |||
1 | SUMMARY = "Sanitized set of kernel headers for the C library's use" | ||
2 | SECTION = "devel" | ||
3 | LICENSE = "GPLv2" | ||
4 | |||
5 | ######################################################################### | ||
6 | #### PLEASE READ | ||
7 | ######################################################################### | ||
8 | # | ||
9 | # You're probably looking here thinking you need to create some new copy | ||
10 | # of linux-libc-headers since you have your own custom kernel. To put | ||
11 | # this simply, you DO NOT. | ||
12 | # | ||
13 | # Why? These headers are used to build the libc. If you customise the | ||
14 | # headers you are customising the libc and the libc becomes machine | ||
15 | # specific. Most people do not add custom libc extensions to the kernel | ||
16 | # and have a machine specific libc. | ||
17 | # | ||
18 | # But you have some kernel headers you need for some driver? That is fine | ||
19 | # but get them from STAGING_KERNEL_DIR where the kernel installs itself. | ||
20 | # This will make the package using them machine specific but this is much | ||
21 | # better than having a machine specific C library. This does mean your | ||
22 | # recipe needs a DEPENDS += "virtual/kernel" but again, that is fine and | ||
23 | # makes total sense. | ||
24 | # | ||
25 | # There can also be a case where your kernel extremely old and you want | ||
26 | # an older libc ABI for that old kernel. The headers installed by this | ||
27 | # recipe should still be a standard mainline kernel, not your own custom | ||
28 | # one. | ||
29 | # | ||
30 | # -- RP | ||
31 | |||
32 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | ||
33 | |||
34 | python __anonymous () { | ||
35 | major = d.getVar("PV",True).split('.')[0] | ||
36 | if major == "3": | ||
37 | d.setVar("HEADER_FETCH_VER", "3.0") | ||
38 | else: | ||
39 | d.setVar("HEADER_FETCH_VER", "2.6") | ||
40 | } | ||
41 | |||
42 | inherit kernel-arch | ||
43 | |||
44 | KORG_ARCHIVE_COMPRESSION ?= "bz2" | ||
45 | |||
46 | SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/v${HEADER_FETCH_VER}/linux-${PV}.tar.${KORG_ARCHIVE_COMPRESSION}" | ||
47 | |||
48 | S = "${WORKDIR}/linux-${PV}" | ||
49 | |||
50 | do_configure() { | ||
51 | oe_runmake allnoconfig | ||
52 | } | ||
53 | |||
54 | do_compile () { | ||
55 | } | ||
56 | |||
57 | do_install() { | ||
58 | oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix} | ||
59 | # Kernel should not be exporting this header | ||
60 | rm -f ${D}${exec_prefix}/include/scsi/scsi.h | ||
61 | |||
62 | # The ..install.cmd conflicts between various configure runs | ||
63 | find ${D}${includedir} -name ..install.cmd | xargs rm -f | ||
64 | } | ||
65 | |||
66 | BBCLASSEXTEND = "nativesdk" | ||
67 | |||
68 | #DEPENDS = "cross-linkage" | ||
69 | RDEPENDS_${PN}-dev = "" | ||
70 | RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" | ||
71 | |||
72 | INHIBIT_DEFAULT_DEPS = "1" | ||
73 | DEPENDS += "unifdef-native" | ||
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.16.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.16.bb new file mode 100644 index 0000000000..cedaced2da --- /dev/null +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.16.bb | |||
@@ -0,0 +1,7 @@ | |||
1 | KORG_ARCHIVE_COMPRESSION = "xz" | ||
2 | |||
3 | require linux-libc-headers.inc | ||
4 | |||
5 | SRC_URI[md5sum] = "5c569ed649a0c9711879f333e90c5386" | ||
6 | SRC_URI[sha256sum] = "4813ad7927a7d92e5339a873ab16201b242b2748934f12cb5df9ba2cfe1d77a0" | ||
7 | |||
diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc new file mode 100644 index 0000000000..6b8f1a54b8 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-dtb.inc | |||
@@ -0,0 +1,69 @@ | |||
1 | # Support for device tree generation | ||
2 | FILES_kernel-devicetree = "/${KERNEL_IMAGEDEST}/devicetree*" | ||
3 | |||
4 | python __anonymous () { | ||
5 | d.appendVar("PACKAGES", " kernel-devicetree") | ||
6 | } | ||
7 | |||
8 | do_install_append() { | ||
9 | if test -n "${KERNEL_DEVICETREE}"; then | ||
10 | for DTB in ${KERNEL_DEVICETREE}; do | ||
11 | if echo ${DTB} | grep -q '/dts/'; then | ||
12 | bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used." | ||
13 | DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'` | ||
14 | fi | ||
15 | DTB_BASE_NAME=`basename ${DTB} .dtb` | ||
16 | DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` | ||
17 | DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` | ||
18 | DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}" | ||
19 | oe_runmake ${DTB} | ||
20 | if [ ! -e "${DTB_PATH}" ]; then | ||
21 | DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}" | ||
22 | fi | ||
23 | install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb | ||
24 | done | ||
25 | fi | ||
26 | } | ||
27 | |||
28 | do_deploy_append() { | ||
29 | if test -n "${KERNEL_DEVICETREE}"; then | ||
30 | for DTB in ${KERNEL_DEVICETREE}; do | ||
31 | if echo ${DTB} | grep -q '/dts/'; then | ||
32 | bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used." | ||
33 | DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'` | ||
34 | fi | ||
35 | DTB_BASE_NAME=`basename ${DTB} .dtb` | ||
36 | DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` | ||
37 | DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` | ||
38 | DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}" | ||
39 | if [ ! -e "${DTB_PATH}" ]; then | ||
40 | DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}" | ||
41 | fi | ||
42 | install -d ${DEPLOYDIR} | ||
43 | install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.dtb | ||
44 | cd ${DEPLOYDIR} | ||
45 | ln -sf ${DTB_NAME}.dtb ${DTB_SYMLINK_NAME}.dtb | ||
46 | cd - | ||
47 | done | ||
48 | fi | ||
49 | } | ||
50 | |||
51 | pkg_postinst_kernel-devicetree () { | ||
52 | cd /${KERNEL_IMAGEDEST} | ||
53 | for DTB_FILE in ${KERNEL_DEVICETREE} | ||
54 | do | ||
55 | DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "." '{print $1}'` | ||
56 | DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` | ||
57 | update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.dtb ${DTB_BASE_NAME}.dtb devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true | ||
58 | done | ||
59 | } | ||
60 | |||
61 | pkg_postrm_kernel-devicetree () { | ||
62 | cd /${KERNEL_IMAGEDEST} | ||
63 | for DTB_FILE in ${KERNEL_DEVICETREE} | ||
64 | do | ||
65 | DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "." '{print $1}'` | ||
66 | DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` | ||
67 | update-alternatives --remove ${DTB_BASE_NAME}.dtb devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true | ||
68 | done | ||
69 | } | ||
diff --git a/meta/recipes-kernel/linux/linux-dummy.bb b/meta/recipes-kernel/linux/linux-dummy.bb new file mode 100644 index 0000000000..8f25f17e6f --- /dev/null +++ b/meta/recipes-kernel/linux/linux-dummy.bb | |||
@@ -0,0 +1,50 @@ | |||
1 | SUMMARY = "Dummy Linux kernel" | ||
2 | DESCRIPTION = "Dummy Linux kernel, to be selected as the preferred \ | ||
3 | provider for virtual/kernel to satisfy dependencies for situations \ | ||
4 | where you wish to build the kernel externally from the build system." | ||
5 | SECTION = "kernel" | ||
6 | |||
7 | LICENSE = "GPLv2" | ||
8 | LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe" | ||
9 | |||
10 | PROVIDES += "virtual/kernel" | ||
11 | |||
12 | PACKAGES_DYNAMIC += "^kernel-module-.*" | ||
13 | PACKAGES_DYNAMIC += "^kernel-image-.*" | ||
14 | PACKAGES_DYNAMIC += "^kernel-firmware-.*" | ||
15 | |||
16 | PACKAGES += "kernel-modules" | ||
17 | FILES_kernel-modules = "" | ||
18 | ALLOW_EMPTY_kernel-modules = "1" | ||
19 | DESCRIPTION_kernel-modules = "Kernel modules meta package" | ||
20 | |||
21 | #COMPATIBLE_MACHINE = "your_machine" | ||
22 | |||
23 | PR = "r1" | ||
24 | |||
25 | SRC_URI = "file://COPYING.GPL" | ||
26 | S = "${WORKDIR}" | ||
27 | |||
28 | do_configure() { | ||
29 | : | ||
30 | } | ||
31 | |||
32 | do_compile () { | ||
33 | : | ||
34 | } | ||
35 | |||
36 | do_install() { | ||
37 | : | ||
38 | } | ||
39 | |||
40 | do_bundle_initramfs() { | ||
41 | : | ||
42 | } | ||
43 | |||
44 | do_deploy() { | ||
45 | : | ||
46 | } | ||
47 | |||
48 | addtask bundle_initramfs after do_install before do_deploy | ||
49 | addtask deploy after do_install | ||
50 | |||
diff --git a/meta/recipes-kernel/linux/linux-dummy/COPYING.GPL b/meta/recipes-kernel/linux/linux-dummy/COPYING.GPL new file mode 100644 index 0000000000..d511905c16 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-dummy/COPYING.GPL | |||
@@ -0,0 +1,339 @@ | |||
1 | GNU GENERAL PUBLIC LICENSE | ||
2 | Version 2, June 1991 | ||
3 | |||
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., | ||
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
6 | Everyone is permitted to copy and distribute verbatim copies | ||
7 | of this license document, but changing it is not allowed. | ||
8 | |||
9 | Preamble | ||
10 | |||
11 | The licenses for most software are designed to take away your | ||
12 | freedom to share and change it. By contrast, the GNU General Public | ||
13 | License is intended to guarantee your freedom to share and change free | ||
14 | software--to make sure the software is free for all its users. This | ||
15 | General Public License applies to most of the Free Software | ||
16 | Foundation's software and to any other program whose authors commit to | ||
17 | using it. (Some other Free Software Foundation software is covered by | ||
18 | the GNU Lesser General Public License instead.) You can apply it to | ||
19 | your programs, too. | ||
20 | |||
21 | When we speak of free software, we are referring to freedom, not | ||
22 | price. Our General Public Licenses are designed to make sure that you | ||
23 | have the freedom to distribute copies of free software (and charge for | ||
24 | this service if you wish), that you receive source code or can get it | ||
25 | if you want it, that you can change the software or use pieces of it | ||
26 | in new free programs; and that you know you can do these things. | ||
27 | |||
28 | To protect your rights, we need to make restrictions that forbid | ||
29 | anyone to deny you these rights or to ask you to surrender the rights. | ||
30 | These restrictions translate to certain responsibilities for you if you | ||
31 | distribute copies of the software, or if you modify it. | ||
32 | |||
33 | For example, if you distribute copies of such a program, whether | ||
34 | gratis or for a fee, you must give the recipients all the rights that | ||
35 | you have. You must make sure that they, too, receive or can get the | ||
36 | source code. And you must show them these terms so they know their | ||
37 | rights. | ||
38 | |||
39 | We protect your rights with two steps: (1) copyright the software, and | ||
40 | (2) offer you this license which gives you legal permission to copy, | ||
41 | distribute and/or modify the software. | ||
42 | |||
43 | Also, for each author's protection and ours, we want to make certain | ||
44 | that everyone understands that there is no warranty for this free | ||
45 | software. If the software is modified by someone else and passed on, we | ||
46 | want its recipients to know that what they have is not the original, so | ||
47 | that any problems introduced by others will not reflect on the original | ||
48 | authors' reputations. | ||
49 | |||
50 | Finally, any free program is threatened constantly by software | ||
51 | patents. We wish to avoid the danger that redistributors of a free | ||
52 | program will individually obtain patent licenses, in effect making the | ||
53 | program proprietary. To prevent this, we have made it clear that any | ||
54 | patent must be licensed for everyone's free use or not licensed at all. | ||
55 | |||
56 | The precise terms and conditions for copying, distribution and | ||
57 | modification follow. | ||
58 | |||
59 | GNU GENERAL PUBLIC LICENSE | ||
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
61 | |||
62 | 0. This License applies to any program or other work which contains | ||
63 | a notice placed by the copyright holder saying it may be distributed | ||
64 | under the terms of this General Public License. The "Program", below, | ||
65 | refers to any such program or work, and a "work based on the Program" | ||
66 | means either the Program or any derivative work under copyright law: | ||
67 | that is to say, a work containing the Program or a portion of it, | ||
68 | either verbatim or with modifications and/or translated into another | ||
69 | language. (Hereinafter, translation is included without limitation in | ||
70 | the term "modification".) Each licensee is addressed as "you". | ||
71 | |||
72 | Activities other than copying, distribution and modification are not | ||
73 | covered by this License; they are outside its scope. The act of | ||
74 | running the Program is not restricted, and the output from the Program | ||
75 | is covered only if its contents constitute a work based on the | ||
76 | Program (independent of having been made by running the Program). | ||
77 | Whether that is true depends on what the Program does. | ||
78 | |||
79 | 1. You may copy and distribute verbatim copies of the Program's | ||
80 | source code as you receive it, in any medium, provided that you | ||
81 | conspicuously and appropriately publish on each copy an appropriate | ||
82 | copyright notice and disclaimer of warranty; keep intact all the | ||
83 | notices that refer to this License and to the absence of any warranty; | ||
84 | and give any other recipients of the Program a copy of this License | ||
85 | along with the Program. | ||
86 | |||
87 | You may charge a fee for the physical act of transferring a copy, and | ||
88 | you may at your option offer warranty protection in exchange for a fee. | ||
89 | |||
90 | 2. You may modify your copy or copies of the Program or any portion | ||
91 | of it, thus forming a work based on the Program, and copy and | ||
92 | distribute such modifications or work under the terms of Section 1 | ||
93 | above, provided that you also meet all of these conditions: | ||
94 | |||
95 | a) You must cause the modified files to carry prominent notices | ||
96 | stating that you changed the files and the date of any change. | ||
97 | |||
98 | b) You must cause any work that you distribute or publish, that in | ||
99 | whole or in part contains or is derived from the Program or any | ||
100 | part thereof, to be licensed as a whole at no charge to all third | ||
101 | parties under the terms of this License. | ||
102 | |||
103 | c) If the modified program normally reads commands interactively | ||
104 | when run, you must cause it, when started running for such | ||
105 | interactive use in the most ordinary way, to print or display an | ||
106 | announcement including an appropriate copyright notice and a | ||
107 | notice that there is no warranty (or else, saying that you provide | ||
108 | a warranty) and that users may redistribute the program under | ||
109 | these conditions, and telling the user how to view a copy of this | ||
110 | License. (Exception: if the Program itself is interactive but | ||
111 | does not normally print such an announcement, your work based on | ||
112 | the Program is not required to print an announcement.) | ||
113 | |||
114 | These requirements apply to the modified work as a whole. If | ||
115 | identifiable sections of that work are not derived from the Program, | ||
116 | and can be reasonably considered independent and separate works in | ||
117 | themselves, then this License, and its terms, do not apply to those | ||
118 | sections when you distribute them as separate works. But when you | ||
119 | distribute the same sections as part of a whole which is a work based | ||
120 | on the Program, the distribution of the whole must be on the terms of | ||
121 | this License, whose permissions for other licensees extend to the | ||
122 | entire whole, and thus to each and every part regardless of who wrote it. | ||
123 | |||
124 | Thus, it is not the intent of this section to claim rights or contest | ||
125 | your rights to work written entirely by you; rather, the intent is to | ||
126 | exercise the right to control the distribution of derivative or | ||
127 | collective works based on the Program. | ||
128 | |||
129 | In addition, mere aggregation of another work not based on the Program | ||
130 | with the Program (or with a work based on the Program) on a volume of | ||
131 | a storage or distribution medium does not bring the other work under | ||
132 | the scope of this License. | ||
133 | |||
134 | 3. You may copy and distribute the Program (or a work based on it, | ||
135 | under Section 2) in object code or executable form under the terms of | ||
136 | Sections 1 and 2 above provided that you also do one of the following: | ||
137 | |||
138 | a) Accompany it with the complete corresponding machine-readable | ||
139 | source code, which must be distributed under the terms of Sections | ||
140 | 1 and 2 above on a medium customarily used for software interchange; or, | ||
141 | |||
142 | b) Accompany it with a written offer, valid for at least three | ||
143 | years, to give any third party, for a charge no more than your | ||
144 | cost of physically performing source distribution, a complete | ||
145 | machine-readable copy of the corresponding source code, to be | ||
146 | distributed under the terms of Sections 1 and 2 above on a medium | ||
147 | customarily used for software interchange; or, | ||
148 | |||
149 | c) Accompany it with the information you received as to the offer | ||
150 | to distribute corresponding source code. (This alternative is | ||
151 | allowed only for noncommercial distribution and only if you | ||
152 | received the program in object code or executable form with such | ||
153 | an offer, in accord with Subsection b above.) | ||
154 | |||
155 | The source code for a work means the preferred form of the work for | ||
156 | making modifications to it. For an executable work, complete source | ||
157 | code means all the source code for all modules it contains, plus any | ||
158 | associated interface definition files, plus the scripts used to | ||
159 | control compilation and installation of the executable. However, as a | ||
160 | special exception, the source code distributed need not include | ||
161 | anything that is normally distributed (in either source or binary | ||
162 | form) with the major components (compiler, kernel, and so on) of the | ||
163 | operating system on which the executable runs, unless that component | ||
164 | itself accompanies the executable. | ||
165 | |||
166 | If distribution of executable or object code is made by offering | ||
167 | access to copy from a designated place, then offering equivalent | ||
168 | access to copy the source code from the same place counts as | ||
169 | distribution of the source code, even though third parties are not | ||
170 | compelled to copy the source along with the object code. | ||
171 | |||
172 | 4. You may not copy, modify, sublicense, or distribute the Program | ||
173 | except as expressly provided under this License. Any attempt | ||
174 | otherwise to copy, modify, sublicense or distribute the Program is | ||
175 | void, and will automatically terminate your rights under this License. | ||
176 | However, parties who have received copies, or rights, from you under | ||
177 | this License will not have their licenses terminated so long as such | ||
178 | parties remain in full compliance. | ||
179 | |||
180 | 5. You are not required to accept this License, since you have not | ||
181 | signed it. However, nothing else grants you permission to modify or | ||
182 | distribute the Program or its derivative works. These actions are | ||
183 | prohibited by law if you do not accept this License. Therefore, by | ||
184 | modifying or distributing the Program (or any work based on the | ||
185 | Program), you indicate your acceptance of this License to do so, and | ||
186 | all its terms and conditions for copying, distributing or modifying | ||
187 | the Program or works based on it. | ||
188 | |||
189 | 6. Each time you redistribute the Program (or any work based on the | ||
190 | Program), the recipient automatically receives a license from the | ||
191 | original licensor to copy, distribute or modify the Program subject to | ||
192 | these terms and conditions. You may not impose any further | ||
193 | restrictions on the recipients' exercise of the rights granted herein. | ||
194 | You are not responsible for enforcing compliance by third parties to | ||
195 | this License. | ||
196 | |||
197 | 7. If, as a consequence of a court judgment or allegation of patent | ||
198 | infringement or for any other reason (not limited to patent issues), | ||
199 | conditions are imposed on you (whether by court order, agreement or | ||
200 | otherwise) that contradict the conditions of this License, they do not | ||
201 | excuse you from the conditions of this License. If you cannot | ||
202 | distribute so as to satisfy simultaneously your obligations under this | ||
203 | License and any other pertinent obligations, then as a consequence you | ||
204 | may not distribute the Program at all. For example, if a patent | ||
205 | license would not permit royalty-free redistribution of the Program by | ||
206 | all those who receive copies directly or indirectly through you, then | ||
207 | the only way you could satisfy both it and this License would be to | ||
208 | refrain entirely from distribution of the Program. | ||
209 | |||
210 | If any portion of this section is held invalid or unenforceable under | ||
211 | any particular circumstance, the balance of the section is intended to | ||
212 | apply and the section as a whole is intended to apply in other | ||
213 | circumstances. | ||
214 | |||
215 | It is not the purpose of this section to induce you to infringe any | ||
216 | patents or other property right claims or to contest validity of any | ||
217 | such claims; this section has the sole purpose of protecting the | ||
218 | integrity of the free software distribution system, which is | ||
219 | implemented by public license practices. Many people have made | ||
220 | generous contributions to the wide range of software distributed | ||
221 | through that system in reliance on consistent application of that | ||
222 | system; it is up to the author/donor to decide if he or she is willing | ||
223 | to distribute software through any other system and a licensee cannot | ||
224 | impose that choice. | ||
225 | |||
226 | This section is intended to make thoroughly clear what is believed to | ||
227 | be a consequence of the rest of this License. | ||
228 | |||
229 | 8. If the distribution and/or use of the Program is restricted in | ||
230 | certain countries either by patents or by copyrighted interfaces, the | ||
231 | original copyright holder who places the Program under this License | ||
232 | may add an explicit geographical distribution limitation excluding | ||
233 | those countries, so that distribution is permitted only in or among | ||
234 | countries not thus excluded. In such case, this License incorporates | ||
235 | the limitation as if written in the body of this License. | ||
236 | |||
237 | 9. The Free Software Foundation may publish revised and/or new versions | ||
238 | of the General Public License from time to time. Such new versions will | ||
239 | be similar in spirit to the present version, but may differ in detail to | ||
240 | address new problems or concerns. | ||
241 | |||
242 | Each version is given a distinguishing version number. If the Program | ||
243 | specifies a version number of this License which applies to it and "any | ||
244 | later version", you have the option of following the terms and conditions | ||
245 | either of that version or of any later version published by the Free | ||
246 | Software Foundation. If the Program does not specify a version number of | ||
247 | this License, you may choose any version ever published by the Free Software | ||
248 | Foundation. | ||
249 | |||
250 | 10. If you wish to incorporate parts of the Program into other free | ||
251 | programs whose distribution conditions are different, write to the author | ||
252 | to ask for permission. For software which is copyrighted by the Free | ||
253 | Software Foundation, write to the Free Software Foundation; we sometimes | ||
254 | make exceptions for this. Our decision will be guided by the two goals | ||
255 | of preserving the free status of all derivatives of our free software and | ||
256 | of promoting the sharing and reuse of software generally. | ||
257 | |||
258 | NO WARRANTY | ||
259 | |||
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY | ||
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN | ||
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES | ||
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED | ||
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS | ||
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE | ||
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, | ||
268 | REPAIR OR CORRECTION. | ||
269 | |||
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | ||
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR | ||
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, | ||
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING | ||
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED | ||
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY | ||
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER | ||
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE | ||
278 | POSSIBILITY OF SUCH DAMAGES. | ||
279 | |||
280 | END OF TERMS AND CONDITIONS | ||
281 | |||
282 | How to Apply These Terms to Your New Programs | ||
283 | |||
284 | If you develop a new program, and you want it to be of the greatest | ||
285 | possible use to the public, the best way to achieve this is to make it | ||
286 | free software which everyone can redistribute and change under these terms. | ||
287 | |||
288 | To do so, attach the following notices to the program. It is safest | ||
289 | to attach them to the start of each source file to most effectively | ||
290 | convey the exclusion of warranty; and each file should have at least | ||
291 | the "copyright" line and a pointer to where the full notice is found. | ||
292 | |||
293 | <one line to give the program's name and a brief idea of what it does.> | ||
294 | Copyright (C) <year> <name of author> | ||
295 | |||
296 | This program is free software; you can redistribute it and/or modify | ||
297 | it under the terms of the GNU General Public License as published by | ||
298 | the Free Software Foundation; either version 2 of the License, or | ||
299 | (at your option) any later version. | ||
300 | |||
301 | This program is distributed in the hope that it will be useful, | ||
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
304 | GNU General Public License for more details. | ||
305 | |||
306 | You should have received a copy of the GNU General Public License along | ||
307 | with this program; if not, write to the Free Software Foundation, Inc., | ||
308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
309 | |||
310 | Also add information on how to contact you by electronic and paper mail. | ||
311 | |||
312 | If the program is interactive, make it output a short notice like this | ||
313 | when it starts in an interactive mode: | ||
314 | |||
315 | Gnomovision version 69, Copyright (C) year name of author | ||
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. | ||
317 | This is free software, and you are welcome to redistribute it | ||
318 | under certain conditions; type `show c' for details. | ||
319 | |||
320 | The hypothetical commands `show w' and `show c' should show the appropriate | ||
321 | parts of the General Public License. Of course, the commands you use may | ||
322 | be called something other than `show w' and `show c'; they could even be | ||
323 | mouse-clicks or menu items--whatever suits your program. | ||
324 | |||
325 | You should also get your employer (if you work as a programmer) or your | ||
326 | school, if any, to sign a "copyright disclaimer" for the program, if | ||
327 | necessary. Here is a sample; alter the names: | ||
328 | |||
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program | ||
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. | ||
331 | |||
332 | <signature of Ty Coon>, 1 April 1989 | ||
333 | Ty Coon, President of Vice | ||
334 | |||
335 | This General Public License does not permit incorporating your program into | ||
336 | proprietary programs. If your program is a subroutine library, you may | ||
337 | consider it more useful to permit linking proprietary applications with the | ||
338 | library. If this is what you want to do, use the GNU Lesser General | ||
339 | Public License instead of this License. | ||
diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb b/meta/recipes-kernel/linux/linux-yocto-dev.bb new file mode 100644 index 0000000000..00feadedd8 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto-dev.bb | |||
@@ -0,0 +1,50 @@ | |||
1 | # This recipe tracks the linux-yocto-dev repository as its upstream source. | ||
2 | # Since this tree is frequently updated, and periodically rebuilt, AUTOREV is | ||
3 | # used to track its contents. | ||
4 | # | ||
5 | # This recipe is just like other linux-yocto variants, with the only difference | ||
6 | # being that to avoid network access during initial parsing, static SRCREVs are | ||
7 | # provided and overridden if the preferred kernel provider is linux-yocto-dev. | ||
8 | # | ||
9 | # To enable this recipe, set PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-dev" | ||
10 | |||
11 | inherit kernel | ||
12 | require recipes-kernel/linux/linux-yocto.inc | ||
13 | |||
14 | # provide this .inc to set specific revisions | ||
15 | include recipes-kernel/linux/linux-yocto-dev-revisions.inc | ||
16 | |||
17 | # Skip processing of this recipe if it is not explicitly specified as the | ||
18 | # PREFERRED_PROVIDER for virtual/kernel. This avoids network access required | ||
19 | # by the use of AUTOREV SRCREVs, which are the default for this recipe. | ||
20 | python () { | ||
21 | if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-dev": | ||
22 | raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-dev to enable it") | ||
23 | } | ||
24 | |||
25 | KBRANCH = "standard/base" | ||
26 | KMETA = "meta" | ||
27 | |||
28 | SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta" | ||
29 | |||
30 | # Set default SRCREVs. Both the machine and meta SRCREVs are statically set | ||
31 | # to the korg v3.7 tag, and hence prevent network access during parsing. If | ||
32 | # linux-yocto-dev is the preferred provider, they will be overridden to | ||
33 | # AUTOREV in following anonymous python routine and resolved when the | ||
34 | # variables are finalized. | ||
35 | SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}' | ||
36 | SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}' | ||
37 | |||
38 | LINUX_VERSION ?= "3.17+" | ||
39 | LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}" | ||
40 | PV = "${LINUX_VERSION}+git${SRCPV}" | ||
41 | |||
42 | COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64)" | ||
43 | |||
44 | # Functionality flags | ||
45 | KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" | ||
46 | KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" | ||
47 | KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" | ||
48 | KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc" | ||
49 | KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" | ||
50 | |||
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb b/meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb new file mode 100644 index 0000000000..36a00cf03b --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb | |||
@@ -0,0 +1,27 @@ | |||
1 | KBRANCH ?= "standard/preempt-rt/base" | ||
2 | KBRANCH_qemuppc ?= "standard/preempt-rt/qemuppc" | ||
3 | |||
4 | require recipes-kernel/linux/linux-yocto.inc | ||
5 | |||
6 | SRCREV_machine ?= "c75818e2932c3c0444ebebfcc0608fecf2440b92" | ||
7 | SRCREV_machine_qemuppc ?= "fc7abf900967db5dea8a8f8648b8a0de7032f8d7" | ||
8 | SRCREV_meta ?= "d5456dd830cad14bd844753b751b83744ced3793" | ||
9 | |||
10 | SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.10.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta" | ||
11 | |||
12 | LINUX_VERSION ?= "3.10.65" | ||
13 | |||
14 | PV = "${LINUX_VERSION}+git${SRCPV}" | ||
15 | |||
16 | KMETA = "meta" | ||
17 | |||
18 | LINUX_KERNEL_TYPE = "preempt-rt" | ||
19 | |||
20 | COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)" | ||
21 | |||
22 | # Functionality flags | ||
23 | KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" | ||
24 | KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" | ||
25 | KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" | ||
26 | KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc" | ||
27 | KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" | ||
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb b/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb new file mode 100644 index 0000000000..fbd331f38e --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb | |||
@@ -0,0 +1,27 @@ | |||
1 | KBRANCH ?= "standard/preempt-rt/base" | ||
2 | KBRANCH_qemuppc ?= "standard/preempt-rt/qemuppc" | ||
3 | |||
4 | require recipes-kernel/linux/linux-yocto.inc | ||
5 | |||
6 | SRCREV_machine ?= "367c3b9712a6e469aed0cb5deebd5d3bfab12b79" | ||
7 | SRCREV_machine_qemuppc ?= "4e827a9b658b6381f6706490e40b6a069a0c4b64" | ||
8 | SRCREV_meta ?= "6eddbf47875ef48ddc5864957a7b63363100782b" | ||
9 | |||
10 | SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta" | ||
11 | |||
12 | LINUX_VERSION ?= "3.14.29" | ||
13 | |||
14 | PV = "${LINUX_VERSION}+git${SRCPV}" | ||
15 | |||
16 | KMETA = "meta" | ||
17 | |||
18 | LINUX_KERNEL_TYPE = "preempt-rt" | ||
19 | |||
20 | COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)" | ||
21 | |||
22 | # Functionality flags | ||
23 | KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" | ||
24 | KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" | ||
25 | KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" | ||
26 | KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" | ||
27 | KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc" | ||
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_3.10.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_3.10.bb new file mode 100644 index 0000000000..3248c4414b --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto-tiny_3.10.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | KBRANCH ?= "standard/tiny/base" | ||
2 | |||
3 | require recipes-kernel/linux/linux-yocto.inc | ||
4 | |||
5 | LINUX_KERNEL_TYPE = "tiny" | ||
6 | KCONFIG_MODE = "--allnoconfig" | ||
7 | |||
8 | LINUX_VERSION ?= "3.10.65" | ||
9 | |||
10 | KMETA = "meta" | ||
11 | |||
12 | SRCREV_machine ?= "a2f2be49cd60b8d022fa47daae0a8293c3066b78" | ||
13 | SRCREV_meta ?= "d5456dd830cad14bd844753b751b83744ced3793" | ||
14 | |||
15 | PV = "${LINUX_VERSION}+git${SRCPV}" | ||
16 | |||
17 | SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.10.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta" | ||
18 | |||
19 | COMPATIBLE_MACHINE = "(qemux86)" | ||
20 | |||
21 | # Functionality flags | ||
22 | KERNEL_FEATURES = "" | ||
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb new file mode 100644 index 0000000000..2d1bc21171 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | KBRANCH ?= "standard/tiny/base" | ||
2 | LINUX_KERNEL_TYPE = "tiny" | ||
3 | KCONFIG_MODE = "--allnoconfig" | ||
4 | |||
5 | require recipes-kernel/linux/linux-yocto.inc | ||
6 | |||
7 | LINUX_VERSION ?= "3.14.29" | ||
8 | |||
9 | KMETA = "meta" | ||
10 | |||
11 | SRCREV_machine ?= "21ba402e0a5286baf0b8960da132e2d56f020c88" | ||
12 | SRCREV_meta ?= "6eddbf47875ef48ddc5864957a7b63363100782b" | ||
13 | |||
14 | PV = "${LINUX_VERSION}+git${SRCPV}" | ||
15 | |||
16 | SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta" | ||
17 | |||
18 | COMPATIBLE_MACHINE = "(qemux86)" | ||
19 | |||
20 | # Functionality flags | ||
21 | KERNEL_FEATURES = "" | ||
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_3.17.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_3.17.bb new file mode 100644 index 0000000000..853f8d0289 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto-tiny_3.17.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | KBRANCH ?= "standard/tiny/base" | ||
2 | LINUX_KERNEL_TYPE = "tiny" | ||
3 | KCONFIG_MODE = "--allnoconfig" | ||
4 | |||
5 | require recipes-kernel/linux/linux-yocto.inc | ||
6 | |||
7 | LINUX_VERSION ?= "3.17.8" | ||
8 | |||
9 | KMETA = "meta" | ||
10 | |||
11 | SRCREV_machine ?= "0409b1fbed221e61212e17b7637fa54f908d83f6" | ||
12 | SRCREV_meta ?= "f24c2bf9c298595d00a9d8600841f2b0206e1fba" | ||
13 | |||
14 | PV = "${LINUX_VERSION}+git${SRCPV}" | ||
15 | |||
16 | SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.17.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta" | ||
17 | |||
18 | COMPATIBLE_MACHINE = "(qemux86)" | ||
19 | |||
20 | # Functionality flags | ||
21 | KERNEL_FEATURES = "" | ||
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc new file mode 100644 index 0000000000..4ed318886f --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto.inc | |||
@@ -0,0 +1,45 @@ | |||
1 | DESCRIPTION = "Yocto Kernel" | ||
2 | SECTION = "kernel" | ||
3 | LICENSE = "GPLv2" | ||
4 | |||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | ||
6 | |||
7 | INC_PR = "r4" | ||
8 | |||
9 | DEPENDS += "xz-native bc-native" | ||
10 | |||
11 | # A KMACHINE is the mapping of a yocto $MACHINE to what is built | ||
12 | # by the kernel. This is typically the branch that should be built, | ||
13 | # and it can be specific to the machine or shared | ||
14 | # KMACHINE = "UNDEFINED" | ||
15 | |||
16 | LINUX_KERNEL_TYPE ?= "standard" | ||
17 | |||
18 | # KMETA ?= "" | ||
19 | KBRANCH ?= "master" | ||
20 | KMACHINE ?= "${MACHINE}" | ||
21 | SRCREV_FORMAT ?= "meta_machine" | ||
22 | |||
23 | LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" | ||
24 | |||
25 | do_patch[depends] = "kern-tools-native:do_populate_sysroot" | ||
26 | |||
27 | addtask kernel_configme before do_configure after do_patch | ||
28 | |||
29 | # Pick up shared functions | ||
30 | inherit kernel | ||
31 | inherit kernel-yocto | ||
32 | require linux-dtb.inc | ||
33 | |||
34 | B = "${WORKDIR}/linux-${PACKAGE_ARCH}-${LINUX_KERNEL_TYPE}-build" | ||
35 | |||
36 | do_install_append(){ | ||
37 | if [ -n "${KMETA}" ]; then | ||
38 | rm -rf ${STAGING_KERNEL_DIR}/${KMETA} | ||
39 | fi | ||
40 | } | ||
41 | |||
42 | # extra tasks | ||
43 | addtask kernel_link_vmlinux after do_compile before do_install | ||
44 | addtask validate_branches before do_patch after do_kernel_checkout | ||
45 | addtask kernel_configcheck after do_configure before do_compile | ||
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.10.bb b/meta/recipes-kernel/linux/linux-yocto_3.10.bb new file mode 100644 index 0000000000..d3cb81662e --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto_3.10.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | KBRANCH ?= "standard/base" | ||
2 | |||
3 | require recipes-kernel/linux/linux-yocto.inc | ||
4 | |||
5 | # board specific branches | ||
6 | KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs" | ||
7 | KBRANCH_qemumips ?= "standard/mti-malta32" | ||
8 | KBRANCH_qemuppc ?= "standard/qemuppc" | ||
9 | KBRANCH_qemux86 ?= "standard/common-pc/base" | ||
10 | KBRANCH_qemux86-64 ?= "standard/common-pc-64/base" | ||
11 | KBRANCH_qemumips64 ?= "standard/mti-malta64" | ||
12 | |||
13 | SRCREV_machine_qemuarm ?= "7a8c197b86281f9a445e23378fdfeeb4da0c48e9" | ||
14 | SRCREV_machine_qemumips ?= "926e71942842a9d1a9f64aae0458b2d777d3bca9" | ||
15 | SRCREV_machine_qemuppc ?= "65648fce58a5e095cfe2bf394bc0f6200efb281c" | ||
16 | SRCREV_machine_qemux86 ?= "a2f2be49cd60b8d022fa47daae0a8293c3066b78" | ||
17 | SRCREV_machine_qemux86-64 ?= "a2f2be49cd60b8d022fa47daae0a8293c3066b78" | ||
18 | SRCREV_machine_qemumips64 ?= "06d173388a171e7371816d74567fdec994925aa4" | ||
19 | SRCREV_machine ?= "a2f2be49cd60b8d022fa47daae0a8293c3066b78" | ||
20 | SRCREV_meta ?= "d5456dd830cad14bd844753b751b83744ced3793" | ||
21 | |||
22 | SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.10.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta" | ||
23 | |||
24 | LINUX_VERSION ?= "3.10.65" | ||
25 | |||
26 | PV = "${LINUX_VERSION}+git${SRCPV}" | ||
27 | |||
28 | KMETA = "meta" | ||
29 | |||
30 | COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" | ||
31 | |||
32 | # Functionality flags | ||
33 | KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" | ||
34 | KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" | ||
35 | KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" | ||
36 | KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc" | ||
37 | KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" | ||
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.14.bb b/meta/recipes-kernel/linux/linux-yocto_3.14.bb new file mode 100644 index 0000000000..9048c1b353 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto_3.14.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | KBRANCH ?= "standard/base" | ||
2 | |||
3 | require recipes-kernel/linux/linux-yocto.inc | ||
4 | |||
5 | # board specific branches | ||
6 | KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs" | ||
7 | KBRANCH_qemumips ?= "standard/mti-malta32" | ||
8 | KBRANCH_qemuppc ?= "standard/qemuppc" | ||
9 | KBRANCH_qemux86 ?= "standard/common-pc/base" | ||
10 | KBRANCH_qemux86-64 ?= "standard/common-pc-64/base" | ||
11 | KBRANCH_qemumips64 ?= "standard/mti-malta64" | ||
12 | |||
13 | SRCREV_machine_qemuarm ?= "c0ed33beda334dcd387dff89da9804c03e24d648" | ||
14 | SRCREV_machine_qemumips ?= "808071c5f72dc98ed2192de28bdd4e9ba2f7e820" | ||
15 | SRCREV_machine_qemuppc ?= "0f93713ce91cc93f055ae6bcf1bf728d4036d097" | ||
16 | SRCREV_machine_qemux86 ?= "f6aa7aaca80e8532316bfb6e8dd2fbf9ab4f8b8e" | ||
17 | SRCREV_machine_qemux86-64 ?= "21ba402e0a5286baf0b8960da132e2d56f020c88" | ||
18 | SRCREV_machine_qemumips64 ?= "f44eb151dc53822f4f94f50b2ec67a0a1aab041b" | ||
19 | SRCREV_machine ?= "21ba402e0a5286baf0b8960da132e2d56f020c88" | ||
20 | SRCREV_meta ?= "6eddbf47875ef48ddc5864957a7b63363100782b" | ||
21 | |||
22 | SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta" | ||
23 | |||
24 | LINUX_VERSION ?= "3.14.29" | ||
25 | |||
26 | PV = "${LINUX_VERSION}+git${SRCPV}" | ||
27 | |||
28 | KMETA = "meta" | ||
29 | |||
30 | COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" | ||
31 | |||
32 | # Functionality flags | ||
33 | KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" | ||
34 | KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" | ||
35 | KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" | ||
36 | KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc" | ||
37 | KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" | ||
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.17.bb b/meta/recipes-kernel/linux/linux-yocto_3.17.bb new file mode 100644 index 0000000000..bba070e0e2 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto_3.17.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | KBRANCH ?= "standard/base" | ||
2 | |||
3 | require recipes-kernel/linux/linux-yocto.inc | ||
4 | |||
5 | # board specific branches | ||
6 | KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs" | ||
7 | KBRANCH_qemumips ?= "standard/mti-malta32" | ||
8 | KBRANCH_qemuppc ?= "standard/qemuppc" | ||
9 | KBRANCH_qemux86 ?= "standard/common-pc" | ||
10 | KBRANCH_qemux86-64 ?= "standard/common-pc-64/base" | ||
11 | KBRANCH_qemumips64 ?= "standard/mti-malta64" | ||
12 | |||
13 | SRCREV_machine_qemuarm ?= "12991e8ac40c51ef3e337f17f12aa59c6500fc7f" | ||
14 | SRCREV_machine_qemumips ?= "1f4735ed314defc95ab9929258ad12844cc2c676" | ||
15 | SRCREV_machine_qemuppc ?= "3231dececf867215ecab7c7f9ec3a7a7640a3f32" | ||
16 | SRCREV_machine_qemux86 ?= "0409b1fbed221e61212e17b7637fa54f908d83f6" | ||
17 | SRCREV_machine_qemux86-64 ?= "0409b1fbed221e61212e17b7637fa54f908d83f6" | ||
18 | SRCREV_machine_qemumips64 ?= "7005c584078109dae03567e9c597a847a2bc5136" | ||
19 | SRCREV_machine ?= "0409b1fbed221e61212e17b7637fa54f908d83f6" | ||
20 | SRCREV_meta ?= "f24c2bf9c298595d00a9d8600841f2b0206e1fba" | ||
21 | |||
22 | SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.17.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta" | ||
23 | |||
24 | LINUX_VERSION ?= "3.17.8" | ||
25 | |||
26 | PV = "${LINUX_VERSION}+git${SRCPV}" | ||
27 | |||
28 | KMETA = "meta" | ||
29 | |||
30 | COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" | ||
31 | |||
32 | # Functionality flags | ||
33 | KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" | ||
34 | KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" | ||
35 | KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" | ||
36 | KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc" | ||
37 | KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" | ||
diff --git a/meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch b/meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch new file mode 100644 index 0000000000..258eedd3ba --- /dev/null +++ b/meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | Upstream-Status: backport | ||
2 | |||
3 | babeltrace: Fix support out of tree builds in babeltrace | ||
4 | |||
5 | Signed-off-by: Lars Persson <larper@axis.com> | ||
6 | |||
7 | diff --git a/formats/lttng-live/Makefile.am b/formats/lttng-live/Makefile.am | ||
8 | index c834699..2c6b0bd 100644 | ||
9 | --- a/formats/lttng-live/Makefile.am | ||
10 | +++ b/formats/lttng-live/Makefile.am | ||
11 | @@ -1,4 +1,4 @@ | ||
12 | -AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_builddir)/include | ||
13 | +AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir) | ||
14 | |||
15 | lib_LTLIBRARIES = libbabeltrace-lttng-live.la | ||
16 | |||
17 | |||
diff --git a/meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch b/meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch new file mode 100644 index 0000000000..ea0aad699d --- /dev/null +++ b/meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch | |||
@@ -0,0 +1,252 @@ | |||
1 | From 6a0b6cd5133db9e3c72914d4e5dd7fc792360934 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
3 | Date: Wed, 16 Jul 2014 10:58:48 -0400 | ||
4 | Subject: [PATCH] Fix: don't perform unaligned integer read/writes | ||
5 | |||
6 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
7 | |||
8 | Upstream-Status: Backport | ||
9 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
10 | |||
11 | --- | ||
12 | formats/ctf/types/integer.c | 108 ++++++++++++++++++++++++++++---------------- | ||
13 | 1 file changed, 70 insertions(+), 38 deletions(-) | ||
14 | |||
15 | diff --git a/formats/ctf/types/integer.c b/formats/ctf/types/integer.c | ||
16 | index 189943e..85931be 100644 | ||
17 | --- a/formats/ctf/types/integer.c | ||
18 | +++ b/formats/ctf/types/integer.c | ||
19 | @@ -62,7 +62,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, | ||
20 | { | ||
21 | uint8_t v; | ||
22 | |||
23 | - v = *(const uint8_t *) ctf_get_pos_addr(pos); | ||
24 | + memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); | ||
25 | integer_definition->value._unsigned = v; | ||
26 | break; | ||
27 | } | ||
28 | @@ -70,7 +70,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, | ||
29 | { | ||
30 | uint16_t v; | ||
31 | |||
32 | - v = *(const uint16_t *) ctf_get_pos_addr(pos); | ||
33 | + memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); | ||
34 | integer_definition->value._unsigned = | ||
35 | rbo ? GUINT16_SWAP_LE_BE(v) : v; | ||
36 | break; | ||
37 | @@ -79,7 +79,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, | ||
38 | { | ||
39 | uint32_t v; | ||
40 | |||
41 | - v = *(const uint32_t *) ctf_get_pos_addr(pos); | ||
42 | + memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); | ||
43 | integer_definition->value._unsigned = | ||
44 | rbo ? GUINT32_SWAP_LE_BE(v) : v; | ||
45 | break; | ||
46 | @@ -88,7 +88,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, | ||
47 | { | ||
48 | uint64_t v; | ||
49 | |||
50 | - v = *(const uint64_t *) ctf_get_pos_addr(pos); | ||
51 | + memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); | ||
52 | integer_definition->value._unsigned = | ||
53 | rbo ? GUINT64_SWAP_LE_BE(v) : v; | ||
54 | break; | ||
55 | @@ -102,7 +102,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, | ||
56 | { | ||
57 | int8_t v; | ||
58 | |||
59 | - v = *(const int8_t *) ctf_get_pos_addr(pos); | ||
60 | + memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); | ||
61 | integer_definition->value._signed = v; | ||
62 | break; | ||
63 | } | ||
64 | @@ -110,7 +110,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, | ||
65 | { | ||
66 | int16_t v; | ||
67 | |||
68 | - v = *(const int16_t *) ctf_get_pos_addr(pos); | ||
69 | + memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); | ||
70 | integer_definition->value._signed = | ||
71 | rbo ? (int16_t) GUINT16_SWAP_LE_BE(v) : v; | ||
72 | break; | ||
73 | @@ -119,7 +119,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, | ||
74 | { | ||
75 | int32_t v; | ||
76 | |||
77 | - v = *(const int32_t *) ctf_get_pos_addr(pos); | ||
78 | + memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); | ||
79 | integer_definition->value._signed = | ||
80 | rbo ? (int32_t) GUINT32_SWAP_LE_BE(v) : v; | ||
81 | break; | ||
82 | @@ -128,7 +128,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, | ||
83 | { | ||
84 | int64_t v; | ||
85 | |||
86 | - v = *(const int64_t *) ctf_get_pos_addr(pos); | ||
87 | + memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); | ||
88 | integer_definition->value._signed = | ||
89 | rbo ? (int64_t) GUINT64_SWAP_LE_BE(v) : v; | ||
90 | break; | ||
91 | @@ -163,48 +163,80 @@ int _aligned_integer_write(struct bt_stream_pos *ppos, | ||
92 | if (pos->dummy) | ||
93 | goto end; | ||
94 | if (!integer_declaration->signedness) { | ||
95 | - uint64_t v = integer_definition->value._unsigned; | ||
96 | - | ||
97 | switch (integer_declaration->len) { | ||
98 | - case 8: *(uint8_t *) ctf_get_pos_addr(pos) = (uint8_t) v; | ||
99 | + case 8: | ||
100 | + { | ||
101 | + uint8_t v = integer_definition->value._unsigned; | ||
102 | + | ||
103 | + memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); | ||
104 | break; | ||
105 | + } | ||
106 | case 16: | ||
107 | - *(uint16_t *) ctf_get_pos_addr(pos) = rbo ? | ||
108 | - GUINT16_SWAP_LE_BE((uint16_t) v) : | ||
109 | - (uint16_t) v; | ||
110 | + { | ||
111 | + uint16_t v = integer_definition->value._unsigned; | ||
112 | + | ||
113 | + if (rbo) | ||
114 | + v = GUINT16_SWAP_LE_BE(v); | ||
115 | + memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); | ||
116 | break; | ||
117 | + } | ||
118 | case 32: | ||
119 | - *(uint32_t *) ctf_get_pos_addr(pos) = rbo ? | ||
120 | - GUINT32_SWAP_LE_BE((uint32_t) v) : | ||
121 | - (uint32_t) v; | ||
122 | + { | ||
123 | + uint32_t v = integer_definition->value._unsigned; | ||
124 | + | ||
125 | + if (rbo) | ||
126 | + v = GUINT32_SWAP_LE_BE(v); | ||
127 | + memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); | ||
128 | break; | ||
129 | + } | ||
130 | case 64: | ||
131 | - *(uint64_t *) ctf_get_pos_addr(pos) = rbo ? | ||
132 | - GUINT64_SWAP_LE_BE(v) : v; | ||
133 | + { | ||
134 | + uint64_t v = integer_definition->value._unsigned; | ||
135 | + | ||
136 | + if (rbo) | ||
137 | + v = GUINT64_SWAP_LE_BE(v); | ||
138 | + memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); | ||
139 | break; | ||
140 | + } | ||
141 | default: | ||
142 | assert(0); | ||
143 | } | ||
144 | } else { | ||
145 | - int64_t v = integer_definition->value._signed; | ||
146 | - | ||
147 | switch (integer_declaration->len) { | ||
148 | - case 8: *(int8_t *) ctf_get_pos_addr(pos) = (int8_t) v; | ||
149 | + case 8: | ||
150 | + { | ||
151 | + uint8_t v = integer_definition->value._signed; | ||
152 | + | ||
153 | + memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); | ||
154 | break; | ||
155 | + } | ||
156 | case 16: | ||
157 | - *(int16_t *) ctf_get_pos_addr(pos) = rbo ? | ||
158 | - (int16_t) GUINT16_SWAP_LE_BE((int16_t) v) : | ||
159 | - (int16_t) v; | ||
160 | + { | ||
161 | + int16_t v = integer_definition->value._signed; | ||
162 | + | ||
163 | + if (rbo) | ||
164 | + v = GUINT16_SWAP_LE_BE(v); | ||
165 | + memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); | ||
166 | break; | ||
167 | + } | ||
168 | case 32: | ||
169 | - *(int32_t *) ctf_get_pos_addr(pos) = rbo ? | ||
170 | - (int32_t) GUINT32_SWAP_LE_BE((int32_t) v) : | ||
171 | - (int32_t) v; | ||
172 | + { | ||
173 | + int32_t v = integer_definition->value._signed; | ||
174 | + | ||
175 | + if (rbo) | ||
176 | + v = GUINT32_SWAP_LE_BE(v); | ||
177 | + memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); | ||
178 | break; | ||
179 | + } | ||
180 | case 64: | ||
181 | - *(int64_t *) ctf_get_pos_addr(pos) = rbo ? | ||
182 | - GUINT64_SWAP_LE_BE(v) : v; | ||
183 | + { | ||
184 | + int64_t v = integer_definition->value._signed; | ||
185 | + | ||
186 | + if (rbo) | ||
187 | + v = GUINT64_SWAP_LE_BE(v); | ||
188 | + memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); | ||
189 | break; | ||
190 | + } | ||
191 | default: | ||
192 | assert(0); | ||
193 | } | ||
194 | @@ -237,23 +269,23 @@ int ctf_integer_read(struct bt_stream_pos *ppos, struct bt_definition *definitio | ||
195 | if (!integer_declaration->signedness) { | ||
196 | if (integer_declaration->byte_order == LITTLE_ENDIAN) | ||
197 | bt_bitfield_read_le(mmap_align_addr(pos->base_mma) + | ||
198 | - pos->mmap_base_offset, unsigned long, | ||
199 | + pos->mmap_base_offset, unsigned char, | ||
200 | pos->offset, integer_declaration->len, | ||
201 | &integer_definition->value._unsigned); | ||
202 | else | ||
203 | bt_bitfield_read_be(mmap_align_addr(pos->base_mma) + | ||
204 | - pos->mmap_base_offset, unsigned long, | ||
205 | + pos->mmap_base_offset, unsigned char, | ||
206 | pos->offset, integer_declaration->len, | ||
207 | &integer_definition->value._unsigned); | ||
208 | } else { | ||
209 | if (integer_declaration->byte_order == LITTLE_ENDIAN) | ||
210 | bt_bitfield_read_le(mmap_align_addr(pos->base_mma) + | ||
211 | - pos->mmap_base_offset, unsigned long, | ||
212 | + pos->mmap_base_offset, unsigned char, | ||
213 | pos->offset, integer_declaration->len, | ||
214 | &integer_definition->value._signed); | ||
215 | else | ||
216 | bt_bitfield_read_be(mmap_align_addr(pos->base_mma) + | ||
217 | - pos->mmap_base_offset, unsigned long, | ||
218 | + pos->mmap_base_offset, unsigned char, | ||
219 | pos->offset, integer_declaration->len, | ||
220 | &integer_definition->value._signed); | ||
221 | } | ||
222 | @@ -286,23 +318,23 @@ int ctf_integer_write(struct bt_stream_pos *ppos, struct bt_definition *definiti | ||
223 | if (!integer_declaration->signedness) { | ||
224 | if (integer_declaration->byte_order == LITTLE_ENDIAN) | ||
225 | bt_bitfield_write_le(mmap_align_addr(pos->base_mma) + | ||
226 | - pos->mmap_base_offset, unsigned long, | ||
227 | + pos->mmap_base_offset, unsigned char, | ||
228 | pos->offset, integer_declaration->len, | ||
229 | integer_definition->value._unsigned); | ||
230 | else | ||
231 | bt_bitfield_write_be(mmap_align_addr(pos->base_mma) + | ||
232 | - pos->mmap_base_offset, unsigned long, | ||
233 | + pos->mmap_base_offset, unsigned char, | ||
234 | pos->offset, integer_declaration->len, | ||
235 | integer_definition->value._unsigned); | ||
236 | } else { | ||
237 | if (integer_declaration->byte_order == LITTLE_ENDIAN) | ||
238 | bt_bitfield_write_le(mmap_align_addr(pos->base_mma) + | ||
239 | - pos->mmap_base_offset, unsigned long, | ||
240 | + pos->mmap_base_offset, unsigned char, | ||
241 | pos->offset, integer_declaration->len, | ||
242 | integer_definition->value._signed); | ||
243 | else | ||
244 | bt_bitfield_write_be(mmap_align_addr(pos->base_mma) + | ||
245 | - pos->mmap_base_offset, unsigned long, | ||
246 | + pos->mmap_base_offset, unsigned char, | ||
247 | pos->offset, integer_declaration->len, | ||
248 | integer_definition->value._signed); | ||
249 | } | ||
250 | -- | ||
251 | 1.8.3.1 | ||
252 | |||
diff --git a/meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch b/meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch new file mode 100644 index 0000000000..8e81d2d781 --- /dev/null +++ b/meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From cae67efbd9ddf2cee6bbefec076dc8933ababc43 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Fredrik=20Markstr=C3=B6m?= <fredrik.markstrom@gmail.com> | ||
3 | Date: Fri, 16 May 2014 10:10:38 +0800 | ||
4 | Subject: [PATCH] Fix: Align buffers from objstack_alloc on sizeof(void *) | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Upstream-Status: Backport | ||
10 | |||
11 | The buffers from objstack_alloc will store pointers, so they must | ||
12 | be aligned on a pointer's size, or else it will cause issues on the | ||
13 | CPUs which do not support unaligned addresses access. | ||
14 | |||
15 | Signed-off-by: Fredrik Markstrom <fredrik.markstrom@gmail.com> | ||
16 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
17 | Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com> | ||
18 | --- | ||
19 | formats/ctf/metadata/objstack.c | 5 ++++- | ||
20 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/formats/ctf/metadata/objstack.c b/formats/ctf/metadata/objstack.c | ||
23 | index 9e264a4..14d9252 100644 | ||
24 | --- a/formats/ctf/metadata/objstack.c | ||
25 | +++ b/formats/ctf/metadata/objstack.c | ||
26 | @@ -27,6 +27,7 @@ | ||
27 | #include <stdlib.h> | ||
28 | #include <babeltrace/list.h> | ||
29 | #include <babeltrace/babeltrace-internal.h> | ||
30 | +#include <babeltrace/align.h> | ||
31 | |||
32 | #define OBJSTACK_INIT_LEN 128 | ||
33 | #define OBJSTACK_POISON 0xcc | ||
34 | @@ -39,7 +40,7 @@ struct objstack_node { | ||
35 | struct bt_list_head node; | ||
36 | size_t len; | ||
37 | size_t used_len; | ||
38 | - char data[]; | ||
39 | + char __attribute__ ((aligned (sizeof(void *)))) data[]; | ||
40 | }; | ||
41 | |||
42 | BT_HIDDEN | ||
43 | @@ -118,6 +119,8 @@ void *objstack_alloc(struct objstack *objstack, size_t len) | ||
44 | struct objstack_node *last_node; | ||
45 | void *p; | ||
46 | |||
47 | + len = ALIGN(len, sizeof(void *)); | ||
48 | + | ||
49 | /* Get last node */ | ||
50 | last_node = bt_list_entry(objstack->head.prev, | ||
51 | struct objstack_node, node); | ||
52 | -- | ||
53 | 1.7.10.4 | ||
54 | |||
diff --git a/meta/recipes-kernel/lttng/babeltrace_1.2.1.bb b/meta/recipes-kernel/lttng/babeltrace_1.2.1.bb new file mode 100644 index 0000000000..1c41e25827 --- /dev/null +++ b/meta/recipes-kernel/lttng/babeltrace_1.2.1.bb | |||
@@ -0,0 +1,26 @@ | |||
1 | SUMMARY = "Babeltrace - Trace Format Babel Tower" | ||
2 | DESCRIPTION = "Babeltrace provides trace read and write libraries in host side, as well as a trace converter, which used to convert LTTng 2.0 traces into human-readable log." | ||
3 | HOMEPAGE = "http://www.efficios.com/babeltrace/" | ||
4 | BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace" | ||
5 | |||
6 | LICENSE = "MIT & GPLv2" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa" | ||
8 | |||
9 | inherit autotools pkgconfig | ||
10 | |||
11 | DEPENDS = "glib-2.0 util-linux popt bison-native flex-native" | ||
12 | |||
13 | SRCREV = "66c2a20b4391fb5c7f870aeb0dde854f0ae1fc79" | ||
14 | PV = "1.2.1+git${SRCPV}" | ||
15 | |||
16 | SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.2 \ | ||
17 | file://0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch \ | ||
18 | file://Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch \ | ||
19 | file://0001-Fix-don-t-perform-unaligned-integer-read-writes.patch \ | ||
20 | " | ||
21 | |||
22 | S = "${WORKDIR}/git" | ||
23 | |||
24 | do_configure_prepend () { | ||
25 | ( cd ${S}; ${S}/bootstrap ) | ||
26 | } | ||
diff --git a/meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch b/meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch new file mode 100644 index 0000000000..9c3dc9c1e1 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch | |||
@@ -0,0 +1,130 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
3 | |||
4 | From d3de7f1468be0b18145ff85b3c1a7c7fb1d48c15 Mon Sep 17 00:00:00 2001 | ||
5 | From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
6 | Date: Fri, 25 Jul 2014 12:30:43 -0400 | ||
7 | Subject: [PATCH 1/3] Fix: noargs probes should calculate alignment and event | ||
8 | length | ||
9 | |||
10 | A noargs probe could have event fields. noargs just means that the probe | ||
11 | does not receive any argument as parameter. However, it could very well | ||
12 | serialize data into fields (global variables, constants, etc). | ||
13 | |||
14 | It just happens that LTTng does not serialize any data in noargs events | ||
15 | at the moment, but this may very well change. | ||
16 | |||
17 | The if (0) with (void) variable access strategy to stop compiler from | ||
18 | complaining from unused variables does not seem to work as expected with | ||
19 | gcc 4.9.1. Use "unused" attribute instead. | ||
20 | |||
21 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
22 | --- | ||
23 | probes/lttng-events.h | 49 +++++++++++++++++++++++++++++++++++-------------- | ||
24 | 1 file changed, 35 insertions(+), 14 deletions(-) | ||
25 | |||
26 | diff --git a/probes/lttng-events.h b/probes/lttng-events.h | ||
27 | index 596b70608584..ba9563b15cf9 100644 | ||
28 | --- a/probes/lttng-events.h | ||
29 | +++ b/probes/lttng-events.h | ||
30 | @@ -456,10 +456,19 @@ static __used struct lttng_probe_desc TP_ID(__probe_desc___, TRACE_SYSTEM) = { | ||
31 | static inline size_t __event_get_size__##_name(size_t *__dynamic_len, _proto) \ | ||
32 | { \ | ||
33 | size_t __event_len = 0; \ | ||
34 | - unsigned int __dynamic_len_idx = 0; \ | ||
35 | + unsigned int __dynamic_len_idx __attribute__((unused)) = 0; \ | ||
36 | + \ | ||
37 | + _tstruct \ | ||
38 | + return __event_len; \ | ||
39 | +} | ||
40 | + | ||
41 | +#undef DECLARE_EVENT_CLASS_NOARGS | ||
42 | +#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \ | ||
43 | +static inline size_t __event_get_size__##_name(size_t *__dynamic_len) \ | ||
44 | +{ \ | ||
45 | + size_t __event_len = 0; \ | ||
46 | + unsigned int __dynamic_len_idx __attribute__((unused)) = 0; \ | ||
47 | \ | ||
48 | - if (0) \ | ||
49 | - (void) __dynamic_len_idx; /* don't warn if unused */ \ | ||
50 | _tstruct \ | ||
51 | return __event_len; \ | ||
52 | } | ||
53 | @@ -514,6 +523,15 @@ static inline size_t __event_get_align__##_name(_proto) \ | ||
54 | return __event_align; \ | ||
55 | } | ||
56 | |||
57 | +#undef DECLARE_EVENT_CLASS_NOARGS | ||
58 | +#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \ | ||
59 | +static inline size_t __event_get_align__##_name(void) \ | ||
60 | +{ \ | ||
61 | + size_t __event_align = 1; \ | ||
62 | + _tstruct \ | ||
63 | + return __event_align; \ | ||
64 | +} | ||
65 | + | ||
66 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | ||
67 | |||
68 | |||
69 | @@ -553,12 +571,16 @@ static inline size_t __event_get_align__##_name(_proto) \ | ||
70 | #undef TP_STRUCT__entry | ||
71 | #define TP_STRUCT__entry(args...) args | ||
72 | |||
73 | -#undef DECLARE_EVENT_CLASS | ||
74 | -#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \ | ||
75 | +#undef DECLARE_EVENT_CLASS_NOARGS | ||
76 | +#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \ | ||
77 | struct __event_typemap__##_name { \ | ||
78 | _tstruct \ | ||
79 | }; | ||
80 | |||
81 | +#undef DECLARE_EVENT_CLASS | ||
82 | +#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \ | ||
83 | + DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) | ||
84 | + | ||
85 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | ||
86 | |||
87 | |||
88 | @@ -760,15 +782,11 @@ static void __event_probe__##_name(void *__data, _proto) \ | ||
89 | struct lttng_channel *__chan = __event->chan; \ | ||
90 | struct lib_ring_buffer_ctx __ctx; \ | ||
91 | size_t __event_len, __event_align; \ | ||
92 | - size_t __dynamic_len_idx = 0; \ | ||
93 | - size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)]; \ | ||
94 | - struct __event_typemap__##_name __typemap; \ | ||
95 | + size_t __dynamic_len_idx __attribute__((unused)) = 0; \ | ||
96 | + size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)] __attribute__((unused)); \ | ||
97 | + struct __event_typemap__##_name __typemap __attribute__((unused)); \ | ||
98 | int __ret; \ | ||
99 | \ | ||
100 | - if (0) { \ | ||
101 | - (void) __dynamic_len_idx; /* don't warn if unused */ \ | ||
102 | - (void) __typemap; /* don't warn if unused */ \ | ||
103 | - } \ | ||
104 | if (!_TP_SESSION_CHECK(session, __chan->session)) \ | ||
105 | return; \ | ||
106 | if (unlikely(!ACCESS_ONCE(__chan->session->active))) \ | ||
107 | @@ -800,6 +818,9 @@ static void __event_probe__##_name(void *__data) \ | ||
108 | struct lttng_channel *__chan = __event->chan; \ | ||
109 | struct lib_ring_buffer_ctx __ctx; \ | ||
110 | size_t __event_len, __event_align; \ | ||
111 | + size_t __dynamic_len_idx __attribute__((unused)) = 0; \ | ||
112 | + size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)] __attribute__((unused)); \ | ||
113 | + struct __event_typemap__##_name __typemap __attribute__((unused)); \ | ||
114 | int __ret; \ | ||
115 | \ | ||
116 | if (!_TP_SESSION_CHECK(session, __chan->session)) \ | ||
117 | @@ -810,8 +831,8 @@ static void __event_probe__##_name(void *__data) \ | ||
118 | return; \ | ||
119 | if (unlikely(!ACCESS_ONCE(__event->enabled))) \ | ||
120 | return; \ | ||
121 | - __event_len = 0; \ | ||
122 | - __event_align = 1; \ | ||
123 | + __event_len = __event_get_size__##_name(__dynamic_len); \ | ||
124 | + __event_align = __event_get_align__##_name(); \ | ||
125 | lib_ring_buffer_ctx_init(&__ctx, __chan->chan, __event, __event_len, \ | ||
126 | __event_align, -1); \ | ||
127 | __ret = __chan->ops->event_reserve(&__ctx, __event->id); \ | ||
128 | -- | ||
129 | 1.8.1.2 | ||
130 | |||
diff --git a/meta/recipes-kernel/lttng/lttng-modules/Update-compaction-instrumentation-to-3.16-kernel.patch b/meta/recipes-kernel/lttng/lttng-modules/Update-compaction-instrumentation-to-3.16-kernel.patch new file mode 100644 index 0000000000..0a056a9475 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/Update-compaction-instrumentation-to-3.16-kernel.patch | |||
@@ -0,0 +1,83 @@ | |||
1 | From 0007344741ef65259bc52dea72259173dfbf96c0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
3 | Date: Sun, 13 Jul 2014 13:33:21 -0400 | ||
4 | Subject: [PATCH 2/2] Update compaction instrumentation to 3.16 kernel | ||
5 | |||
6 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
7 | --- | ||
8 | instrumentation/events/lttng-module/compaction.h | 45 +++++++++++++++++++++++- | ||
9 | 1 file changed, 44 insertions(+), 1 deletion(-) | ||
10 | |||
11 | diff --git a/instrumentation/events/lttng-module/compaction.h b/instrumentation/events/lttng-module/compaction.h | ||
12 | index 1b237fa45ab0..22024e9ee582 100644 | ||
13 | --- a/instrumentation/events/lttng-module/compaction.h | ||
14 | +++ b/instrumentation/events/lttng-module/compaction.h | ||
15 | @@ -6,6 +6,7 @@ | ||
16 | |||
17 | #include <linux/types.h> | ||
18 | #include <linux/tracepoint.h> | ||
19 | +#include <linux/version.h> | ||
20 | #include <trace/events/gfpflags.h> | ||
21 | |||
22 | DECLARE_EVENT_CLASS(mm_compaction_isolate_template, | ||
23 | @@ -45,6 +46,48 @@ DEFINE_EVENT(mm_compaction_isolate_template, mm_compaction_isolate_freepages, | ||
24 | TP_ARGS(nr_scanned, nr_taken) | ||
25 | ) | ||
26 | |||
27 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) | ||
28 | +TRACE_EVENT(mm_compaction_migratepages, | ||
29 | + | ||
30 | + TP_PROTO(unsigned long nr_all, | ||
31 | + int migrate_rc, | ||
32 | + struct list_head *migratepages), | ||
33 | + | ||
34 | + TP_ARGS(nr_all, migrate_rc, migratepages), | ||
35 | + | ||
36 | + TP_STRUCT__entry( | ||
37 | + __field(unsigned long, nr_migrated) | ||
38 | + __field(unsigned long, nr_failed) | ||
39 | + ), | ||
40 | + | ||
41 | + TP_fast_assign( | ||
42 | + tp_assign(nr_migrated, | ||
43 | + nr_all - | ||
44 | + (migrate_rc >= 0 ? migrate_rc : | ||
45 | + ({ | ||
46 | + unsigned long nr_failed = 0; | ||
47 | + struct list_head *page_lru; | ||
48 | + | ||
49 | + list_for_each(page_lru, migratepages) | ||
50 | + nr_failed++; | ||
51 | + nr_failed; | ||
52 | + }))) | ||
53 | + tp_assign(nr_failed, | ||
54 | + ({ | ||
55 | + unsigned long nr_failed = 0; | ||
56 | + struct list_head *page_lru; | ||
57 | + | ||
58 | + list_for_each(page_lru, migratepages) | ||
59 | + nr_failed++; | ||
60 | + nr_failed; | ||
61 | + })) | ||
62 | + ), | ||
63 | + | ||
64 | + TP_printk("nr_migrated=%lu nr_failed=%lu", | ||
65 | + __entry->nr_migrated, | ||
66 | + __entry->nr_failed) | ||
67 | +) | ||
68 | +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ | ||
69 | TRACE_EVENT(mm_compaction_migratepages, | ||
70 | |||
71 | TP_PROTO(unsigned long nr_migrated, | ||
72 | @@ -66,7 +109,7 @@ TRACE_EVENT(mm_compaction_migratepages, | ||
73 | __entry->nr_migrated, | ||
74 | __entry->nr_failed) | ||
75 | ) | ||
76 | - | ||
77 | +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ | ||
78 | |||
79 | #endif /* _TRACE_COMPACTION_H */ | ||
80 | |||
81 | -- | ||
82 | 1.8.1.2 | ||
83 | |||
diff --git a/meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch b/meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch new file mode 100644 index 0000000000..3541b50b79 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
3 | |||
4 | From 458c2022e992c057bd21d02e4c77bcc7d4d6cd6c Mon Sep 17 00:00:00 2001 | ||
5 | From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
6 | Date: Thu, 21 Aug 2014 11:15:50 -0400 | ||
7 | Subject: [PATCH 3/3] Update kvm instrumentation: compile on 3.17-rc1 | ||
8 | |||
9 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
10 | --- | ||
11 | instrumentation/events/lttng-module/arch/x86/kvm/trace.h | 12 +++++++++++- | ||
12 | 1 file changed, 11 insertions(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h | ||
15 | index 2354884074eb..3c299c58a1cf 100644 | ||
16 | --- a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h | ||
17 | +++ b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h | ||
18 | @@ -724,7 +724,7 @@ TRACE_EVENT(kvm_emulate_insn, | ||
19 | tp_memcpy(insn, | ||
20 | vcpu->arch.emulate_ctxt.decode.fetch.data, | ||
21 | 15) | ||
22 | -#else | ||
23 | +#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) | ||
24 | tp_assign(rip, vcpu->arch.emulate_ctxt.fetch.start) | ||
25 | tp_assign(csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS)) | ||
26 | tp_assign(len, vcpu->arch.emulate_ctxt._eip | ||
27 | @@ -732,6 +732,16 @@ TRACE_EVENT(kvm_emulate_insn, | ||
28 | tp_memcpy(insn, | ||
29 | vcpu->arch.emulate_ctxt.fetch.data, | ||
30 | 15) | ||
31 | +#else | ||
32 | + tp_assign(rip, vcpu->arch.emulate_ctxt._eip - | ||
33 | + (vcpu->arch.emulate_ctxt.fetch.ptr - | ||
34 | + vcpu->arch.emulate_ctxt.fetch.data)) | ||
35 | + tp_assign(csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS)) | ||
36 | + tp_assign(len, vcpu->arch.emulate_ctxt.fetch.ptr - | ||
37 | + vcpu->arch.emulate_ctxt.fetch.data) | ||
38 | + tp_memcpy(insn, | ||
39 | + vcpu->arch.emulate_ctxt.fetch.data, | ||
40 | + 15) | ||
41 | #endif | ||
42 | tp_assign(flags, kei_decode_mode(vcpu->arch.emulate_ctxt.mode)) | ||
43 | tp_assign(failed, failed) | ||
44 | -- | ||
45 | 1.8.1.2 | ||
46 | |||
diff --git a/meta/recipes-kernel/lttng/lttng-modules/Update-statedump-to-3.17-nsproxy-locking.patch b/meta/recipes-kernel/lttng/lttng-modules/Update-statedump-to-3.17-nsproxy-locking.patch new file mode 100644 index 0000000000..0f18c8a3e6 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/Update-statedump-to-3.17-nsproxy-locking.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
3 | |||
4 | From 4ba1f53c5aebb4433fedc25d65af010274985043 Mon Sep 17 00:00:00 2001 | ||
5 | From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
6 | Date: Thu, 21 Aug 2014 10:53:12 -0400 | ||
7 | Subject: [PATCH 2/3] Update statedump to 3.17 nsproxy locking | ||
8 | |||
9 | This Linux upstream commit introduces locking strategy back and forth: | ||
10 | |||
11 | commit 728dba3a39c66b3d8ac889ddbe38b5b1c264aec3 | ||
12 | Author: Eric W. Biederman <ebiederm@xmission.com> | ||
13 | Date: Mon Feb 3 19:13:49 2014 -0800 | ||
14 | |||
15 | namespaces: Use task_lock and not rcu to protect nsproxy | ||
16 | |||
17 | Use the task lock starting from kernel 3.17 rather than RCU to access | ||
18 | the task nsproxy. | ||
19 | |||
20 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
21 | --- | ||
22 | lttng-statedump-impl.c | 15 +++++++++++++++ | ||
23 | 1 file changed, 15 insertions(+) | ||
24 | |||
25 | diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c | ||
26 | index dad51ddaa250..e4caa488e436 100644 | ||
27 | --- a/lttng-statedump-impl.c | ||
28 | +++ b/lttng-statedump-impl.c | ||
29 | @@ -378,6 +378,9 @@ int lttng_list_interrupts(struct lttng_session *session) | ||
30 | } | ||
31 | #endif | ||
32 | |||
33 | +/* | ||
34 | + * Called with task lock held. | ||
35 | + */ | ||
36 | static | ||
37 | void lttng_statedump_process_ns(struct lttng_session *session, | ||
38 | struct task_struct *p, | ||
39 | @@ -389,8 +392,18 @@ void lttng_statedump_process_ns(struct lttng_session *session, | ||
40 | struct nsproxy *proxy; | ||
41 | struct pid_namespace *pid_ns; | ||
42 | |||
43 | + /* | ||
44 | + * Back and forth on locking strategy within Linux upstream for nsproxy. | ||
45 | + * See Linux upstream commit 728dba3a39c66b3d8ac889ddbe38b5b1c264aec3 | ||
46 | + * "namespaces: Use task_lock and not rcu to protect nsproxy" | ||
47 | + * for details. | ||
48 | + */ | ||
49 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) | ||
50 | rcu_read_lock(); | ||
51 | proxy = task_nsproxy(p); | ||
52 | +#else /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */ | ||
53 | + proxy = p->nsproxy; | ||
54 | +#endif /* #else #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */ | ||
55 | if (proxy) { | ||
56 | pid_ns = lttng_get_proxy_pid_ns(proxy); | ||
57 | do { | ||
58 | @@ -402,7 +415,9 @@ void lttng_statedump_process_ns(struct lttng_session *session, | ||
59 | trace_lttng_statedump_process_state(session, | ||
60 | p, type, mode, submode, status, NULL); | ||
61 | } | ||
62 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) | ||
63 | rcu_read_unlock(); | ||
64 | +#endif /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */ | ||
65 | } | ||
66 | |||
67 | static | ||
68 | -- | ||
69 | 1.8.1.2 | ||
70 | |||
diff --git a/meta/recipes-kernel/lttng/lttng-modules/Update-vmscan-instrumentation-to-3.16-kernel.patch b/meta/recipes-kernel/lttng/lttng-modules/Update-vmscan-instrumentation-to-3.16-kernel.patch new file mode 100644 index 0000000000..5f02270e89 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/Update-vmscan-instrumentation-to-3.16-kernel.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | From 5defe623568273e9b87da1b817e373ff087fd862 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
3 | Date: Sun, 13 Jul 2014 13:27:01 -0400 | ||
4 | Subject: [PATCH 1/2] Update vmscan instrumentation to 3.16 kernel | ||
5 | |||
6 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
7 | --- | ||
8 | instrumentation/events/lttng-module/vmscan.h | 39 ++++++++++++++++++++++++++++ | ||
9 | 1 file changed, 39 insertions(+) | ||
10 | |||
11 | diff --git a/instrumentation/events/lttng-module/vmscan.h b/instrumentation/events/lttng-module/vmscan.h | ||
12 | index 1fd50ba7c235..0b4aa56761dc 100644 | ||
13 | --- a/instrumentation/events/lttng-module/vmscan.h | ||
14 | +++ b/instrumentation/events/lttng-module/vmscan.h | ||
15 | @@ -238,6 +238,44 @@ TRACE_EVENT(mm_shrink_slab_start, | ||
16 | __entry->total_scan) | ||
17 | ) | ||
18 | |||
19 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) | ||
20 | +TRACE_EVENT(mm_shrink_slab_end, | ||
21 | + TP_PROTO(struct shrinker *shr, int nid, int shrinker_retval, | ||
22 | + long unused_scan_cnt, long new_scan_cnt, long total_scan), | ||
23 | + | ||
24 | + TP_ARGS(shr, nid, shrinker_retval, unused_scan_cnt, new_scan_cnt, | ||
25 | + total_scan), | ||
26 | + | ||
27 | + TP_STRUCT__entry( | ||
28 | + __field(struct shrinker *, shr) | ||
29 | + __field(int, nid) | ||
30 | + __field(void *, shrink) | ||
31 | + __field(long, unused_scan) | ||
32 | + __field(long, new_scan) | ||
33 | + __field(int, retval) | ||
34 | + __field(long, total_scan) | ||
35 | + ), | ||
36 | + | ||
37 | + TP_fast_assign( | ||
38 | + tp_assign(shr, shr) | ||
39 | + tp_assign(nid, nid) | ||
40 | + tp_assign(shrink, shr->scan_objects) | ||
41 | + tp_assign(unused_scan, unused_scan_cnt) | ||
42 | + tp_assign(new_scan, new_scan_cnt) | ||
43 | + tp_assign(retval, shrinker_retval) | ||
44 | + tp_assign(total_scan, total_scan) | ||
45 | + ), | ||
46 | + | ||
47 | + TP_printk("%pF %p: nid %d unused scan count %ld new scan count %ld total_scan %ld last shrinker return val %d", | ||
48 | + __entry->shrink, | ||
49 | + __entry->shr, | ||
50 | + __entry->nid, | ||
51 | + __entry->unused_scan, | ||
52 | + __entry->new_scan, | ||
53 | + __entry->total_scan, | ||
54 | + __entry->retval) | ||
55 | +) | ||
56 | +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ | ||
57 | TRACE_EVENT(mm_shrink_slab_end, | ||
58 | TP_PROTO(struct shrinker *shr, int shrinker_retval, | ||
59 | long unused_scan_cnt, long new_scan_cnt), | ||
60 | @@ -274,6 +312,7 @@ TRACE_EVENT(mm_shrink_slab_end, | ||
61 | __entry->total_scan, | ||
62 | __entry->retval) | ||
63 | ) | ||
64 | +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ | ||
65 | #endif | ||
66 | |||
67 | DECLARE_EVENT_CLASS(mm_vmscan_lru_isolate_template, | ||
68 | -- | ||
69 | 1.8.1.2 | ||
70 | |||
diff --git a/meta/recipes-kernel/lttng/lttng-modules/bio-bvec-iter.patch b/meta/recipes-kernel/lttng/lttng-modules/bio-bvec-iter.patch new file mode 100644 index 0000000000..d6c66e4f2b --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/bio-bvec-iter.patch | |||
@@ -0,0 +1,156 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | In 3.14, bi_sector and bi_size were moved into an iterator, thus | ||
4 | breaking any tracepoints that still expect them in the bio. Fix up | ||
5 | the lttng-module tracepoints to use the new scheme when the kernel | ||
6 | version is >= 3.14. | ||
7 | |||
8 | Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> | ||
9 | |||
10 | diff --git a/instrumentation/events/lttng-module/block.h b/instrumentation/events/lttng-module/block.h | ||
11 | index f3b8bff..0a61543 100644 | ||
12 | --- a/instrumentation/events/lttng-module/block.h | ||
13 | +++ b/instrumentation/events/lttng-module/block.h | ||
14 | @@ -341,9 +341,15 @@ TRACE_EVENT(block_bio_bounce, | ||
15 | TP_fast_assign( | ||
16 | tp_assign(dev, bio->bi_bdev ? | ||
17 | bio->bi_bdev->bd_dev : 0) | ||
18 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) | ||
19 | + tp_assign(sector, bio->bi_iter.bi_sector) | ||
20 | + tp_assign(nr_sector, bio->bi_iter.bi_size >> 9) | ||
21 | + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) | ||
22 | +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ | ||
23 | tp_assign(sector, bio->bi_sector) | ||
24 | tp_assign(nr_sector, bio->bi_size >> 9) | ||
25 | blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) | ||
26 | +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ | ||
27 | tp_memcpy(comm, current->comm, TASK_COMM_LEN) | ||
28 | ), | ||
29 | |||
30 | @@ -385,14 +391,24 @@ TRACE_EVENT(block_bio_complete, | ||
31 | |||
32 | TP_fast_assign( | ||
33 | tp_assign(dev, bio->bi_bdev->bd_dev) | ||
34 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) | ||
35 | + tp_assign(sector, bio->bi_iter.bi_sector) | ||
36 | + tp_assign(nr_sector, bio->bi_iter.bi_size >> 9) | ||
37 | +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ | ||
38 | tp_assign(sector, bio->bi_sector) | ||
39 | tp_assign(nr_sector, bio->bi_size >> 9) | ||
40 | +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ | ||
41 | + | ||
42 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)) | ||
43 | tp_assign(error, error) | ||
44 | #else | ||
45 | tp_assign(error, 0) | ||
46 | #endif | ||
47 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) | ||
48 | + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) | ||
49 | +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ | ||
50 | blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) | ||
51 | +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ | ||
52 | ), | ||
53 | |||
54 | TP_printk("%d,%d %s %llu + %u [%d]", | ||
55 | @@ -419,9 +435,15 @@ DECLARE_EVENT_CLASS(block_bio_merge, | ||
56 | |||
57 | TP_fast_assign( | ||
58 | tp_assign(dev, bio->bi_bdev->bd_dev) | ||
59 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) | ||
60 | + tp_assign(sector, bio->bi_iter.bi_sector) | ||
61 | + tp_assign(nr_sector, bio->bi_iter.bi_size >> 9) | ||
62 | + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) | ||
63 | +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ | ||
64 | tp_assign(sector, bio->bi_sector) | ||
65 | tp_assign(nr_sector, bio->bi_size >> 9) | ||
66 | blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) | ||
67 | +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ | ||
68 | tp_memcpy(comm, current->comm, TASK_COMM_LEN) | ||
69 | ), | ||
70 | |||
71 | @@ -485,9 +507,15 @@ TRACE_EVENT(block_bio_queue, | ||
72 | |||
73 | TP_fast_assign( | ||
74 | tp_assign(dev, bio->bi_bdev->bd_dev) | ||
75 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) | ||
76 | + tp_assign(sector, bio->bi_iter.bi_sector) | ||
77 | + tp_assign(nr_sector, bio->bi_iter.bi_size >> 9) | ||
78 | + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) | ||
79 | +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ | ||
80 | tp_assign(sector, bio->bi_sector) | ||
81 | tp_assign(nr_sector, bio->bi_size >> 9) | ||
82 | blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) | ||
83 | +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ | ||
84 | tp_memcpy(comm, current->comm, TASK_COMM_LEN) | ||
85 | ), | ||
86 | |||
87 | @@ -513,9 +541,15 @@ DECLARE_EVENT_CLASS(block_bio, | ||
88 | |||
89 | TP_fast_assign( | ||
90 | tp_assign(dev, bio->bi_bdev ? bio->bi_bdev->bd_dev : 0) | ||
91 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) | ||
92 | + tp_assign(sector, bio->bi_iter.bi_sector) | ||
93 | + tp_assign(nr_sector, bio->bi_iter.bi_size >> 9) | ||
94 | + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) | ||
95 | +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ | ||
96 | tp_assign(sector, bio->bi_sector) | ||
97 | tp_assign(nr_sector, bio->bi_size >> 9) | ||
98 | blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) | ||
99 | +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ | ||
100 | tp_memcpy(comm, current->comm, TASK_COMM_LEN) | ||
101 | ), | ||
102 | |||
103 | @@ -587,10 +621,17 @@ DECLARE_EVENT_CLASS(block_get_rq, | ||
104 | |||
105 | TP_fast_assign( | ||
106 | tp_assign(dev, bio ? bio->bi_bdev->bd_dev : 0) | ||
107 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) | ||
108 | + tp_assign(sector, bio ? bio->bi_iter.bi_sector : 0) | ||
109 | + tp_assign(nr_sector, bio ? bio->bi_iter.bi_size >> 9 : 0) | ||
110 | + blk_fill_rwbs(rwbs, bio ? bio->bi_rw : 0, | ||
111 | + bio ? bio->bi_iter.bi_size >> 9 : 0) | ||
112 | +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ | ||
113 | tp_assign(sector, bio ? bio->bi_sector : 0) | ||
114 | tp_assign(nr_sector, bio ? bio->bi_size >> 9 : 0) | ||
115 | blk_fill_rwbs(rwbs, bio ? bio->bi_rw : 0, | ||
116 | bio ? bio->bi_size >> 9 : 0) | ||
117 | +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ | ||
118 | tp_memcpy(comm, current->comm, TASK_COMM_LEN) | ||
119 | ), | ||
120 | |||
121 | @@ -759,9 +800,15 @@ TRACE_EVENT(block_split, | ||
122 | |||
123 | TP_fast_assign( | ||
124 | tp_assign(dev, bio->bi_bdev->bd_dev) | ||
125 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) | ||
126 | + tp_assign(sector, bio->bi_iter.bi_sector) | ||
127 | + tp_assign(new_sector, new_sector) | ||
128 | + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) | ||
129 | +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ | ||
130 | tp_assign(sector, bio->bi_sector) | ||
131 | tp_assign(new_sector, new_sector) | ||
132 | blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) | ||
133 | +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ | ||
134 | tp_memcpy(comm, current->comm, TASK_COMM_LEN) | ||
135 | ), | ||
136 | |||
137 | @@ -805,11 +852,19 @@ TRACE_EVENT(block_remap, | ||
138 | |||
139 | TP_fast_assign( | ||
140 | tp_assign(dev, bio->bi_bdev->bd_dev) | ||
141 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) | ||
142 | + tp_assign(sector, bio->bi_iter.bi_sector) | ||
143 | + tp_assign(nr_sector, bio->bi_iter.bi_size >> 9) | ||
144 | + tp_assign(old_dev, dev) | ||
145 | + tp_assign(old_sector, from) | ||
146 | + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) | ||
147 | +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ | ||
148 | tp_assign(sector, bio->bi_sector) | ||
149 | tp_assign(nr_sector, bio->bi_size >> 9) | ||
150 | tp_assign(old_dev, dev) | ||
151 | tp_assign(old_sector, from) | ||
152 | blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) | ||
153 | +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ | ||
154 | ), | ||
155 | |||
156 | TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu", | ||
diff --git a/meta/recipes-kernel/lttng/lttng-modules/compaction-fix-mm_compaction_isolate_template-build.patch b/meta/recipes-kernel/lttng/lttng-modules/compaction-fix-mm_compaction_isolate_template-build.patch new file mode 100644 index 0000000000..a99871a62e --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/compaction-fix-mm_compaction_isolate_template-build.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From af48c7b08de4b811d3d974e65e362b86ce8c4a34 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
3 | Date: Wed, 10 Dec 2014 03:19:28 -0500 | ||
4 | Subject: [PATCH] compaction: fix mm_compaction_isolate_template build | ||
5 | |||
6 | linux-stable integrated the 3.16 commit f8c9301fa5a2a [mm/compaction: do | ||
7 | not count migratepages when unnecessary] with the 3.14.25 update. | ||
8 | |||
9 | So we have to update the lttng-module linux version codes to use the | ||
10 | new definition in builds greater than 3.14.24 or 3.16. | ||
11 | |||
12 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
13 | --- | ||
14 | instrumentation/events/lttng-module/compaction.h | 4 ++-- | ||
15 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/instrumentation/events/lttng-module/compaction.h b/instrumentation/events/lttng-module/compaction.h | ||
18 | index 22024e9ee582..07afbe06f1a6 100644 | ||
19 | --- a/instrumentation/events/lttng-module/compaction.h | ||
20 | +++ b/instrumentation/events/lttng-module/compaction.h | ||
21 | @@ -46,7 +46,7 @@ DEFINE_EVENT(mm_compaction_isolate_template, mm_compaction_isolate_freepages, | ||
22 | TP_ARGS(nr_scanned, nr_taken) | ||
23 | ) | ||
24 | |||
25 | -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) | ||
26 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) || LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,25)) | ||
27 | TRACE_EVENT(mm_compaction_migratepages, | ||
28 | |||
29 | TP_PROTO(unsigned long nr_all, | ||
30 | @@ -87,7 +87,7 @@ TRACE_EVENT(mm_compaction_migratepages, | ||
31 | __entry->nr_migrated, | ||
32 | __entry->nr_failed) | ||
33 | ) | ||
34 | -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ | ||
35 | +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) || LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,25)) */ | ||
36 | TRACE_EVENT(mm_compaction_migratepages, | ||
37 | |||
38 | TP_PROTO(unsigned long nr_migrated, | ||
39 | -- | ||
40 | 2.1.0 | ||
41 | |||
diff --git a/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch b/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch new file mode 100644 index 0000000000..97b7a53a07 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch | |||
@@ -0,0 +1,113 @@ | |||
1 | |||
2 | Upstream-Status: Backport | ||
3 | |||
4 | commit 7df57eb5d6bdc85ddcf2b9afb6cd0cacfb22096e | ||
5 | Author: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
6 | Date: Thu Sep 25 18:19:43 2014 -0700 | ||
7 | |||
8 | asoc.h: fix build with v3.17 kernel | ||
9 | |||
10 | The snd_soc_codec structure has changed in the v3.17 kernel. Some | ||
11 | of the redundant fields have been removed. To be specific this commit | ||
12 | from the v3.17 kernel causes the build failure for lttng-modules. | ||
13 | |||
14 | |commit f4333203ec933f9272c90c7add01774ec2cf94d3 | ||
15 | |Author: Lars-Peter Clausen <lars@metafoo.de> | ||
16 | |Date: Mon Jun 16 18:13:02 2014 +0200 | ||
17 | | | ||
18 | | ASoC: Move name and id from CODEC/platform to component | ||
19 | | | ||
20 | | The component struct already has a name and id field which are initialized to | ||
21 | | the same values as the same fields in the CODEC and platform structs. So remove | ||
22 | | them from the CODEC and platform structs and used the ones from the component | ||
23 | | struct instead. | ||
24 | | | ||
25 | | Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> | ||
26 | | Signed-off-by: Mark Brown <broonie@linaro.org> | ||
27 | |||
28 | The asoc.h is changed according to the change in the above kernel commit | ||
29 | to fix the lttng-modules build. The change in the lttng-modules code is | ||
30 | conditional on the kernel version, so that it does not break builds with | ||
31 | previous kernel versions. | ||
32 | |||
33 | Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
34 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
35 | |||
36 | diff --git a/instrumentation/events/lttng-module/asoc.h b/instrumentation/events/lttng-module/asoc.h | ||
37 | index 672bea4..bf9cf86 100644 | ||
38 | --- a/instrumentation/events/lttng-module/asoc.h | ||
39 | +++ b/instrumentation/events/lttng-module/asoc.h | ||
40 | @@ -21,6 +21,14 @@ struct snd_soc_card; | ||
41 | struct snd_soc_dapm_widget; | ||
42 | #endif | ||
43 | |||
44 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) | ||
45 | +#define CODEC_NAME_FIELD component.name | ||
46 | +#define CODEC_ID_FIELD component.id | ||
47 | +#else | ||
48 | +#define CODEC_NAME_FIELD name | ||
49 | +#define CODEC_ID_FIELD id | ||
50 | +#endif | ||
51 | + | ||
52 | /* | ||
53 | * Log register events | ||
54 | */ | ||
55 | @@ -32,15 +40,15 @@ DECLARE_EVENT_CLASS(snd_soc_reg, | ||
56 | TP_ARGS(codec, reg, val), | ||
57 | |||
58 | TP_STRUCT__entry( | ||
59 | - __string( name, codec->name ) | ||
60 | + __string( name, codec->CODEC_NAME_FIELD ) | ||
61 | __field( int, id ) | ||
62 | __field( unsigned int, reg ) | ||
63 | __field( unsigned int, val ) | ||
64 | ), | ||
65 | |||
66 | TP_fast_assign( | ||
67 | - tp_strcpy(name, codec->name) | ||
68 | - tp_assign(id, codec->id) | ||
69 | + tp_strcpy(name, codec->CODEC_NAME_FIELD) | ||
70 | + tp_assign(id, codec->CODEC_ID_FIELD) | ||
71 | tp_assign(reg, reg) | ||
72 | tp_assign(val, val) | ||
73 | ), | ||
74 | @@ -77,15 +85,15 @@ DECLARE_EVENT_CLASS(snd_soc_preg, | ||
75 | TP_ARGS(platform, reg, val), | ||
76 | |||
77 | TP_STRUCT__entry( | ||
78 | - __string( name, platform->name ) | ||
79 | + __string( name, platform->CODEC_NAME_FIELD ) | ||
80 | __field( int, id ) | ||
81 | __field( unsigned int, reg ) | ||
82 | __field( unsigned int, val ) | ||
83 | ), | ||
84 | |||
85 | TP_fast_assign( | ||
86 | - tp_strcpy(name, platform->name) | ||
87 | - tp_assign(id, platform->id) | ||
88 | + tp_strcpy(name, platform->CODEC_NAME_FIELD) | ||
89 | + tp_assign(id, platform->CODEC_ID_FIELD) | ||
90 | tp_assign(reg, reg) | ||
91 | tp_assign(val, val) | ||
92 | ), | ||
93 | @@ -399,17 +407,17 @@ TRACE_EVENT(snd_soc_cache_sync, | ||
94 | TP_ARGS(codec, type, status), | ||
95 | |||
96 | TP_STRUCT__entry( | ||
97 | - __string( name, codec->name ) | ||
98 | + __string( name, codec->CODEC_NAME_FIELD ) | ||
99 | __string( status, status ) | ||
100 | __string( type, type ) | ||
101 | __field( int, id ) | ||
102 | ), | ||
103 | |||
104 | TP_fast_assign( | ||
105 | - tp_strcpy(name, codec->name) | ||
106 | + tp_strcpy(name, codec->CODEC_NAME_FIELD) | ||
107 | tp_strcpy(status, status) | ||
108 | tp_strcpy(type, type) | ||
109 | - tp_assign(id, codec->id) | ||
110 | + tp_assign(id, codec->CODEC_ID_FIELD) | ||
111 | ), | ||
112 | |||
113 | TP_printk("codec=%s.%d type=%s status=%s", __get_str(name), | ||
diff --git a/meta/recipes-kernel/lttng/lttng-modules/lttng-modules-remove-kernel-version-check.patch b/meta/recipes-kernel/lttng/lttng-modules/lttng-modules-remove-kernel-version-check.patch new file mode 100644 index 0000000000..02d8d8827e --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/lttng-modules-remove-kernel-version-check.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | This is required in order the make the build succeed for | ||
2 | machine k2hk-evm, image enea-image-demo. | ||
3 | |||
4 | The patch for commit 7bd36014460f793c19e7d6c94dab67b0afcfcb7f is already part of the build. | ||
5 | It is located here: | ||
6 | poky/meta-ti/recipes-kernel/linux/linux-keystone-3.10.10/Fix_HRTICK_related_deadlock_from_ntp_lock.patch | ||
7 | and it is applied for kernel recipe poky/meta-ti/recipes-kernel/linux/linux-keystone_3.10.bb, | ||
8 | that is the kernel used for k2hk-evm. | ||
9 | |||
10 | In this regard, I removed the check until TI upgrade their | ||
11 | kernels to a supported version. | ||
12 | |||
13 | Upstream-Status: Not Applicable | ||
14 | |||
15 | Signed-off-by: Liviu Gheorghisan <liviu.gheorghisan@enea.com> | ||
16 | |||
17 | --- | ||
18 | --- a/wrapper/trace-clock.h 2014-07-25 15:54:00.677739746 +0200 | ||
19 | +++ b/wrapper/trace-clock.h 2014-07-25 15:55:49.807390266 +0200 | ||
20 | @@ -36,10 +36,6 @@ | ||
21 | #include "../lttng-kernel-version.h" | ||
22 | #include "random.h" | ||
23 | |||
24 | -#if LTTNG_KERNEL_RANGE(3,10,0, 3,10,14) || LTTNG_KERNEL_RANGE(3,11,0, 3,11,3) | ||
25 | -#error "Linux kernels 3.10 and 3.11 introduce a deadlock in the timekeeping subsystem. Fixed by commit 7bd36014460f793c19e7d6c94dab67b0afcfcb7f \"timekeeping: Fix HRTICK related deadlock from ntp lock changes\" in Linux." | ||
26 | -#endif | ||
27 | - | ||
28 | static inline u64 trace_clock_monotonic_wrapper(void) | ||
29 | { | ||
30 | ktime_t ktime; | ||
diff --git a/meta/recipes-kernel/lttng/lttng-modules/lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch b/meta/recipes-kernel/lttng/lttng-modules/lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch new file mode 100644 index 0000000000..30f825c414 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch | |||
@@ -0,0 +1,81 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | lttng-modules: replace KERNELDIR with KERNEL_SRC | ||
4 | |||
5 | Since lttng-modules uses the default way of module.bbclass to | ||
6 | build and install lttng-modules, we do this replacement for | ||
7 | it as-is. | ||
8 | |||
9 | Signed-off-by: Zumeng Chen <zumeng.chen@windriver.com> | ||
10 | |||
11 | diff --git a/Makefile b/Makefile | ||
12 | index a9d1cb1..c1b65b9 100644 | ||
13 | --- a/Makefile | ||
14 | +++ b/Makefile | ||
15 | @@ -43,19 +43,19 @@ obj-m += lib/ | ||
16 | endif # CONFIG_TRACEPOINTS | ||
17 | |||
18 | else # KERNELRELEASE | ||
19 | - KERNELDIR ?= /lib/modules/$(shell uname -r)/build | ||
20 | + KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build | ||
21 | PWD := $(shell pwd) | ||
22 | CFLAGS = $(EXTCFLAGS) | ||
23 | |||
24 | default: | ||
25 | - $(MAKE) -C $(KERNELDIR) M=$(PWD) modules | ||
26 | + $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules | ||
27 | |||
28 | modules_install: | ||
29 | - $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install | ||
30 | + $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules_install | ||
31 | |||
32 | clean: | ||
33 | - $(MAKE) -C $(KERNELDIR) M=$(PWD) clean | ||
34 | + $(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean | ||
35 | |||
36 | %.i: %.c | ||
37 | - $(MAKE) -C $(KERNELDIR) M=$(PWD) $@ | ||
38 | + $(MAKE) -C $(KERNEL_SRC) M=$(PWD) $@ | ||
39 | endif # KERNELRELEASE | ||
40 | diff --git a/README b/README | ||
41 | index 8c5dd46..6bd3334 100644 | ||
42 | --- a/README | ||
43 | +++ b/README | ||
44 | @@ -27,8 +27,8 @@ access to your full kernel source tree), and use: | ||
45 | If you need to specify the target directory to the kernel you want to build | ||
46 | against, use: | ||
47 | |||
48 | -% KERNELDIR=path_to_kernel_dir make | ||
49 | -# KERNELDIR=path_to_kernel_dir make modules_install | ||
50 | +% KERNEL_SRC=path_to_kernel_dir make | ||
51 | +# KERNEL_SRC=path_to_kernel_dir make modules_install | ||
52 | # depmod -a kernel_version | ||
53 | |||
54 | Use lttng-tools to control the tracer. LTTng tools should automatically load | ||
55 | diff --git a/probes/Makefile b/probes/Makefile | ||
56 | index 225803c..3449866 100644 | ||
57 | --- a/probes/Makefile | ||
58 | +++ b/probes/Makefile | ||
59 | @@ -212,18 +212,18 @@ endif | ||
60 | endif | ||
61 | |||
62 | else | ||
63 | - KERNELDIR ?= /lib/modules/$(shell uname -r)/build | ||
64 | + KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build | ||
65 | PWD := $(shell pwd) | ||
66 | CFLAGS = $(EXTCFLAGS) | ||
67 | |||
68 | default: | ||
69 | - $(MAKE) -C $(KERNELDIR) M=$(PWD) modules | ||
70 | + $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules | ||
71 | |||
72 | modules_install: | ||
73 | - $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install | ||
74 | + $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules_install | ||
75 | /sbin/depmod -a | ||
76 | |||
77 | clean: | ||
78 | - $(MAKE) -C $(KERNELDIR) M=$(PWD) clean | ||
79 | + $(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean | ||
80 | |||
81 | endif | ||
diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb b/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb new file mode 100644 index 0000000000..1a352209ed --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb | |||
@@ -0,0 +1,44 @@ | |||
1 | SECTION = "devel" | ||
2 | SUMMARY = "Linux Trace Toolkit KERNEL MODULE" | ||
3 | DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules" | ||
4 | LICENSE = "LGPLv2.1 & GPLv2 & MIT" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1412caf5a1aa90d6a48588a4794c0eac \ | ||
6 | file://gpl-2.0.txt;md5=751419260aa954499f7abaabaa882bbe \ | ||
7 | file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad" | ||
8 | |||
9 | DEPENDS = "virtual/kernel" | ||
10 | |||
11 | inherit module | ||
12 | |||
13 | SRCREV = "789fd1d06d07aeb9a403bdce1b3318560cfc6eca" | ||
14 | |||
15 | COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|arm).*-linux' | ||
16 | |||
17 | SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.5 \ | ||
18 | file://lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch \ | ||
19 | file://Update-compaction-instrumentation-to-3.16-kernel.patch \ | ||
20 | file://Update-vmscan-instrumentation-to-3.16-kernel.patch \ | ||
21 | file://lttng-modules-remove-kernel-version-check.patch \ | ||
22 | file://Fix-noargs-probes-should-calculate-alignment-and-eve.patch \ | ||
23 | file://Update-statedump-to-3.17-nsproxy-locking.patch \ | ||
24 | file://Update-kvm-instrumentation-compile-on-3.17-rc1.patch \ | ||
25 | file://fix_build_with_v3.17_kernel.patch \ | ||
26 | file://compaction-fix-mm_compaction_isolate_template-build.patch \ | ||
27 | " | ||
28 | |||
29 | export INSTALL_MOD_DIR="kernel/lttng-modules" | ||
30 | export KERNEL_SRC="${STAGING_KERNEL_DIR}" | ||
31 | |||
32 | |||
33 | S = "${WORKDIR}/git" | ||
34 | |||
35 | do_install_append() { | ||
36 | # Delete empty directories to avoid QA failures if no modules were built | ||
37 | find ${D}/lib -depth -type d -empty -exec rmdir {} \; | ||
38 | } | ||
39 | |||
40 | python do_package_prepend() { | ||
41 | if not os.path.exists(os.path.join(d.getVar('D', True), 'lib/modules')): | ||
42 | bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN', True)) | ||
43 | } | ||
44 | |||
diff --git a/meta/recipes-kernel/lttng/lttng-tools/run-ptest b/meta/recipes-kernel/lttng/lttng-tools/run-ptest new file mode 100755 index 0000000000..e758815c77 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-tools/run-ptest | |||
@@ -0,0 +1,4 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | make -C tests installcheck | ||
4 | |||
diff --git a/meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch b/meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch new file mode 100644 index 0000000000..958bce48e0 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | diff --git a/Makefile.am b/Makefile.am | ||
2 | index 584f59b..c2bcabd 100644 | ||
3 | --- a/Makefile.am | ||
4 | +++ b/Makefile.am | ||
5 | @@ -12,3 +12,9 @@ dist_doc_DATA = LICENSE \ | ||
6 | dist_noinst_DATA = CodingStyle | ||
7 | |||
8 | EXTRA_DIST = extras/lttng-bash_completion gpl-2.0.txt lgpl-2.1.txt | ||
9 | + | ||
10 | +install-ptest: | ||
11 | + cp -r $(srcdir)/tests $(DESTDIR) | ||
12 | + for m in $$(find $(DESTDIR)/tests -name Makefile); do \ | ||
13 | + sed -i -e 's|^Makefile:|_Makefile:|' $$m; \ | ||
14 | + done | ||
15 | diff --git a/tests/run.sh b/tests/run.sh | ||
16 | index c6c50fd..6455359 100755 | ||
17 | --- a/tests/run.sh | ||
18 | +++ b/tests/run.sh | ||
19 | @@ -19,4 +19,7 @@ | ||
20 | |||
21 | [ -z "$1" ] && echo "Error: No testlist. Please specify a testlist to run." && exit 1 | ||
22 | |||
23 | -prove --merge --exec '' - < $1 | ||
24 | +prove --merge -v --exec '' - < $1 | sed \ | ||
25 | + -e 's|^ok \(.*\)|PASS: \1|' \ | ||
26 | + -e 's|^not ok \(.*\)|FAIL: \1|' \ | ||
27 | + | egrep -h 'PASS|FAIL' | ||
diff --git a/meta/recipes-kernel/lttng/lttng-tools/runtest.patch b/meta/recipes-kernel/lttng/lttng-tools/runtest.patch new file mode 100644 index 0000000000..545a5dc083 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-tools/runtest.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | diff --git a/Makefile.am b/Makefile.am | ||
2 | index 584f59b..c2bcabd 100644 | ||
3 | --- a/Makefile.am | ||
4 | +++ b/Makefile.am | ||
5 | @@ -12,3 +12,9 @@ dist_doc_DATA = LICENSE \ | ||
6 | dist_noinst_DATA = CodingStyle | ||
7 | |||
8 | EXTRA_DIST = extras/lttng-bash_completion gpl-2.0.txt lgpl-2.1.txt | ||
9 | + | ||
10 | +install-ptest: | ||
11 | + cp -r $(srcdir)/tests $(DESTDIR) | ||
12 | + for m in $$(find $(DESTDIR)/tests -name Makefile); do \ | ||
13 | + sed -i -e 's|^Makefile:|_Makefile:|' $$m; \ | ||
14 | + done | ||
15 | diff --git a/tests/Makefile.am b/tests/Makefile.am | ||
16 | index 6d5b00d..3774f9d 100644 | ||
17 | --- a/tests/Makefile.am | ||
18 | +++ b/tests/Makefile.am | ||
19 | @@ -1,14 +1,17 @@ | ||
20 | SUBDIRS = utils regression unit stress | ||
21 | |||
22 | -if USE_PYTHON | ||
23 | -check-am: | ||
24 | +installcheck-am: | ||
25 | ./run.sh unit_tests | ||
26 | ./run.sh fast_regression | ||
27 | +if USE_PYTHON | ||
28 | ./run.sh with_bindings_regression | ||
29 | -else | ||
30 | +endif | ||
31 | + | ||
32 | check-am: | ||
33 | ./run.sh unit_tests | ||
34 | ./run.sh fast_regression | ||
35 | +if USE_PYTHON | ||
36 | + ./run.sh with_bindings_regression | ||
37 | endif | ||
38 | |||
39 | dist_noinst_SCRIPTS = run.sh unit_tests fast_regression long_regression root_regression with_bindings_regression | ||
40 | diff --git a/tests/run.sh b/tests/run.sh | ||
41 | index c6c50fd..6455359 100755 | ||
42 | --- a/tests/run.sh | ||
43 | +++ b/tests/run.sh | ||
44 | @@ -19,4 +19,7 @@ | ||
45 | |||
46 | [ -z "$1" ] && echo "Error: No testlist. Please specify a testlist to run." && exit 1 | ||
47 | |||
48 | -prove --merge --exec '' - < $1 | ||
49 | +prove --merge -v --exec '' - < $1 | sed \ | ||
50 | + -e 's|^ok \(.*\)|PASS: \1|' \ | ||
51 | + -e 's|^not ok \(.*\)|FAIL: \1|' \ | ||
52 | + | egrep -h 'PASS|FAIL' | ||
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.5.0.bb b/meta/recipes-kernel/lttng/lttng-tools_2.5.0.bb new file mode 100644 index 0000000000..fd44aa5f6d --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-tools_2.5.0.bb | |||
@@ -0,0 +1,77 @@ | |||
1 | SECTION = "devel" | ||
2 | SUMMARY = "Linux Trace Toolkit Control" | ||
3 | DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \ | ||
4 | to extract program execution details from the Linux operating system \ | ||
5 | and interpret them." | ||
6 | |||
7 | LICENSE = "GPLv2 & LGPLv2.1" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \ | ||
9 | file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
10 | file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca" | ||
11 | |||
12 | DEPENDS = "liburcu popt lttng-ust libxml2" | ||
13 | RDEPENDS_${PN}-ptest += "make perl bash" | ||
14 | |||
15 | SRCREV = "8b27cacb277c2cdab791139b08da8eb87ab14a88" | ||
16 | PV = "v2.5.0" | ||
17 | |||
18 | PYTHON_OPTION = "am_cv_python_pyexecdir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \ | ||
19 | am_cv_python_pythondir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \ | ||
20 | PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}' \ | ||
21 | " | ||
22 | PACKAGECONFIG ??= "lttng-ust" | ||
23 | PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python swig-native" | ||
24 | PACKAGECONFIG[lttng-ust] = ", --disable-lttng-ust, lttng-ust" | ||
25 | |||
26 | SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.5 \ | ||
27 | file://runtest-2.4.0.patch \ | ||
28 | file://run-ptest \ | ||
29 | " | ||
30 | |||
31 | S = "${WORKDIR}/git" | ||
32 | |||
33 | inherit autotools-brokensep ptest pkgconfig | ||
34 | |||
35 | export KERNELDIR="${STAGING_KERNEL_DIR}" | ||
36 | |||
37 | FILES_${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \ | ||
38 | ${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" | ||
39 | FILES_${PN}-dbg += "${libdir}/lttng/libexec/.debug \ | ||
40 | ${libdir}/python2.7/site-packages/.debug" | ||
41 | FILES_${PN}-staticdev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a" | ||
42 | FILES_${PN}-dev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.la" | ||
43 | |||
44 | # Since files are installed into ${libdir}/lttng/libexec we match | ||
45 | # the libexec insane test so skip it. | ||
46 | # Python module needs to keep _lttng.so | ||
47 | INSANE_SKIP_${PN} = "libexec dev-so" | ||
48 | INSANE_SKIP_${PN}-dbg = "libexec" | ||
49 | |||
50 | do_configure_prepend () { | ||
51 | # Delete a shipped m4 file that overrides our patched one | ||
52 | rm -f ${S}/config/libxml.m4 | ||
53 | } | ||
54 | |||
55 | do_install_ptest () { | ||
56 | chmod +x ${D}${PTEST_PATH}/tests/utils/utils.sh | ||
57 | for i in `find ${D}${PTEST_PATH} -perm /u+x -type f`; do | ||
58 | sed -e "s:\$TESTDIR.*/src/bin/lttng/\$LTTNG_BIN:\$LTTNG_BIN:g" \ | ||
59 | -e "s:\$TESTDIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \ | ||
60 | -e "s:\$DIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \ | ||
61 | -e "s:\$TESTDIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \ | ||
62 | -e "s:\$DIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \ | ||
63 | -e "s:\$TESTDIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \ | ||
64 | -e "s:\$DIR/../src/bin/lttng-sessiond/lttng-sessiond:\$SESSIOND_BIN:g" \ | ||
65 | -e "s:\$DIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \ | ||
66 | -e "s:\$DIR/../bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \ | ||
67 | -i $i | ||
68 | done | ||
69 | |||
70 | sed -e "s:src/bin/lttng-sessiond:$bindir:g" \ | ||
71 | -e "s:src/bin/lttng-consumerd:${libexecdir}/libexec/:g" \ | ||
72 | -i ${D}${PTEST_PATH}/tests/regression/run-report.py | ||
73 | sed -e "s:src/bin:bin:g" -e "s:lt-::g" \ | ||
74 | -i ${D}${PTEST_PATH}/tests/utils/utils.sh | ||
75 | sed -e "s:ini_config:\.libs\/ini_config:" \ | ||
76 | -i ${D}${PTEST_PATH}/tests/unit/ini_config/test_ini_config | ||
77 | } | ||
diff --git a/meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch b/meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch new file mode 100644 index 0000000000..b8b2cc3452 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | diff --git a/configure.ac b/configure.ac | ||
2 | index f507883..40a57d8 100644 | ||
3 | --- a/configure.ac | ||
4 | +++ b/configure.ac | ||
5 | @@ -194,6 +194,8 @@ changequote([,])dnl | ||
6 | s390) NO_UNALIGNED_ACCESS=1 ;; | ||
7 | s390x) NO_UNALIGNED_ACCESS=1 ;; | ||
8 | arm*) NO_UNALIGNED_ACCESS=1 ;; | ||
9 | + aarch64) NO_UNALIGNED_ACCESS=1 ;; | ||
10 | + aarch64_be) NO_UNALIGNED_ACCESS=1 ;; | ||
11 | mips*) NO_UNALIGNED_ACCESS=1 ;; | ||
12 | tile*) NO_UNALIGNED_ACCESS=1 ;; | ||
13 | *) AC_MSG_ERROR([unable to detect alignment requirements (unsupported architecture ($host_cpu)?)]) ;; | ||
diff --git a/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch b/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch new file mode 100644 index 0000000000..b68a9899c9 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | Don't build the doc examples - we don't need them and in fact they | ||
4 | never successfully built in previous iterations of the lttng-ust | ||
5 | recipe anyway. | ||
6 | |||
7 | Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> | ||
8 | |||
9 | Index: doc/Makefile.am | ||
10 | =================================================================== | ||
11 | --- a/doc/Makefile.am | ||
12 | +++ b/doc/Makefile.am | ||
13 | @@ -1,4 +1,4 @@ | ||
14 | -SUBDIRS = . examples | ||
15 | +SUBDIRS = . | ||
16 | |||
17 | dist_man_MANS = man/lttng-gen-tp.1 \ | ||
18 | man/lttng-ust.3 \ | ||
diff --git a/meta/recipes-kernel/lttng/lttng-ust_2.5.0.bb b/meta/recipes-kernel/lttng/lttng-ust_2.5.0.bb new file mode 100644 index 0000000000..e07d3c726b --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-ust_2.5.0.bb | |||
@@ -0,0 +1,34 @@ | |||
1 | SUMMARY = "Linux Trace Toolkit Userspace Tracer 2.x" | ||
2 | DESCRIPTION = "The LTTng UST 2.x package contains the userspace tracer library to trace userspace codes." | ||
3 | HOMEPAGE = "http://lttng.org/ust" | ||
4 | BUGTRACKER = "https://bugs.lttng.org/projects/lttng-ust" | ||
5 | |||
6 | LICENSE = "LGPLv2.1+ & MIT & GPLv2" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=c963eb366b781252b0bf0fdf1624d9e9 \ | ||
8 | file://snprintf/snprintf.c;endline=32;md5=d3d544959d8a3782b2e07451be0a903c \ | ||
9 | file://snprintf/various.h;endline=31;md5=89f2509b6b4682c4fc95255eec4abe44" | ||
10 | |||
11 | inherit autotools lib_package | ||
12 | |||
13 | DEPENDS = "liburcu util-linux" | ||
14 | RDEPENDS_${PN}-bin = "python-core" | ||
15 | |||
16 | # For backwards compatibility after rename | ||
17 | RPROVIDES_${PN} = "lttng2-ust" | ||
18 | RREPLACES_${PN} = "lttng2-ust" | ||
19 | RCONFLICTS_${PN} = "lttng2-ust" | ||
20 | |||
21 | SRCREV = "ce59a997afdb7dc8af02b464430bb7e35549fa66" | ||
22 | PV = "2.5.0" | ||
23 | PE = "2" | ||
24 | |||
25 | SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.5 \ | ||
26 | file://lttng-ust-doc-examples-disable.patch \ | ||
27 | file://add-aarch64.patch \ | ||
28 | " | ||
29 | |||
30 | S = "${WORKDIR}/git" | ||
31 | |||
32 | do_configure_prepend () { | ||
33 | ( cd ${S}; ${S}/bootstrap ) | ||
34 | } | ||
diff --git a/meta/recipes-kernel/modutils-initscripts/files/PD.patch b/meta/recipes-kernel/modutils-initscripts/files/PD.patch new file mode 100644 index 0000000000..21ac49cbd8 --- /dev/null +++ b/meta/recipes-kernel/modutils-initscripts/files/PD.patch | |||
@@ -0,0 +1,8 @@ | |||
1 | Upstream-Status: Inappropriate [licensing] | ||
2 | |||
3 | Index: modutils-initscripts-1.0/LICENSE | ||
4 | =================================================================== | ||
5 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
6 | +++ modutils-initscripts-1.0/LICENSE 2010-12-06 14:26:03.570339002 -0800 | ||
7 | @@ -0,0 +1 @@ | ||
8 | +Public Domain | ||
diff --git a/meta/recipes-kernel/modutils-initscripts/files/modutils.sh b/meta/recipes-kernel/modutils-initscripts/files/modutils.sh new file mode 100755 index 0000000000..a78adf5729 --- /dev/null +++ b/meta/recipes-kernel/modutils-initscripts/files/modutils.sh | |||
@@ -0,0 +1,52 @@ | |||
1 | #!/bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: module-init-tools | ||
4 | # Required-Start: | ||
5 | # Required-Stop: | ||
6 | # Should-Start: checkroot | ||
7 | # Should-stop: | ||
8 | # Default-Start: S | ||
9 | # Default-Stop: | ||
10 | # Short-Description: Process /etc/modules. | ||
11 | # Description: Load the modules listed in /etc/modules. | ||
12 | ### END INIT INFO | ||
13 | |||
14 | LOAD_MODULE=modprobe | ||
15 | [ -f /proc/modules ] || exit 0 | ||
16 | [ -f /etc/modules ] || [ -d /etc/modules-load.d ] || exit 0 | ||
17 | [ -e /sbin/modprobe ] || LOAD_MODULE=insmod | ||
18 | |||
19 | if [ ! -f /lib/modules/`uname -r`/modules.dep ]; then | ||
20 | [ "$VERBOSE" != no ] && echo "Calculating module dependencies ..." | ||
21 | depmod -Ae | ||
22 | fi | ||
23 | |||
24 | loaded_modules=" " | ||
25 | |||
26 | process_file() { | ||
27 | file=$1 | ||
28 | |||
29 | (cat $file; echo; ) | | ||
30 | while read module args | ||
31 | do | ||
32 | case "$module" in | ||
33 | \#*|"") continue ;; | ||
34 | esac | ||
35 | [ -n "$(echo $loaded_modules | grep " $module ")" ] && continue | ||
36 | [ "$VERBOSE" != no ] && echo -n "$module " | ||
37 | eval "$LOAD_MODULE $module $args >/dev/null 2>&1" | ||
38 | loaded_modules="${loaded_modules}${module} " | ||
39 | done | ||
40 | } | ||
41 | |||
42 | [ "$VERBOSE" != no ] && echo -n "Loading modules: " | ||
43 | [ -f /etc/modules ] && process_file /etc/modules | ||
44 | |||
45 | [ -d /etc/modules-load.d ] || exit 0 | ||
46 | |||
47 | for f in /etc/modules-load.d/*.conf; do | ||
48 | process_file $f | ||
49 | done | ||
50 | [ "$VERBOSE" != no ] && echo | ||
51 | |||
52 | exit 0 | ||
diff --git a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb new file mode 100644 index 0000000000..7031ba142c --- /dev/null +++ b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb | |||
@@ -0,0 +1,30 @@ | |||
1 | SUMMARY = "Initscript for auto-loading kernel modules on boot" | ||
2 | SECTION = "base" | ||
3 | LICENSE = "PD" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=7bf87fc37976e93ec66ad84fac58c098" | ||
5 | SRC_URI = "file://modutils.sh \ | ||
6 | file://PD.patch" | ||
7 | PR = "r7" | ||
8 | |||
9 | INITSCRIPT_NAME = "modutils.sh" | ||
10 | INITSCRIPT_PARAMS = "start 05 S ." | ||
11 | |||
12 | inherit update-rc.d | ||
13 | |||
14 | do_compile () { | ||
15 | } | ||
16 | |||
17 | do_install () { | ||
18 | install -d ${D}${sysconfdir}/init.d/ | ||
19 | install -m 0755 ${WORKDIR}/modutils.sh ${D}${sysconfdir}/init.d/ | ||
20 | } | ||
21 | |||
22 | DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}" | ||
23 | pkg_postinst_${PN} () { | ||
24 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
25 | if [ -n "$D" ]; then | ||
26 | OPTS="--root=$D" | ||
27 | fi | ||
28 | systemctl $OPTS mask modutils.service | ||
29 | fi | ||
30 | } | ||
diff --git a/meta/recipes-kernel/oprofile/oprofile.inc b/meta/recipes-kernel/oprofile/oprofile.inc new file mode 100644 index 0000000000..69582039e8 --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofile.inc | |||
@@ -0,0 +1,59 @@ | |||
1 | SUMMARY = "System-Wide Profiler" | ||
2 | DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \ | ||
3 | of profiling all running code at low overhead." | ||
4 | HOMEPAGE = "http://oprofile.sourceforge.net/news/" | ||
5 | BUGTRACKER = "http://sourceforge.net/tracker/?group_id=16191&atid=116191" | ||
6 | |||
7 | LICENSE = "LGPLv2.1+ & GPLv2" | ||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
9 | file://libopagent/opagent.h;beginline=5;endline=26;md5=4f16f72c7a493d8a4704aa18d03d15c6 \ | ||
10 | " | ||
11 | SECTION = "devel" | ||
12 | |||
13 | DEPENDS = "popt binutils" | ||
14 | RDEPENDS_${PN} = "binutils-symlinks" | ||
15 | RRECOMMENDS_${PN} = "kernel-vmlinux" | ||
16 | |||
17 | FILES_${PN} = "${bindir} ${libdir}/${BPN}/lib*${SOLIBS} ${datadir}/${BPN}" | ||
18 | FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/lib*.la" | ||
19 | FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a" | ||
20 | |||
21 | SRC_URI = "file://opstart.patch \ | ||
22 | file://acinclude.m4 \ | ||
23 | file://automake-foreign.patch \ | ||
24 | file://oprofile-cross-compile-tests.patch \ | ||
25 | file://run-ptest \ | ||
26 | file://root-home-dir.patch" | ||
27 | |||
28 | inherit autotools-brokensep pkgconfig ptest | ||
29 | |||
30 | EXTRA_OECONF = "--with-kernel=${STAGING_KERNEL_DIR} --without-x" | ||
31 | do_configure () { | ||
32 | cp ${WORKDIR}/acinclude.m4 ${S}/ | ||
33 | autotools_do_configure | ||
34 | } | ||
35 | |||
36 | EXTRA_OEMAKE = "SRCDIR=${PTEST_PATH}/libutil++/tests" | ||
37 | do_compile_ptest() { | ||
38 | oe_runmake check | ||
39 | } | ||
40 | |||
41 | do_install_ptest() { | ||
42 | subdirs="libdb/tests libutil++/tests libregex/tests libutil/tests libop/tests libdb/tests " | ||
43 | cd ${S} | ||
44 | for tooltest in ${subdirs} | ||
45 | do | ||
46 | find ${tooltest} -perm /u=x -type f| cpio -pvdu ${D}${PTEST_PATH} | ||
47 | done | ||
48 | |||
49 | # needed by some libop tests | ||
50 | cp -r events ${D}${PTEST_PATH} | ||
51 | |||
52 | # needed by libregex regex_test | ||
53 | cp libregex/stl.pat ${D}${PTEST_PATH}/libregex | ||
54 | cp libregex/tests/mangled-name ${D}${PTEST_PATH}/libregex/tests | ||
55 | |||
56 | # needed by litutil++ file_manip_tests | ||
57 | cp libutil++/tests/file_manip_tests.cpp \ | ||
58 | libutil++/tests/file_manip_tests.o ${D}${PTEST_PATH}/libutil++/tests | ||
59 | } | ||
diff --git a/meta/recipes-kernel/oprofile/oprofile/0001-Add-freescale-e500mc-support.patch b/meta/recipes-kernel/oprofile/oprofile/0001-Add-freescale-e500mc-support.patch new file mode 100644 index 0000000000..077da4bf2b --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofile/0001-Add-freescale-e500mc-support.patch | |||
@@ -0,0 +1,219 @@ | |||
1 | From ca3f796b3a7742215ed35b56fc072595174c410e Mon Sep 17 00:00:00 2001 | ||
2 | From: Ting Liu <b28495@freescale.com> | ||
3 | Date: Thu, 5 Sep 2013 07:43:55 -0500 | ||
4 | Subject: [PATCH 1/2] Add freescale e500mc support | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | |||
8 | Signed-off-by: George Stephen <Stephen.George@freescale.com> | ||
9 | Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com> | ||
10 | Signed-off-by: Ting Liu <b28495@freescale.com> | ||
11 | --- | ||
12 | events/Makefile.am | 1 + | ||
13 | events/ppc/e500mc/events | 120 ++++++++++++++++++++++++++++++++++++++++++ | ||
14 | events/ppc/e500mc/unit_masks | 4 ++ | ||
15 | libop/op_cpu_type.c | 1 + | ||
16 | libop/op_cpu_type.h | 1 + | ||
17 | libop/op_events.c | 1 + | ||
18 | utils/ophelp.c | 1 + | ||
19 | 7 files changed, 129 insertions(+), 0 deletions(-) | ||
20 | create mode 100644 events/ppc/e500mc/events | ||
21 | create mode 100644 events/ppc/e500mc/unit_masks | ||
22 | |||
23 | diff --git a/events/Makefile.am b/events/Makefile.am | ||
24 | index be87781..e496f98 100644 | ||
25 | --- a/events/Makefile.am | ||
26 | +++ b/events/Makefile.am | ||
27 | @@ -76,6 +76,7 @@ event_files = \ | ||
28 | ppc/7450/events ppc/7450/unit_masks \ | ||
29 | ppc/e500/events ppc/e500/unit_masks \ | ||
30 | ppc/e500v2/events ppc/e500v2/unit_masks \ | ||
31 | + ppc/e500mc/events ppc/e500mc/unit_masks \ | ||
32 | ppc/e300/events ppc/e300/unit_masks \ | ||
33 | tile/tile64/events tile/tile64/unit_masks \ | ||
34 | tile/tilepro/events tile/tilepro/unit_masks \ | ||
35 | diff --git a/events/ppc/e500mc/events b/events/ppc/e500mc/events | ||
36 | new file mode 100644 | ||
37 | index 0000000..8197a7d | ||
38 | --- /dev/null | ||
39 | +++ b/events/ppc/e500mc/events | ||
40 | @@ -0,0 +1,120 @@ | ||
41 | +# e500mc Events | ||
42 | +# | ||
43 | +# Copyright (C) 2010 Freescale Semiconductor, Inc. | ||
44 | +# | ||
45 | +event:0x1 counters:0,1,2,3 um:zero minimum:100 name:CPU_CLK : Cycles | ||
46 | +event:0x2 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_INSNS : Completed Instructions (0, 1, or 2 per cycle) | ||
47 | +event:0x3 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_OPS : Completed Micro-ops (counts 2 for load/store w/update) | ||
48 | +event:0x4 counters:0,1,2,3 um:zero minimum:500 name:INSTRUCTION_FETCHES : Instruction fetches | ||
49 | +event:0x5 counters:0,1,2,3 um:zero minimum:500 name:DECODED_OPS : Micro-ops decoded | ||
50 | +event:0x8 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_BRANCHES : Branch Instructions completed | ||
51 | +event:0x9 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_LOAD_OPS : Load micro-ops completed | ||
52 | +event:0xa counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_STORE_OPS : Store micro-ops completed | ||
53 | +event:0xb counters:0,1,2,3 um:zero minimum:500 name:COMPLETION_REDIRECTS : Number of completion buffer redirects | ||
54 | +event:0xc counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_FINISHED : Branches finished | ||
55 | +event:0xd counters:0,1,2,3 um:zero minimum:500 name:TAKEN_BRANCHES_FINISHED : Taken branches finished | ||
56 | +event:0xe counters:0,1,2,3 um:zero minimum:500 name:BIFFED_BRANCHES_FINISHED : Biffed branches finished | ||
57 | +event:0xf counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_MISPREDICTED : Branch instructions mispredicted due to direction, target, or IAB prediction | ||
58 | +event:0x10 counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_MISPREDICTED_DIRECTION : Branches mispredicted due to direction prediction | ||
59 | +event:0x11 counters:0,1,2,3 um:zero minimum:500 name:BTB_HITS : Branches that hit in the BTB, or missed but are not taken | ||
60 | +event:0x12 counters:0,1,2,3 um:zero minimum:500 name:DECODE_STALLED : Cycles the instruction buffer was not empty, but 0 instructions decoded | ||
61 | +event:0x13 counters:0,1,2,3 um:zero minimum:500 name:ISSUE_STALLED : Cycles the issue buffer is not empty but 0 instructions issued | ||
62 | +event:0x14 counters:0,1,2,3 um:zero minimum:500 name:BRANCH_ISSUE_STALLED : Cycles the branch buffer is not empty but 0 instructions issued | ||
63 | +event:0x15 counters:0,1,2,3 um:zero minimum:500 name:SRS0_SCHEDULE_STALLED : Cycles SRS0 is not empty but 0 instructions scheduled | ||
64 | +event:0x16 counters:0,1,2,3 um:zero minimum:500 name:SRS1_SCHEDULE_STALLED : Cycles SRS1 is not empty but 0 instructions scheduled | ||
65 | +event:0x17 counters:0,1,2,3 um:zero minimum:500 name:VRS_SCHEDULE_STALLED : Cycles VRS is not empty but 0 instructions scheduled | ||
66 | +event:0x18 counters:0,1,2,3 um:zero minimum:500 name:LRS_SCHEDULE_STALLED : Cycles LRS is not empty but 0 instructions scheduled | ||
67 | +event:0x19 counters:0,1,2,3 um:zero minimum:500 name:BRS_SCHEDULE_STALLED : Cycles BRS is not empty but 0 instructions scheduled Load/Store, Data Cache, and dLFB Events | ||
68 | +event:0x1a counters:0,1,2,3 um:zero minimum:500 name:TOTAL_TRANSLATED : Total Ldst microops translated. | ||
69 | +event:0x1b counters:0,1,2,3 um:zero minimum:500 name:LOADS_TRANSLATED : Number of cacheable L* or EVL* microops translated. (This includes microops from load-multiple, load-update, and load-context instructions.) | ||
70 | +event:0x1c counters:0,1,2,3 um:zero minimum:500 name:STORES_TRANSLATED : Number of cacheable ST* or EVST* microops translated. (This includes microops from store-multiple, store-update, and save-context instructions.) | ||
71 | +event:0x1d counters:0,1,2,3 um:zero minimum:500 name:TOUCHES_TRANSLATED : Number of cacheable DCBT and DCBTST instructions translated (L1 only) (Does not count touches that are converted to nops i.e. exceptions, noncacheable, hid0[nopti] bit is set.) | ||
72 | +event:0x1e counters:0,1,2,3 um:zero minimum:500 name:CACHEOPS_TRANSLATED : Number of dcba, dcbf, dcbst, and dcbz instructions translated (e500 traps on dcbi) | ||
73 | +event:0x1f counters:0,1,2,3 um:zero minimum:500 name:CACHEINHIBITED_ACCESSES_TRANSLATED : Number of cache inhibited accesses translated | ||
74 | +event:0x20 counters:0,1,2,3 um:zero minimum:500 name:GUARDED_LOADS_TRANSLATED : Number of guarded loads translated | ||
75 | +event:0x21 counters:0,1,2,3 um:zero minimum:500 name:WRITETHROUGH_STORES_TRANSLATED : Number of write-through stores translated | ||
76 | +event:0x22 counters:0,1,2,3 um:zero minimum:500 name:MISALIGNED_ACCESSES_TRANSLATED : Number of misaligned load or store accesses translated. | ||
77 | +event:0x23 counters:0,1,2,3 um:zero minimum:500 name:TOTAL_ALLOCATED_DLFB : Total allocated to dLFB | ||
78 | +event:0x24 counters:0,1,2,3 um:zero minimum:500 name:LOADS_TRANSLATED_ALLOCATED_DLFB : Loads translated and allocated to dLFB (Applies to same class of instructions as loads translated.) | ||
79 | +event:0x25 counters:0,1,2,3 um:zero minimum:500 name:STORES_COMPLETED_ALLOCATED_DLFB : Stores completed and allocated to dLFB (Applies to same class of instructions as stores translated.) | ||
80 | +event:0x26 counters:0,1,2,3 um:zero minimum:500 name:TOUCHES_TRANSLATED_ALLOCATED_DLFB : Touches translated and allocated to dLFB (Applies to same class of instructions as touches translated.) | ||
81 | +event:0x27 counters:0,1,2,3 um:zero minimum:500 name:STORES_COMPLETED : Number of cacheable ST* or EVST* microops completed. (Applies to the same class of instructions as stores translated.) | ||
82 | +event:0x28 counters:0,1,2,3 um:zero minimum:500 name:DL1_LOCKS : Number of cache lines locked in the dL1. (Counts a lock even if an overlock condition is encountered.) | ||
83 | +event:0x29 counters:0,1,2,3 um:zero minimum:500 name:DL1_RELOADS : This is historically used to determine dcache miss rate (along with loads/stores completed). This counts dL1 reloads for any reason. | ||
84 | +event:0x2a counters:0,1,2,3 um:zero minimum:500 name:DL1_CASTOUTS : dL1 castouts. Does not count castouts due to DCBF. | ||
85 | +event:0x2b counters:0,1,2,3 um:zero minimum:500 name:DETECTED_REPLAYS : Times detected replay condition - Load miss with dLFB full. | ||
86 | +event:0x2c counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_QUEUE_FULL_REPLAYS : Load miss with load queue full. | ||
87 | +event:0x2d counters:0,1,2,3 um:zero minimum:500 name:LOAD_GUARDED_MISS_NOT_LAST_REPLAYS : Load guarded miss when the load is not yet at the bottom of the completion buffer. | ||
88 | +event:0x2e counters:0,1,2,3 um:zero minimum:500 name:STORE_TRANSLATED_QUEUE_FULL_REPLAYS : Translate a store when the StQ is full. | ||
89 | +event:0x2f counters:0,1,2,3 um:zero minimum:500 name:ADDRESS_COLLISION_REPLAYS : Address collision. | ||
90 | +event:0x30 counters:0,1,2,3 um:zero minimum:500 name:DMMU_MISS_REPLAYS : DMMU_MISS_REPLAYS : DMMU miss. | ||
91 | +event:0x31 counters:0,1,2,3 um:zero minimum:500 name:DMMU_BUSY_REPLAYS : DMMU_BUSY_REPLAYS : DMMU busy. | ||
92 | +event:0x32 counters:0,1,2,3 um:zero minimum:500 name:SECOND_PART_MISALIGNED_AFTER_MISS_REPLAYS : Second part of misaligned access when first part missed in cache. | ||
93 | +event:0x33 counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_DLFB_FULL_CYCLES : Cycles stalled on replay condition - Load miss with dLFB full. | ||
94 | +event:0x34 counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_QUEUE_FULL_CYCLES : Cycles stalled on replay condition - Load miss with load queue full. | ||
95 | +event:0x35 counters:0,1,2,3 um:zero minimum:500 name:LOAD_GUARDED_MISS_NOT_LAST_CYCLES : Cycles stalled on replay condition - Load guarded miss when the load is not yet at the bottom of the completion buffer. | ||
96 | +event:0x36 counters:0,1,2,3 um:zero minimum:500 name:STORE_TRANSLATED_QUEUE_FULL_CYCLES : Cycles stalled on replay condition - Translate a store when the StQ is full. | ||
97 | +event:0x37 counters:0,1,2,3 um:zero minimum:500 name:ADDRESS_COLLISION_CYCLES : Cycles stalled on replay condition - Address collision. | ||
98 | +event:0x38 counters:0,1,2,3 um:zero minimum:500 name:DMMU_MISS_CYCLES : Cycles stalled on replay condition - DMMU miss. | ||
99 | +event:0x39 counters:0,1,2,3 um:zero minimum:500 name:DMMU_BUSY_CYCLES : Cycles stalled on replay condition - DMMU busy. | ||
100 | +event:0x3a counters:0,1,2,3 um:zero minimum:500 name:SECOND_PART_MISALIGNED_AFTER_MISS_CYCLES : Cycles stalled on replay condition - Second part of misaligned access when first part missed in cache. | ||
101 | +event:0x3b counters:0,1,2,3 um:zero minimum:500 name:IL1_LOCKS : Number of cache lines locked in the iL1. (Counts a lock even if an overlock condition is encountered.) | ||
102 | +event:0x3c counters:0,1,2,3 um:zero minimum:500 name:IL1_FETCH_RELOADS : This is historically used to determine icache miss rate (along with instructions completed) Reloads due to demand fetch. | ||
103 | +event:0x3d counters:0,1,2,3 um:zero minimum:500 name:FETCHES : Counts the number of fetches that write at least one instruction to the instruction buffer. (With instruction fetched, can used to compute instructions-per-fetch) | ||
104 | +event:0x3e counters:0,1,2,3 um:zero minimum:500 name:IMMU_TLB4K_RELOADS : iMMU TLB4K reloads | ||
105 | +event:0x3f counters:0,1,2,3 um:zero minimum:500 name:IMMU_VSP_RELOADS : iMMU VSP reloads | ||
106 | +event:0x40 counters:0,1,2,3 um:zero minimum:500 name:DMMU_TLB4K_RELOADS : dMMU TLB4K reloads | ||
107 | +event:0x41 counters:0,1,2,3 um:zero minimum:500 name:DMMU_VSP_RELOADS : dMMU VSP reloads | ||
108 | +event:0x42 counters:0,1,2,3 um:zero minimum:500 name:L2MMU_MISSES : Counts iTLB/dTLB error interrupt | ||
109 | +event:0x43 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_REQUESTS : Number of master transactions. (Number of master TSs.) | ||
110 | +event:0x44 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_I_REQUESTS : Number of master I-Side transactions. (Number of master I-Side TSs.) | ||
111 | +event:0x45 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_D_REQUESTS : Number of master D-Side transactions. (Number of master D-Side TSs.) | ||
112 | +event:0x46 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_D_CASTOUT_REQUESTS : Number of master D-Side non-program-demand castout transactions. This counts replacement pushes and snoop pushes. This does not count DCBF castouts. (Number of master D-side non-program-demand castout TSs.) | ||
113 | +event:0x48 counters:0,1,2,3 um:zero minimum:500 name:SNOOP_REQUESTS : Number of externally generated snoop requests. (Counts snoop TSs.) | ||
114 | +event:0x49 counters:0,1,2,3 um:zero minimum:500 name:SNOOP_HITS : Number of snoop hits on all D-side resources regardless of the cache state (modified, exclusive, or shared) | ||
115 | +event:0x4a counters:0,1,2,3 um:zero minimum:500 name:SNOOP_PUSHES : Number of snoop pushes from all D-side resources. (Counts snoop ARTRY/WOPs.) | ||
116 | +event:0x52 counters:0,1,2,3 um:zero minimum:500 name:PMC0_OVERFLOW : Counts the number of times PMC0[32] transitioned from 1 to 0. | ||
117 | +event:0x53 counters:0,1,2,3 um:zero minimum:500 name:PMC1_OVERFLOW : Counts the number of times PMC1[32] transitioned from 1 to 0. | ||
118 | +event:0x54 counters:0,1,2,3 um:zero minimum:500 name:PMC2_OVERFLOW : Counts the number of times PMC2[32] transitioned from 1 to 0. | ||
119 | +event:0x55 counters:0,1,2,3 um:zero minimum:500 name:PMC3_OVERFLOW : Counts the number of times PMC3[32] transitioned from 1 to 0. | ||
120 | +event:0x56 counters:0,1,2,3 um:zero minimum:500 name:INTERRUPTS : Number of interrupts taken | ||
121 | +event:0x57 counters:0,1,2,3 um:zero minimum:500 name:EXTERNAL_INTERRUPTS : Number of external input interrupts taken | ||
122 | +event:0x58 counters:0,1,2,3 um:zero minimum:500 name:CRITICAL_INTERRUPTS : Number of critical input interrupts taken | ||
123 | +event:0x59 counters:0,1,2,3 um:zero minimum:500 name:SC_TRAP_INTERRUPTS : Number of system call and trap interrupts | ||
124 | +event:0x5b counters:0,1,2,3 um:zero minimum:500 name:L2_LINEFILL_REQ : Number L2 Linefill requests | ||
125 | +event:0x5c counters:0,1,2,3 um:zero minimum:500 name:L2_VICTIM_SELECT : Number L2 Victim selects | ||
126 | +event:0x6e counters:0,1,2,3 um:zero minimum:500 name:L2_ACCESS : Number L2 cache accesses | ||
127 | +event:0x6f counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_ACCESS : Number L2 hit cache accesses | ||
128 | +event:0x70 counters:0,1,2,3 um:zero minimum:500 name:L2_DATA_ACCESS : Number L2 data cache accesses | ||
129 | +event:0x71 counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_DATA_ACCESS : Number L2 hit data cache accesses | ||
130 | +event:0x72 counters:0,1,2,3 um:zero minimum:500 name:L2_INST_ACCESS : Number L2 instruction cache accesses | ||
131 | +event:0x73 counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_INST_ACCESS : Number L2 hit instruction cache accesses | ||
132 | +event:0x74 counters:0,1,2,3 um:zero minimum:500 name:L2_ALLOC : Number L2 cache allocations | ||
133 | +event:0x75 counters:0,1,2,3 um:zero minimum:500 name:L2_DATA_ALLOC : Number L2 data cache allocations | ||
134 | +event:0x76 counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_DATA_ALLOC : Number L2 dirty data cache allocations | ||
135 | +event:0x77 counters:0,1,2,3 um:zero minimum:500 name:L2_INST_ALLOC : Number L2 instruction cache allocations | ||
136 | +event:0x78 counters:0,1,2,3 um:zero minimum:500 name:L2_UPDATE : Number L2 cache updates | ||
137 | +event:0x79 counters:0,1,2,3 um:zero minimum:500 name:L2_CLEAN_UPDATE : Number L2 cache clean updates | ||
138 | +event:0x7a counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_UPDATE : Number L2 cache dirty updates | ||
139 | +event:0x7b counters:0,1,2,3 um:zero minimum:500 name:L2_CLEAN_REDU_UPDATE : Number L2 cache clean redundant updates | ||
140 | +event:0x7c counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_REDU_UPDATE : Number L2 cache dirty redundant updates | ||
141 | +event:0x7d counters:0,1,2,3 um:zero minimum:500 name:L2_LOCKS : Number L2 cache locks | ||
142 | +event:0x7e counters:0,1,2,3 um:zero minimum:500 name:L2_CASTOUT : Number L2 cache castouts | ||
143 | +event:0x7f counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_DATA_DIRTY : Number L2 cache data dirty hits | ||
144 | +event:0x82 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_CLEAN : Number L2 cache invalidation of clean lines | ||
145 | +event:0x83 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_INCOHER : Number L2 cache invalidation of incoherent lines | ||
146 | +event:0x84 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_COHER : Number L2 cache invalidation of coherent lines | ||
147 | +event:0x94 counters:0,1,2,3 um:zero minimum:500 name:DVT0 : Detection of write to DEVENT with DVT0 set | ||
148 | +event:0x95 counters:0,1,2,3 um:zero minimum:500 name:DVT1 : Detection of write to DEVENT with DVT1 set | ||
149 | +event:0x96 counters:0,1,2,3 um:zero minimum:500 name:DVT2 : Detection of write to DEVENT with DVT2 set | ||
150 | +event:0x97 counters:0,1,2,3 um:zero minimum:500 name:DVT3 : Detection of write to DEVENT with DVT3 set | ||
151 | +event:0x98 counters:0,1,2,3 um:zero minimum:500 name:DVT4 : Detection of write to DEVENT with DVT4 set | ||
152 | +event:0x99 counters:0,1,2,3 um:zero minimum:500 name:DVT5 : Detection of write to DEVENT with DVT5 set | ||
153 | +event:0x9a counters:0,1,2,3 um:zero minimum:500 name:DVT6 : Detection of write to DEVENT with DVT6 set | ||
154 | +event:0x9b counters:0,1,2,3 um:zero minimum:500 name:DVT7 : Detection of write to DEVENT with DVT7 set | ||
155 | +event:0x9c counters:0,1,2,3 um:zero minimum:500 name:CYCLES_NEXUS_STALLED : Number of completion cycles stalled due to Nexus FIFO full | ||
156 | +event:0xb0 counters:0,1,2,3 um:zero minimum:500 name:DECORATED_LOAD : Number of decorated loads. | ||
157 | +event:0xb1 counters:0,1,2,3 um:zero minimum:500 name:DECORATED_STORE : Number of decorated stores | ||
158 | +event:0xb2 counters:0,1,2,3 um:zero minimum:500 name:LOAD_RETRY : Number of load retries | ||
159 | +event:0xb3 counters:0,1,2,3 um:zero minimum:500 name:STWCX_SUCCESS : Number of successful stwcx. instructions | ||
160 | +event:0xb4 counters:0,1,2,3 um:zero minimum:500 name:STWCX_UNSUCCESS : Number of unsuccessful stwcx. instructions | ||
161 | diff --git a/events/ppc/e500mc/unit_masks b/events/ppc/e500mc/unit_masks | ||
162 | new file mode 100644 | ||
163 | index 0000000..395c653 | ||
164 | --- /dev/null | ||
165 | +++ b/events/ppc/e500mc/unit_masks | ||
166 | @@ -0,0 +1,4 @@ | ||
167 | +# e500 possible unit masks | ||
168 | +# | ||
169 | +name:zero type:mandatory default:0x0 | ||
170 | + 0x0 No unit mask | ||
171 | diff --git a/libop/op_cpu_type.c b/libop/op_cpu_type.c | ||
172 | index 89d5a92..7d50a2d 100644 | ||
173 | --- a/libop/op_cpu_type.c | ||
174 | +++ b/libop/op_cpu_type.c | ||
175 | @@ -125,6 +125,7 @@ static struct cpu_descr const cpu_descrs[MAX_CPU_TYPE] = { | ||
176 | { "AMD64 generic", "x86-64/generic", CPU_AMD64_GENERIC, 4 }, | ||
177 | { "IBM Power Architected Events V1", "ppc64/architected_events_v1", CPU_PPC64_ARCH_V1, 6 }, | ||
178 | { "ppc64 POWER8", "ppc64/power8", CPU_PPC64_POWER8, 6 }, | ||
179 | + { "e500mc", "ppc/e500mc", CPU_PPC_E500MC, 4 }, | ||
180 | }; | ||
181 | |||
182 | static size_t const nr_cpu_descrs = sizeof(cpu_descrs) / sizeof(struct cpu_descr); | ||
183 | diff --git a/libop/op_cpu_type.h b/libop/op_cpu_type.h | ||
184 | index aeb6bb2..10f000b 100644 | ||
185 | --- a/libop/op_cpu_type.h | ||
186 | +++ b/libop/op_cpu_type.h | ||
187 | @@ -105,6 +105,7 @@ typedef enum { | ||
188 | CPU_AMD64_GENERIC, /**< AMD64 Generic */ | ||
189 | CPU_PPC64_ARCH_V1, /** < IBM Power architected events version 1 */ | ||
190 | CPU_PPC64_POWER8, /**< ppc64 POWER8 family */ | ||
191 | + CPU_PPC_E500MC, /**< e500mc */ | ||
192 | MAX_CPU_TYPE | ||
193 | } op_cpu; | ||
194 | |||
195 | diff --git a/libop/op_events.c b/libop/op_events.c | ||
196 | index bb86833..638dc5c 100644 | ||
197 | --- a/libop/op_events.c | ||
198 | +++ b/libop/op_events.c | ||
199 | @@ -1308,6 +1308,7 @@ void op_default_event(op_cpu cpu_type, struct op_default_event_descr * descr) | ||
200 | |||
201 | case CPU_PPC_E500: | ||
202 | case CPU_PPC_E500_2: | ||
203 | + case CPU_PPC_E500MC: | ||
204 | case CPU_PPC_E300: | ||
205 | descr->name = "CPU_CLK"; | ||
206 | break; | ||
207 | diff --git a/utils/ophelp.c b/utils/ophelp.c | ||
208 | index 1b913ca..0647360 100644 | ||
209 | --- a/utils/ophelp.c | ||
210 | +++ b/utils/ophelp.c | ||
211 | @@ -753,6 +753,7 @@ int main(int argc, char const * argv[]) | ||
212 | |||
213 | case CPU_PPC_E500: | ||
214 | case CPU_PPC_E500_2: | ||
215 | + case CPU_PPC_E500MC: | ||
216 | event_doc = | ||
217 | "See PowerPC e500 Core Complex Reference Manual\n" | ||
218 | "Chapter 7: Performance Monitor\n" | ||
219 | -- | ||
diff --git a/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-AArch64-architecture.patch b/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-AArch64-architecture.patch new file mode 100644 index 0000000000..a2385cd2b2 --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-AArch64-architecture.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From 27edaef9c6d66dfc324630ef40cb27e78031eeeb Mon Sep 17 00:00:00 2001 | ||
2 | From: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> | ||
3 | Date: Tue, 15 Jan 2013 07:37:33 +0100 | ||
4 | Subject: [PATCH] Add rmb() definition for AArch64 architecture | ||
5 | |||
6 | Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> | ||
7 | |||
8 | Upstream-Status: backport | ||
9 | --- | ||
10 | libperf_events/operf_utils.h | 5 +++++ | ||
11 | 1 file changed, 5 insertions(+) | ||
12 | |||
13 | diff --git a/libperf_events/operf_utils.h b/libperf_events/operf_utils.h | ||
14 | index 815d51d..2df00b7 100644 | ||
15 | --- a/libperf_events/operf_utils.h | ||
16 | +++ b/libperf_events/operf_utils.h | ||
17 | @@ -148,6 +148,11 @@ void op_release_resources(void); | ||
18 | #define cpu_relax() asm volatile("":::"memory") | ||
19 | #endif | ||
20 | |||
21 | +#ifdef __aarch64__ | ||
22 | +#define rmb() asm volatile("dmb ld" ::: "memory") | ||
23 | +#define cpu_relax() asm volatile("yield" ::: "memory") | ||
24 | +#endif | ||
25 | + | ||
26 | #ifdef __mips__ | ||
27 | #include <asm/unistd.h> | ||
28 | #define rmb() asm volatile( \ | ||
29 | -- | ||
30 | 1.8.0 | ||
31 | |||
diff --git a/meta/recipes-kernel/oprofile/oprofile/0001-Tidy-powerpc64-bfd-target-check.patch b/meta/recipes-kernel/oprofile/oprofile/0001-Tidy-powerpc64-bfd-target-check.patch new file mode 100644 index 0000000000..93c62400cf --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofile/0001-Tidy-powerpc64-bfd-target-check.patch | |||
@@ -0,0 +1,123 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | From 63b5692aace5ff6022f892822b4bfdc51ed25bfb Mon Sep 17 00:00:00 2001 | ||
4 | From: Alan Modra <amodra@gmail.com> | ||
5 | Date: Fri, 2 May 2014 07:54:08 -0500 | ||
6 | Subject: [PATCH] Tidy powerpc64 bfd target check | ||
7 | |||
8 | Testing for a bfd_target vector might (will!) break. See | ||
9 | https://sourceware.org/ml/binutils/2014-04/msg00283.html | ||
10 | |||
11 | It's safer to ask BFD for the target name. I left the direct target | ||
12 | vector checks in configure tests, and updated them, even though the | ||
13 | target vector is no longer used in oprofile code, because a run-time | ||
14 | configure test for powerpc64 support in bfd: | ||
15 | #include <bfd.h> | ||
16 | int main(void) | ||
17 | { return !bfd_find_target("elf64-powerpc", (void *)0); } | ||
18 | unfortunately isn't possible when cross-compiling. | ||
19 | |||
20 | The bfd_target vector tests could be omitted if we aren't bothered by | ||
21 | the small runtime overhead of a strncmp on targets other than | ||
22 | powerpc64. | ||
23 | |||
24 | * libutil++/bfd_support.cpp (get_synth_symbols): Don't check for | ||
25 | ppc64 target vector, use bfd_get_target to return the target | ||
26 | name instead. | ||
27 | * m4/binutils.m4: Modernize bfd_get_synthetic_symtab checks to | ||
28 | use AC_LINK_IFELSE. Check for either powerpc_elf64_vec or | ||
29 | bfd_elf64_powerpc_vec. | ||
30 | |||
31 | Signed-off-by: Alan Modra <amodra@gmail.com> | ||
32 | --- | ||
33 | libutil++/bfd_support.cpp | 10 +++++++-- | ||
34 | m4/binutils.m4 | 50 ++++++++++++++++++++++----------------------- | ||
35 | 2 files changed, 33 insertions(+), 27 deletions(-) | ||
36 | |||
37 | Index: oprofile-0.9.9/libutil++/bfd_support.cpp | ||
38 | =================================================================== | ||
39 | --- oprofile-0.9.9.orig/libutil++/bfd_support.cpp 2013-07-29 08:55:06.000000000 -0700 | ||
40 | +++ oprofile-0.9.9/libutil++/bfd_support.cpp 2014-05-02 09:12:05.761146347 -0700 | ||
41 | @@ -633,10 +633,16 @@ | ||
42 | |||
43 | bool bfd_info::get_synth_symbols() | ||
44 | { | ||
45 | - extern const bfd_target bfd_elf64_powerpc_vec; | ||
46 | - extern const bfd_target bfd_elf64_powerpcle_vec; | ||
47 | - bool is_elf64_powerpc_target = (abfd->xvec == &bfd_elf64_powerpc_vec) | ||
48 | - || (abfd->xvec == &bfd_elf64_powerpcle_vec); | ||
49 | + const char* targname = bfd_get_target(abfd); | ||
50 | + // Match elf64-powerpc and elf64-powerpc-freebsd, but not | ||
51 | + // elf64-powerpcle. elf64-powerpcle is a different ABI without | ||
52 | + // function descriptors, so we don't need the synthetic | ||
53 | + // symbols to have function code marked by a symbol. | ||
54 | + bool is_elf64_powerpc_target = (!strncmp(targname, "elf64-powerpc", 13) | ||
55 | + && (targname[13] == 0 | ||
56 | + || targname[13] == '-')); | ||
57 | + | ||
58 | + | ||
59 | |||
60 | if (!is_elf64_powerpc_target) | ||
61 | return false; | ||
62 | Index: oprofile-0.9.9/m4/binutils.m4 | ||
63 | =================================================================== | ||
64 | --- oprofile-0.9.9.orig/m4/binutils.m4 2013-07-29 08:55:07.000000000 -0700 | ||
65 | +++ oprofile-0.9.9/m4/binutils.m4 2014-05-02 09:07:32.471148147 -0700 | ||
66 | @@ -22,32 +22,32 @@ | ||
67 | |||
68 | AC_LANG_PUSH(C) | ||
69 | # Determine if bfd_get_synthetic_symtab macro is available | ||
70 | -OS="`uname`" | ||
71 | -if test "$OS" = "Linux"; then | ||
72 | - AC_MSG_CHECKING([whether bfd_get_synthetic_symtab() exists in BFD library]) | ||
73 | - rm -f test-for-synth | ||
74 | - AC_LANG_CONFTEST( | ||
75 | - [AC_LANG_PROGRAM([[#include <bfd.h>]], | ||
76 | - [[asymbol * synthsyms; bfd * ibfd = 0; | ||
77 | - long synth_count = bfd_get_synthetic_symtab(ibfd, 0, 0, 0, 0, &synthsyms); | ||
78 | - extern const bfd_target bfd_elf64_powerpc_vec; | ||
79 | - extern const bfd_target bfd_elf64_powerpcle_vec; | ||
80 | - char * ppc_name = bfd_elf64_powerpc_vec.name; | ||
81 | - char * ppcle_name = bfd_elf64_powerpcle_vec.name; | ||
82 | - printf("%s %s\n", ppc_name, ppcle_name);]]) | ||
83 | - ]) | ||
84 | - $CC conftest.$ac_ext $CFLAGS $LDFLAGS $LIBS -o test-for-synth > /dev/null 2>&1 | ||
85 | - if test -f test-for-synth; then | ||
86 | - echo "yes" | ||
87 | - SYNTHESIZE_SYMBOLS='1' | ||
88 | - else | ||
89 | - echo "no" | ||
90 | - SYNTHESIZE_SYMBOLS='0' | ||
91 | - fi | ||
92 | - AC_DEFINE_UNQUOTED(SYNTHESIZE_SYMBOLS, $SYNTHESIZE_SYMBOLS, [Synthesize special symbols when needed]) | ||
93 | - rm -f test-for-synth* | ||
94 | +AC_MSG_CHECKING([whether bfd_get_synthetic_symtab() exists in BFD library]) | ||
95 | +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <bfd.h> | ||
96 | + ]], | ||
97 | + [[asymbol * synthsyms; bfd * ibfd = 0; | ||
98 | + long synth_count = bfd_get_synthetic_symtab(ibfd, 0, 0, 0, 0, &synthsyms); | ||
99 | + extern const bfd_target powerpc_elf64_vec; | ||
100 | + char *ppc_name = powerpc_elf64_vec.name; | ||
101 | + printf("%s\n", ppc_name); | ||
102 | + ]])], | ||
103 | + [AC_MSG_RESULT([yes]) | ||
104 | + SYNTHESIZE_SYMBOLS=2], | ||
105 | + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <bfd.h> | ||
106 | + ]], | ||
107 | + [[asymbol * synthsyms; bfd * ibfd = 0; | ||
108 | + long synth_count = bfd_get_synthetic_symtab(ibfd, 0, 0, 0, 0, &synthsyms); | ||
109 | + extern const bfd_target bfd_elf64_powerpc_vec; | ||
110 | + char *ppc_name = bfd_elf64_powerpc_vec.name; | ||
111 | + printf("%s\n", ppc_name); | ||
112 | + ]])], | ||
113 | + [AC_MSG_RESULT([yes]) | ||
114 | + SYNTHESIZE_SYMBOLS=1], | ||
115 | + [AC_MSG_RESULT([no]) | ||
116 | + SYNTHESIZE_SYMBOLS=0]) | ||
117 | + ]) | ||
118 | +AC_DEFINE_UNQUOTED(SYNTHESIZE_SYMBOLS, $SYNTHESIZE_SYMBOLS, [Synthesize special symbols when needed]) | ||
119 | |||
120 | -fi | ||
121 | AC_LANG_POP(C) | ||
122 | ] | ||
123 | ) | ||
diff --git a/meta/recipes-kernel/oprofile/oprofile/0002-Add-freescale-e6500-support.patch b/meta/recipes-kernel/oprofile/oprofile/0002-Add-freescale-e6500-support.patch new file mode 100644 index 0000000000..9b2ae042c6 --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofile/0002-Add-freescale-e6500-support.patch | |||
@@ -0,0 +1,364 @@ | |||
1 | From b91794fd855177946719b34ea5cd3822c7993caa Mon Sep 17 00:00:00 2001 | ||
2 | From: Ting Liu <b28495@freescale.com> | ||
3 | Date: Thu, 5 Sep 2013 07:45:52 -0500 | ||
4 | Subject: [PATCH 2/2] Add freescale e6500 support | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | |||
8 | Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com> | ||
9 | Signed-off-by: Ting Liu <b28495@freescale.com> | ||
10 | --- | ||
11 | events/Makefile.am | 1 + | ||
12 | events/ppc/e6500/events | 266 +++++++++++++++++++++++++++++++++++++++++++ | ||
13 | events/ppc/e6500/unit_masks | 4 + | ||
14 | libop/op_cpu_type.c | 1 + | ||
15 | libop/op_cpu_type.h | 1 + | ||
16 | libop/op_events.c | 1 + | ||
17 | utils/ophelp.c | 1 + | ||
18 | 7 files changed, 275 insertions(+), 0 deletions(-) | ||
19 | create mode 100644 events/ppc/e6500/events | ||
20 | create mode 100644 events/ppc/e6500/unit_masks | ||
21 | |||
22 | diff --git a/events/Makefile.am b/events/Makefile.am | ||
23 | index e496f98..d91d44b 100644 | ||
24 | --- a/events/Makefile.am | ||
25 | +++ b/events/Makefile.am | ||
26 | @@ -77,6 +77,7 @@ event_files = \ | ||
27 | ppc/e500/events ppc/e500/unit_masks \ | ||
28 | ppc/e500v2/events ppc/e500v2/unit_masks \ | ||
29 | ppc/e500mc/events ppc/e500mc/unit_masks \ | ||
30 | + ppc/e6500/events ppc/e6500/unit_masks \ | ||
31 | ppc/e300/events ppc/e300/unit_masks \ | ||
32 | tile/tile64/events tile/tile64/unit_masks \ | ||
33 | tile/tilepro/events tile/tilepro/unit_masks \ | ||
34 | diff --git a/events/ppc/e6500/events b/events/ppc/e6500/events | ||
35 | new file mode 100644 | ||
36 | index 0000000..f34f82d | ||
37 | --- /dev/null | ||
38 | +++ b/events/ppc/e6500/events | ||
39 | @@ -0,0 +1,266 @@ | ||
40 | +# e6500 Events | ||
41 | +# | ||
42 | +# Copyright (C) 2012 Freescale Semiconductor, Inc. | ||
43 | +# | ||
44 | +event:0x1 counters:0,1,2,3,4,5 um:zero minimum:100 name:CPU_CLK : Cycles | ||
45 | +event:0x2 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_INSNS : Completed Instructions (0, 1, or 2 per cycle) | ||
46 | +event:0x3 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_OPS : Completed Micro-ops | ||
47 | +event:0x5 counters:0,1,2,3,4,5 um:zero minimum:500 name:DECODED_OPS : Micro-ops decoded | ||
48 | +event:0x6 counters:0,1,2,3,4,5 um:zero minimum:500 name:TRANSITIONS_PM_EVENT : 0 to 1 transitions on the pm_event input | ||
49 | +event:0x7 counters:0,1,2,3,4,5 um:zero minimum:500 name:CPU_CLK_PM_EVENT : Processor cycles that occur when the pm_event input is asserted | ||
50 | +event:0x8 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_BRANCHES : Branch Instructions completed | ||
51 | +event:0x9 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_LOAD_OPS : Load micro-ops completed | ||
52 | +event:0xa counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_STORE_OPS : Store micro-ops completed | ||
53 | +event:0xb counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETION_REDIRECTS : Number of completion buffer redirects | ||
54 | +event:0xc counters:0,1,2,3,4,5 um:zero minimum:500 name:BRANCHES_FINISHED : Branches finished | ||
55 | +event:0xd counters:0,1,2,3,4,5 um:zero minimum:500 name:TAKEN_BRANCHES_FINISHED : Taken branches finished | ||
56 | +event:0xe counters:0,1,2,3,4,5 um:zero minimum:500 name:TAKEN_BRANCHES_FINISHED_NOT_BTB : Finished unconditional branches that miss the BTB | ||
57 | +event:0xf counters:0,1,2,3,4,5 um:zero minimum:500 name:BRANCHES_MISPREDICTED : Branch instructions mispredicted due to direction, target, or IAB prediction | ||
58 | +event:0x10 counters:0,1,2,3,4,5 um:zero minimum:500 name:BRANCHES_MISPREDICTED_DIRECTION : Branches mispredicted due to direction prediction | ||
59 | +event:0x11 counters:0,1,2,3,4,5 um:zero minimum:500 name:BTB_HITS : Branches that hit in the BTB, or missed but are not taken | ||
60 | +event:0x12 counters:0,1,2,3,4,5 um:zero minimum:500 name:DECODE_STALLED : Cycles the instruction buffer was not empty, but 0 instructions decoded | ||
61 | +event:0x13 counters:0,1,2,3,4,5 um:zero minimum:500 name:ISSUE_STALLED : Cycles the SFX/CFX issue queue is not empty but 0 instructions issued | ||
62 | +event:0x14 counters:0,1,2,3,4,5 um:zero minimum:500 name:BRANCH_ISSUE_STALLED : Cycles the branch buffer is not empty but 0 instructions issued | ||
63 | +event:0x15 counters:0,1,2,3,4,5 um:zero minimum:500 name:SFX0_SCHEDULE_STALLED : Cycles SFX0 is not empty but 0 instructions scheduled | ||
64 | +event:0x16 counters:0,1,2,3,4,5 um:zero minimum:500 name:SFX1_SCHEDULE_STALLED : Cycles SFX1 is not empty but 0 instructions scheduled | ||
65 | +event:0x17 counters:0,1,2,3,4,5 um:zero minimum:500 name:CFX_SCHEDULE_STALLED : Cycles CFX is not empty but 0 instructions scheduled | ||
66 | +event:0x18 counters:0,1,2,3,4,5 um:zero minimum:500 name:LSU_SCHEDULE_STALLED : Cycles LSU is not empty but 0 instructions scheduled | ||
67 | +event:0x19 counters:0,1,2,3,4,5 um:zero minimum:500 name:BU_SCHEDULE_STALLED : Cycles BU is not empty but 0 instructions scheduled | ||
68 | +event:0x1a counters:0,1,2,3,4,5 um:zero minimum:500 name:TOTAL_TRANSLATED : Total LSU micro-ops that reach the second stage of the LSU | ||
69 | +event:0x1b counters:0,1,2,3,4,5 um:zero minimum:500 name:LOADS_TRANSLATED : Cacheable load micro-ops translated.1 (Does not include WT) | ||
70 | +event:0x1c counters:0,1,2,3,4,5 um:zero minimum:500 name:STORES_TRANSLATED : Cacheable store micro-ops translated.1 (Does not include WT) | ||
71 | +event:0x1d counters:0,1,2,3,4,5 um:zero minimum:500 name:TOUCHES_TRANSLATED : Cacheable touch instructions translated. Includes: dcbt / dcbtep dcbtst / dcbtstep icbt ct=2 | ||
72 | +event:0x1e counters:0,1,2,3,4,5 um:zero minimum:500 name:CACHEOPS_TRANSLATED : Number of dcba, dcbf, dcbst, and dcbz instructions translated (e500 traps on dcbi) | ||
73 | +event:0x1f counters:0,1,2,3,4,5 um:zero minimum:500 name:CACHEINHIBITED_ACCESSES_TRANSLATED : Number of cache inhibited accesses translated | ||
74 | +event:0x20 counters:0,1,2,3,4,5 um:zero minimum:500 name:GUARDED_LOADS_TRANSLATED : Number of guarded loads translated | ||
75 | +event:0x21 counters:0,1,2,3,4,5 um:zero minimum:500 name:WRITETHROUGH_STORES_TRANSLATED : Number of write-through stores translated | ||
76 | +event:0x22 counters:0,1,2,3,4,5 um:zero minimum:500 name:MISALIGNED_ACCESSES_TRANSLATED : Number of misaligned load or store accesses translated. | ||
77 | +event:0x23 counters:0,1,2,3,4,5 um:zero minimum:500 name:FETCH_2X4_HITS : Each fetch retrieves up to 8 instructions, but only the first 4 are required. This event increments if at least one instruction of the second 4 are actually used. | ||
78 | +event:0x24 counters:0,1,2,3,4,5 um:zero minimum:500 name:FETCH_HITS_ON_PREFETCHES : Fetch hits on instruction prefetch when the data is still in the ILFB. | ||
79 | +event:0x25 counters:0,1,2,3,4,5 um:zero minimum:500 name:GENERATED_FETCH_PREFETCHES : Number of prefetches generated. | ||
80 | +event:0x29 counters:0,1,2,3,4,5 um:zero minimum:500 name:DL1_RELOADS : This is historically used to determine dcache miss rate (along with loads/stores completed). This counts dL1 reloads for any reason. | ||
81 | +event:0x2c counters:0,1,2,3,4,5 um:zero minimum:500 name:LOAD_MISS_WITH_LOAD_QUEUE_FULL : Counts number of stalls; Com:52 counts cycles stalled. Includes: cacheable loads, CI loads, loadec, larx, touches, ibll, ibsl,ibllsl | ||
82 | +event:0x2d counters:0,1,2,3,4,5 um:zero minimum:500 name:LOAD_GUARDED_MISS_NOT_LAST_REPLAYS : Load guarded miss when the load is not yet at the bottom of the completion buffer. | ||
83 | +event:0x2e counters:0,1,2,3,4,5 um:zero minimum:500 name:STORE_TRANSLATED_QUEUE_FULL_REPLAYS : Translate a store when the StQ is full. | ||
84 | +event:0x2f counters:0,1,2,3,4,5 um:zero minimum:500 name:ADDRESS_COLLISION_REPLAYS : Address collision. | ||
85 | +event:0x30 counters:0,1,2,3,4,5 um:zero minimum:500 name:DTLB_MISS_REPLAYS : Counts number of stalls; Com:56 counts cycles stalled. | ||
86 | +event:0x31 counters:0,1,2,3,4,5 um:zero minimum:500 name:DTLB_BUSY_REPLAYS : Counts number of stalls; Com:57 counts cycles stalled. | ||
87 | +event:0x32 counters:0,1,2,3,4,5 um:zero minimum:500 name:SECOND_PART_MISALIGNED_AFTER_MISS_REPLAYS : Second part of misaligned access when first part missed in cache. | ||
88 | +event:0x34 counters:0,1,2,3,4,5 um:zero minimum:500 name:LOAD_MISS_QUEUE_FULL_CYCLES : Cycles stalled on replay condition - Load miss with load queue full. | ||
89 | +event:0x35 counters:0,1,2,3,4,5 um:zero minimum:500 name:LOAD_GUARDED_MISS_NOT_LAST_CYCLES : Cycles stalled on replay condition - Load guarded miss when the load is not yet at the bottom of the completion buffer. | ||
90 | +event:0x36 counters:0,1,2,3,4,5 um:zero minimum:500 name:STORE_TRANSLATED_QUEUE_FULL_CYCLES : Cycles stalled on replay condition - Translate a store when the StQ is full. | ||
91 | +event:0x37 counters:0,1,2,3,4,5 um:zero minimum:500 name:ADDRESS_COLLISION_CYCLES : Cycles stalled on replay condition - Address collision. | ||
92 | +event:0x38 counters:0,1,2,3,4,5 um:zero minimum:500 name:DTLB_MISS_CYCLES : Cycles stalled on replay condition - DTLB miss. | ||
93 | +event:0x39 counters:0,1,2,3,4,5 um:zero minimum:500 name:DTLB_BUSY_CYCLES : Cycles stalled on replay condition - DTLB busy. | ||
94 | +event:0x3a counters:0,1,2,3,4,5 um:zero minimum:500 name:SECOND_PART_MISALIGNED_AFTER_MISS_CYCLES : Cycles stalled on replay condition - Second part of misaligned access when first part missed in cache. | ||
95 | +event:0x3c counters:0,1,2,3,4,5 um:zero minimum:500 name:IL1_FETCH_RELOADS : This is historically used to determine icache miss rate (along with instructions completed) Reloads due to demand fetch. | ||
96 | +event:0x3d counters:0,1,2,3,4,5 um:zero minimum:500 name:FETCHES : Counts fetches that write at least one instruction to the Instruction Buffer. | ||
97 | +event:0x3e counters:0,1,2,3,4,5 um:zero minimum:500 name:IMMU_TLB4K_RELOADS : iMMU TLB4K reloads | ||
98 | +event:0x3f counters:0,1,2,3,4,5 um:zero minimum:500 name:IMMU_VSP_RELOADS : iMMU VSP reloads | ||
99 | +event:0x40 counters:0,1,2,3,4,5 um:zero minimum:500 name:DMMU_TLB4K_RELOADS : dMMU TLB4K reloads | ||
100 | +event:0x41 counters:0,1,2,3,4,5 um:zero minimum:500 name:DMMU_VSP_RELOADS : dMMU VSP reloads | ||
101 | +event:0x42 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2MMU_MISSES : Counts iTLB/dTLB error interrupt | ||
102 | +event:0x43 counters:0,1,2,3,4,5 um:zero minimum:500 name:TAKEN_BRANCHES : Completed branch instructions that were taken. | ||
103 | +event:0x44 counters:0,1,2,3,4,5 um:zero minimum:500 name:TAKEN_BLR : Completed blr instructions that were taken. | ||
104 | +event:0x45 counters:0,1,2,3,4,5 um:zero minimum:500 name:BTB_TARGET_MISPREDICT : Number of target mispredicts (BTB). | ||
105 | +event:0x46 counters:0,1,2,3,4,5 um:zero minimum:500 name:MISPREDICT_TARGET_BLR : Number of link stack mispredicts (LS). | ||
106 | +event:0x47 counters:0,1,2,3,4,5 um:zero minimum:500 name:TAKEN_BTB_BUT_MISS : Number of BTB misses, but taken (BTB allocates). | ||
107 | +event:0x52 counters:0,1,2,3,4,5 um:zero minimum:500 name:PMC0_OVERFLOW : Counts the number of times PMC0[32] transitioned from 1 to 0. | ||
108 | +event:0x53 counters:0,1,2,3,4,5 um:zero minimum:500 name:PMC1_OVERFLOW : Counts the number of times PMC1[32] transitioned from 1 to 0. | ||
109 | +event:0x54 counters:0,1,2,3,4,5 um:zero minimum:500 name:PMC2_OVERFLOW : Counts the number of times PMC2[32] transitioned from 1 to 0. | ||
110 | +event:0x55 counters:0,1,2,3,4,5 um:zero minimum:500 name:PMC3_OVERFLOW : Counts the number of times PMC3[32] transitioned from 1 to 0. | ||
111 | +event:0x56 counters:0,1,2,3,4,5 um:zero minimum:500 name:INTERRUPTS : Number of interrupts taken | ||
112 | +event:0x57 counters:0,1,2,3,4,5 um:zero minimum:500 name:EXTERNAL_INTERRUPTS : Number of external input interrupts taken | ||
113 | +event:0x58 counters:0,1,2,3,4,5 um:zero minimum:500 name:CRITICAL_INTERRUPTS : Number of critical input interrupts taken | ||
114 | +event:0x59 counters:0,1,2,3,4,5 um:zero minimum:500 name:SC_TRAP_INTERRUPTS : Number of system call and trap interrupts | ||
115 | +event:0x5a counters:0,1,2,3,4,5 um:zero minimum:500 name:TBL_BIT_TRANS_PMGC0 : Counts transitions of the TBL bit selected by PMGC0[TBSEL]. | ||
116 | +event:0x5b counters:0,1,2,3,4,5 um:zero minimum:500 name:PMC4_OVERFLOW : Counts the number of times PMC4[32] transitioned from 1 to 0. | ||
117 | +event:0x5c counters:0,1,2,3,4,5 um:zero minimum:500 name:PMC5_OVERFLOW : Counts the number of times PMC5[32] transitioned from 1 to 0. | ||
118 | +event:0x61 counters:0,1,2,3,4,5 um:zero minimum:500 name:L1_STASH_HIT : Stash hits in L1 Data Cache. | ||
119 | +event:0x63 counters:0,1,2,3,4,5 um:zero minimum:500 name:L1_STASH_REQ : Stash requests to L1 Data Cache. | ||
120 | +event:0x64 counters:0,1,2,3,4,5 um:zero minimum:500 name:TIMES_LSU_THREAD_PRIO_SWTICHED : Number of times the Load Store Unit thread priority switched based on resource collisions. | ||
121 | +event:0x65 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_THREAD_REQ_FPU_DENIED : Number of cycles both threads had Floating Point Unit requests and one was denied. | ||
122 | +event:0x66 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_THREAD_REQ_VPERM_DENIED : Number of cycles both threads had Altivec Permute requests and one was denied. | ||
123 | +event:0x67 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_THREAD_REQ_VGEN_DENIED : Number of cycles both threads had Altivec General requests and one was denied. | ||
124 | +event:0x68 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_THREAD_REQ_CFX_DENIED : Number of cycles both threads had Complex Fixed-Point Unit requests and one was denied. | ||
125 | +event:0x69 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_THREAD_REQ_FETCH_DENIED : Number of cycles both threads both threads made a Fetch request to the L1 Instruction Cache and one thread wins arbitration. | ||
126 | +event:0x6e counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_LSU_ISSUE_STALLED : Cycles the LSU issue queue is not empty but 0 instructions issued. | ||
127 | +event:0x6f counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_FPU_ISSUE_STALLED : Cycles the FPU issue queue is not empty but 0 instructions issued. | ||
128 | +event:0x70 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_ALTIVEC_ISSUE_STALLED : Cycles the AltiVec issue queue is not empty but 0 instructions issued. | ||
129 | +event:0x71 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_FPU_SCHEDULE_STALLED : Cycles FPU is not empty but 0 instructions scheduled. | ||
130 | +event:0x72 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VPERM_SCHEDULE_STALLED : Cycles VPERM is not empty but 0 instructions scheduled. | ||
131 | +event:0x73 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VGEN_SCHEDULE_STALLED : Cycles VGEN is not empty but 0 instructions scheduled. | ||
132 | +event:0x74 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VPU_INSTRUCTION_WAIT_FOR_OPERA : Cycles VPU instruction waits for operands. | ||
133 | +event:0x75 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VFPU_INSTRUCTION_WAIT_FOR_OPERA : Cycles VFPU instruction waits for operands. | ||
134 | +event:0x76 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VSFX_INSTRUCTION_WAIT_FOR_OPERA : Cycles VSFX instruction waits for operands | ||
135 | +event:0x77 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VCFX_INSTRUCTION_WAIT_FOR_OPERA : Cycles VCFX instruction waits for operands. | ||
136 | +event:0x7a counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_IB_EMPT : Number of cycles the Instruction Buffer is empty | ||
137 | +event:0x7b counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_IB_FULL : Number of cycles the Instruction Buffer is full enough such that fetch stops fetching. | ||
138 | +event:0x7c counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_CB_EMPT : Number of cycles the Completion Buffer is empty. | ||
139 | +event:0x7d counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_CB_FULL : Number of cycles the Completion Buffer is full enough such that decode stops. | ||
140 | +event:0x7e counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_PRESYNC_SI_IB : Number of cycles a pre-sync serialized instruction holds in the Instruction Buffer and is not decoded. | ||
141 | +event:0x7f counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_CLK_0_INSTRUCTIONS : Increments if 0 instructions (micro-ops) completed. | ||
142 | +event:0x80 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_CLK_1_INSTRUCTIONS : Increments if 1 instruction (micro-op) completed. | ||
143 | +event:0x80 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_CLK_2_INSTRUCTIONS : Increments if 2 instructions (micro-op) completed. | ||
144 | +event:0x88 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC5S : Every valid IAC5 detection. | ||
145 | +event:0x89 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC6S : Every valid IAC6 detection. | ||
146 | +event:0x8a counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC7S : Every valid IAC7 detection. | ||
147 | +event:0x8b counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC8S : Every valid IAC8 detection. | ||
148 | +event:0x8c counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC1S : Every valid IAC1 detection. | ||
149 | +event:0x8d counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC2S : Every valid IAC2 detection. | ||
150 | +event:0x8e counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC3S : Every valid IAC3 detection. | ||
151 | +event:0x8f counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC4S : Every valid IAC4 detection. | ||
152 | +event:0x90 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DAC1S : Every valid DAC1 detection. | ||
153 | +event:0x91 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DAC2S : Every valid DAC2 detection. | ||
154 | +event:0x94 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DVT0 : Detection of a write to DEVENT SPR with DVT0 set. | ||
155 | +event:0x95 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DVT1 : Detection of a write to DEVENT SPR with DVT1 set. | ||
156 | +event:0x96 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DVT2 : Detection of a write to DEVENT SPR with DVT2 set. | ||
157 | +event:0x97 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DVT3 : Detection of a write to DEVENT SPR with DVT3 set. | ||
158 | +event:0x98 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DVT4 : Detection of a write to DEVENT SPR with DVT4 set. | ||
159 | +event:0x99 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DVT5 : Detection of a write to DEVENT SPR with DVT5 set. | ||
160 | +event:0x9a counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DVT6 : Detection of a write to DEVENT SPR with DVT6 set. | ||
161 | +event:0x9b counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DVT7 : Detection of a write to DEVENT SPR with DVT7 set. | ||
162 | +event:0x9c counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_COMPLETION_STALLED : Number of completion cycles stalled due to Nexus FIFO full. | ||
163 | +event:0xa1 counters:0,1,2,3,4,5 um:zero minimum:500 name:FPU_FINISH : FPU finish. | ||
164 | +event:0xa2 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_FPU_DIV : Counts once for every cycle of divide execution. (fdivs and fdiv). | ||
165 | +event:0xa3 counters:0,1,2,3,4,5 um:zero minimum:500 name:FPU_DENORM_INPUT : Counts extra cycles delay due to denormalized inputs. If there is one, this is incremented 4 times, Two operands increments it 5 times. This shows the real penalty due to denorms, not just how often they occur. | ||
166 | +event:0xa4 counters:0,1,2,3,4,5 um:zero minimum:500 name:FPU_DENORM_OUTPUT : FPU denorm output. | ||
167 | +event:0xa5 counters:0,1,2,3,4,5 um:zero minimum:500 name:FPU_FPSCR_FULL_STALL : FPU FPSCR stall. | ||
168 | +event:0xa6 counters:0,1,2,3,4,5 um:zero minimum:500 name:FPU_PIPE_SYNC_STALL : Synchronization-op stalls: count once for each cycle that a ��break-before�� FPU is in the RS/issue stage but cannotissue. Also count once for each cycle that an FPU op is in the RS/issue stage but cannot issue due to ��break-after��: of an FPU op currently in progress. | ||
169 | +event:0xa7 counters:0,1,2,3,4,5 um:zero minimum:500 name:FPU_INPUT_DATA_STALL : FPU data-ready stall: cycles in which there is an op in the RS/issue stage that cannot issue because one or more of its operands is not yet available. | ||
170 | +event:0xa8 counters:0,1,2,3,4,5 um:zero minimum:500 name:FPU_INSTRUCTIONS_GEN_FLAG : FPU instruction sets FPSCR[FEX]. | ||
171 | +event:0xac counters:0,1,2,3,4,5 um:zero minimum:500 name:PW20_CNT : Number of times the core enters the PW20 power management state. | ||
172 | +event:0xb0 counters:0,1,2,3,4,5 um:zero minimum:500 name:DECORATED_LOADS : Number of decorated loads to cache inhibited memory performed. | ||
173 | +event:0xb1 counters:0,1,2,3,4,5 um:zero minimum:500 name:DECORATED_STORES : Number of decorated stores to cache inhibited memory performed. | ||
174 | +event:0xb3 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_INSTRUCTIONS_SUCC : Number of successful stbcx., sthcx., stwcx., or stdcx. instructions. | ||
175 | +event:0xb4 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_INSTRUCTIONS_UNSUCC : Number of unsuccessful stbcx., sthcx., stwcx., or stdcx. instructions. | ||
176 | +event:0xb5 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_LSU_MICROOPS : Completed Load Store Unit micro-ops. Every micro-op that goes down the LSU pipe. Includes: GPR loads / GPR stores, FPR loads / FPR stores, VR loads / VR stores, Cache ops. Memory barriers Other LSU ops (dsn, msgsnd, mvidsplt, mviwsplt, tlbilx, tlbivax, tlbsync) | ||
177 | +event:0xb6 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_GPR_LOADS : GPR load micro-ops completed. This event only counts once for misaligns. Note that lmw that causes a fault may end up double-counting micro-ops -- once for first pass, once for second pass. | ||
178 | +event:0xb7 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_GPR_STORES : GPR store micro-ops completed. This event only counts once for misaligns. Note that stmw that causes a fault may end up double-counting micro-ops -- once for first pass, once for second pass. | ||
179 | +event:0xb8 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_CACHEOPS : Cache ops completed. Includes: dcba / dcbal, dcbf / dcbfep, dcbi, dcblc / dcblq, dcbst / dcbstep, dcbt / dcbtep / dcbtls, dcbtst / dcbtstep / dcbtstls, dcbz / dcbzep / dcbzl / dcbzlep, icbi / icbiep, icblc / icblq., icbt / icbtls | ||
180 | +event:0xb9 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_MEM_BARRIERS : Memory barriers completed. Includes: msync (sync, lwsync, elemental barriers) mbar (eieio) miso. | ||
181 | +event:0xba counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_SFX_MICROOPS : SFX micro-ops completed. | ||
182 | +event:0xbb counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_SINCLK_SFX_MICROOPS : SFX single-cycle micro-ops completed. | ||
183 | +event:0xbc counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_DBLCLK_SFX_MICROOPS : SFX double-cycle micro-ops completed. | ||
184 | +event:0xbe counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_CFX_INSTRUCTIONS : CFX instructions completed. | ||
185 | +event:0xbf counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_SFX_CFX_INSTRUCTIONS : SFX or CFX instructions completed. | ||
186 | +event:0xc0 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_FPU_INSTRUCTIONS : FPU instructions completed. | ||
187 | +event:0xc1 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_FPR_MICROOPS_LOADS : FPR load micro-ops completed. | ||
188 | +event:0xc2 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_FPR_MICROOPS_STORES : FPR store micro-ops completed. | ||
189 | +event:0xc3 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_FPR_MICROOPS_LOADS_STORES : FPR load and store micro-ops completed. | ||
190 | +event:0xc4 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_FPR_SINPRECISE_LOADS_STORES : FPR single-precision load and store micro-ops completed. | ||
191 | +event:0xc5 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_FPR_DBLPRECISE_LOADS_STORES : FPR double-precision load and store micro-ops completed. | ||
192 | +event:0xc6 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_ALTIVEC_INSTRUCTIONS : AltiVec instructions completed. (non-LSU). | ||
193 | +event:0xc7 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_ALTIVEC_VSFX_INSTRUCTIONS : AltiVec VSFX instructions completed. | ||
194 | +event:0xc8 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_ALTIVEC_VCFX_INSTRUCTIONS : AltiVec VCFX instructions completed. | ||
195 | +event:0xc9 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_ALTIVEC_VPU_INSTRUCTIONS : AltiVec VPU instructions completed. | ||
196 | +event:0xca counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_ALTIVEC_VFPU_INSTRUCTIONS : AltiVec VFPU instructions completed. | ||
197 | +event:0xcb counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_VR_LOADS_MICROOPS : VR load micro-ops completed. | ||
198 | +event:0xcc counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_VR_STORES_MICROOPS : VR store micro-ops completed. | ||
199 | +event:0xcd counters:0,1,2,3,4,5 um:zero minimum:500 name:VSCR_SAT_SET : Number of times the saturate bit flips from 0 to 1. | ||
200 | +event:0xd2 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_SFX0_IDLE : Cycles Simple Fixed Point Unit 0 is idle. | ||
201 | +event:0xd3 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_SFX1_IDLE : Cycles Simple Fixed Point Unit 1 is idle. | ||
202 | +event:0xd4 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_CFX_IDLE : Cycles Complex Fixed Point Unit is idle. | ||
203 | +event:0xd5 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_LSU_IDLE : Cycles Load Store Unit is idle. | ||
204 | +event:0xd6 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_BU_IDLE : Cycles Branch Unit is idle. | ||
205 | +event:0xd7 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_FPU_IDLE : Cycles Floating Point Unit is idle. | ||
206 | +event:0xd8 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VPU_IDLE : Cycles AltiVec Permute Unit is idle. | ||
207 | +event:0xd9 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VFPU_IDLE : Cycles AltiVec Floating Point Unit is idle. | ||
208 | +event:0xda counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VSFX_IDLE : Cycles AltiVec Simple Fixed Point Unit is idle. | ||
209 | +event:0xdb counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VCFX_IDLE : Cycles AltiVec Complex Fixed Point Unit is idle. | ||
210 | +event:0xdd counters:0,1,2,3,4,5 um:zero minimum:500 name:L1_CACHE_MISSES : Data L1 cache misses. (Includes load, store, cache ops). | ||
211 | +event:0xde counters:0,1,2,3,4,5 um:zero minimum:500 name:L1_CACHE_LOAD_MISSES : Data L1 cache load misses. | ||
212 | +event:0xdf counters:0,1,2,3,4,5 um:zero minimum:500 name:L1_CACHE_STORE_MISSES : Data L1 cache store misses. | ||
213 | +event:0xe0 counters:0,1,2,3,4,5 um:zero minimum:500 name:LMQ_ALLOCATED_LOADS : Loads that allocate into Load Miss Queue. (Data L1 cache misses, but may not be to different cache lines). | ||
214 | +event:0xe1 counters:0,1,2,3,4,5 um:zero minimum:500 name:LOAD_THREAD_MISS_COLLISION : Number of times that this thread��s load hits a line that is valid for the other thread but not this thread. | ||
215 | +event:0xe2 counters:0,1,2,3,4,5 um:zero minimum:500 name:INTERTHREAD_STATUS_ARRAY_COLLISION : Number of times that two threads collide on status array access. | ||
216 | +event:0xe3 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_ALLOC : Number of Store Gather Buffer allocates. | ||
217 | +event:0xe4 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_GATHERS : Number of Store Gather Buffer gathers. | ||
218 | +event:0xe5 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_OVERFLOWS : Number of Store Gather Buffer overflows. (Causes SGB full condition when additional store request is made). | ||
219 | +event:0xe6 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_PROMOTIONS : Number of Store Gather Buffer promotions. | ||
220 | +event:0xe7 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_INORDER_PROMOTIONS : Number of Store Gather Buffer in-order promotions. (Also includes oldest-entry timeout condition). | ||
221 | +event:0xe8 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_OUTOFORDER_PROMOTIONS : Number of Store Gather Buffer out-of-order promotions. | ||
222 | +event:0xe9 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_HP_PROMOTIONS : Number of Store Gather Buffer high-priority promotions. (Load hits on pending store). | ||
223 | +event:0xea counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_MISO_PROMOTIONS : Number of Store Gather Buffer miso promotions. promotions. (Load hits on pending store). | ||
224 | +event:0xeb counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_WATERMARK_PROMOTIONS : Number of Store Gather Buffer watermark promotions. | ||
225 | +event:0xec counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_OVERFLOW_PROMOTIONS : Number of Store Gather Buffer overflow promotions. | ||
226 | +event:0xed counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_DLAQ_FULL : Number of cycles the DLink Age Queue is full. | ||
227 | +event:0xee counters:0,1,2,3,4,5 um:zero minimum:500 name:TIMES_DLAQ_FULL : Number of times the DLink Age Queue is full. | ||
228 | +event:0xef counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_LRSAQ_FULL : Number of cycles the Load Reservation Set Age Queue is full. | ||
229 | +event:0xf0 counters:0,1,2,3,4,5 um:zero minimum:500 name:TIMES_LRSAQ_FULL : Number of times the Load Reservation Set Age Queue is full. | ||
230 | +event:0xf1 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_FWDAQ_FULL : Number of cycles the Forward Age Queue is full. | ||
231 | +event:0xf2 counters:0,1,2,3,4,5 um:zero minimum:500 name:TIMES_FWDAQ_FULL : Number of times the Forward Age Queue is full. | ||
232 | +event:0xf3 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_FWD_STQ_COLLISION_TIMES : Number of times a Store Queue collision is forwardable. The following cases are not forwardable: store address + size does not contain the load, cache-inhibited store, denormalized, floating point store, stcx, guarded load. | ||
233 | +event:0xf4 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_FWD_STQ_COLLISION_TIMES_DATA_RDY : Number of times a Store Queue collision is forwardable and is ready with data to forward. | ||
234 | +event:0xf5 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_FWD_STQ_COLLISION_TIMES_DATA_NORDY : Number of times a Store Queue collision is forwardable but is not ready with data to forward. | ||
235 | +event:0xf6 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_NOFWD_STQ_COLLISION_TIMES : Number of times a Store Queue collision is not forwardable and must wait until the store leaves the Store Queue. | ||
236 | +event:0xf7 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_FWD_STQ_COLLISION_CLK : Number of cycles a Store Queue collision is forwardable. (Number of cycles from the detection of a forwardable Store Queue entry until the load is replayed in stg1). | ||
237 | +event:0xf8 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_FWD_STQ_COLLISION_CLK_DATA_RDY : Number of cycles a Store Queue collision is forwardable and is ready with data to forward. (Number of cycles from the detection of a forwardable Store Queue entry with valid data until the load is replayed in stg1). | ||
238 | +event:0xf9 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_FWD_STQ_COLLISION_CLK_DATA_NORDY : Number of cycles a Store Queue collision is forwardable but is not ready with data to forward. (Number of cycles from the detection of a forwardable Store Queue entry without valid data until the load is replayed in stg1). | ||
239 | +event:0xfa counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_NOFWD_STQ_COLLISION_CLK : Number of cycles a Store Queue collision is not forwardable and has to wait until the store leaves the Store Queue. (Number of cycles from the detection of a non-forwardable Store Queue entry until the load is replayed in stg1). | ||
240 | +event:0xfb counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_FALSE_EA_COLLISION : Number of times the lower 12-bits of EA matched but the upper bits did not, leading to a false load-on-store replay. Cycle penalty is 4x the number of times. | ||
241 | +event:0xfc counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_LSO_BUS_COLLISION : Number of LS0 result bus collisions. Cycle penalty is 3x this measurement. | ||
242 | +event:0xfd counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_INTERTHREAD_DBLWORKD_BANK_COLLISION : Number of inter-thread double-word bank collisions. Measures when both threads attempt to access the same double-word bank. Cycle penalty is 3x this measurement. | ||
243 | +event:0xfe counters:0,1,2,3,4,5 um:zero minimum:500 name:L1_CACHE_IM : Instruction L1 cache demand fetch misses. (Includes icbtls. Does not include prefetch). | ||
244 | +event:0x100 counters:0,1,2,3,4,5 um:zero minimum:500 name:IMMU_MISSES : Counts misses in the level 1 Instruction MMU. | ||
245 | +event:0x101 counters:0,1,2,3,4,5 um:zero minimum:500 name:IMMU_TLB4K_HITS : Counts hits in the level 1 Instruction MMU TLB-4K. | ||
246 | +event:0x102 counters:0,1,2,3,4,5 um:zero minimum:500 name:IMMU_VSP_HITS : Counts hits in the level 1 Instruction MMU VSP. | ||
247 | +event:0x103 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_IMMU_HW_TABLEWALK : Counts IMMU cycles spent in hardware tablewalk. This represents the cycles from the point where the L2 MMU miss occurs to when the page table walk completes with a valid translation or exception. | ||
248 | +event:0x104 counters:0,1,2,3,4,5 um:zero minimum:500 name:DMMU_MISSES : Counts misses in the level 1 Data MMU. (Does not count replayed operations). | ||
249 | +event:0x105 counters:0,1,2,3,4,5 um:zero minimum:500 name:DMMU_TLB4K_HITS : Counts hits in the level 1 Data MMU TLB-4K. (Does not count replayed operations). | ||
250 | +event:0x106 counters:0,1,2,3,4,5 um:zero minimum:500 name:DMMU_VSP_HITS : Counts hits in the level 1 Data MMU VSP. (Does not count replayed operations). | ||
251 | +event:0x107 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_DMMU_HW_TABLEWALK : Counts DMMU cycles spent in hardware tablewalk. This represents the cycles from the point where the L2 MMU miss occurs to when the page table walk completes with a valid translation or exception. | ||
252 | +event:0x108 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2MMU_MISSES : Counts level 2 MMU misses. (Does not count misses that occur due to dcbt / dcbtst / dcba / dcbal instructions that fail translation and are no-oped. Does not count misses in L2MMU-VSP when looking up an indirect entry). | ||
253 | +event:0x109 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2MMU_4K_HITS : Counts level 2 MMU hits in L2MMU-4K. | ||
254 | +event:0x10a counters:0,1,2,3,4,5 um:zero minimum:500 name:L2MMU_VSP_HITS : Counts level 2 MMU hits in L2MMU-VSP. (Does not count indirect lookups). | ||
255 | +event:0x10b counters:0,1,2,3,4,5 um:zero minimum:500 name:L2MMU_INDIRECT_MISSES : Counts level 2 MMU indirect misses. This represents indirect entry lookups that do not have a matching indirect entry. | ||
256 | +event:0x10c counters:0,1,2,3,4,5 um:zero minimum:500 name:L2MMU_INDIRECT_VALID_MISSES : Counts level 2 MMU indirect valid misses. This occurts when the indirect entry is valid, but the corresponding PTE[V] = 0 or the premissions in the PTE are not sufficient for the requested access. | ||
257 | +event:0x10d counters:0,1,2,3,4,5 um:zero minimum:500 name:LRAT_MISSES : Counts Logical to Real Address Translation misses. This includes LRAT misses from tlbwe instructions or from page table translations. | ||
258 | +event:0x110 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_LMQ_LOSE_DLINK_DUE_SGB : Cycles the Load Miss Queue loses DLINK arbitration due to the Store Gather Buffer. | ||
259 | +event:0x111 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_SGB_LOSE_DLINK_DUE_LMQ : Cycles the Store Gather Buffer loses DLINK arbitration due to the Load Miss Queue. | ||
260 | +event:0x112 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_THREAD_LOSE_DLINK_DUE_OTHER_THREAD : Cycles thread loses DLINK arbitration due to other thread: Cycles thread loses DLINK arbitration due to other thread. | ||
261 | +event:0x116 counters:0,1,2,3,4,5 um:zero minimum:500 name:DECODE_MASK_VALUE : One mask/value pair that allows instructions to be counted in Decode. | ||
262 | +event:0x1bb counters:0,1,2,3,4,5 um:zero minimum:500 name:SHR_L2_DLINK_REQ : Number of DLINK requests made from core to Shared L2. | ||
263 | +event:0x1bc counters:0,1,2,3,4,5 um:zero minimum:500 name:SHR_L2_ILINK_REQ : Number of ILINK requests made from core to Shared L2. (Includes instruction fetches and L2MMU hardware tablewalk requests). | ||
264 | +event:0x1bd counters:0,1,2,3,4,5 um:zero minimum:500 name:SHR_L2_RLINK_REQ : Number of RLINK requests made from Shared L2 to core. (back invalidates, stashes, barriers). | ||
265 | +event:0x1be counters:0,1,2,3,4,5 um:zero minimum:500 name:SHR_L2_BLINK_REQ : Number of BLINK requests made from Shared L2 to core. (back invalidates, stashes, barriers). | ||
266 | +event:0x1bf counters:0,1,2,3,4,5 um:zero minimum:500 name:SHR_L2_CLINK_REQ : Number of CLINK requests made from Shared L2 to core. (back invalidates, stashes, barriers). | ||
267 | +event:0x1c8 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_HITS : Number of L2 Cache hits. Counts 0, 1, 2, 3, or 4 per cycle. | ||
268 | +event:0x1c9 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_MISSES : Number of L2 Cache hits. Counts 0, 1, 2, 3, or 4 per cycle. | ||
269 | +event:0x1ca counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_DEMAND_ACCESS : Number of L2 Cache demand accesses. Counts 0, 1, 2, 3, or 4 per cycle. | ||
270 | +event:0x1cb counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_ACCESSES : Number of L2 Cache accesses from all sources (demand, reload, snoop, etc). Counts 0, 1, 2, 3, or 4 per cycle. | ||
271 | +event:0x1cc counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_STORE_ALLOCATE : Number of L2 Cache store allocates. Counts 0, 1, 2, 3, or 4 per cycle. | ||
272 | +event:0x1cd counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_INSTRUCTIONS_ACCESS : Number of L2 Cache instruction accesses. Counts 0, 1, 2, 3, or 4 per cycle. | ||
273 | +event:0x1ce counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_DATA_ACCESS : Number of L2 Cache data accesses. Counts 0, 1, 2, 3, or 4 per cycle. | ||
274 | +event:0x1cf counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_INSTRUCTIONS_MISSES : Number of L2 Cache instruction misses. Counts 0, 1, 2, 3, or 4 per cycle. | ||
275 | +event:0x1d0 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_DATA_MISSES : Number of L2 Cache data misses. Counts 0, 1, 2, 3, or 4 per cycle. | ||
276 | +event:0x1d1 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_HITS_PER_THREAD : Number of times this core/thread hits in the L2 Cache. Counts 0, 1, 2, 3, or 4 per cycle. | ||
277 | +event:0x1d2 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_MISSES_PER_THREAD : Number of times this core/thread misses in the L2 Cache. Counts 0, 1, 2, 3, or 4 per cycle. | ||
278 | +event:0x1d3 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_DEMAND_ACCESS_PER_THREAD : Number of times this core/thread makes a demand access to the L2 Cache. Counts 0, 1, 2, 3, or 4 per cycle. | ||
279 | +event:0x1d4 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_STORE_ALLOC_PER_THREAD : Number of times a store from this core/thread allocates in the L2 Cache. Counts 0, 1, 2, 3, or 4 per cycle. | ||
280 | +event:0x1d5 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_INSTRUCTIONS_ACCESS_PER_THREAD : Number of times an instruction from this core/thread accesses the L2 Cache. Counts 0, 1, 2, 3, or 4 per cycle. | ||
281 | +event:0x1d6 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_DATA_ACCESS_PER_THREAD : Number of times a data operation from this core/thread accesses the L2 Cache. Counts 0, 1, 2, 3, or 4 per cycle. | ||
282 | +event:0x1d7 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_INSTRUCTION_MISSES_PER_THREAD : Number of times an instruction from this core/thread misses in the L2 Cache. Counts 0, 1, 2, 3, or 4 per cycle. | ||
283 | +event:0x1d8 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_DATA_MISSES_PER_THREAD : Number of times a data operation from this core/thread misses in the L2 Cache. Counts 0, 1, 2, 3, or 4 per cycle. | ||
284 | +event:0x1d9 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_RELOAD_FROM_CORENET : Number of L2 Cache reloads from CoreNet. Counts 0, 1, 2, 3, or 4 per cycle. | ||
285 | +event:0x1da counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_IN_STASH_REQ : Number of incoming L2 Cache stash requests. Counts 0, 1, 2, 3, or 4 per cycle. | ||
286 | +event:0x1db counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_STASH_REQ_DOWNGRD_TO_SNOOPS : Number of incoming L2 Cache stash requests downgraded to snoops. Counts 0, 1, 2, 3, or 4 per cycle. | ||
287 | +event:0x1dc counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_SNOOPS_HITS : Number of L2 Cache snoop hits. Counts 0, 1, 2, 3, or 4 per cycle. | ||
288 | +event:0x1dd counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_SNOOPS_MINT : Number of L2 Cache snoops causing MINT. | ||
289 | +event:0x1de counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_SNOOPS_SINT : Number of L2 Cache snoops causing SINT. | ||
290 | +event:0x1df counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_SNOOPS_PUSHES : Number of L2 Cache snoop pushes. | ||
291 | +event:0x1e0 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_BIB_STALL : Stall for Back Invalidate Buffer entry (cycles). Counts 0, 1, 2, 3, or 4 per cycle. | ||
292 | +event:0x1e2 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_RLT_STALL : Stall for Reload Table entry (cycles). Counts 0, 1, 2, 3, or 4 per cycle. | ||
293 | +event:0x1e4 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_RLFQ_STALL : Stall for Reload Fold Queue entry (cycles). Counts 0, 1, 2, 3, or 4 per cycle. | ||
294 | +event:0x1e6 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_DTQ_STALL : Stall for Data Transaction Queue entry (cycles). Counts 0, 1, 2, 3, or 4 per cycle. | ||
295 | +event:0x1e8 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_COB_STALL : Stall for Castout Buffer entry (cycles). Counts 0, 1, 2, 3, or 4 per cycle. | ||
296 | +event:0x1ea counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_WDB_STALL : Stall for Write Data Buffer entry (cycles). Counts 0, 1, 2, 3, or 4 per cycle. | ||
297 | +event:0x1ec counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_RLDB_STALL : Stall for Reload Data Buffer entry (cycles). Counts 0, 1, 2, 3, or 4 per cycle. | ||
298 | +event:0x1ee counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_SNPQ_STALL : Stall for Snoop Queue entry (cycles). | ||
299 | +event:0x1fa counters:0,1,2,3,4,5 um:zero minimum:500 name:BIU_MASTER_REQ : Master transaction starts. (Number of AOut sent to CoreNet). | ||
300 | +event:0x1fb counters:0,1,2,3,4,5 um:zero minimum:500 name:BIU_MASTER_GLOBAL_REQ : Master transaction starts that are global. (Number of AOut with M=1 sent to CoreNet). | ||
301 | +event:0x1fc counters:0,1,2,3,4,5 um:zero minimum:500 name:BIU_MASTER_DATA_SIDE_REQ : Master transaction starts that are global. (Number of AOut with M=1 sent to CoreNet). | ||
302 | +event:0x1fd counters:0,1,2,3,4,5 um:zero minimum:500 name:BIU_MASTER_INSTRUCTION_SIDE_REQ : Master instruction-side transaction starts. (Number of I-side AOut sent to CoreNet). | ||
303 | +event:0x1fe counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_STASH_REQ : Stash request on AIn matches stash IDs for core or L2. | ||
304 | +event:0x1ff counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_SNOOP_REQ : Externally generated snoop requests. (Number of AIn from CoreNet not from self). | ||
305 | + | ||
306 | diff --git a/events/ppc/e6500/unit_masks b/events/ppc/e6500/unit_masks | ||
307 | new file mode 100644 | ||
308 | index 0000000..b7e7a23 | ||
309 | --- /dev/null | ||
310 | +++ b/events/ppc/e6500/unit_masks | ||
311 | @@ -0,0 +1,4 @@ | ||
312 | +# e6500 possible unit masks | ||
313 | +# | ||
314 | +name:zero type:mandatory default:0x0 | ||
315 | + 0x0 no unit mask | ||
316 | diff --git a/libop/op_cpu_type.c b/libop/op_cpu_type.c | ||
317 | index 7d50a2d..badb7ba 100644 | ||
318 | --- a/libop/op_cpu_type.c | ||
319 | +++ b/libop/op_cpu_type.c | ||
320 | @@ -126,6 +126,7 @@ static struct cpu_descr const cpu_descrs[MAX_CPU_TYPE] = { | ||
321 | { "IBM Power Architected Events V1", "ppc64/architected_events_v1", CPU_PPC64_ARCH_V1, 6 }, | ||
322 | { "ppc64 POWER8", "ppc64/power8", CPU_PPC64_POWER8, 6 }, | ||
323 | { "e500mc", "ppc/e500mc", CPU_PPC_E500MC, 4 }, | ||
324 | + { "e6500", "ppc/e6500", CPU_PPC_E6500, 6 }, | ||
325 | }; | ||
326 | |||
327 | static size_t const nr_cpu_descrs = sizeof(cpu_descrs) / sizeof(struct cpu_descr); | ||
328 | diff --git a/libop/op_cpu_type.h b/libop/op_cpu_type.h | ||
329 | index 10f000b..934fe9e 100644 | ||
330 | --- a/libop/op_cpu_type.h | ||
331 | +++ b/libop/op_cpu_type.h | ||
332 | @@ -106,6 +106,7 @@ typedef enum { | ||
333 | CPU_PPC64_ARCH_V1, /** < IBM Power architected events version 1 */ | ||
334 | CPU_PPC64_POWER8, /**< ppc64 POWER8 family */ | ||
335 | CPU_PPC_E500MC, /**< e500mc */ | ||
336 | + CPU_PPC_E6500, /**< e6500 */ | ||
337 | MAX_CPU_TYPE | ||
338 | } op_cpu; | ||
339 | |||
340 | diff --git a/libop/op_events.c b/libop/op_events.c | ||
341 | index 638dc5c..9d2aa5e 100644 | ||
342 | --- a/libop/op_events.c | ||
343 | +++ b/libop/op_events.c | ||
344 | @@ -1309,6 +1309,7 @@ void op_default_event(op_cpu cpu_type, struct op_default_event_descr * descr) | ||
345 | case CPU_PPC_E500: | ||
346 | case CPU_PPC_E500_2: | ||
347 | case CPU_PPC_E500MC: | ||
348 | + case CPU_PPC_E6500: | ||
349 | case CPU_PPC_E300: | ||
350 | descr->name = "CPU_CLK"; | ||
351 | break; | ||
352 | diff --git a/utils/ophelp.c b/utils/ophelp.c | ||
353 | index 0647360..3b2896a 100644 | ||
354 | --- a/utils/ophelp.c | ||
355 | +++ b/utils/ophelp.c | ||
356 | @@ -754,6 +754,7 @@ int main(int argc, char const * argv[]) | ||
357 | case CPU_PPC_E500: | ||
358 | case CPU_PPC_E500_2: | ||
359 | case CPU_PPC_E500MC: | ||
360 | + case CPU_PPC_E6500: | ||
361 | event_doc = | ||
362 | "See PowerPC e500 Core Complex Reference Manual\n" | ||
363 | "Chapter 7: Performance Monitor\n" | ||
364 | -- | ||
diff --git a/meta/recipes-kernel/oprofile/oprofile/acinclude.m4 b/meta/recipes-kernel/oprofile/oprofile/acinclude.m4 new file mode 100644 index 0000000000..95ecd91b5e --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofile/acinclude.m4 | |||
@@ -0,0 +1,581 @@ | |||
1 | dnl AX_KERNEL_OPTION(option, action-if-found, action-if-not-found) | ||
2 | dnl see if autoconf.h defines the option | ||
3 | AC_DEFUN([AX_KERNEL_OPTION], [ | ||
4 | SAVE_CFLAGS=$CFLAGS | ||
5 | CFLAGS="-I$KINC -O2 -D__KERNEL__" | ||
6 | AC_TRY_COMPILE( [#include <linux/config.h>], | ||
7 | [ | ||
8 | #ifndef $1 | ||
9 | break_me_hard(\\\); | ||
10 | #endif | ||
11 | ],[$2],[$3],) | ||
12 | CFLAGS=$SAVE_CFLAGS | ||
13 | ]) | ||
14 | |||
15 | dnl Handle the 2.4 module inside module/ | ||
16 | AC_DEFUN([AX_CONFIG_MODULE], | ||
17 | [ | ||
18 | if test ! -f $KINC/linux/autoconf.h; then | ||
19 | AC_MSG_ERROR([no suitably configured kernel include tree found]) | ||
20 | fi | ||
21 | |||
22 | dnl --- Get Linux kernel version and compile parameters --- | ||
23 | |||
24 | AC_SUBST(KVERS) | ||
25 | AC_MSG_CHECKING([for kernel version]) | ||
26 | dnl it's like this to handle mandrake's fubar version.h - bug #471448 | ||
27 | eval KVERS=`gcc -I$KINC -E -dM $KINC/linux/version.h | grep -w UTS_RELEASE | awk '{print $[]3}'` | ||
28 | AC_MSG_RESULT([$KVERS]) | ||
29 | case "$KVERS" in | ||
30 | 2.2.*|2.4.*) ;; | ||
31 | *) AC_MSG_ERROR([Unsupported kernel version]) | ||
32 | esac | ||
33 | |||
34 | dnl Check for the minimal kernel version supported | ||
35 | AC_MSG_CHECKING([kernel version]) | ||
36 | AX_KERNEL_VERSION(2, 2, 10, <=, AC_MSG_RESULT([ok]), AC_MSG_ERROR([check html documentation install section])) | ||
37 | |||
38 | dnl linux/spinlock.h added at some point in past | ||
39 | AC_MSG_CHECKING([for $KINC/linux/spinlock.h]) | ||
40 | if test -f $KINC/linux/spinlock.h; then | ||
41 | EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DHAVE_LINUX_SPINLOCK_HEADER" | ||
42 | AC_MSG_RESULT([yes]) | ||
43 | else | ||
44 | AC_MSG_RESULT([no]) | ||
45 | fi | ||
46 | |||
47 | AC_MSG_CHECKING([for rtc_lock]) | ||
48 | gcc -I$KINC -E $KINC/linux/mc146818rtc.h | grep rtc_lock >/dev/null | ||
49 | if test "$?" -eq 0; then | ||
50 | EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DRTC_LOCK" | ||
51 | AC_MSG_RESULT([yes]) | ||
52 | else | ||
53 | AC_MSG_RESULT([no]) | ||
54 | fi | ||
55 | |||
56 | arch="unknown" | ||
57 | AC_MSG_CHECKING(for x86-64 architecture) | ||
58 | AX_KERNEL_OPTION(CONFIG_X86_64, x8664=1, x8664=0) | ||
59 | AX_MSG_RESULT_YN($x8664) | ||
60 | BUILD_HAMMER=no | ||
61 | if test "$x8664" -eq 1; then | ||
62 | arch="x86" | ||
63 | BUILD_HAMMER=yes | ||
64 | else | ||
65 | AC_MSG_CHECKING(for x86 architecture) | ||
66 | AX_KERNEL_OPTION(CONFIG_X86, x86=1, x86=0) | ||
67 | AX_KERNEL_OPTION(CONFIG_X86_WP_WORKS_OK, x86=1, x86=$x86) | ||
68 | AX_MSG_RESULT_YN($x86) | ||
69 | test "$x86" = 1 && arch="x86" | ||
70 | |||
71 | if test "$arch" = "unknown"; then | ||
72 | AC_MSG_CHECKING(for ia64 architecture) | ||
73 | AX_KERNEL_OPTION(CONFIG_IA64, ia64=1, ia64=0) | ||
74 | AX_MSG_RESULT_YN($ia64) | ||
75 | test "$ia64" = 1 && arch="ia64" | ||
76 | fi | ||
77 | |||
78 | fi | ||
79 | AC_SUBST(BUILD_HAMMER) | ||
80 | |||
81 | test "$arch" = "unknown" && AC_MSG_ERROR(Unsupported architecture) | ||
82 | |||
83 | dnl check to see if kernel verion appropriate for arch | ||
84 | AC_MSG_CHECKING(arch/kernel version combination) | ||
85 | case "$arch" in | ||
86 | ia64) | ||
87 | AX_KERNEL_VERSION(2, 4, 18, <, AC_MSG_RESULT([ok]), | ||
88 | AC_MSG_ERROR([unsupported arch/kernel])) ;; | ||
89 | *) AC_MSG_RESULT([ok]) | ||
90 | esac | ||
91 | |||
92 | dnl for now we do not support PREEMPT patch | ||
93 | AC_MSG_CHECKING([for preempt patch]) | ||
94 | AX_KERNEL_OPTION(CONFIG_PREEMPT,preempt=1,preempt=0) | ||
95 | AX_MSG_RESULT_YN([$preempt]) | ||
96 | test "$preempt" = 0 || AC_MSG_ERROR([unsupported kernel configuration : CONFIG_PREEMPT]) | ||
97 | |||
98 | AC_SUBST(KINC) | ||
99 | |||
100 | MODINSTALLDIR=/lib/modules/$KVERS | ||
101 | |||
102 | OPROFILE_MODULE_ARCH=$arch | ||
103 | AC_SUBST(OPROFILE_MODULE_ARCH) | ||
104 | ] | ||
105 | ) | ||
106 | |||
107 | dnl AX_MSG_RESULT_YN(a) | ||
108 | dnl results "yes" iff a==1, "no" else | ||
109 | AC_DEFUN([AX_MSG_RESULT_YN], [x=no | ||
110 | test "x$1" = "x1" && x=yes | ||
111 | AC_MSG_RESULT($x)]) | ||
112 | |||
113 | dnl AX_MALLOC_ATTRIBUTE - see if gcc will take __attribute__((malloc)) | ||
114 | AC_DEFUN([AX_MALLOC_ATTRIBUTE], | ||
115 | [ | ||
116 | AC_MSG_CHECKING([whether malloc attribute is understood]) | ||
117 | SAVE_CFLAGS=$CFLAGS | ||
118 | CFLAGS="-Werror $CFLAGS" | ||
119 | AC_TRY_COMPILE(,[ | ||
120 | void monkey() __attribute__((malloc)); | ||
121 | ],AC_MSG_RESULT([yes]); AC_DEFINE(MALLOC_ATTRIBUTE_OK, 1, [whether malloc attribute is understood]), AC_MSG_RESULT([no])) | ||
122 | CFLAGS=$SAVE_CFLAGS | ||
123 | ] | ||
124 | ) | ||
125 | |||
126 | dnl builtin_expect is used in module we can't add that in config.h | ||
127 | AC_DEFUN([AX_BUILTIN_EXPECT], | ||
128 | [ | ||
129 | AC_MSG_CHECKING([whether __builtin_expect is understood]) | ||
130 | SAVE_CFLAGS=$CFLAGS | ||
131 | CFLAGS="-Werror $CFLAGS" | ||
132 | AC_TRY_LINK(,[ | ||
133 | int i; | ||
134 | if (__builtin_expect(i, 0)) { } | ||
135 | ], | ||
136 | AC_MSG_RESULT([yes]); EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DEXPECT_OK", | ||
137 | AC_MSG_RESULT([no]);) | ||
138 | CFLAGS=$SAVE_CFLAGS | ||
139 | ] | ||
140 | ) | ||
141 | |||
142 | dnl AX_EXTRA_DIRS - Let user specify extra dirs for include/libs | ||
143 | AC_DEFUN([AX_EXTRA_DIRS], | ||
144 | [ | ||
145 | AC_ARG_WITH(extra-includes, | ||
146 | [ --with-extra-includes=DIR add extra include paths], | ||
147 | use_extra_includes="$withval", | ||
148 | use_extra_includes=NO | ||
149 | ) | ||
150 | if test -n "$use_extra_includes" && \ | ||
151 | test "$use_extra_includes" != "NO"; then | ||
152 | ac_save_ifs=$IFS | ||
153 | IFS=':' | ||
154 | for dir in $use_extra_includes; do | ||
155 | extra_includes="$extra_includes -I$dir" | ||
156 | done | ||
157 | IFS=$ac_save_ifs | ||
158 | CPPFLAGS="$CPPFLAGS $extra_includes" | ||
159 | fi | ||
160 | |||
161 | AC_ARG_WITH(extra-libs, | ||
162 | [ --with-extra-libs=DIR add extra library paths], | ||
163 | use_extra_libs=$withval, | ||
164 | use_extra_libs=NO | ||
165 | ) | ||
166 | if test -n "$use_extra_libs" && \ | ||
167 | test "$use_extra_libs" != "NO"; then | ||
168 | ac_save_ifs=$IFS | ||
169 | IFS=':' | ||
170 | for dir in $use_extra_libs; do | ||
171 | extra_libraries="$extra_libraries -L$dir" | ||
172 | done | ||
173 | IFS=$ac_save_ifs | ||
174 | LDFLAGS="$LDFLAGS $extra_libraries" | ||
175 | fi | ||
176 | ] | ||
177 | ) | ||
178 | |||
179 | dnl AX_POPT_CONST - check popt prototype | ||
180 | AC_DEFUN([AX_POPT_CONST], | ||
181 | [ | ||
182 | AC_MSG_CHECKING([popt prototype]) | ||
183 | SAVE_CXXFLAGS=$CXXFLAGS | ||
184 | CXXFLAGS="-Werror $CXXFLAGS" | ||
185 | AC_TRY_COMPILE([#include <popt.h>], | ||
186 | [ | ||
187 | int c; char **v; | ||
188 | poptGetContext(0, c, v, 0, 0); | ||
189 | ], | ||
190 | AC_MSG_RESULT([takes char **]);, | ||
191 | AC_MSG_RESULT([takes const char **]); AC_DEFINE(CONST_POPT, 1, [whether popt prototype takes a const char **])) | ||
192 | CXXFLAGS="$SAVE_CXXFLAGS" | ||
193 | ] | ||
194 | ) | ||
195 | |||
196 | dnl AX_CHECK_SSTREAM - check if local sstream is needed to compile OK | ||
197 | AC_DEFUN([AX_CHECK_SSTREAM], | ||
198 | [ | ||
199 | AC_MSG_CHECKING([whether to use included sstream]) | ||
200 | AC_TRY_COMPILE([#include <sstream>], [], | ||
201 | AC_MSG_RESULT([no]);, | ||
202 | AC_MSG_RESULT([yes]); OP_CXXFLAGS="$OP_CXXFLAGS -I\${top_srcdir}/include") | ||
203 | ] | ||
204 | ) | ||
205 | |||
206 | dnl AX_CHECK_TYPEDEF(typedef_name, type, action-if-true, action-if-false) | ||
207 | dnl exec action-if-true if typedef_name is a typedef to type else exec | ||
208 | dnl action-if-false | ||
209 | dnl currently work only with type typedef'ed in stddef.h | ||
210 | AC_DEFUN([AX_CHECK_TYPEDEF], [ | ||
211 | dnl AC_LANG_PUSH(C) not in autoconf 2.13 | ||
212 | AC_LANG_SAVE | ||
213 | AC_LANG_C | ||
214 | SAVE_CFLAGS=$CFLAGS | ||
215 | CFLAGS="-Werror $CFLAGS" | ||
216 | |||
217 | AC_TRY_COMPILE( | ||
218 | [ | ||
219 | #include <stddef.h> | ||
220 | ], | ||
221 | [ | ||
222 | typedef void (*fct1)($1); | ||
223 | typedef void (*fct2)($2); | ||
224 | fct1 f1 = 0; | ||
225 | fct2 f2 = 0; | ||
226 | if (f1 == f2) {} | ||
227 | ], | ||
228 | [$3],[$4]) | ||
229 | |||
230 | CFLAGS=$SAVE_CFLAGS | ||
231 | AC_LANG_RESTORE | ||
232 | ]) | ||
233 | |||
234 | |||
235 | dnl AX_TYPEDEFED_NAME(typedef_name, candidate_list, var_name) | ||
236 | dnl set var_name to the typedef name of $1 which must be in canditate_list | ||
237 | dnl else produce a fatal error | ||
238 | AC_DEFUN([AX_TYPEDEFED_NAME], [ | ||
239 | AC_MSG_CHECKING([type of $1]) | ||
240 | for f in $2; do | ||
241 | AX_CHECK_TYPEDEF($1, $f, $3="$f", $3="") | ||
242 | if test -n "${$3}"; then | ||
243 | break | ||
244 | fi | ||
245 | done | ||
246 | if test -n "${$3}"; then | ||
247 | AC_MSG_RESULT([${$3}]) | ||
248 | else | ||
249 | AC_MSG_ERROR([not found]) | ||
250 | fi | ||
251 | ]) | ||
252 | |||
253 | dnl find a binary in the path | ||
254 | AC_DEFUN([QT_FIND_PATH], | ||
255 | [ | ||
256 | AC_MSG_CHECKING([for $1]) | ||
257 | AC_CACHE_VAL(qt_cv_path_$1, | ||
258 | [ | ||
259 | qt_cv_path_$1="NONE" | ||
260 | if test -n "$$2"; then | ||
261 | qt_cv_path_$1="$$2"; | ||
262 | else | ||
263 | dirs="$3" | ||
264 | qt_save_IFS=$IFS | ||
265 | IFS=':' | ||
266 | for dir in $PATH; do | ||
267 | dirs="$dirs $dir" | ||
268 | done | ||
269 | IFS=$qt_save_IFS | ||
270 | |||
271 | for dir in $dirs; do | ||
272 | if test -x "$dir/$1"; then | ||
273 | if test -n "$5"; then | ||
274 | evalstr="$dir/$1 $5 2>&1 " | ||
275 | if eval $evalstr; then | ||
276 | qt_cv_path_$1="$dir/$1" | ||
277 | break | ||
278 | fi | ||
279 | else | ||
280 | qt_cv_path_$1="$dir/$1" | ||
281 | break | ||
282 | fi | ||
283 | fi | ||
284 | done | ||
285 | fi | ||
286 | ]) | ||
287 | |||
288 | if test -z "$qt_cv_path_$1" || test "$qt_cv_path_$1" = "NONE"; then | ||
289 | AC_MSG_RESULT(not found) | ||
290 | $4 | ||
291 | else | ||
292 | AC_MSG_RESULT($qt_cv_path_$1) | ||
293 | $2=$qt_cv_path_$1 | ||
294 | fi | ||
295 | ]) | ||
296 | |||
297 | dnl Find the uic compiler on the path or in qt_cv_dir | ||
298 | AC_DEFUN([QT_FIND_UIC], | ||
299 | [ | ||
300 | QT_FIND_PATH(uic, ac_uic, $qt_cv_dir/bin) | ||
301 | if test -z "$ac_uic" -a "$FATAL" = 1; then | ||
302 | AC_MSG_ERROR([uic binary not found in \$PATH or $qt_cv_dir/bin !]) | ||
303 | fi | ||
304 | ]) | ||
305 | |||
306 | dnl Find the right moc in path/qt_cv_dir | ||
307 | AC_DEFUN([QT_FIND_MOC], | ||
308 | [ | ||
309 | QT_FIND_PATH(moc2, ac_moc2, $qt_cv_dir/bin) | ||
310 | QT_FIND_PATH(moc, ac_moc1, $qt_cv_dir/bin) | ||
311 | |||
312 | if test -n "$ac_moc1" -a -n "$ac_moc2"; then | ||
313 | dnl found both. Prefer Qt3's if it exists else moc2 | ||
314 | $ac_moc1 -v 2>&1 | grep "Qt 3" >/dev/null | ||
315 | if test "$?" = 0; then | ||
316 | ac_moc=$ac_moc1; | ||
317 | else | ||
318 | ac_moc=$ac_moc2; | ||
319 | fi | ||
320 | else | ||
321 | if test -n "$ac_moc1"; then | ||
322 | ac_moc=$ac_moc1; | ||
323 | else | ||
324 | ac_moc=$ac_moc2; | ||
325 | fi | ||
326 | fi | ||
327 | |||
328 | if test -z "$ac_moc" -a "$FATAL" = 1; then | ||
329 | AC_MSG_ERROR([moc binary not found in \$PATH or $qt_cv_dir/bin !]) | ||
330 | fi | ||
331 | ]) | ||
332 | |||
333 | dnl check a particular libname | ||
334 | AC_DEFUN([QT_TRY_LINK], | ||
335 | [ | ||
336 | SAVE_LIBS="$LIBS" | ||
337 | LIBS="$LIBS $1" | ||
338 | AC_TRY_LINK([ | ||
339 | #include <qglobal.h> | ||
340 | #include <qstring.h> | ||
341 | ], | ||
342 | [ | ||
343 | QString s("mangle_failure"); | ||
344 | #if (QT_VERSION < 221) | ||
345 | break_me_(\\\); | ||
346 | #endif | ||
347 | ], | ||
348 | qt_cv_libname=$1, | ||
349 | ) | ||
350 | LIBS="$SAVE_LIBS" | ||
351 | ]) | ||
352 | |||
353 | dnl check we can do a compile | ||
354 | AC_DEFUN([QT_CHECK_COMPILE], | ||
355 | [ | ||
356 | AC_MSG_CHECKING([for Qt library name]) | ||
357 | |||
358 | AC_CACHE_VAL(qt_cv_libname, | ||
359 | [ | ||
360 | AC_LANG_CPLUSPLUS | ||
361 | SAVE_CXXFLAGS=$CXXFLAGS | ||
362 | CXXFLAGS="$CXXFLAGS $QT_INCLUDES $QT_LDFLAGS" | ||
363 | |||
364 | for libname in -lqt-mt -lqt3 -lqt2 -lqt; | ||
365 | do | ||
366 | QT_TRY_LINK($libname) | ||
367 | if test -n "$qt_cv_libname"; then | ||
368 | break; | ||
369 | fi | ||
370 | done | ||
371 | |||
372 | CXXFLAGS=$SAVE_CXXFLAGS | ||
373 | ]) | ||
374 | |||
375 | if test -z "$qt_cv_libname"; then | ||
376 | AC_MSG_RESULT([failed]) | ||
377 | if test "$FATAL" = 1 ; then | ||
378 | AC_MSG_ERROR([Cannot compile a simple Qt executable. Check you have the right \$QTDIR !]) | ||
379 | fi | ||
380 | else | ||
381 | AC_MSG_RESULT([$qt_cv_libname]) | ||
382 | fi | ||
383 | ]) | ||
384 | |||
385 | dnl get Qt version we're using | ||
386 | AC_DEFUN([QT_GET_VERSION], | ||
387 | [ | ||
388 | AC_CACHE_CHECK([Qt version],lyx_cv_qtversion, | ||
389 | [ | ||
390 | AC_LANG_CPLUSPLUS | ||
391 | SAVE_CPPFLAGS=$CPPFLAGS | ||
392 | CPPFLAGS="$CPPFLAGS $QT_INCLUDES" | ||
393 | |||
394 | cat > conftest.$ac_ext <<EOF | ||
395 | #line __oline__ "configure" | ||
396 | #include "confdefs.h" | ||
397 | #include <qglobal.h> | ||
398 | "%%%"QT_VERSION_STR"%%%" | ||
399 | EOF | ||
400 | lyx_cv_qtversion=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \ | ||
401 | grep '^"%%%"' 2>/dev/null | \ | ||
402 | sed -e 's/"%%%"//g' -e 's/"//g'` | ||
403 | rm -f conftest.$ac_ext | ||
404 | CPPFLAGS=$SAVE_CPPFLAGS | ||
405 | ]) | ||
406 | |||
407 | QT_VERSION=$lyx_cv_qtversion | ||
408 | AC_SUBST(QT_VERSION) | ||
409 | ]) | ||
410 | |||
411 | dnl start here | ||
412 | AC_DEFUN([QT_DO_IT_ALL], | ||
413 | [ | ||
414 | dnl Please leave this alone. I use this file in | ||
415 | dnl oprofile. | ||
416 | FATAL=0 | ||
417 | |||
418 | AC_ARG_WITH(qt-dir, [ --with-qt-dir where the root of Qt is installed ], | ||
419 | [ qt_cv_dir=`eval echo "$withval"/` ]) | ||
420 | |||
421 | AC_ARG_WITH(qt-includes, [ --with-qt-includes where the Qt includes are. ], | ||
422 | [ qt_cv_includes=`eval echo "$withval"` ]) | ||
423 | |||
424 | AC_ARG_WITH(qt-libraries, [ --with-qt-libraries where the Qt library is installed.], | ||
425 | [ qt_cv_libraries=`eval echo "$withval"` ]) | ||
426 | |||
427 | dnl pay attention to $QTDIR unless overridden | ||
428 | if test -z "$qt_cv_dir"; then | ||
429 | qt_cv_dir=$QTDIR | ||
430 | fi | ||
431 | |||
432 | dnl derive inc/lib if needed | ||
433 | if test -n "$qt_cv_dir"; then | ||
434 | if test -z "$qt_cv_includes"; then | ||
435 | qt_cv_includes=$qt_cv_dir/include | ||
436 | fi | ||
437 | if test -z "$qt_cv_libraries"; then | ||
438 | qt_cv_libraries=$qt_cv_dir/lib | ||
439 | fi | ||
440 | fi | ||
441 | |||
442 | dnl flags for compilation | ||
443 | QT_INCLUDES= | ||
444 | QT_LDFLAGS= | ||
445 | if test -n "$qt_cv_includes"; then | ||
446 | QT_INCLUDES="-I$qt_cv_includes" | ||
447 | fi | ||
448 | if test -n "$qt_cv_libraries"; then | ||
449 | QT_LDFLAGS="-L$qt_cv_libraries" | ||
450 | fi | ||
451 | AC_SUBST(QT_INCLUDES) | ||
452 | AC_SUBST(QT_LDFLAGS) | ||
453 | |||
454 | QT_FIND_MOC | ||
455 | MOC=$ac_moc | ||
456 | AC_SUBST(MOC) | ||
457 | QT_FIND_UIC | ||
458 | UIC=$ac_uic | ||
459 | AC_SUBST(UIC) | ||
460 | |||
461 | QT_CHECK_COMPILE | ||
462 | |||
463 | QT_LIB=$qt_cv_libname; | ||
464 | AC_SUBST(QT_LIB) | ||
465 | |||
466 | if test -n "$qt_cv_libname"; then | ||
467 | QT_GET_VERSION | ||
468 | fi | ||
469 | ]) | ||
470 | |||
471 | dnl AX_CXXFLAGS_OPTIONS(var-name, option) | ||
472 | dnl add option to var-name if $CXX support it. | ||
473 | AC_DEFUN([AX_CHECK_PRECOMPILED_HEADER], [ | ||
474 | AC_MSG_CHECKING([whether ${CXX} support precompiled header]) | ||
475 | AC_LANG_SAVE | ||
476 | AC_LANG_CPLUSPLUS | ||
477 | SAVE_CXXFLAGS=$CXXFLAGS | ||
478 | dnl we consider than if -Winvalid-pch is accepted pch will works ... | ||
479 | CXXFLAGS=-Winvalid-pch | ||
480 | dnl but we don't want -Winvalid-pch else compilation will fail due -Werror and | ||
481 | dnl the fact than some pch will be invalid for the given compilation option | ||
482 | AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} -include bits/stdc++.h", AC_MSG_RESULT([no])) | ||
483 | CXXFLAGS=$SAVE_CXXFLAGS | ||
484 | AC_LANG_RESTORE | ||
485 | ]) | ||
486 | |||
487 | dnl AX_CHECK_DOCBOOK | ||
488 | AC_DEFUN([AX_CHECK_DOCBOOK], [ | ||
489 | # It's just rude to go over the net to build | ||
490 | XSLTPROC_FLAGS=--nonet | ||
491 | DOCBOOK_ROOT= | ||
492 | if test ! -f /etc/xml/catalog; then | ||
493 | for i in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh /usr/share/sgml/docbook/xsl-stylesheets/; | ||
494 | do | ||
495 | if test -d "$i"; then | ||
496 | DOCBOOK_ROOT=$i | ||
497 | fi | ||
498 | done | ||
499 | |||
500 | # Last resort - try net | ||
501 | if test -z "$DOCBOOK_ROOT"; then | ||
502 | XSLTPROC_FLAGS= | ||
503 | fi | ||
504 | else | ||
505 | XML_CATALOG=/etc/xml/catalog | ||
506 | CAT_ENTRY_START='<!--' | ||
507 | CAT_ENTRY_END='-->' | ||
508 | fi | ||
509 | |||
510 | AC_CHECK_PROG(XSLTPROC,xsltproc,xsltproc,) | ||
511 | XSLTPROC_WORKS=no | ||
512 | if test -n "$XSLTPROC"; then | ||
513 | AC_MSG_CHECKING([whether xsltproc works]) | ||
514 | |||
515 | if test -n "$XML_CATALOG"; then | ||
516 | DB_FILE="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" | ||
517 | else | ||
518 | DB_FILE="$DOCBOOK_ROOT/docbook.xsl" | ||
519 | fi | ||
520 | |||
521 | $XSLTPROC $XSLTPROC_FLAGS $DB_FILE >/dev/null 2>&1 << END | ||
522 | <?xml version="1.0" encoding='ISO-8859-1'?> | ||
523 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> | ||
524 | <book id="test"> | ||
525 | </book> | ||
526 | END | ||
527 | if test "$?" = 0; then | ||
528 | XSLTPROC_WORKS=yes | ||
529 | fi | ||
530 | AC_MSG_RESULT($XSLTPROC_WORKS) | ||
531 | fi | ||
532 | AM_CONDITIONAL(have_xsltproc, test "$XSLTPROC_WORKS" = "yes") | ||
533 | |||
534 | AC_SUBST(XML_CATALOG) | ||
535 | AC_SUBST(XSLTPROC_FLAGS) | ||
536 | AC_SUBST(DOCBOOK_ROOT) | ||
537 | AC_SUBST(CAT_ENTRY_START) | ||
538 | AC_SUBST(CAT_ENTRY_END) | ||
539 | ]) | ||
540 | |||
541 | dnl AX_CFLAGS_OPTIONS(var-name, option) | ||
542 | dnl add option to var-name if $CC support it. | ||
543 | AC_DEFUN([AX_CFLAGS_OPTION], [ | ||
544 | AC_MSG_CHECKING([whether ${CC} $2 is understood]) | ||
545 | AC_LANG_SAVE | ||
546 | AC_LANG_C | ||
547 | SAVE_CFLAGS=$CFLAGS | ||
548 | CFLAGS=$2 | ||
549 | AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} $2",AC_MSG_RESULT([no])) | ||
550 | CFLAGS=$SAVE_CFLAGS | ||
551 | AC_LANG_RESTORE | ||
552 | ]) | ||
553 | |||
554 | |||
555 | dnl AX_CXXFLAGS_OPTIONS(var-name, option) | ||
556 | dnl add option to var-name if $CXX support it. | ||
557 | AC_DEFUN([AX_CXXFLAGS_OPTION], [ | ||
558 | AC_MSG_CHECKING([whether ${CXX} $2 is understood]) | ||
559 | AC_LANG_SAVE | ||
560 | AC_LANG_CPLUSPLUS | ||
561 | SAVE_CXXFLAGS=$CXXFLAGS | ||
562 | CXXFLAGS=$2 | ||
563 | AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} $2",AC_MSG_RESULT([no])) | ||
564 | CXXFLAGS=$SAVE_CXXFLAGS | ||
565 | AC_LANG_RESTORE | ||
566 | ]) | ||
567 | |||
568 | dnl AX_COPY_IF_CHANGE(source, dest) | ||
569 | dnl copy source to dest if they don't compare equally or if dest doesn't exist | ||
570 | AC_DEFUN([AX_COPY_IF_CHANGE], [ | ||
571 | if test -r $2; then | ||
572 | if cmp $1 $2 > /dev/null; then | ||
573 | echo $2 is unchanged | ||
574 | else | ||
575 | cp -f $1 $2 | ||
576 | fi | ||
577 | else | ||
578 | cp -f $1 $2 | ||
579 | fi | ||
580 | ]) | ||
581 | |||
diff --git a/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch b/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch new file mode 100644 index 0000000000..e82a381139 --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch | |||
@@ -0,0 +1,7 @@ | |||
1 | diff --git a/configure.ac b/configure.ac | ||
2 | index 5740585..cf6c316 100644 | ||
3 | --- a/configure.ac | ||
4 | +++ b/configure.ac | ||
5 | @@ -16 +16 @@ AC_CONFIG_SRCDIR([libop/op_config.h]) | ||
6 | -AM_INIT_AUTOMAKE | ||
7 | +AM_INIT_AUTOMAKE([foreign]) | ||
diff --git a/meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch b/meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch new file mode 100644 index 0000000000..aefa9548e1 --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch | |||
@@ -0,0 +1,98 @@ | |||
1 | Prevent running check tests on host if cross compiling | ||
2 | |||
3 | This patch enables running the 'make check' tests on the target | ||
4 | in a cross-compiled environment. If not cross-compiling, then 'make | ||
5 | check' builds and executes the tests; no change from this patch. | ||
6 | In a cross-compiling environment, the make variable CROSS_COMPILE is | ||
7 | set which bypasses assiging tests to the makekfile variable TESTS. | ||
8 | Since TESTS is empty, the 'make check' process never tries to run the | ||
9 | tests on the hosts. On the target, the tests must be run manually. | ||
10 | |||
11 | Also, in the libutil++ tests, a makefile variable SRCDIR is passed into | ||
12 | the compilation phase, pointing to the runtime location of the test | ||
13 | 'file-manip-tests'. The mechanism used for a host test, based on | ||
14 | 'topdir' doesn't work. Instead, if CROSS_COMPILE is set, the | ||
15 | makefile takes the path of SRCDIR from the build environment and not | ||
16 | from an expression based on the host path 'topdir'. | ||
17 | |||
18 | Upstream-Status: Pending | ||
19 | |||
20 | Signed-off-by: Dave Lerner <dave.lerner@windriver.com> | ||
21 | |||
22 | diff --git a/configure.ac b/configure.ac | ||
23 | index 41ece64..ce5a16f 100644 | ||
24 | --- a/configure.ac | ||
25 | +++ b/configure.ac | ||
26 | @@ -392,6 +392,7 @@ AC_ARG_ENABLE(account-check, | ||
27 | enable_account_check=$enableval, enable_account_check=yes) | ||
28 | |||
29 | AM_CONDITIONAL(CHECK_ACCOUNT, test "x$enable_account_check" = "xyes") | ||
30 | +AM_CONDITIONAL(CROSS_COMPILE, test "x$cross_compiling" = "xyes") | ||
31 | |||
32 | AC_SUBST(OP_CFLAGS) | ||
33 | AC_SUBST(OP_CXXFLAGS) | ||
34 | diff --git a/libdb/tests/Makefile.am b/libdb/tests/Makefile.am | ||
35 | index 8a69003..d820090 100644 | ||
36 | --- a/libdb/tests/Makefile.am | ||
37 | +++ b/libdb/tests/Makefile.am | ||
38 | @@ -13,4 +13,6 @@ check_PROGRAMS = db_test | ||
39 | db_test_SOURCES = db_test.c | ||
40 | db_test_LDADD = ../libodb.a ../../libutil/libutil.a | ||
41 | |||
42 | +if ! CROSS_COMPILE | ||
43 | TESTS = ${check_PROGRAMS} | ||
44 | +endif | ||
45 | diff --git a/libop/tests/Makefile.am b/libop/tests/Makefile.am | ||
46 | index 8a79eb5..6d417c4 100644 | ||
47 | --- a/libop/tests/Makefile.am | ||
48 | +++ b/libop/tests/Makefile.am | ||
49 | @@ -33,4 +33,6 @@ load_events_files_tests_LDADD = ${COMMON_LIBS} | ||
50 | mangle_tests_SOURCES = mangle_tests.c | ||
51 | mangle_tests_LDADD = ${COMMON_LIBS} | ||
52 | |||
53 | +if ! CROSS_COMPILE | ||
54 | TESTS = ${check_PROGRAMS} utf8_checker.sh | ||
55 | +endif | ||
56 | diff --git a/libregex/tests/Makefile.am b/libregex/tests/Makefile.am | ||
57 | index 6f19838..1d176f9 100644 | ||
58 | --- a/libregex/tests/Makefile.am | ||
59 | +++ b/libregex/tests/Makefile.am | ||
60 | @@ -18,4 +18,6 @@ java_test_LDADD = \ | ||
61 | |||
62 | EXTRA_DIST = mangled-name.in | ||
63 | |||
64 | +if ! CROSS_COMPILE | ||
65 | TESTS = ${check_PROGRAMS} | ||
66 | +endif | ||
67 | diff --git a/libutil++/tests/Makefile.am b/libutil++/tests/Makefile.am | ||
68 | index 51af031..a01ea2d 100644 | ||
69 | --- a/libutil++/tests/Makefile.am | ||
70 | +++ b/libutil++/tests/Makefile.am | ||
71 | @@ -1,7 +1,9 @@ | ||
72 | |||
73 | REALPATH= readlink -f | ||
74 | |||
75 | +if ! CROSS_COMPILE | ||
76 | SRCDIR := $(shell $(REALPATH) $(topdir)/libutil++/tests/ ) | ||
77 | +endif | ||
78 | |||
79 | AM_CPPFLAGS = \ | ||
80 | -I ${top_srcdir}/libutil++ -D SRCDIR="\"$(SRCDIR)/\"" @OP_CPPFLAGS@ | ||
81 | @@ -46,4 +48,6 @@ cached_value_tests_LDADD = ${COMMON_LIBS} | ||
82 | utility_tests_SOURCES = utility_tests.cpp | ||
83 | utility_tests_LDADD = ${COMMON_LIBS} | ||
84 | |||
85 | +if ! CROSS_COMPILE | ||
86 | TESTS = ${check_PROGRAMS} | ||
87 | +endif | ||
88 | diff --git a/libutil/tests/Makefile.am b/libutil/tests/Makefile.am | ||
89 | index dfcd6ec..e8831b5 100644 | ||
90 | --- a/libutil/tests/Makefile.am | ||
91 | +++ b/libutil/tests/Makefile.am | ||
92 | @@ -12,4 +12,6 @@ file_tests_LDADD = ../libutil.a | ||
93 | string_tests_SOURCES = string_tests.c | ||
94 | string_tests_LDADD = ../libutil.a | ||
95 | |||
96 | +if ! CROSS_COMPILE | ||
97 | TESTS = ${check_PROGRAMS} | ||
98 | +endif | ||
diff --git a/meta/recipes-kernel/oprofile/oprofile/opstart.patch b/meta/recipes-kernel/oprofile/oprofile/opstart.patch new file mode 100644 index 0000000000..8696f4ef4d --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofile/opstart.patch | |||
@@ -0,0 +1,245 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | The patch gives a low overhead way of starting/stopping oprofile which | ||
4 | doesn't involve script exection. | ||
5 | |||
6 | (written by RP in OpenedHand days) | ||
7 | |||
8 | diff --git a/utils/Makefile.am b/utils/Makefile.am | ||
9 | index d34b060..dff15f9 100644 | ||
10 | --- oprofile.orig/utils/Makefile.am | ||
11 | +++ oprofile/utils/Makefile.am | ||
12 | @@ -7,7 +7,7 @@ AM_LDFLAGS = @OP_LDFLAGS@ | ||
13 | |||
14 | LIBS=@POPT_LIBS@ @LIBERTY_LIBS@ | ||
15 | |||
16 | -bin_PROGRAMS = ophelp op-check-perfevents | ||
17 | +bin_PROGRAMS = ophelp op-check-perfevents opstart | ||
18 | dist_bin_SCRIPTS = opcontrol | ||
19 | |||
20 | op_check_perfevents_SOURCES = op_perf_events_checker.c | ||
21 | @@ -15,3 +15,10 @@ op_check_perfevents_CPPFLAGS = ${AM_CFLAGS} @PERF_EVENT_FLAGS@ | ||
22 | |||
23 | ophelp_SOURCES = ophelp.c | ||
24 | ophelp_LDADD = ../libop/libop.a ../libutil/libutil.a | ||
25 | + | ||
26 | +opstart_SOURCES = opstart.c | ||
27 | + | ||
28 | +install-exec-local: | ||
29 | + cd $(DESTDIR)/$(bindir) && \ | ||
30 | + rm -f opstop && \ | ||
31 | + $(LN_S) opstart opstop | ||
32 | Index: oprofile/utils/opstart.c | ||
33 | =================================================================== | ||
34 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
35 | +++ oprofile/utils/opstart.c 2008-07-02 15:14:07.000000000 +0100 | ||
36 | @@ -0,0 +1,110 @@ | ||
37 | +/** | ||
38 | + * @file opstart.c | ||
39 | + * Start/Stop oprofile | ||
40 | + * | ||
41 | + * @remark Copyright 2007 Openedhand Ltd. | ||
42 | + * @remark Read the file COPYING | ||
43 | + * | ||
44 | + * @author Richard Purdie | ||
45 | + */ | ||
46 | + | ||
47 | +#include <signal.h> | ||
48 | +#include <stdio.h> | ||
49 | +#include <stdlib.h> | ||
50 | +#include <string.h> | ||
51 | +#include <unistd.h> | ||
52 | +#include <sys/types.h> | ||
53 | +#include <sys/stat.h> | ||
54 | + | ||
55 | +int main(const int argc, const char* argv[]) | ||
56 | +{ | ||
57 | + const char *enable = "/dev/oprofile/enable"; | ||
58 | + const char *lockfile; | ||
59 | + unsigned long dpid; | ||
60 | + struct stat sbuf; | ||
61 | + FILE *lfile, *efile; | ||
62 | + int sig, enb, err; | ||
63 | + | ||
64 | + if (argc >= 2) { | ||
65 | + printf("Error: Invalid options.\n"); | ||
66 | + return 1; | ||
67 | + } | ||
68 | + | ||
69 | + lockfile = getenv("LOCK_FILE"); | ||
70 | + if (!lockfile) | ||
71 | + lockfile = "/var/lib/oprofile/lock"; | ||
72 | + | ||
73 | + /* Add SESSION_DIR support? */ | ||
74 | + | ||
75 | + if (geteuid()) { | ||
76 | + printf("Error: This program must be run as root.\n"); | ||
77 | + return 1; | ||
78 | + } | ||
79 | + | ||
80 | + if (stat(enable, &sbuf)) { | ||
81 | + printf("Error: Could not find /dev/oprofile/enable, the" | ||
82 | + " kernel module probably isn't loaded.\n"); | ||
83 | + printf("This binary only works with 2.6 kernels and oprofile" | ||
84 | + " must have been initialised with 'opcontrol --start-daemon'.\n"); | ||
85 | + return 1; | ||
86 | + } | ||
87 | + | ||
88 | + if (stat(lockfile, &sbuf)) { | ||
89 | + printf("Error: Could not find lockfile %s.\n", lockfile); | ||
90 | + printf("The oprofile daemon must be running (oprofile must" | ||
91 | + " have been initialised with 'opcontrol --start-daemon').\n"); | ||
92 | + return 1; | ||
93 | + } | ||
94 | + | ||
95 | + lfile = fopen(lockfile, "r"); | ||
96 | + if (!lfile) { | ||
97 | + printf("Error opening lockfile %s.\n", lockfile); | ||
98 | + return 1; | ||
99 | + } | ||
100 | + | ||
101 | + err = fscanf(lfile, "%lud", (unsigned long *) &dpid); | ||
102 | + if (err != 1) { | ||
103 | + printf("Error reading pid from lockfile %s.\n", lockfile); | ||
104 | + return 1; | ||
105 | + } | ||
106 | + fclose(lfile); | ||
107 | + | ||
108 | + efile = fopen(enable, "r"); | ||
109 | + if (!efile) { | ||
110 | + printf("Error opening %s.\n", enable); | ||
111 | + return 1; | ||
112 | + } | ||
113 | + | ||
114 | + if (strstr(argv[0], "opstart")) { | ||
115 | + printf("Starting Profiler\n"); | ||
116 | + sig = SIGUSR1; | ||
117 | + enb = 1; | ||
118 | + } else if (strstr(argv[0], "opstop")) { | ||
119 | + printf("Stopping Oprofile.\n"); | ||
120 | + printf("You need to run 'opcontrol --dump' when the session" | ||
121 | + " is finished.\n"); | ||
122 | + sig = SIGUSR2; | ||
123 | + enb = 0; | ||
124 | + } else { | ||
125 | + printf("Error: Please call as 'opstart' or 'opstop'\n"); | ||
126 | + return 1; | ||
127 | + } | ||
128 | + | ||
129 | + err = kill(dpid, 0); | ||
130 | + if (err) { | ||
131 | + printf("Error sending signal to oprofiled. Stale lockfile" | ||
132 | + " (%s) ?\n", lockfile); | ||
133 | + return 1; | ||
134 | + } | ||
135 | + | ||
136 | + fprintf(efile, "%d\n", enb); | ||
137 | + err = kill(dpid, sig); | ||
138 | + if (err) { | ||
139 | + printf("Error sending signal to oprofiled. Stale lockfile" | ||
140 | + " (%s) ?\n", lockfile); | ||
141 | + return 1; | ||
142 | + } | ||
143 | + | ||
144 | + return 0; | ||
145 | +} | ||
146 | + | ||
147 | Index: oprofile/configure.ac | ||
148 | =================================================================== | ||
149 | --- oprofile.orig/configure.ac 2008-07-02 15:13:58.000000000 +0100 | ||
150 | +++ oprofile/configure.ac 2008-07-02 15:17:37.000000000 +0100 | ||
151 | @@ -16,6 +16,7 @@ | ||
152 | AM_CONFIG_HEADER(config.h) | ||
153 | |||
154 | AC_PROG_RANLIB | ||
155 | +AC_PROG_LN_S | ||
156 | AC_PROG_LIBTOOL | ||
157 | |||
158 | dnl for the man page | ||
159 | @@ -241,6 +242,8 @@ | ||
160 | doc/xsl/catalog-1.xml \ | ||
161 | doc/oprofile.1 \ | ||
162 | doc/opcontrol.1 \ | ||
163 | + doc/opstart.1 \ | ||
164 | + doc/opstop.1 \ | ||
165 | doc/ophelp.1 \ | ||
166 | doc/opreport.1 \ | ||
167 | doc/opannotate.1 \ | ||
168 | Index: oprofile/doc/Makefile.am | ||
169 | =================================================================== | ||
170 | --- oprofile.orig/doc/Makefile.am 2008-07-02 15:13:59.000000000 +0100 | ||
171 | +++ oprofile/doc/Makefile.am 2008-07-02 15:14:07.000000000 +0100 | ||
172 | @@ -11,6 +11,8 @@ | ||
173 | man_MANS = \ | ||
174 | oprofile.1 \ | ||
175 | opcontrol.1 \ | ||
176 | + opstart.1 \ | ||
177 | + opstop.1 \ | ||
178 | opreport.1 \ | ||
179 | opannotate.1 \ | ||
180 | opgprof.1 \ | ||
181 | Index: oprofile/doc/opstart.1.in | ||
182 | =================================================================== | ||
183 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
184 | +++ oprofile/doc/opstart.1.in 2008-07-02 15:14:07.000000000 +0100 | ||
185 | @@ -0,0 +1,27 @@ | ||
186 | +.TH OPSTART 1 "@DATE@" "oprofile @VERSION@" | ||
187 | +.UC 4 | ||
188 | +.SH NAME | ||
189 | +opstart \- start OProfile profiling | ||
190 | +.SH SYNOPSIS | ||
191 | +.br | ||
192 | +.B opstart | ||
193 | +.SH DESCRIPTION | ||
194 | +.B opstart | ||
195 | +is a simple optimised command to start profiling with 2.6 Linux kernels. | ||
196 | +OProfile should have already been initialised by calling "opcontrol --start-daemon". | ||
197 | + | ||
198 | +.SH ENVIRONMENT | ||
199 | +No special environment variables are recognised by opstart. | ||
200 | + | ||
201 | +.SH FILES | ||
202 | +.TP | ||
203 | +.I /var/lib/oprofile/samples/ | ||
204 | +The location of the generated sample files. | ||
205 | + | ||
206 | +.SH VERSION | ||
207 | +.TP | ||
208 | +This man page is current for @PACKAGE@-@VERSION@. | ||
209 | + | ||
210 | +.SH SEE ALSO | ||
211 | +.BR @OP_DOCDIR@, | ||
212 | +.BR oprofile(1) | ||
213 | Index: oprofile/doc/opstop.1.in | ||
214 | =================================================================== | ||
215 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
216 | +++ oprofile/doc/opstop.1.in 2008-07-02 15:14:07.000000000 +0100 | ||
217 | @@ -0,0 +1,28 @@ | ||
218 | +.TH OPSTOP 1 "@DATE@" "oprofile @VERSION@" | ||
219 | +.UC 4 | ||
220 | +.SH NAME | ||
221 | +opstop \- stop OProfile profiling | ||
222 | +.SH SYNOPSIS | ||
223 | +.br | ||
224 | +.B opstop | ||
225 | +.SH DESCRIPTION | ||
226 | +.B opstop | ||
227 | +is a simple optimsed command to stop profiling with 2.6 Linux kernels. | ||
228 | +You need to run "opcontrol --dump" before being able to view a profile | ||
229 | +with opreport. | ||
230 | + | ||
231 | +.SH ENVIRONMENT | ||
232 | +No special environment variables are recognised by opstop. | ||
233 | + | ||
234 | +.SH FILES | ||
235 | +.TP | ||
236 | +.I /var/lib/oprofile/samples/ | ||
237 | +The location of the generated sample files. | ||
238 | + | ||
239 | +.SH VERSION | ||
240 | +.TP | ||
241 | +This man page is current for @PACKAGE@-@VERSION@. | ||
242 | + | ||
243 | +.SH SEE ALSO | ||
244 | +.BR @OP_DOCDIR@, | ||
245 | +.BR oprofile(1) | ||
diff --git a/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch b/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch new file mode 100644 index 0000000000..45cab7d3d8 --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch | |||
@@ -0,0 +1,120 @@ | |||
1 | oprofile: Determine the root home directory dynamically | ||
2 | |||
3 | This commit detects the root home directory dynamically with changes to | ||
4 | the opcontrol script and the oprofile gui app source. | ||
5 | |||
6 | The commit replaces an earlier fix that detected and adjusted a | ||
7 | 'non-standard' root home directory at build time. The advantage of this | ||
8 | patch is that the oprofile tools are adjusted to the current run-time | ||
9 | path to ~root, not the build time path. | ||
10 | |||
11 | Upstream-Status: inappropriate [OE specific] | ||
12 | |||
13 | Signed-off-by: Dave Lerner <dave.lerner@windriver.com> | ||
14 | |||
15 | diff --git a/doc/opcontrol.1.in b/doc/opcontrol.1.in | ||
16 | index c434704..f57eb76 100644 | ||
17 | --- a/doc/opcontrol.1.in | ||
18 | +++ b/doc/opcontrol.1.in | ||
19 | @@ -171,7 +171,7 @@ No special environment variables are recognised by opcontrol. | ||
20 | |||
21 | .SH FILES | ||
22 | .TP | ||
23 | -.I /root/.oprofile/daemonrc | ||
24 | +.I ~root/.oprofile/daemonrc | ||
25 | Configuration file for opcontrol | ||
26 | .TP | ||
27 | .I /var/lib/oprofile/samples/ | ||
28 | diff --git a/doc/oprofile.1.in b/doc/oprofile.1.in | ||
29 | index 3d0f0ed..5c623e1 100644 | ||
30 | --- a/doc/oprofile.1.in | ||
31 | +++ b/doc/oprofile.1.in | ||
32 | @@ -150,7 +150,7 @@ No special environment variables are recognised by oprofile. | ||
33 | .I $HOME/.oprofile/ | ||
34 | Configuration files | ||
35 | .TP | ||
36 | -.I /root/.oprofile/daemonrc | ||
37 | +.I ~root/.oprofile/daemonrc | ||
38 | Configuration file for opcontrol | ||
39 | .TP | ||
40 | .I @prefix@/share/oprofile/ | ||
41 | diff --git a/doc/oprofile.html b/doc/oprofile.html | ||
42 | index 128d9f7..d7e4dea 100644 | ||
43 | --- a/doc/oprofile.html | ||
44 | +++ b/doc/oprofile.html | ||
45 | @@ -1394,7 +1394,7 @@ The <span class="command"><strong>opcontrol</strong></span> script provides the | ||
46 | <dd> | ||
47 | <p> | ||
48 | Followed by list arguments for profiling set up. List of arguments | ||
49 | - saved in <code class="filename">/root/.oprofile/daemonrc</code>. | ||
50 | + saved in <code class="filename">~root/.oprofile/daemonrc</code>. | ||
51 | Giving this option is not necessary; you can just directly pass one | ||
52 | of the setup options, e.g. <span class="command"><strong>opcontrol --no-vmlinux</strong></span>. | ||
53 | </p> | ||
54 | @@ -1430,7 +1430,7 @@ The <span class="command"><strong>opcontrol</strong></span> script provides the | ||
55 | <dd> | ||
56 | <p> | ||
57 | Start data collection with either arguments provided by <code class="option">--setup</code> | ||
58 | - or information saved in <code class="filename">/root/.oprofile/daemonrc</code>. Specifying | ||
59 | + or information saved in <code class="filename">~root/.oprofile/daemonrc</code>. Specifying | ||
60 | the addition <code class="option">--verbose</code> makes the daemon generate lots of debug data | ||
61 | whilst it is running. | ||
62 | </p> | ||
63 | diff --git a/doc/oprofile.xml b/doc/oprofile.xml | ||
64 | index 6a17c6d..0968d76 100644 | ||
65 | --- a/doc/oprofile.xml | ||
66 | +++ b/doc/oprofile.xml | ||
67 | @@ -568,7 +568,7 @@ The <command>opcontrol</command> script provides the following actions : | ||
68 | <term><option>--setup</option></term> | ||
69 | <listitem><para> | ||
70 | Followed by list arguments for profiling set up. List of arguments | ||
71 | - saved in <filename>/root/.oprofile/daemonrc</filename>. | ||
72 | + saved in <filename>~root/.oprofile/daemonrc</filename>. | ||
73 | Giving this option is not necessary; you can just directly pass one | ||
74 | of the setup options, e.g. <command>opcontrol --no-vmlinux</command>. | ||
75 | </para></listitem> | ||
76 | @@ -592,7 +592,7 @@ The <command>opcontrol</command> script provides the following actions : | ||
77 | <term><option>--start</option></term> | ||
78 | <listitem><para> | ||
79 | Start data collection with either arguments provided by <option>--setup</option> | ||
80 | - or information saved in <filename>/root/.oprofile/daemonrc</filename>. Specifying | ||
81 | + or information saved in <filename>~root/.oprofile/daemonrc</filename>. Specifying | ||
82 | the addition <option>--verbose</option> makes the daemon generate lots of debug data | ||
83 | whilst it is running. | ||
84 | </para></listitem> | ||
85 | diff --git a/gui/oprof_start_util.cpp b/gui/oprof_start_util.cpp | ||
86 | index d293431..d13fa8f 100644 | ||
87 | --- a/gui/oprof_start_util.cpp | ||
88 | +++ b/gui/oprof_start_util.cpp | ||
89 | @@ -20,6 +20,8 @@ | ||
90 | #include <iostream> | ||
91 | #include <fstream> | ||
92 | #include <cstdlib> | ||
93 | +#include <sys/types.h> | ||
94 | +#include <pwd.h> | ||
95 | |||
96 | #include <qfiledialog.h> | ||
97 | #include <qmessagebox.h> | ||
98 | @@ -39,7 +41,8 @@ namespace { | ||
99 | // return the ~ expansion suffixed with a '/' | ||
100 | string const get_config_dir() | ||
101 | { | ||
102 | - return "/root"; | ||
103 | + struct *pw = getpwnam("root"); | ||
104 | + return pw->pw_dir; | ||
105 | } | ||
106 | |||
107 | string daemon_pid; | ||
108 | diff --git a/utils/opcontrol b/utils/opcontrol | ||
109 | index 09fa5a7..a8acdae 100644 | ||
110 | --- a/utils/opcontrol | ||
111 | +++ b/utils/opcontrol | ||
112 | @@ -385,7 +385,7 @@ do_init() | ||
113 | OPROFILED="$OPDIR/oprofiled" | ||
114 | |||
115 | # location for daemon setup information | ||
116 | - SETUP_DIR="/root/.oprofile" | ||
117 | + SETUP_DIR="`grep root /etc/passwd | cut -d: -f6`/.oprofile" | ||
118 | SETUP_FILE="$SETUP_DIR/daemonrc" | ||
119 | SEC_SETUP_FILE="$SETUP_DIR/daemonrc_new" | ||
120 | |||
diff --git a/meta/recipes-kernel/oprofile/oprofile/run-ptest b/meta/recipes-kernel/oprofile/oprofile/run-ptest new file mode 100644 index 0000000000..4814be652a --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofile/run-ptest | |||
@@ -0,0 +1,19 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | saved_dir=$PWD | ||
4 | for dir in */tests ; do | ||
5 | cd $dir | ||
6 | for atest in * ; do | ||
7 | if [ \( -x $atest \) -a \( -f $atest \) ] ; then | ||
8 | ./$atest > ${atest}.stdout 2> ${atest}.stderr | ||
9 | if [ $? = 0 ] ; then | ||
10 | echo "PASS: $dir $atest" | ||
11 | rm ${atest}.stdout ${atest}.stderr | ||
12 | else | ||
13 | echo "FAIL: ${dir}/${atest}" | ||
14 | fi | ||
15 | fi | ||
16 | done | ||
17 | cd $saved_dir | ||
18 | done | ||
19 | |||
diff --git a/meta/recipes-kernel/oprofile/oprofile_0.9.9.bb b/meta/recipes-kernel/oprofile/oprofile_0.9.9.bb new file mode 100644 index 0000000000..63ef6af0e9 --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofile_0.9.9.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | require oprofile.inc | ||
2 | |||
3 | DEPENDS += "virtual/kernel" | ||
4 | DEPENDS_append_powerpc64 = " libpfm4" | ||
5 | |||
6 | SRC_URI += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ | ||
7 | file://0001-Add-rmb-definition-for-AArch64-architecture.patch \ | ||
8 | file://0001-Tidy-powerpc64-bfd-target-check.patch \ | ||
9 | file://0001-Add-freescale-e500mc-support.patch \ | ||
10 | file://0002-Add-freescale-e6500-support.patch \ | ||
11 | " | ||
12 | SRC_URI[md5sum] = "00aec1287da2dfffda17a9b1c0a01868" | ||
13 | SRC_URI[sha256sum] = "1e523400daaba7b8d0d15269e977a08b40edfea53970774b69ae130e25117597" | ||
14 | |||
15 | |||
16 | S = "${WORKDIR}/oprofile-${PV}" | ||
17 | |||
diff --git a/meta/recipes-kernel/oprofile/oprofileui-server/init b/meta/recipes-kernel/oprofile/oprofileui-server/init new file mode 100755 index 0000000000..2544ea4ac0 --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofileui-server/init | |||
@@ -0,0 +1,37 @@ | |||
1 | #!/bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: oprofile-server | ||
4 | # Required-Start: $network | ||
5 | # Required-Stop: $network | ||
6 | # Default-Start: 2 3 4 5 | ||
7 | # Default-Stop: 0 1 6 | ||
8 | # Short-Description: OProfileUI server | ||
9 | # Description: | ||
10 | ### END INIT INFO | ||
11 | |||
12 | . /etc/init.d/functions | ||
13 | |||
14 | case "$1" in | ||
15 | start) | ||
16 | echo "Starting OProfileUI server" | ||
17 | . /etc/profile | ||
18 | /usr/bin/oprofile-server & | ||
19 | ;; | ||
20 | |||
21 | stop) | ||
22 | echo "Stopping OProfileUI server" | ||
23 | killproc oprofile-server | ||
24 | ;; | ||
25 | |||
26 | restart) | ||
27 | $0 stop | ||
28 | sleep 1 | ||
29 | $0 start | ||
30 | ;; | ||
31 | |||
32 | *) | ||
33 | echo "usage: $0 { start | stop | restart }" | ||
34 | ;; | ||
35 | esac | ||
36 | |||
37 | exit 0 | ||
diff --git a/meta/recipes-kernel/oprofile/oprofileui-server/oprofileui-server.service b/meta/recipes-kernel/oprofile/oprofileui-server/oprofileui-server.service new file mode 100644 index 0000000000..1a2cbe62ea --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofileui-server/oprofileui-server.service | |||
@@ -0,0 +1,6 @@ | |||
1 | [Unit] | ||
2 | Description=OProfileUI Server | ||
3 | After=network.target | ||
4 | |||
5 | [Service] | ||
6 | ExecStart=/bin/sh -c ". @SYSCONFDIR@/profile; @BINDIR@/oprofile-server" | ||
diff --git a/meta/recipes-kernel/oprofile/oprofileui-server_git.bb b/meta/recipes-kernel/oprofile/oprofileui-server_git.bb new file mode 100644 index 0000000000..eb3b78b906 --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofileui-server_git.bb | |||
@@ -0,0 +1,34 @@ | |||
1 | require oprofileui.inc | ||
2 | |||
3 | SRCREV = "389e1875af4721d52c7e65cf9cfffb69b0ed6a59" | ||
4 | PV = "0.0+git${SRCPV}" | ||
5 | |||
6 | S = "${WORKDIR}/git" | ||
7 | |||
8 | SRC_URI = "git://git.yoctoproject.org/oprofileui \ | ||
9 | file://init \ | ||
10 | file://oprofileui-server.service " | ||
11 | |||
12 | DEPENDS += "intltool-native" | ||
13 | |||
14 | EXTRA_OECONF += "--disable-client --enable-server" | ||
15 | |||
16 | RDEPENDS_${PN} = "oprofile avahi-daemon" | ||
17 | |||
18 | do_install_append() { | ||
19 | install -d ${D}${sysconfdir}/init.d | ||
20 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/oprofileui-server | ||
21 | |||
22 | install -d ${D}${systemd_unitdir}/system | ||
23 | install -m 0644 ${WORKDIR}/oprofileui-server.service ${D}${systemd_unitdir}/system/ | ||
24 | sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | ||
25 | -e 's,@BINDIR@,${bindir},g' ${D}${systemd_unitdir}/system/oprofileui-server.service | ||
26 | } | ||
27 | |||
28 | inherit update-rc.d systemd | ||
29 | |||
30 | INITSCRIPT_NAME = "oprofileui-server" | ||
31 | INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ." | ||
32 | |||
33 | SYSTEMD_SERVICE_${PN} = "oprofileui-server.service" | ||
34 | SYSTEMD_AUTO_ENABLE = "disable" | ||
diff --git a/meta/recipes-kernel/oprofile/oprofileui.inc b/meta/recipes-kernel/oprofile/oprofileui.inc new file mode 100644 index 0000000000..1dfd0c64ee --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofileui.inc | |||
@@ -0,0 +1,16 @@ | |||
1 | SUMMARY = "User Interface for the System-Wide Profiler" | ||
2 | DESCRIPTION = "User interface for the OProfile tool" | ||
3 | HOMEPAGE = "http://labs.o-hand.com/oprofileui/" | ||
4 | BUGTRACKER = "http://bugzilla.yoctoproject.org/" | ||
5 | |||
6 | SECTION = "x11" | ||
7 | |||
8 | LICENSE = "GPLv2" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
10 | |||
11 | DEPENDS = "glib-2.0 avahi intltool-native" | ||
12 | |||
13 | inherit autotools pkgconfig | ||
14 | |||
15 | EXTRA_OECONF = "--with-avahi" | ||
16 | |||
diff --git a/meta/recipes-kernel/oprofile/oprofileui_git.bb b/meta/recipes-kernel/oprofile/oprofileui_git.bb new file mode 100644 index 0000000000..bb69d5404d --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofileui_git.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | require oprofileui.inc | ||
2 | |||
3 | DEPENDS += "gtk+ libglade libxml2 avahi-ui gconf" | ||
4 | |||
5 | SRCREV = "389e1875af4721d52c7e65cf9cfffb69b0ed6a59" | ||
6 | PV = "0.0+git${SRCPV}" | ||
7 | |||
8 | S = "${WORKDIR}/git" | ||
9 | |||
10 | SRC_URI = "git://git.yoctoproject.org/oprofileui" | ||
11 | |||
12 | EXTRA_OECONF += "--enable-client --disable-server" | ||
13 | |||
14 | PACKAGES =+ "oprofileui-viewer" | ||
15 | |||
16 | FILES_oprofileui-viewer = "${bindir}/oparchconv ${bindir}/oprofile-viewer ${datadir}/applications/ ${datadir}/oprofileui/ ${datadir}/icons" | ||
17 | RDEPENDS_oprofileui-viewer = "oprofile" | ||
diff --git a/meta/recipes-kernel/perf/perf-features.inc b/meta/recipes-kernel/perf/perf-features.inc new file mode 100644 index 0000000000..b8859ab7d5 --- /dev/null +++ b/meta/recipes-kernel/perf/perf-features.inc | |||
@@ -0,0 +1,22 @@ | |||
1 | PERF_FEATURES_ENABLE ?= "perf-scripting perf-tui" | ||
2 | |||
3 | def perf_feature_enabled(feature, trueval, falseval, d): | ||
4 | """ | ||
5 | Check which perf features are enabled. | ||
6 | |||
7 | The PERF_FEATURES_ENABLE variable lists the perf features to | ||
8 | enable. Override it if you want something different from what's | ||
9 | listed above, which is the default. If empty, the build won't | ||
10 | enable any features (which may be exactly what you want, just a | ||
11 | barebones perf without any extra baggage, what you get if you | ||
12 | specify an empty feature list). | ||
13 | |||
14 | Available perf features: | ||
15 | perf-scripting: enable support for Perl and Python bindings | ||
16 | perf-tui: enable support for the perf TUI (via libnewt) | ||
17 | |||
18 | """ | ||
19 | enabled_features = d.getVar("PERF_FEATURES_ENABLE", True) or "" | ||
20 | if feature in enabled_features: | ||
21 | return trueval | ||
22 | return falseval | ||
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb new file mode 100644 index 0000000000..19772d87c9 --- /dev/null +++ b/meta/recipes-kernel/perf/perf.bb | |||
@@ -0,0 +1,189 @@ | |||
1 | SUMMARY = "Performance analysis tools for Linux" | ||
2 | DESCRIPTION = "Performance counters for Linux are a new kernel-based \ | ||
3 | subsystem that provide a framework for all things \ | ||
4 | performance analysis. It covers hardware level \ | ||
5 | (CPU/PMU, Performance Monitoring Unit) features \ | ||
6 | and software features (software counters, tracepoints) \ | ||
7 | as well." | ||
8 | |||
9 | LICENSE = "GPLv2" | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | ||
11 | |||
12 | PR = "r9" | ||
13 | |||
14 | require perf-features.inc | ||
15 | |||
16 | BUILDPERF_libc-uclibc = "no" | ||
17 | |||
18 | # gui support was added with kernel 3.6.35 | ||
19 | # since 3.10 libnewt was replaced by slang | ||
20 | # to cover a wide range of kernel we add both dependencies | ||
21 | TUI_DEPENDS = "${@perf_feature_enabled('perf-tui', 'libnewt slang', '',d)}" | ||
22 | SCRIPTING_DEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl python', '',d)}" | ||
23 | LIBUNWIND_DEPENDS = "${@perf_feature_enabled('perf-libunwind', 'libunwind', '',d)}" | ||
24 | |||
25 | DEPENDS = "virtual/kernel \ | ||
26 | virtual/${MLPREFIX}libc \ | ||
27 | ${MLPREFIX}elfutils \ | ||
28 | ${MLPREFIX}binutils \ | ||
29 | ${TUI_DEPENDS} \ | ||
30 | ${SCRIPTING_DEPENDS} \ | ||
31 | ${LIBUNWIND_DEPENDS} \ | ||
32 | bison flex \ | ||
33 | " | ||
34 | |||
35 | PROVIDES = "virtual/perf" | ||
36 | |||
37 | inherit linux-kernel-base kernel-arch pythonnative | ||
38 | |||
39 | # needed for building the tools/perf Python bindings | ||
40 | inherit python-dir | ||
41 | export STAGING_INCDIR | ||
42 | export STAGING_LIBDIR | ||
43 | export BUILD_SYS | ||
44 | export HOST_SYS | ||
45 | |||
46 | #kernel 3.1+ supports WERROR to disable warnings as errors | ||
47 | export WERROR = "0" | ||
48 | |||
49 | do_populate_lic[depends] += "virtual/kernel:do_populate_sysroot" | ||
50 | |||
51 | # needed for building the tools/perf Perl binding | ||
52 | inherit perlnative cpan-base | ||
53 | # Env var which tells perl if it should use host (no) or target (yes) settings | ||
54 | export PERLCONFIGTARGET = "${@is_target(d)}" | ||
55 | export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}/CORE" | ||
56 | export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" | ||
57 | export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" | ||
58 | |||
59 | S = "${STAGING_KERNEL_DIR}" | ||
60 | # The source should be ready after the do_unpack | ||
61 | do_unpack[depends] += "virtual/kernel:do_populate_sysroot" | ||
62 | |||
63 | B = "${WORKDIR}/${BPN}-${PV}" | ||
64 | |||
65 | SCRIPTING_DEFINES = "${@perf_feature_enabled('perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}" | ||
66 | TUI_DEFINES = "${@perf_feature_enabled('perf-tui', '', 'NO_NEWT=1',d)}" | ||
67 | LIBUNWIND_DEFINES = "${@perf_feature_enabled('perf-libunwind', '', 'NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1',d)}" | ||
68 | |||
69 | # The LDFLAGS is required or some old kernels fails due missing | ||
70 | # symbols and this is preferred than requiring patches to every old | ||
71 | # supported kernel. | ||
72 | LDFLAGS="-ldl -lutil" | ||
73 | |||
74 | EXTRA_OEMAKE = '\ | ||
75 | -C ${S}/tools/perf \ | ||
76 | O=${B} \ | ||
77 | CROSS_COMPILE=${TARGET_PREFIX} \ | ||
78 | ARCH=${ARCH} \ | ||
79 | CC="${CC}" \ | ||
80 | AR="${AR}" \ | ||
81 | EXTRA_CFLAGS="-ldw" \ | ||
82 | perfexecdir=${libexecdir} \ | ||
83 | NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} ${SCRIPTING_DEFINES} \ | ||
84 | ' | ||
85 | |||
86 | EXTRA_OEMAKE += "\ | ||
87 | 'prefix=${prefix}' \ | ||
88 | 'bindir=${bindir}' \ | ||
89 | 'sharedir=${datadir}' \ | ||
90 | 'sysconfdir=${sysconfdir}' \ | ||
91 | 'perfexecdir=${libexecdir}/perf-core' \ | ||
92 | \ | ||
93 | 'ETC_PERFCONFIG=${@os.path.relpath(sysconfdir, prefix)}' \ | ||
94 | 'sharedir=${@os.path.relpath(datadir, prefix)}' \ | ||
95 | 'mandir=${@os.path.relpath(mandir, prefix)}' \ | ||
96 | 'infodir=${@os.path.relpath(infodir, prefix)}' \ | ||
97 | " | ||
98 | |||
99 | PARALLEL_MAKE = "" | ||
100 | |||
101 | do_compile() { | ||
102 | # Linux kernel build system is expected to do the right thing | ||
103 | unset CFLAGS | ||
104 | oe_runmake all | ||
105 | } | ||
106 | |||
107 | do_install() { | ||
108 | # Linux kernel build system is expected to do the right thing | ||
109 | unset CFLAGS | ||
110 | oe_runmake DESTDIR=${D} install | ||
111 | # we are checking for this make target to be compatible with older perf versions | ||
112 | if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" -a $(grep install-python_ext ${S}/tools/perf/Makefile) = "0" ]; then | ||
113 | oe_runmake DESTDIR=${D} install-python_ext | ||
114 | fi | ||
115 | } | ||
116 | |||
117 | do_configure_prepend () { | ||
118 | # Fix for rebuilding | ||
119 | rm -rf ${B}/ | ||
120 | mkdir ${B}/ | ||
121 | |||
122 | #kernels before 3.1 do not support WERROR env variable | ||
123 | sed -i 's,-Werror ,,' ${S}/tools/perf/Makefile | ||
124 | if [ -e "${S}/tools/perf/config/Makefile" ]; then | ||
125 | sed -i 's,-Werror ,,' ${S}/tools/perf/config/Makefile | ||
126 | fi | ||
127 | |||
128 | # If building a multlib based perf, the incorrect library path will be | ||
129 | # detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 bit | ||
130 | # build, with a 64 bit multilib, the arch won't match and the detection of a | ||
131 | # 64 bit build (and library) are not exected. To ensure that libraries are | ||
132 | # installed to the correct location, we can use the weak assignment in the | ||
133 | # config/Makefile. | ||
134 | if [ -e "${S}/tools/perf/config/Makefile" ]; then | ||
135 | # Match $(prefix)/$(lib) and $(prefix)/lib | ||
136 | sed -i -e 's,^libdir = \($(prefix)/.*lib\),libdir ?= \1,' \ | ||
137 | -e 's,^perfexecdir = \(.*\),perfexecdir ?= \1,' \ | ||
138 | ${S}/tools/perf/config/Makefile | ||
139 | fi | ||
140 | # We need to ensure the --sysroot option in CC is preserved | ||
141 | if [ -e "${S}/tools/perf/Makefile.perf" ]; then | ||
142 | sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/perf/Makefile.perf | ||
143 | sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/perf/Makefile.perf | ||
144 | fi | ||
145 | if [ -e "${S}/tools/lib/api/Makefile" ]; then | ||
146 | sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/api/Makefile | ||
147 | sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/api/Makefile | ||
148 | fi | ||
149 | if [ -e "${S}/tools/perf/config/feature-checks/Makefile" ]; then | ||
150 | sed -i 's,CC := $(CROSS_COMPILE)gcc -MD,CC += -MD,' ${S}/tools/perf/config/feature-checks/Makefile | ||
151 | fi | ||
152 | |||
153 | # 3.17-rc1+ has a include issue for arm/powerpc. Temporarily sed in the appropriate include | ||
154 | if [ -e "${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c" ]; then | ||
155 | sed -i 's,#include "util/callchain.h",#include "util/callchain.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c | ||
156 | fi | ||
157 | if [ -e "${S}/tools/perf/arch/arm/util/unwind-libunwind.c" ] && [ -e "${S}/tools/perf/arch/arm/tests/dwarf-unwind.c" ]; then | ||
158 | sed -i 's,#include "tests/tests.h",#include "tests/tests.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/arm/tests/dwarf-unwind.c | ||
159 | sed -i 's,#include "perf_regs.h",#include "perf_regs.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/arm/util/unwind-libunwind.c | ||
160 | fi | ||
161 | } | ||
162 | |||
163 | python do_package_prepend() { | ||
164 | bb.data.setVar('PKGV', get_kernelversion('${S}').split("-")[0], d) | ||
165 | } | ||
166 | |||
167 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
168 | |||
169 | |||
170 | PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python" | ||
171 | |||
172 | RDEPENDS_${PN} += "elfutils" | ||
173 | RDEPENDS_${PN}-archive =+ "bash" | ||
174 | RDEPENDS_${PN}-python =+ "bash python" | ||
175 | RDEPENDS_${PN}-perl =+ "bash perl perl-modules" | ||
176 | RDEPENDS_${PN}-tests =+ "python" | ||
177 | |||
178 | RSUGGESTS_SCRIPTING = "${@perf_feature_enabled('perf-scripting', '${PN}-perl ${PN}-python', '',d)}" | ||
179 | RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}" | ||
180 | |||
181 | FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent" | ||
182 | FILES_${PN}-dbg += "${libdir}/python*/site-packages/.debug" | ||
183 | FILES_${PN}-archive = "${libdir}/perf/perf-core/perf-archive" | ||
184 | FILES_${PN}-tests = "${libdir}/perf/perf-core/tests" | ||
185 | FILES_${PN}-python = "${libdir}/python*/site-packages ${libdir}/perf/perf-core/scripts/python" | ||
186 | FILES_${PN}-perl = "${libdir}/perf/perf-core/scripts/perl" | ||
187 | |||
188 | |||
189 | INHIBIT_PACKAGE_DEBUG_SPLIT="1" | ||
diff --git a/meta/recipes-kernel/powertop/powertop_2.6.1.bb b/meta/recipes-kernel/powertop/powertop_2.6.1.bb new file mode 100644 index 0000000000..ddb510254a --- /dev/null +++ b/meta/recipes-kernel/powertop/powertop_2.6.1.bb | |||
@@ -0,0 +1,32 @@ | |||
1 | SUMMARY = "Power usage tool" | ||
2 | DESCRIPTION = "Linux tool to diagnose issues with power consumption and power management." | ||
3 | HOMEPAGE = "http://01.org/powertop/" | ||
4 | BUGTRACKER = "http://bugzilla.lesswatts.org/" | ||
5 | DEPENDS = "ncurses libnl pciutils" | ||
6 | LICENSE = "GPLv2" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" | ||
8 | |||
9 | SRC_URI = "http://01.org/powertop/sites/default/files/downloads/powertop-${PV}.tar.gz" | ||
10 | |||
11 | SRC_URI[md5sum] = "4391e7b0af854ecf722cdf712f24b631" | ||
12 | SRC_URI[sha256sum] = "034cde6d5bb433fe0d29251d5cde5d4c2948abf05fe29ef10966b659331b20e4" | ||
13 | |||
14 | inherit autotools gettext pkgconfig | ||
15 | |||
16 | # we need to explicitly link with libintl in uClibc systems | ||
17 | EXTRA_LDFLAGS ?= "" | ||
18 | EXTRA_LDFLAGS_libc-uclibc = "-lintl" | ||
19 | LDFLAGS += "${EXTRA_LDFLAGS}" | ||
20 | |||
21 | # we do not want libncursesw if we can | ||
22 | do_configure_prepend() { | ||
23 | # configure.ac checks for delwin() in "ncursesw ncurses" so let's drop first one | ||
24 | sed -i -e "s/ncursesw//g" ${S}/configure.ac | ||
25 | mkdir -p ${B}/src/tuning/ | ||
26 | } | ||
27 | |||
28 | inherit update-alternatives | ||
29 | ALTERNATIVE_${PN} = "powertop" | ||
30 | ALTERNATIVE_TARGET[powertop] = "${sbindir}/powertop" | ||
31 | ALTERNATIVE_LINK_NAME[powertop] = "${sbindir}/powertop" | ||
32 | ALTERNATIVE_PRIORITY = "100" | ||
diff --git a/meta/recipes-kernel/sysprof/files/define-NT_GNU_BUILD_ID.patch b/meta/recipes-kernel/sysprof/files/define-NT_GNU_BUILD_ID.patch new file mode 100644 index 0000000000..dcc2cbe67c --- /dev/null +++ b/meta/recipes-kernel/sysprof/files/define-NT_GNU_BUILD_ID.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | On uclibc elf.h does not have GNU extentions but we need this define | ||
2 | so we define it locally if its not getting it from elf.h | ||
3 | |||
4 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Index: git/elfparser.h | ||
9 | =================================================================== | ||
10 | --- git.orig/elfparser.h 2011-07-16 18:57:41.000000000 -0700 | ||
11 | +++ git/elfparser.h 2011-07-16 20:28:54.733829895 -0700 | ||
12 | @@ -17,6 +17,10 @@ | ||
13 | */ | ||
14 | #include <glib.h> | ||
15 | |||
16 | +#ifndef NT_GNU_BUILD_ID | ||
17 | +#define NT_GNU_BUILD_ID 3 | ||
18 | +#endif | ||
19 | + | ||
20 | typedef struct ElfSym ElfSym; | ||
21 | typedef struct ElfParser ElfParser; | ||
22 | |||
diff --git a/meta/recipes-kernel/sysprof/files/rmb-arm.patch b/meta/recipes-kernel/sysprof/files/rmb-arm.patch new file mode 100644 index 0000000000..c53ac6427c --- /dev/null +++ b/meta/recipes-kernel/sysprof/files/rmb-arm.patch | |||
@@ -0,0 +1,21 @@ | |||
1 | |||
2 | Upstream-Status: Pending | ||
3 | |||
4 | Index: git/util.h | ||
5 | =================================================================== | ||
6 | --- git.orig/util.h 2010-12-07 22:41:57.156243001 -0600 | ||
7 | +++ git/util.h 2010-12-07 22:43:47.616243002 -0600 | ||
8 | @@ -37,4 +37,13 @@ | ||
9 | #define cpu_relax() asm volatile("" ::: "memory"); | ||
10 | #endif | ||
11 | |||
12 | +#ifdef __arm__ | ||
13 | +/* | ||
14 | + * Use the __kuser_memory_barrier helper in the CPU helper page. See | ||
15 | + * arch/arm/kernel/entry-armv.S in the kernel source for details. | ||
16 | + */ | ||
17 | +#define rmb() ((void(*)(void))0xffff0fa0)() | ||
18 | +#define cpu_relax() asm volatile("":::"memory") | ||
19 | +#endif | ||
20 | + | ||
21 | #endif | ||
diff --git a/meta/recipes-kernel/sysprof/files/rmb-mips.patch b/meta/recipes-kernel/sysprof/files/rmb-mips.patch new file mode 100644 index 0000000000..e055b8ad8b --- /dev/null +++ b/meta/recipes-kernel/sysprof/files/rmb-mips.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Index: git/util.h | ||
4 | =================================================================== | ||
5 | --- git.orig/util.h 2010-12-08 01:22:44.486243001 -0600 | ||
6 | +++ git/util.h 2010-12-08 01:23:27.836243001 -0600 | ||
7 | @@ -37,4 +37,15 @@ | ||
8 | #define cpu_relax() asm volatile("" ::: "memory"); | ||
9 | #endif | ||
10 | |||
11 | +#ifdef __mips__ | ||
12 | +#define rmb() asm volatile( \ | ||
13 | + ".set mips2\n\t" \ | ||
14 | + "sync\n\t" \ | ||
15 | + ".set mips0" \ | ||
16 | + : /* no output */ \ | ||
17 | + : /* no input */ \ | ||
18 | + : "memory") | ||
19 | +#define cpu_relax() asm volatile("" ::: "memory") | ||
20 | +#endif | ||
21 | + | ||
22 | #endif | ||
diff --git a/meta/recipes-kernel/sysprof/sysprof_git.bb b/meta/recipes-kernel/sysprof/sysprof_git.bb new file mode 100644 index 0000000000..1187cb466a --- /dev/null +++ b/meta/recipes-kernel/sysprof/sysprof_git.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | SUMMARY = "System-wide Performance Profiler for Linux" | ||
2 | LICENSE = "GPLv2" | ||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
4 | |||
5 | DEPENDS = "gtk+ libglade" | ||
6 | |||
7 | SRCREV = "cd44ee6644c3641507fb53b8a2a69137f2971219" | ||
8 | PV = "1.2.0+git${SRCPV}" | ||
9 | |||
10 | SRC_URI = "git://git.gnome.org/sysprof \ | ||
11 | file://define-NT_GNU_BUILD_ID.patch \ | ||
12 | " | ||
13 | |||
14 | SRC_URI_append_arm = " file://rmb-arm.patch" | ||
15 | SRC_URI_append_mips = " file://rmb-mips.patch" | ||
16 | SRC_URI_append_mips64 = " file://rmb-mips.patch" | ||
17 | SRC_URI_append_mips64n32 = " file://rmb-mips.patch" | ||
18 | |||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | inherit autotools pkgconfig | ||
diff --git a/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb b/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb new file mode 100644 index 0000000000..4d2bec4714 --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb | |||
@@ -0,0 +1,44 @@ | |||
1 | SUMMARY = "UProbes kernel module for SystemTap" | ||
2 | |||
3 | require systemtap_git.inc | ||
4 | |||
5 | DEPENDS = "systemtap virtual/kernel" | ||
6 | |||
7 | PR = "r1" | ||
8 | |||
9 | # On systems without CONFIG_UTRACE, this package is empty. | ||
10 | ALLOW_EMPTY_${PN} = "1" | ||
11 | |||
12 | inherit module-base gettext | ||
13 | |||
14 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemtap:" | ||
15 | |||
16 | FILES_${PN} += "${datadir}/systemtap/runtime/uprobes" | ||
17 | |||
18 | EXTRA_OEMAKE = "" | ||
19 | |||
20 | # Compile and install the uprobes kernel module on machines with utrace | ||
21 | # support. Note that staprun expects it in the systemtap/runtime directory, | ||
22 | # not in /lib/modules. | ||
23 | do_compile() { | ||
24 | if grep -q "CONFIG_UTRACE=y" ${STAGING_KERNEL_DIR}/.config | ||
25 | then | ||
26 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC LD CPP | ||
27 | oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ | ||
28 | AR="${KERNEL_AR}" \ | ||
29 | -C ${STAGING_KERNEL_DIR} scripts | ||
30 | oe_runmake KDIR=${STAGING_KERNEL_DIR} \ | ||
31 | M="${S}/runtime/uprobes/" \ | ||
32 | CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ | ||
33 | AR="${KERNEL_AR}" \ | ||
34 | -C "${S}/runtime/uprobes/" | ||
35 | fi | ||
36 | } | ||
37 | |||
38 | do_install() { | ||
39 | if [ -e "${S}/runtime/uprobes/uprobes.ko" ] | ||
40 | then | ||
41 | install -d ${D}${datadir}/systemtap/runtime/uprobes/ | ||
42 | install -m 0644 ${S}/runtime/uprobes/uprobes.ko ${D}${datadir}/systemtap/runtime/uprobes/ | ||
43 | fi | ||
44 | } | ||
diff --git a/meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch b/meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch new file mode 100644 index 0000000000..b4f2fbc066 --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 5eb10d90af9178edb65e6091ae939d1b5b19bb78 Mon Sep 17 00:00:00 2001 | ||
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | ||
3 | Date: Tue, 23 Sep 2014 04:47:10 -0400 | ||
4 | Subject: [PATCH] systemtap: allow to disable libvirt | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
9 | --- | ||
10 | configure.ac | 13 +++++++++---- | ||
11 | 1 file changed, 9 insertions(+), 4 deletions(-) | ||
12 | |||
13 | diff --git a/configure.ac b/configure.ac | ||
14 | index a631ae7..cb4885b 100644 | ||
15 | --- a/configure.ac | ||
16 | +++ b/configure.ac | ||
17 | @@ -525,10 +525,15 @@ dnl Check for the libvirt and libxml2 devel packages | ||
18 | |||
19 | dnl We require libvirt >= 1.0.2 because stapvirt relies on the | ||
20 | dnl virDomainOpenChannel function, which was implemented in 1.0.2. | ||
21 | -PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [ | ||
22 | - have_libvirt=yes | ||
23 | - AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed]) | ||
24 | - ], [have_libvirt=no]) | ||
25 | +AC_ARG_ENABLE([libvirt], | ||
26 | + AS_HELP_STRING([--disable-libvirt], [Do not use libvirt even if present])) | ||
27 | + | ||
28 | +if test "$enable_libvirt" != no; then | ||
29 | + PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [ | ||
30 | + have_libvirt=yes | ||
31 | + AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed]) | ||
32 | + ], [have_libvirt=no]) | ||
33 | +fi | ||
34 | AM_CONDITIONAL([HAVE_LIBVIRT], [test "${have_libvirt}" = "yes"]) | ||
35 | PKG_CHECK_MODULES([libxml2], [libxml-2.0], [ | ||
36 | have_libxml2=yes | ||
37 | -- | ||
38 | 1.7.9.5 | ||
39 | |||
diff --git a/meta/recipes-kernel/systemtap/systemtap/docproc-build-fix.patch b/meta/recipes-kernel/systemtap/systemtap/docproc-build-fix.patch new file mode 100644 index 0000000000..33a89940ae --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/docproc-build-fix.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> | ||
4 | |||
5 | Index: git/doc/SystemTap_Tapset_Reference/Makefile.am | ||
6 | =================================================================== | ||
7 | --- git.orig/doc/SystemTap_Tapset_Reference/Makefile.am 2012-04-13 08:43:46.263339003 -0500 | ||
8 | +++ git/doc/SystemTap_Tapset_Reference/Makefile.am 2012-04-13 09:31:22.470083915 -0500 | ||
9 | @@ -27,6 +27,10 @@ | ||
10 | noinst_PROGRAMS = docproc | ||
11 | SRCTREE=$(abs_top_srcdir)/ | ||
12 | DOCPROC=$(abs_builddir)/docproc | ||
13 | +docproc_LINK = $(CC_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ | ||
14 | + | ||
15 | +docproc.o: $(srcdir)/docproc.c | ||
16 | + $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -o $@ $(srcdir)/docproc.c | ||
17 | |||
18 | all: $(PDFDOCS) stamp-htmldocs stamp-mandocs | ||
19 | tapsets.xml: docproc $(shell find $(SRCTREE)/tapset -name '*.stp') | ||
diff --git a/meta/recipes-kernel/systemtap/systemtap/obsolete_automake_macros.patch b/meta/recipes-kernel/systemtap/systemtap/obsolete_automake_macros.patch new file mode 100644 index 0000000000..988cda4f0c --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/obsolete_automake_macros.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> | ||
4 | Index: git/configure.ac | ||
5 | =================================================================== | ||
6 | --- git.orig/configure.ac | ||
7 | +++ git/configure.ac | ||
8 | @@ -19,7 +19,6 @@ AC_PROG_LN_S | ||
9 | AC_PROG_CC | ||
10 | AC_PROG_CXX | ||
11 | AC_PROG_CPP | ||
12 | -AM_PROG_CC_STDC | ||
13 | AM_PROG_CC_C_O | ||
14 | AC_PROG_RANLIB | ||
15 | AC_OBJEXT | ||
diff --git a/meta/recipes-kernel/systemtap/systemtap/scheduler-stp.patch b/meta/recipes-kernel/systemtap/systemtap/scheduler-stp.patch new file mode 100644 index 0000000000..9897e481a3 --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/scheduler-stp.patch | |||
@@ -0,0 +1,109 @@ | |||
1 | scheduler.stp: Handle missing symbols. | ||
2 | |||
3 | Compiler output code optimization leads to missing debug data for some | ||
4 | target variables, in particular some inline functions parameters, e.g. | ||
5 | context_switch. | ||
6 | |||
7 | Handle this by testing for variable name resolvability and provide default | ||
8 | variable values in case no suitable target data is available through variable | ||
9 | name. Affected functions: ctxswitch,wakeup. | ||
10 | |||
11 | This fix does not affect the intended context switch tracing. | ||
12 | |||
13 | |||
14 | Upstream-Status: Pending | ||
15 | |||
16 | Signed-off-by: George Nita <george.nita@enea.com> | ||
17 | |||
18 | |||
19 | diff --git a/tapset/linux/scheduler.stp b/tapset/linux/scheduler.stp | ||
20 | index 7596a46..539a0f1 100644 | ||
21 | --- a/tapset/linux/scheduler.stp | ||
22 | +++ b/tapset/linux/scheduler.stp | ||
23 | @@ -120,7 +120,7 @@ probe scheduler.ctxswitch = kernel.trace("sched_switch") !, | ||
24 | %( arch != "x86_64" && arch != "ia64" && arch != "arm" %? | ||
25 | kernel.function("__switch_to") | ||
26 | %: | ||
27 | - kernel.function("context_switch") | ||
28 | + kernel.function("prepare_task_switch") | ||
29 | %) | ||
30 | { | ||
31 | name = "ctxswitch" | ||
32 | @@ -140,7 +140,7 @@ probe scheduler.ctxswitch = kernel.trace("sched_switch") !, | ||
33 | prev_task_name = task_execname($prev_p) | ||
34 | prevtsk_state = $prev_p->state | ||
35 | } | ||
36 | - else { | ||
37 | + else if (@defined($prev)) { | ||
38 | prev_priority = $prev->prio | ||
39 | prev_pid = $prev->tgid | ||
40 | prev_tid = $prev->pid | ||
41 | @@ -148,6 +148,15 @@ probe scheduler.ctxswitch = kernel.trace("sched_switch") !, | ||
42 | prev_task_name = task_execname($prev) | ||
43 | prevtsk_state = $prev->state | ||
44 | } | ||
45 | + else { | ||
46 | + prev_priority = 0 | ||
47 | + prev_pid = 0 | ||
48 | + prev_tid = 0 | ||
49 | + /* No prev_task, dummy */ | ||
50 | + prev_task = task_current() | ||
51 | + prev_task_name = "UNAVAILABLE" | ||
52 | + prevtsk_state = 0 | ||
53 | + } | ||
54 | |||
55 | if (@defined($next)) { | ||
56 | next_priority = $next->prio | ||
57 | @@ -165,7 +174,7 @@ probe scheduler.ctxswitch = kernel.trace("sched_switch") !, | ||
58 | next_task_name = task_execname($next_p) | ||
59 | nexttsk_state = $next_p->state | ||
60 | } | ||
61 | - else { | ||
62 | + else if (@defined($new)) { | ||
63 | next_priority = $new->prio | ||
64 | next_pid = $new->tgid | ||
65 | next_tid = $new->pid | ||
66 | @@ -173,6 +182,14 @@ probe scheduler.ctxswitch = kernel.trace("sched_switch") !, | ||
67 | next_task_name = task_execname($new) | ||
68 | nexttsk_state = $new->state | ||
69 | } | ||
70 | + else { | ||
71 | + next_task = task_current() | ||
72 | + next_priority = task_prio(next_task) | ||
73 | + next_pid = task_pid(next_task) | ||
74 | + next_tid = task_tid(next_task) | ||
75 | + next_task_name = task_execname(next_task) | ||
76 | + nexttsk_state = task_state(next_task) | ||
77 | + } | ||
78 | } | ||
79 | |||
80 | |||
81 | @@ -254,12 +271,22 @@ probe scheduler.wakeup = | ||
82 | kernel.function("try_to_wake_up") | ||
83 | { | ||
84 | name = "wakeup" | ||
85 | - task = $p | ||
86 | - task_pid = $p->tgid | ||
87 | - task_tid = $p->pid | ||
88 | - task_priority = $p->prio | ||
89 | - task_cpu = task_cpu($p) | ||
90 | - task_state = task_state($p) | ||
91 | + if (@defined($p)) { | ||
92 | + task = $p | ||
93 | + task_pid = $p->tgid | ||
94 | + task_tid = $p->pid | ||
95 | + task_priority = $p->prio | ||
96 | + task_cpu = task_cpu($p) | ||
97 | + task_state = task_state($p) | ||
98 | + } | ||
99 | + else { | ||
100 | + task = task_current() | ||
101 | + task_pid = task_pid(task) | ||
102 | + task_tid = task_tid(task) | ||
103 | + task_priority = task_prio(task) | ||
104 | + task_cpu = task_cpu(task) | ||
105 | + task_state = task_state(task) | ||
106 | + } | ||
107 | } | ||
108 | |||
109 | /** | ||
diff --git a/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch b/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch new file mode 100644 index 0000000000..013af5c3a4 --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | systemtap: Cross compilation fix | ||
2 | |||
3 | This is a cross compilation fix. It allows systemtap to find | ||
4 | the kernel map file in the right place, i.e. in the kernel build tree. | ||
5 | Without this fix it takes a map file from the build host, if available. | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com> | ||
10 | |||
11 | Index: git/session.cxx | ||
12 | =================================================================== | ||
13 | --- git.orig/session.cxx | ||
14 | +++ git/session.cxx | ||
15 | @@ -1634,7 +1634,7 @@ systemtap_session::parse_kernel_function | ||
16 | clog << _F("Kernel symbol table %s unavailable, (%s)", | ||
17 | system_map_path.c_str(), strerror(errno)) << endl; | ||
18 | |||
19 | - system_map_path = "/boot/System.map-" + kernel_release; | ||
20 | + system_map_path = kernel_build_tree + "/System.map-" + kernel_release; | ||
21 | system_map.clear(); | ||
22 | system_map.open(system_map_path.c_str(), ifstream::in); | ||
23 | if (! system_map.is_open()) | ||
diff --git a/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch b/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch new file mode 100644 index 0000000000..f945760fde --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | systemtap: Fixed probe syscall.sendfile failure | ||
2 | |||
3 | compat_sendfile syscall is unavailable in kernels starting version 3.8. | ||
4 | Hence systemtap scripts like 'probe syscall.* { if (target()==pid()) log(name." ".argstr) }' fail. | ||
5 | This problem is solved by marking __syscall.compat_sendfile as optional in tapset/linux/syscalls2.stp | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com> | ||
10 | |||
11 | diff -Naur old/tapset/linux/syscalls2.stp new/tapset/linux/syscalls2.stp | ||
12 | --- old/tapset/linux/syscalls2.stp 2014-04-21 01:28:41.000000000 -0500 | ||
13 | +++ new/tapset/linux/syscalls2.stp 2014-04-21 01:38:14.961233914 -0500 | ||
14 | @@ -1953,7 +1953,7 @@ | ||
15 | # COMPAT_SYSCALL_DEFINE4(sendfile64, int, out_fd, int, in_fd, | ||
16 | # compat_loff_t __user *, offset, compat_size_t, count) | ||
17 | # | ||
18 | -probe syscall.sendfile = __syscall.sendfile, __syscall.compat_sendfile | ||
19 | +probe syscall.sendfile = __syscall.sendfile, __syscall.compat_sendfile ? | ||
20 | { | ||
21 | name = "sendfile" | ||
22 | out_fd = __int32($out_fd) | ||
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb new file mode 100644 index 0000000000..d0dd42a643 --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap_git.bb | |||
@@ -0,0 +1,30 @@ | |||
1 | SUMMARY = "Script-directed dynamic tracing and performance analysis tool for Linux" | ||
2 | |||
3 | require systemtap_git.inc | ||
4 | |||
5 | DEPENDS = "elfutils sqlite3 systemtap-native" | ||
6 | DEPENDS_class-native = "elfutils-native sqlite3-native gettext-native" | ||
7 | DEPENDS_class-nativesdk = "nativesdk-elfutils nativesdk-sqlite3 nativesdk-gettext" | ||
8 | |||
9 | RDEPENDS_${PN} += "python bash" | ||
10 | RDEPENDS_${PN}_class-native += "python-native" | ||
11 | RDEPENDS_${PN}_class-nativesdk += "python-native" | ||
12 | |||
13 | EXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \ | ||
14 | --without-nss --without-avahi --without-dyninst \ | ||
15 | --disable-server --disable-grapher --enable-prologues \ | ||
16 | ac_cv_prog_have_javac=no \ | ||
17 | ac_cv_prog_have_jar=no " | ||
18 | |||
19 | STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs" | ||
20 | |||
21 | EXTRA_OECONF += "${STAP_DOCS} " | ||
22 | |||
23 | PACKAGECONFIG ??= "" | ||
24 | PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt" | ||
25 | |||
26 | inherit autotools gettext pkgconfig | ||
27 | |||
28 | BBCLASSEXTEND = "native nativesdk" | ||
29 | |||
30 | FILES_${PN}-dbg += "${libexecdir}/systemtap/.debug" | ||
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc new file mode 100644 index 0000000000..9db0dcc2d7 --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap_git.inc | |||
@@ -0,0 +1,29 @@ | |||
1 | LICENSE = "GPLv2" | ||
2 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
3 | SRCREV = "8f0fcd995f7f650a2ee0a94539f90c99e6d19e1d" | ||
4 | PV = "2.5+git${SRCPV}" | ||
5 | |||
6 | SRC_URI = "git://sourceware.org/git/systemtap.git \ | ||
7 | file://docproc-build-fix.patch \ | ||
8 | file://obsolete_automake_macros.patch \ | ||
9 | file://scheduler-stp.patch \ | ||
10 | file://system_map_location.patch \ | ||
11 | file://tapset-linux-sendfile-syscall.patch \ | ||
12 | file://configure-allow-to-disable-libvirt.patch \ | ||
13 | " | ||
14 | |||
15 | # systemtap doesn't support mips | ||
16 | COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64).*-linux' | ||
17 | |||
18 | S = "${WORKDIR}/git" | ||
19 | |||
20 | # systemtap can't be built without optimization, if someone tries to compile an | ||
21 | # entire image as -O0, we override it with -O2 here and give a note about it. | ||
22 | def get_optimization(d): | ||
23 | selected_optimization = d.getVar("SELECTED_OPTIMIZATION", True) | ||
24 | if bb.utils.contains("SELECTED_OPTIMIZATION", "-O0", "x", "", d) == "x": | ||
25 | bb.note("systemtap can't be built with -O0, -O2 will be used instead.") | ||
26 | return selected_optimization.replace("-O0", "-O2") | ||
27 | return selected_optimization | ||
28 | |||
29 | SELECTED_OPTIMIZATION := "${@get_optimization(d)}" | ||
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 | |||