From 972dcfcdbfe75dcfeb777150c136576cf1a71e99 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 9 Oct 2015 22:59:03 +0200 Subject: initial commit for Enea Linux 5.0 arm Signed-off-by: Tudor Florea --- .../recipes-kernel/blktrace/blktrace/ldflags.patch | 93 ++++ meta/recipes-kernel/blktrace/blktrace_git.bb | 28 + .../cryptodev/cryptodev-linux_1.6.bb | 15 + .../cryptodev/cryptodev-module_1.6.bb | 18 + .../cryptodev/cryptodev-tests_1.6.bb | 23 + meta/recipes-kernel/cryptodev/cryptodev_1.6.inc | 11 + ...pile-and-install-rules-for-cryptodev-test.patch | 69 +++ ...talling-header-file-provided-by-another-p.patch | 28 + ...ests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch | 29 + ...-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch | 86 +++ meta/recipes-kernel/dtc/dtc.inc | 20 + meta/recipes-kernel/dtc/dtc/make_install.patch | 17 + meta/recipes-kernel/dtc/dtc_git.bb | 11 + .../kern-tools/kern-tools-native_git.bb | 23 + meta/recipes-kernel/kexec/kexec-tools.inc | 28 + ...kexec-tools-Refine-kdump-device_tree-sort.patch | 82 +++ meta/recipes-kernel/kexec/kexec-tools_2.0.7.bb | 17 + .../recipes-kernel/kmod/depmodwrapper-cross_1.0.bb | 46 ++ meta/recipes-kernel/kmod/kmod-native_git.bb | 18 + meta/recipes-kernel/kmod/kmod.inc | 39 ++ ...missing-O_CLOEXEC-in-kmod_module_get_size.patch | 27 + ...alling-bswap_-instead-of-htobe-and-be-toh.patch | 41 ++ .../kmod/kmod/avoid_parallel_tests.patch | 21 + meta/recipes-kernel/kmod/kmod/depmod-search.conf | 6 + meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch | 38 ++ meta/recipes-kernel/kmod/kmod/ptest.patch | 25 + meta/recipes-kernel/kmod/kmod/run-ptest | 5 + meta/recipes-kernel/kmod/kmod_git.bb | 78 +++ .../latencytop-0.5/latencytop-fsync.patch | 49 ++ .../latencytop-0.5/latencytop-makefile.patch | 39 ++ meta/recipes-kernel/latencytop/latencytop_0.5.bb | 28 + meta/recipes-kernel/libpfm/libpfm4_4.3.0.bb | 29 + .../linux-firmware/linux-firmware_git.bb | 230 ++++++++ .../linux-libc-headers/linux-libc-headers.inc | 73 +++ .../linux-libc-headers/linux-libc-headers_3.16.bb | 7 + meta/recipes-kernel/linux/linux-dtb.inc | 69 +++ meta/recipes-kernel/linux/linux-dummy.bb | 50 ++ meta/recipes-kernel/linux/linux-dummy/COPYING.GPL | 339 ++++++++++++ meta/recipes-kernel/linux/linux-yocto-dev.bb | 50 ++ meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb | 27 + meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb | 27 + meta/recipes-kernel/linux/linux-yocto-tiny_3.10.bb | 22 + meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb | 21 + meta/recipes-kernel/linux/linux-yocto-tiny_3.17.bb | 21 + meta/recipes-kernel/linux/linux-yocto.inc | 45 ++ meta/recipes-kernel/linux/linux-yocto_3.10.bb | 37 ++ meta/recipes-kernel/linux/linux-yocto_3.14.bb | 37 ++ meta/recipes-kernel/linux/linux-yocto_3.17.bb | 37 ++ ...-Support-out-of-tree-builds-in-babeltrace.patch | 17 + ...n-t-perform-unaligned-integer-read-writes.patch | 252 +++++++++ ...uffers-from-objstack_alloc-on-sizeof-void.patch | 54 ++ meta/recipes-kernel/lttng/babeltrace_1.2.1.bb | 26 + ...probes-should-calculate-alignment-and-eve.patch | 130 +++++ ...compaction-instrumentation-to-3.16-kernel.patch | 83 +++ ...e-kvm-instrumentation-compile-on-3.17-rc1.patch | 46 ++ .../Update-statedump-to-3.17-nsproxy-locking.patch | 70 +++ ...ate-vmscan-instrumentation-to-3.16-kernel.patch | 70 +++ .../lttng/lttng-modules/bio-bvec-iter.patch | 156 ++++++ ...-fix-mm_compaction_isolate_template-build.patch | 41 ++ .../fix_build_with_v3.17_kernel.patch | 113 ++++ ...lttng-modules-remove-kernel-version-check.patch | 30 ++ ...modules-replace-KERNELDIR-with-KERNEL_SRC.patch | 81 +++ meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb | 44 ++ meta/recipes-kernel/lttng/lttng-tools/run-ptest | 4 + .../lttng/lttng-tools/runtest-2.4.0.patch | 27 + .../recipes-kernel/lttng/lttng-tools/runtest.patch | 52 ++ meta/recipes-kernel/lttng/lttng-tools_2.5.0.bb | 77 +++ .../lttng/lttng-ust/add-aarch64.patch | 13 + .../lttng-ust/lttng-ust-doc-examples-disable.patch | 18 + meta/recipes-kernel/lttng/lttng-ust_2.5.0.bb | 34 ++ .../modutils-initscripts/files/PD.patch | 8 + .../modutils-initscripts/files/modutils.sh | 52 ++ .../modutils-initscripts/modutils-initscripts.bb | 30 ++ meta/recipes-kernel/oprofile/oprofile.inc | 59 +++ .../0001-Add-freescale-e500mc-support.patch | 219 ++++++++ ...d-rmb-definition-for-AArch64-architecture.patch | 31 ++ .../0001-Tidy-powerpc64-bfd-target-check.patch | 123 +++++ .../0002-Add-freescale-e6500-support.patch | 364 +++++++++++++ meta/recipes-kernel/oprofile/oprofile/acinclude.m4 | 581 +++++++++++++++++++++ .../oprofile/oprofile/automake-foreign.patch | 7 + .../oprofile/oprofile-cross-compile-tests.patch | 98 ++++ .../recipes-kernel/oprofile/oprofile/opstart.patch | 245 +++++++++ .../oprofile/oprofile/root-home-dir.patch | 120 +++++ meta/recipes-kernel/oprofile/oprofile/run-ptest | 19 + meta/recipes-kernel/oprofile/oprofile_0.9.9.bb | 17 + .../recipes-kernel/oprofile/oprofileui-server/init | 37 ++ .../oprofileui-server/oprofileui-server.service | 6 + .../oprofile/oprofileui-server_git.bb | 34 ++ meta/recipes-kernel/oprofile/oprofileui.inc | 16 + meta/recipes-kernel/oprofile/oprofileui_git.bb | 17 + meta/recipes-kernel/perf/perf-features.inc | 22 + meta/recipes-kernel/perf/perf.bb | 189 +++++++ meta/recipes-kernel/powertop/powertop_2.6.1.bb | 32 ++ .../sysprof/files/define-NT_GNU_BUILD_ID.patch | 22 + meta/recipes-kernel/sysprof/files/rmb-arm.patch | 21 + meta/recipes-kernel/sysprof/files/rmb-mips.patch | 22 + meta/recipes-kernel/sysprof/sysprof_git.bb | 21 + .../systemtap/systemtap-uprobes_git.bb | 44 ++ .../configure-allow-to-disable-libvirt.patch | 39 ++ .../systemtap/systemtap/docproc-build-fix.patch | 19 + .../systemtap/obsolete_automake_macros.patch | 15 + .../systemtap/systemtap/scheduler-stp.patch | 109 ++++ .../systemtap/systemtap/system_map_location.patch | 23 + .../systemtap/tapset-linux-sendfile-syscall.patch | 22 + meta/recipes-kernel/systemtap/systemtap_git.bb | 30 ++ meta/recipes-kernel/systemtap/systemtap_git.inc | 29 + .../kernelshark-fix-syntax-error-of-shell.patch | 30 ++ meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb | 26 + meta/recipes-kernel/trace-cmd/trace-cmd.inc | 14 + .../trace-cmd/trace-cmd/addldflags.patch | 51 ++ .../trace-cmd/blktrace-api-compatibility.patch | 29 + .../trace-cmd/trace-cmd/make-docs-optional.patch | 36 ++ meta/recipes-kernel/trace-cmd/trace-cmd_2.3.2.bb | 41 ++ 113 files changed, 6586 insertions(+) create mode 100644 meta/recipes-kernel/blktrace/blktrace/ldflags.patch create mode 100644 meta/recipes-kernel/blktrace/blktrace_git.bb create mode 100644 meta/recipes-kernel/cryptodev/cryptodev-linux_1.6.bb create mode 100644 meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb create mode 100644 meta/recipes-kernel/cryptodev/cryptodev-tests_1.6.bb create mode 100644 meta/recipes-kernel/cryptodev/cryptodev_1.6.inc create mode 100644 meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch create mode 100644 meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch create mode 100644 meta/recipes-kernel/cryptodev/files/0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch create mode 100644 meta/recipes-kernel/cryptodev/files/0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch create mode 100644 meta/recipes-kernel/dtc/dtc.inc create mode 100644 meta/recipes-kernel/dtc/dtc/make_install.patch create mode 100644 meta/recipes-kernel/dtc/dtc_git.bb create mode 100644 meta/recipes-kernel/kern-tools/kern-tools-native_git.bb create mode 100644 meta/recipes-kernel/kexec/kexec-tools.inc create mode 100644 meta/recipes-kernel/kexec/kexec-tools/kexec-tools-Refine-kdump-device_tree-sort.patch create mode 100644 meta/recipes-kernel/kexec/kexec-tools_2.0.7.bb create mode 100644 meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb create mode 100644 meta/recipes-kernel/kmod/kmod-native_git.bb create mode 100644 meta/recipes-kernel/kmod/kmod.inc create mode 100644 meta/recipes-kernel/kmod/kmod/0001-Add-missing-O_CLOEXEC-in-kmod_module_get_size.patch create mode 100644 meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch create mode 100644 meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch create mode 100644 meta/recipes-kernel/kmod/kmod/depmod-search.conf create mode 100644 meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch create mode 100644 meta/recipes-kernel/kmod/kmod/ptest.patch create mode 100755 meta/recipes-kernel/kmod/kmod/run-ptest create mode 100644 meta/recipes-kernel/kmod/kmod_git.bb create mode 100644 meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch create mode 100644 meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch create mode 100644 meta/recipes-kernel/latencytop/latencytop_0.5.bb create mode 100644 meta/recipes-kernel/libpfm/libpfm4_4.3.0.bb create mode 100644 meta/recipes-kernel/linux-firmware/linux-firmware_git.bb create mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc create mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.16.bb create mode 100644 meta/recipes-kernel/linux/linux-dtb.inc create mode 100644 meta/recipes-kernel/linux/linux-dummy.bb create mode 100644 meta/recipes-kernel/linux/linux-dummy/COPYING.GPL create mode 100644 meta/recipes-kernel/linux/linux-yocto-dev.bb create mode 100644 meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb create mode 100644 meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb create mode 100644 meta/recipes-kernel/linux/linux-yocto-tiny_3.10.bb create mode 100644 meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb create mode 100644 meta/recipes-kernel/linux/linux-yocto-tiny_3.17.bb create mode 100644 meta/recipes-kernel/linux/linux-yocto.inc create mode 100644 meta/recipes-kernel/linux/linux-yocto_3.10.bb create mode 100644 meta/recipes-kernel/linux/linux-yocto_3.14.bb create mode 100644 meta/recipes-kernel/linux/linux-yocto_3.17.bb create mode 100644 meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch create mode 100644 meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch create mode 100644 meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch create mode 100644 meta/recipes-kernel/lttng/babeltrace_1.2.1.bb create mode 100644 meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/Update-compaction-instrumentation-to-3.16-kernel.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/Update-statedump-to-3.17-nsproxy-locking.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/Update-vmscan-instrumentation-to-3.16-kernel.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/bio-bvec-iter.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/compaction-fix-mm_compaction_isolate_template-build.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/lttng-modules-remove-kernel-version-check.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb create mode 100755 meta/recipes-kernel/lttng/lttng-tools/run-ptest create mode 100644 meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch create mode 100644 meta/recipes-kernel/lttng/lttng-tools/runtest.patch create mode 100644 meta/recipes-kernel/lttng/lttng-tools_2.5.0.bb create mode 100644 meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch create mode 100644 meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch create mode 100644 meta/recipes-kernel/lttng/lttng-ust_2.5.0.bb create mode 100644 meta/recipes-kernel/modutils-initscripts/files/PD.patch create mode 100755 meta/recipes-kernel/modutils-initscripts/files/modutils.sh create mode 100644 meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb create mode 100644 meta/recipes-kernel/oprofile/oprofile.inc create mode 100644 meta/recipes-kernel/oprofile/oprofile/0001-Add-freescale-e500mc-support.patch create mode 100644 meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-AArch64-architecture.patch create mode 100644 meta/recipes-kernel/oprofile/oprofile/0001-Tidy-powerpc64-bfd-target-check.patch create mode 100644 meta/recipes-kernel/oprofile/oprofile/0002-Add-freescale-e6500-support.patch create mode 100644 meta/recipes-kernel/oprofile/oprofile/acinclude.m4 create mode 100644 meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch create mode 100644 meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch create mode 100644 meta/recipes-kernel/oprofile/oprofile/opstart.patch create mode 100644 meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch create mode 100644 meta/recipes-kernel/oprofile/oprofile/run-ptest create mode 100644 meta/recipes-kernel/oprofile/oprofile_0.9.9.bb create mode 100755 meta/recipes-kernel/oprofile/oprofileui-server/init create mode 100644 meta/recipes-kernel/oprofile/oprofileui-server/oprofileui-server.service create mode 100644 meta/recipes-kernel/oprofile/oprofileui-server_git.bb create mode 100644 meta/recipes-kernel/oprofile/oprofileui.inc create mode 100644 meta/recipes-kernel/oprofile/oprofileui_git.bb create mode 100644 meta/recipes-kernel/perf/perf-features.inc create mode 100644 meta/recipes-kernel/perf/perf.bb create mode 100644 meta/recipes-kernel/powertop/powertop_2.6.1.bb create mode 100644 meta/recipes-kernel/sysprof/files/define-NT_GNU_BUILD_ID.patch create mode 100644 meta/recipes-kernel/sysprof/files/rmb-arm.patch create mode 100644 meta/recipes-kernel/sysprof/files/rmb-mips.patch create mode 100644 meta/recipes-kernel/sysprof/sysprof_git.bb create mode 100644 meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb create mode 100644 meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch create mode 100644 meta/recipes-kernel/systemtap/systemtap/docproc-build-fix.patch create mode 100644 meta/recipes-kernel/systemtap/systemtap/obsolete_automake_macros.patch create mode 100644 meta/recipes-kernel/systemtap/systemtap/scheduler-stp.patch create mode 100644 meta/recipes-kernel/systemtap/systemtap/system_map_location.patch create mode 100644 meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch create mode 100644 meta/recipes-kernel/systemtap/systemtap_git.bb create mode 100644 meta/recipes-kernel/systemtap/systemtap_git.inc create mode 100644 meta/recipes-kernel/trace-cmd/kernelshark/kernelshark-fix-syntax-error-of-shell.patch create mode 100644 meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb create mode 100644 meta/recipes-kernel/trace-cmd/trace-cmd.inc create mode 100644 meta/recipes-kernel/trace-cmd/trace-cmd/addldflags.patch create mode 100644 meta/recipes-kernel/trace-cmd/trace-cmd/blktrace-api-compatibility.patch create mode 100644 meta/recipes-kernel/trace-cmd/trace-cmd/make-docs-optional.patch create mode 100644 meta/recipes-kernel/trace-cmd/trace-cmd_2.3.2.bb (limited to 'meta/recipes-kernel') 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 @@ +blktrace: obey LDFLAGS + +Upstream-Status: Pending + +Signed-off-by: Christopher Larson + +the patch was imported from meta-mentor layer on yoctoproject git server +http://git.yoctoproject.org/cgit/cgit.cgi/meta-mentor as of commit id +aed463414e2e2bf8ca44ba54ee5973e7ed599e57 + +Signed-off-by: Fahad Usman +--- + Makefile | 11 ++++++----- + btreplay/Makefile | 3 ++- + btt/Makefile | 3 ++- + 3 files changed, 10 insertions(+), 7 deletions(-) + +--- git.orig/Makefile ++++ git/Makefile +@@ -1,5 +1,6 @@ + CC = gcc + CFLAGS = -Wall -O2 -g -W ++LDFLAGS = + ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 + PROGS = blkparse blktrace verify_blkparse blkrawverify blkiomon + LIBS = -lpthread +@@ -23,19 +24,19 @@ btreplay/btreplay: + $(CC) -o $*.o -c $(ALL_CFLAGS) $< + + blkparse: blkparse.o blkparse_fmt.o rbtree.o act_mask.o +- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) ++ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS) + + blktrace: blktrace.o act_mask.o +- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) ++ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) $(LDFLAGS) + + verify_blkparse: verify_blkparse.o +- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) ++ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS) + + blkrawverify: blkrawverify.o +- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) ++ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS) + + blkiomon: blkiomon.o rbtree.o +- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -lrt ++ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -lrt $(LDFLAGS) + + $(PROGS): | depend + +--- git.orig/btreplay/Makefile ++++ git/btreplay/Makefile +@@ -7,6 +7,7 @@ + + CC = gcc + CFLAGS = -Wall -W -O2 -g ++LDFLAGS = + INCS = -I. -I.. -I../btt + OCFLAGS = -UCOUNT_IOS -UDEBUG -DNDEBUG + XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +@@ -32,10 +33,10 @@ clean: docsclean + $(CC) $(CFLAGS) -c -o $*.o $< + + btrecord: btrecord.o +- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) ++ $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS) + + btreplay: btreplay.o +- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) ++ $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) $(LDFLAGS) + + depend: + @$(CC) -MM $(CFLAGS) *.c 1> .depend +--- git.orig/btt/Makefile ++++ git/btt/Makefile +@@ -7,6 +7,7 @@ + + CC = gcc + CFLAGS = -Wall -W -O2 -g ++LDFLAGS = + INCS = -I. -I.. + XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 + override CFLAGS += $(INCS) $(XCFLAGS) +@@ -38,7 +39,7 @@ clean: docsclean + $(CC) $(CFLAGS) -c -o $*.o $< + + btt: $(OBJS) +- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) ++ $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) $(LDFLAGS) + + ifneq ($(wildcard .depend),) + 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 @@ +SUMMARY = "Generates traces of I/O traffic on block devices" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" + +DEPENDS = "libaio" + +SRCREV = "d6918c8832793b4205ed3bfede78c2f915c23385" + +PR = "r6" +PV = "1.0.5+git${SRCPV}" + +SRC_URI = "git://git.kernel.dk/blktrace.git \ + file://ldflags.patch" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = "\ + 'CC=${CC}' \ + 'CFLAGS=${CFLAGS}' \ + 'LDFLAGS=${LDFLAGS}' \ +" +PARALLEL_MAKE = "" + +do_install() { + oe_runmake ARCH="${ARCH}" prefix=${prefix} \ + mandir=${mandir} DESTDIR=${D} install +} + 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 @@ +require cryptodev_${PV}.inc + +SUMMARY = "A /dev/crypto device driver header file" + +do_compile() { + : +} + +# Just install cryptodev.h which is the only header file needed to be exported +do_install() { + install -D ${S}/crypto/cryptodev.h ${D}${includedir}/crypto/cryptodev.h +} + +ALLOW_EMPTY_${PN} = "1" +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 @@ +require cryptodev_${PV}.inc + +SUMMARY = "A /dev/crypto device driver kernel module" + +inherit module + +# Header file provided by a separate package +DEPENDS += "cryptodev-linux" + +SRC_URI += " \ +file://0001-Disable-installing-header-file-provided-by-another-p.patch \ +file://0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch \ +" + +EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' + +RCONFLICTS_${PN} = "ocf-linux" +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 @@ +require cryptodev_${PV}.inc + +SUMMARY = "A test suite for /dev/crypto device driver" + +DEPENDS += "openssl" + +SRC_URI += " \ +file://0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch \ +file://0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch \ +" + +EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' + +do_compile() { + oe_runmake testprogs +} + +do_install() { + oe_runmake install_tests +} + +FILES_${PN}-dbg += "${bindir}/tests_cryptodev/.debug" +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 @@ +HOMEPAGE = "http://cryptodev-linux.org/" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "http://download.gna.org/cryptodev-linux/cryptodev-linux-${PV}.tar.gz" + +SRC_URI[md5sum] = "eade38998313c25fd7934719cdf8a2ea" +SRC_URI[sha256sum] = "75f1425c8ea1f8cae523905a5a046a35092327a6152800b0b86efc4e56fb3e2f" + +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 @@ +From 1980a8f4779a955e73285e7a0d86549b69bea5c8 Mon Sep 17 00:00:00 2001 +From: Yu Zongchun +Date: Sun, 28 Apr 2013 14:39:22 +0800 +Subject: [PATCH] Add the compile and install rules for cryptodev tests folder + +This is required to install the cryptodev tests folder to rootfs + +Signed-off-by: Yu Zongchun + +Upstream-Status: Pending + +--- + Makefile | 6 ++++++ + tests/Makefile | 8 ++++++++ + 2 files changed, 14 insertions(+), 0 deletions(-) + +diff --git a/Makefile b/Makefile +index 2be8825..4cbb865 100644 +--- a/Makefile ++++ b/Makefile +@@ -17,6 +17,9 @@ install: + @echo "Installing cryptodev.h in /usr/include/crypto ..." + @install -D crypto/cryptodev.h /usr/include/crypto/cryptodev.h + ++install_tests: ++ make -C tests install DESTDIR=$(PREFIX) ++ + clean: + make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean + rm -f $(hostprogs) *~ +@@ -25,6 +28,9 @@ clean: + check: + KERNEL_DIR=$(KERNEL_DIR) make -C tests check + ++testprogs: ++ KERNEL_DIR=$(KERNEL_DIR) make -C tests testprogs ++ + FILEBASE = cryptodev-linux-$(VERSION) + TMPDIR ?= /tmp + OUTPUT = $(FILEBASE).tar.gz +diff --git a/tests/Makefile b/tests/Makefile +index 87ca3c7..0488cf6 100644 +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -19,6 +19,12 @@ example-async-hmac-objs := async_hmac.o + example-async-speed-objs := async_speed.o + example-hashcrypt-speed-objs := hashcrypt_speed.c + ++install: ++ install -d $(DESTDIR)/usr/bin/tests_cryptodev ++ for bin in $(hostprogs); do \ ++ install -m 755 $${bin} $(DESTDIR)/usr/bin/tests_cryptodev/; \ ++ done ++ + check: $(hostprogs) + ./cipher + ./hmac +@@ -28,6 +34,8 @@ check: $(hostprogs) + ./cipher-gcm + ./cipher-aead + ++testprogs: $(hostprogs) ++ + clean: + rm -f *.o *~ $(hostprogs) + +-- +1.7.5.4 + 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 @@ +From 8a884f55bd1527baa82fab68c186ba546273860c Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko +Date: Sun, 6 Apr 2014 19:51:39 -0400 +Subject: [PATCH] Disable installing header file provided by another package + +Signed-off-by: Denys Dmytriyenko + +Upstream-Status: Inappropriate [ OE specific ] +--- + Makefile | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/Makefile b/Makefile +index d66ef26..8e97c6a 100644 +--- a/Makefile ++++ b/Makefile +@@ -23,8 +23,6 @@ install: modules_install + + modules_install: + make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules_install +- @echo "Installing cryptodev.h in $(PREFIX)/usr/include/crypto ..." +- @install -D crypto/cryptodev.h $(PREFIX)/usr/include/crypto/cryptodev.h + + clean: + make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean +-- +1.9.1 + 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 @@ +From 47ff1eb9bb4f872c1d731b93d334ee5865bf3439 Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko +Date: Sun, 6 Apr 2014 22:16:30 -0400 +Subject: [PATCH] Fix tests Makefile usage of LDLIBS vs. LDFLAGS + +Libraries must come after objects, as link order matters, especially +when using linker flags like -Wl,--as-needed. + +Signed-off-by: Denys Dmytriyenko + +Upstream-Status: Pending +--- + tests/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/Makefile b/tests/Makefile +index cd202af..67c3c83 100644 +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -39,5 +39,5 @@ testprogs: $(hostprogs) + clean: + rm -f *.o *~ $(hostprogs) + +-${comp_progs}: LDFLAGS += -lssl -lcrypto ++${comp_progs}: LDLIBS += -lssl -lcrypto + ${comp_progs}: %: %.o openssl_wrapper.o +-- +1.9.1 + 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 @@ +From 57b5544de80db85c8955499831fdaa30829db77a Mon Sep 17 00:00:00 2001 +From: Cosmin Paraschiv +Date: Thu, 23 Jan 2014 03:40:00 +0100 +Subject: [PATCH] In the 3.13-rc1 Linux kernel, the INIT_COMPLETION macro has + been replaced with an inline function, reinit_completion [1][2]. We are + currently using the 3.13-rc3 Linux kernel, which leads to the following + error: + +cryptlib.c:279:2: error: implicit declaration of function 'INIT_COMPLETION' [-Werror=implicit-function-declaration] + INIT_COMPLETION(cdata->async.result->completion); + +[1] https://github.com/torvalds/linux/commit/c32f74ab2872994bc8336ed367313da3139350ca +[2] https://github.com/torvalds/linux/commit/62026aedaacedbe1ffe94a3599ad4acd8ecdf587 + +Signed-off-by: Cosmin Paraschiv +Reviewed-by: Cristian Stoica +Tested-by: Cristian Stoica +Signed-off-by: Horia Geanta +Signed-off-by: Phil Sutter + +Upstream-Status: Backport +--- + cryptlib.c | 8 ++++---- + cryptodev_int.h | 6 ++++++ + 2 files changed, 10 insertions(+), 4 deletions(-) + +diff --git a/cryptlib.c b/cryptlib.c +index 54d5d41..a923c14 100644 +--- a/cryptlib.c ++++ b/cryptlib.c +@@ -217,7 +217,7 @@ ssize_t cryptodev_cipher_encrypt(struct cipher_data *cdata, + { + int ret; + +- INIT_COMPLETION(cdata->async.result->completion); ++ reinit_completion(&cdata->async.result->completion); + + if (cdata->aead == 0) { + ablkcipher_request_set_crypt(cdata->async.request, +@@ -240,7 +240,7 @@ ssize_t cryptodev_cipher_decrypt(struct cipher_data *cdata, + { + int ret; + +- INIT_COMPLETION(cdata->async.result->completion); ++ reinit_completion(&cdata->async.result->completion); + if (cdata->aead == 0) { + ablkcipher_request_set_crypt(cdata->async.request, + (struct scatterlist *)src, dst, +@@ -351,7 +351,7 @@ ssize_t cryptodev_hash_update(struct hash_data *hdata, + { + int ret; + +- INIT_COMPLETION(hdata->async.result->completion); ++ reinit_completion(&hdata->async.result->completion); + ahash_request_set_crypt(hdata->async.request, sg, NULL, len); + + ret = crypto_ahash_update(hdata->async.request); +@@ -363,7 +363,7 @@ int cryptodev_hash_final(struct hash_data *hdata, void* output) + { + int ret; + +- INIT_COMPLETION(hdata->async.result->completion); ++ reinit_completion(&hdata->async.result->completion); + ahash_request_set_crypt(hdata->async.request, NULL, output, 0); + + ret = crypto_ahash_final(hdata->async.request); +diff --git a/cryptodev_int.h b/cryptodev_int.h +index 12dd5b1..188063d 100644 +--- a/cryptodev_int.h ++++ b/cryptodev_int.h +@@ -2,6 +2,12 @@ + #ifndef CRYPTODEV_INT_H + # define CRYPTODEV_INT_H + ++#include ++ ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)) ++# define reinit_completion(x) INIT_COMPLETION(*(x)) ++#endif ++ + #include + #include + #include +-- +1.9.1 + 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 @@ +SUMMARY = "Device Tree Compiler" +DESCRIPTION = "The Device Tree Compiler is a tool used to manipulate the Open-Firmware-like device tree used by PowerPC kernels." +SECTION = "bootloader" +LICENSE = "GPLv2 | BSD" +DEPENDS = "flex-native bison-native" + +inherit autotools-brokensep + +SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git \ + file://make_install.patch \ + " + +EXTRA_OEMAKE='PREFIX="${prefix}" LIBDIR="${libdir}"' + +S = "${WORKDIR}/git" + +PACKAGES =+ "${PN}-misc" +FILES_${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff" + +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 @@ +Upstream-Status: Inappropriate [configuration] + +Index: git/Makefile +=================================================================== +--- git.orig/Makefile 2011-11-02 14:52:17.243104779 -0700 ++++ git/Makefile 2011-11-02 15:06:01.555104982 -0700 +@@ -161,8 +161,8 @@ + $(INSTALL) -d $(DESTDIR)$(BINDIR) + $(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR) + $(INSTALL) -d $(DESTDIR)$(LIBDIR) +- $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR) +- ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname) ++ $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname) ++ ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/$(notdir $(LIBFDT_lib)) + ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/libfdt.$(SHAREDLIB_EXT) + $(INSTALL) -m 644 $(LIBFDT_archive) $(DESTDIR)$(LIBDIR) + $(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 @@ +require dtc.inc + +LIC_FILES_CHKSUM = "file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://libfdt/libfdt.h;beginline=3;endline=52;md5=fb360963151f8ec2d6c06b055bcbb68c" + +SRCREV = "65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf" +PV = "1.4.0+git${SRCPV}" + +S = "${WORKDIR}/git" + +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 @@ +SUMMARY = "Tools for managing Yocto Project style branched kernels" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=d8d1d729a70cd5f52972f8884b80743d" + +DEPENDS = "git-native" + +SRCREV = "23345b8846fe4bd167efdf1bd8a1224b2ba9a5ff" +PR = "r12" +PV = "0.2+git${SRCPV}" + +inherit native + +SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git" +S = "${WORKDIR}" + +do_compile() { + : +} + +do_install() { + cd ${S}/git + make DESTDIR=${D}${bindir} install +} 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 @@ +SUMMARY = "Kexec fast reboot tools" +DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel" +AUTHOR = "Eric Biederman" +HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/" +SECTION = "kernel/userland" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \ + file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09" +DEPENDS = "zlib xz" + +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz" + +inherit autotools-brokensep + +COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|powerpc.*|mips.*)-(linux|freebsd.*)' + +INSANE_SKIP_${PN} = "arch" + +do_compile_prepend() { + # Remove the '*.d' file to make sure the recompile is OK + for dep in `find ${B} -type f -name '*.d'`; do + dep_no_d="`echo $dep | sed 's#.d$##'`" + # Remove file.d when there is a file.o + if [ -f "$dep_no_d.o" ]; then + rm -f $dep + fi + done +} 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 @@ +kexec-tools: Refine kdump device_tree sort + +The commit b02d735bf was to rearrange the device-tree entries, and +assumed that these entries are sorted in the ascending order. but +acctually when I was validating kexec and kdump, the order of +serial node still is changed. So the patch is to sort these entries +by the directory name in ascending order. + +Upstream-Status: Pending + +Signed-off-by: Yang Wei +Signed-off-by: Chong Lu +--- + kexec/arch/ppc/fs2dt.c | 13 ++++++++++--- + kexec/fs2dt.c | 13 ++++++++++--- + 2 files changed, 20 insertions(+), 6 deletions(-) + +diff --git a/kexec/arch/ppc/fs2dt.c b/kexec/arch/ppc/fs2dt.c +index 4121c7d..cc04b04 100644 +--- a/kexec/arch/ppc/fs2dt.c ++++ b/kexec/arch/ppc/fs2dt.c +@@ -296,6 +296,9 @@ static int comparefunc(const void *dentry1, const void *dentry2) + { + char *str1 = (*(struct dirent **)dentry1)->d_name; + char *str2 = (*(struct dirent **)dentry2)->d_name; ++ char* ptr1 = strchr(str1, '@'); ++ char* ptr2 = strchr(str2, '@'); ++ int len1, len2; + + /* + * strcmp scans from left to right and fails to idetify for some +@@ -303,9 +306,13 @@ static int comparefunc(const void *dentry1, const void *dentry2) + * Therefore, we get the wrong sorted order like memory@10000000 and + * memory@f000000. + */ +- if (strchr(str1, '@') && strchr(str2, '@') && +- (strlen(str1) > strlen(str2))) +- return 1; ++ if (ptr1 && ptr2) { ++ len1 = ptr1 - str1; ++ len2 = ptr2 - str2; ++ if (!strncmp(str1, str2, len1 >len2 ? len1: len2) && ++ (strlen(str1) > strlen(str2))) ++ return 1; ++ } + + return strcmp(str1, str2); + } +diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c +index 5e6b98d..1c0345b 100644 +--- a/kexec/fs2dt.c ++++ b/kexec/fs2dt.c +@@ -475,6 +475,9 @@ static int comparefunc(const struct dirent **dentry1, + { + char *str1 = (*(struct dirent **)dentry1)->d_name; + char *str2 = (*(struct dirent **)dentry2)->d_name; ++ char* ptr1 = strchr(str1, '@'); ++ char* ptr2 = strchr(str2, '@'); ++ int len1, len2; + + /* + * strcmp scans from left to right and fails to idetify for some +@@ -482,9 +485,13 @@ static int comparefunc(const struct dirent **dentry1, + * Therefore, we get the wrong sorted order like memory@10000000 and + * memory@f000000. + */ +- if (strchr(str1, '@') && strchr(str2, '@') && +- (strlen(str1) > strlen(str2))) +- return 1; ++ if (ptr1 && ptr2) { ++ len1 = ptr1 - str1; ++ len2 = ptr2 - str2; ++ if (!strncmp(str1, str2, len1 >len2 ? len1: len2) && ++ (strlen(str1) > strlen(str2))) ++ return 1; ++ } + + return strcmp(str1, str2); + } +-- +1.7.9.5 + 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 @@ +require kexec-tools.inc +export LDFLAGS = "-L${STAGING_LIBDIR}" +EXTRA_OECONF = " --with-zlib=yes" + +SRC_URI += "file://kexec-tools-Refine-kdump-device_tree-sort.patch" + +SRC_URI[md5sum] = "2309ba43981cb6d39d07ac3a9aac30ab" +SRC_URI[sha256sum] = "dde5c38be39882c6c91f0129647349c4e1943b077d3020af1970b481ee954eb0" + +PACKAGES =+ "kexec kdump vmcore-dmesg" + +ALLOW_EMPTY_${PN} = "1" +RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg" + +FILES_kexec = "${sbindir}/kexec" +FILES_kdump = "${sbindir}/kdump" +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 @@ +SUMMARY = "Wrapper script for the Linux kernel module dependency indexer" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +INHIBIT_DEFAULT_DEPS = "1" +# The kernel and the staging dir for it is machine specific +PACKAGE_ARCH = "${MACHINE_ARCH}" + +# We need the following for the sstate code to process the wrapper +SSTATE_SCAN_FILES += "depmodwrapper" + +do_install() { + install -d ${D}${bindir_crossscripts}/ + + cat > ${D}${bindir_crossscripts}/depmodwrapper << EOF +#!/bin/sh +# Expected to be called as: depmodwrapper -a KERNEL_VERSION +if [ "\$1" != "-a" -o "\$2" != "-b" ]; then + echo "Usage: depmodwrapper -a -b rootfs KERNEL_VERSION" >&2 + exit 1 +fi +if [ ! -r ${STAGING_KERNEL_DIR}/kernel-abiversion ]; then + echo "Unable to read: ${STAGING_KERNEL_DIR}/kernel-abiversion" >&2 +else + kernelabi=\$(cat ${STAGING_KERNEL_DIR}/kernel-abiversion) + if [ "\$kernelabi" != "\$4" ]; then + echo "Error: Kernel version \$4 does not match kernel-abiversion (\$kernelabi)" >&2 + exit 1 + fi +fi + +if [ ! -r ${STAGING_KERNEL_DIR}/System.map-\$4 ]; then + echo "Unable to read: ${STAGING_KERNEL_DIR}/System.map-\$4" >&2 + exec env depmod "\$1" "\$2" "\$3" "\$4" +else + exec env depmod "\$1" "\$2" "\$3" -F "${STAGING_KERNEL_DIR}/System.map-\$4" "\$4" +fi +EOF + chmod +x ${D}${bindir_crossscripts}/depmodwrapper +} + +SYSROOT_PREPROCESS_FUNCS += "depmodwrapper_sysroot_preprocess" + +depmodwrapper_sysroot_preprocess () { + sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} +} 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 @@ +# Copyright (C) 2012 Khem Raj +# Released under the MIT license (see COPYING.MIT for the terms) + +require kmod.inc + +DEPENDS += "zlib-native" + +inherit native + +SRC_URI += "file://Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch \ + " + +do_install_append (){ + for tool in depmod insmod lsmod modinfo modprobe rmmod + do + ln -s kmod ${D}${bindir}/$tool + done +} 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 @@ +# Copyright (C) 2012 Khem Raj +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Tools for managing Linux kernel modules" +DESCRIPTION = "kmod is a set of tools to handle common tasks with Linux kernel modules like \ + insert, remove, list, check properties, resolve dependencies and aliases." +HOMEPAGE = "http://packages.profusion.mobi/kmod/" +LICENSE = "GPL-2.0+ & LGPL-2.1+" +LICENSE_libkmod = "LGPL-2.1+" +SECTION = "base" + +DEPENDS += "pkgconfig-native" + +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ + file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + " +inherit autotools gtk-doc ptest + +SRCREV = "ae58de0fcb4a6528dd365e23d383bbe2eaf2d566" +# Lookout for PV bump too when SRCREV is changed +PV = "18+git${SRCPV}" + +SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \ + file://depmod-search.conf \ + file://run-ptest \ + file://ptest.patch \ + file://avoid_parallel_tests.patch \ + file://fix-O_CLOEXEC.patch \ + file://0001-Add-missing-O_CLOEXEC-in-kmod_module_get_size.patch \ + " + +S = "${WORKDIR}/git" + +EXTRA_AUTORECONF += "--install --symlink" +EXTRA_OECONF +="--enable-debug --enable-logging --enable-tools --disable-manpages --with-zlib" + +do_configure_prepend () { + gtkdocize --docdir ${S}/libkmod/docs || touch ${S}/libkmod/docs/gtk-doc.make +} 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 @@ +From 74c26943f1228870022d116a1fda25be3a55a38e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= +Date: Wed, 18 Jun 2014 20:51:00 -0400 +Subject: [PATCH] Add missing O_CLOEXEC in kmod_module_get_size() + +Upstream-Status: Backport +Signed-off-by: Saul Wold +--- + libkmod/libkmod-module.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c +index e3cc5a7..b81b451 100644 +--- a/libkmod/libkmod-module.c ++++ b/libkmod/libkmod-module.c +@@ -1783,7 +1783,7 @@ KMOD_EXPORT long kmod_module_get_size(const struct kmod_module *mod) + * loaded. + */ + snprintf(line, sizeof(line), "/sys/module/%s", mod->name); +- dfd = open(line, O_RDONLY); ++ dfd = open(line, O_RDONLY|O_CLOEXEC); + if (dfd < 0) + return -errno; + +-- +1.8.3.1 + 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 @@ +From 0c4dbadc9db3cda1cfca64e44ea08c6e89919ea7 Mon Sep 17 00:00:00 2001 +From: Ting Liu +Date: Tue, 10 Sep 2013 13:44:18 +0800 +Subject: [PATCH] Change to calling bswap_* instead of htobe* and be*toh + +We can't use htobe* and be*toh functions because they are not +available on older versions of glibc, For example, shipped on Centos 5.5. + +Change to directly calling bswap_* as defined in+byteswap.h. + +Upstream-Status: Inappropriate + +Signed-off-by: Ting Liu +--- + libkmod/libkmod-signature.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c +index 6b80caa..3544a36 100644 +--- a/libkmod/libkmod-signature.c ++++ b/libkmod/libkmod-signature.c +@@ -19,6 +19,7 @@ + */ + + #include ++#include + #include + #include + #include +@@ -121,7 +122,7 @@ bool kmod_module_signature_info(const struct kmod_file *file, struct kmod_signat + modsig->hash >= PKEY_HASH__LAST || + modsig->id_type >= PKEY_ID_TYPE__LAST) + return false; +- sig_len = be32toh(get_unaligned(&modsig->sig_len)); ++ sig_len = bswap_32(get_unaligned(&modsig->sig_len)); + if (size < (off_t)(modsig->signer_len + modsig->key_id_len + sig_len)) + return false; + +-- +1.7.5.4 + 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 @@ +Avoid parallel-tests as it remove +buildtest-TESTS and runtest-TESTS targets required by ptest. +In automake 1.13.4 parallel-tests is assumed by defauls. +In order to have buildtest-TESTS and runtest-TESTS targets +serial-tests is now required + +Signed-off-by: Tudor Florea +Upstream-Status: Inappropriate (disable feature incompatible with ptest) + +diff -ruN a/configure.ac b/configure.ac +--- a/configure.ac 2013-09-02 15:05:18.662366800 +0200 ++++ b/configure.ac 2013-11-28 09:26:49.557066764 +0200 +@@ -8,7 +8,7 @@ + AC_CONFIG_SRCDIR([libkmod/libkmod.c]) + AC_CONFIG_AUX_DIR([build-aux]) + AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules +- tar-pax no-dist-gzip dist-xz subdir-objects color-tests parallel-tests]) ++ tar-pax no-dist-gzip dist-xz subdir-objects color-tests serial-tests]) + AC_PROG_CC_STDC + AC_USE_SYSTEM_EXTENSIONS + 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 @@ +# +# /etc/depmod.d/depmod.conf +# + +search updates extramodules built-in + 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 @@ +From bd43367eee868059770188fd9e9db38520dc6fff Mon Sep 17 00:00:00 2001 +From: Robert Yang +Date: Wed, 22 Jan 2014 01:06:40 -0500 +Subject: [PATCH] libkmod/libkmod-internal.h: check whether O_CLOEXEC is + defined or not + +O_CLOEXEC is introduced from Linux 2.6.23, so old kernel doesn't have +it, we need check before use. + +This patch is much more like a workaround, since it may need fcntl() use +FD_CLOEXEC to replace. + +This problem was reported by "Ting Liu " +Signed-off-by: Robert Yang + +Upstream-Status: Pending +--- + libkmod/libkmod-internal.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/libkmod/libkmod-internal.h b/libkmod/libkmod-internal.h +index 0180124..100b40f 100644 +--- a/libkmod/libkmod-internal.h ++++ b/libkmod/libkmod-internal.h +@@ -9,6 +9,10 @@ + #include "macro.h" + #include "libkmod.h" + ++#ifndef O_CLOEXEC ++#define O_CLOEXEC 0 ++#endif ++ + static _always_inline_ _printf_format_(2, 3) void + kmod_log_null(struct kmod_ctx *ctx, const char *format, ...) {} + +-- +1.7.10.4 + 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 @@ +Add 'install-ptest' rule. + +Signed-off-by: Tudor Florea +Upstream-Status: Pending + +diff -ruN a/Makefile.am b/Makefile.am +--- a/Makefile.am 2013-07-12 17:11:05.278331557 +0200 ++++ b/Makefile.am 2013-07-12 17:14:27.033788016 +0200 +@@ -204,6 +204,16 @@ + + distclean-local: $(DISTCLEAN_LOCAL_HOOKS) + ++install-ptest: ++ @$(MKDIR_P) $(DESTDIR)/testsuite ++ @for file in $(TESTSUITE); do \ ++ install $$file $(DESTDIR)/testsuite; \ ++ done; ++ @sed -e 's/^Makefile/_Makefile/' < Makefile > $(DESTDIR)/Makefile ++ @$(MKDIR_P) $(DESTDIR)/tools ++ @cp $(noinst_SCRIPTS) $(noinst_PROGRAMS) $(DESTDIR)/tools ++ @cp -r testsuite/rootfs testsuite/.libs $(DESTDIR)/testsuite ++ + # ------------------------------------------------------------------------------ + # custom release helpers + # ------------------------------------------------------------------------------ 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 @@ +#!/bin/sh +touch testsuite/stamp-rootfs +tar xf testmodule.tar +make -k runtest-TESTS 2>/dev/null| grep -e ^PASS -e ^FAIL +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 @@ +# Copyright (C) 2012 Khem Raj +# Released under the MIT license (see COPYING.MIT for the terms) + +require kmod.inc + +DEPENDS += "zlib" +PROVIDES += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" +RPROVIDES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" +RCONFLICTS_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" +RREPLACES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" + +# to force user to remove old module-init-tools and replace them with kmod variants +RCONFLICTS_libkmod2 += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" + +# autotools set prefix to /usr, however we want them in /bin and /sbin +bindir = "${base_bindir}" +sbindir = "${base_sbindir}" +# libdir = "${base_libdir}" + +do_install_append () { + install -dm755 ${D}${base_bindir} + install -dm755 ${D}${base_sbindir} + # add symlinks to kmod + ln -s ..${base_bindir}/kmod ${D}${base_bindir}/lsmod + for tool in insmod rmmod depmod modinfo modprobe; do + ln -s ..${base_bindir}/kmod ${D}${base_sbindir}/${tool} + done + # configuration directories + install -dm755 ${D}${base_libdir}/depmod.d + install -dm755 ${D}${base_libdir}/modprobe.d + install -dm755 ${D}${sysconfdir}/depmod.d + install -dm755 ${D}${sysconfdir}/modprobe.d + + # install depmod.d file for search/ dir + install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${base_libdir}/depmod.d/search.conf" + + if ${@base_contains('DISTRO_FEATURES', 'ptest', 'true', 'false', d)}; then + find testsuite -name *.ko -exec tar rf testmodule.tar {} \; + find testsuite -name *.ko -exec rm -f {} \; + fi +} + +do_compile_prepend() { + sed -i 's/ac_pwd=/#ac_pwd=/' config.status ; sed -i "/#ac_pwd=/a\ac_pwd='.'" config.status +} + +do_compile_ptest () { + oe_runmake buildtest-TESTS rootfs +} + +do_install_ptest () { + install testmodule.tar ${D}${PTEST_PATH} +} + +INSANE_SKIP_${PN}-ptest = "arch" + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "60" + +ALTERNATIVE_kmod = "insmod modprobe rmmod modinfo bin-lsmod lsmod depmod" + +ALTERNATIVE_LINK_NAME[insmod] = "${base_sbindir}/insmod" +ALTERNATIVE_LINK_NAME[modprobe] = "${base_sbindir}/modprobe" +ALTERNATIVE_LINK_NAME[rmmod] = "${base_sbindir}/rmmod" +ALTERNATIVE_LINK_NAME[modinfo] = "${base_sbindir}/modinfo" +ALTERNATIVE_LINK_NAME[bin-lsmod] = "${base_bindir}/lsmod" + +ALTERNATIVE_LINK_NAME[lsmod] = "${base_sbindir}/lsmod" +ALTERNATIVE_TARGET[lsmod] = "${base_bindir}/lsmod.${BPN}" + +ALTERNATIVE_LINK_NAME[depmod] = "${base_sbindir}/depmod" + +PACKAGES =+ "libkmod ${PN}-bash-completion" + +FILES_libkmod = "${base_libdir}/libkmod*${SOLIBS} ${libdir}/libkmod*${SOLIBS}" +FILES_${PN} += "${base_libdir}/depmod.d ${base_libdir}/modprobe.d" +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 @@ +linux: sysfs: use tracing_on as tracing_enabled is deprecated + +tracing_enabled use in the kernel is being deprecated as per commit +6752ab4a9c30 [tracing: Deprecate tracing_enabled for tracing_on] in +the linux mainline kernel. tracing_enabled use will generate a warning +and may no longer function as expected, therefore move to use tracing_on. + +Upstream-Status: Pending + +Signed-off-by: Dennis Hall + +Index: latencytop-0.5/fsync.c +=================================================================== +--- latencytop-0.5.orig/fsync.c 2012-08-03 10:45:49.000000000 -0400 ++++ latencytop-0.5/fsync.c 2012-08-03 10:48:39.000000000 -0400 +@@ -149,19 +149,19 @@ + * cd /sys/kernel/debug/tracing + * echo fsync > current_tracer + * echo ftrace_printk > iter_ctrl +- * echo 1 > tracing_enabled ++ * echo 1 > tracing_on + */ + ret = system("/bin/mount -t debugfs none /sys/kernel/debug/"); + if (!ret) + return -1; + write_to_file("/sys/kernel/debug/tracing/current_tracer", "fsync"); + write_to_file("/sys/kernel/debug/tracing/iter_ctrl", "ftrace_printk"); +- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "1"); ++ write_to_file("/sys/kernel/debug/tracing/tracing_on", "1"); + } + + int disable_fsync_tracer(void) + { +- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "0"); ++ write_to_file("/sys/kernel/debug/tracing/tracing_on", "0"); + } + + +@@ -339,8 +339,8 @@ + if (curduration > 5) + curduration = 5; + /* clear the ftrace buffer */ +- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "0"); +- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "1"); ++ write_to_file("/sys/kernel/debug/tracing/tracing_on", "0"); ++ write_to_file("/sys/kernel/debug/tracing/tracing_on", "1"); + key = select(1, &rfds, NULL, NULL, &end); + parse_ftrace(); + 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 @@ +diff --git a/Makefile.orig b/Makefile +index 16a2369..fa797a2 100644 +--- a/Makefile.orig ++++ b/Makefile +@@ -1,10 +1,11 @@ +-# FIXME: Use autoconf ? +-HAS_GTK_GUI = 1 ++# Upstream-Status: Inappropriate [configuration] ++# Signed-off-by: Jack Mitchell + + DESTDIR = + SBINDIR = /usr/sbin + XCFLAGS = -W -g `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare +-LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncursesw ++LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncurses ++CC ?= gcc + + OBJS= latencytop.o text_display.o translate.o fsync.o + +@@ -26,16 +27,17 @@ endif + + # We write explicity this "implicit rule" + %.o : %.c +- gcc -c $(CFLAGS) $(XCFLAGS) $< -o $@ ++ $(CC) -c $(CFLAGS) $(XCFLAGS) $< -o $@ + + latencytop: $(OBJS) latencytop.h Makefile +- gcc $(CFLAGS) $(OBJS) $(LDF) -o latencytop ++ $(CC) $(CFLAGS) $(OBJS) $(LDF) -o latencytop + + clean: + rm -f *~ latencytop DEADJOE *.o + + install: latencytop + mkdir -p $(DESTDIR)/usr/share/latencytop ++ mkdir -p $(DESTDIR)/$(SBINDIR) + install -m 0644 latencytop.trans $(DESTDIR)/usr/share/latencytop/latencytop.trans + install -m 0644 *.png $(DESTDIR)/usr/share/latencytop/ + 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 @@ +SUMMARY = "Linux tool for measuring and fixing latency" +HOMEPAGE = "http://www.latencytop.org/" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://latencytop.c;endline=23;md5=ee9ea9b1415356e5734adad4a87dc7fa" + +DEPENDS = "virtual/libintl ncurses glib-2.0" + +PR = "r3" + +SRC_URI = "http://www.latencytop.org/download/latencytop-${PV}.tar.gz \ + file://latencytop-makefile.patch \ + file://latencytop-fsync.patch" + +SRC_URI[md5sum] = "73bb3371c6ee0b0e68e25289027e865c" +SRC_URI[sha256sum] = "9e7f72fbea7bd918e71212a1eabaad8488d2c602205d2e3c95d62cd57e9203ef" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" + +PACKAGECONFIG[x11] = ",,gtk+" + +EXTRA_OEMAKE_X = "${@bb.utils.contains('PACKAGECONFIG', 'x11', 'HAS_GTK_GUI=1', '', d)}" + +CFLAGS += "${LDFLAGS}" + +do_install() { + oe_runmake install DESTDIR=${D} ${EXTRA_OEMAKE_X} +} 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 @@ +SUMMARY = "Monitoring tools exploiting the performance monitoring events" +DESCRIPTION = "This package provides a library, called libpfm4 which is used to develop \ +monitoring tools exploiting the performance monitoring events such as those \ +provided by the Performance Monitoring Unit (PMU) of modern processors." +HOMEPAGE = "http://perfmon2.sourceforge.net/" +BUGTRACKER = "http://sourceforge.net/tracker/?group_id=144822&atid=759953&source=navbar" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=0de488f3bd4424e308e2e399cb99c788" + +SECTION = "devel" + +PR = "r1" +COMPATIBLE_HOST = "powerpc64" + +SRC_URI = "http://downloads.sourceforge.net/project/perfmon2/libpfm4/libpfm-4.3.0.tar.gz" + +SRC_URI[md5sum] = "0ab272dbdbb759b852ba8bd06db030ef" +SRC_URI[sha256sum] = "a23eb9affbff279e13563a39317c0ad71c4de28908d4243c8bc109138430cc3b" + +EXTRA_OEMAKE = "DESTDIR=\"${D}\" PREFIX=\"${prefix}\" LIBDIR=\"${libdir}\" LDCONFIG=\"true\"" +EXTRA_OEMAKE_append_powerpc = " ARCH=\"powerpc\"" +EXTRA_OEMAKE_append_powerpc64 = " ARCH=\"powerpc\" BITMODE=\"64\"" + +S = "${WORKDIR}/libpfm-${PV}" + +do_install () { + oe_runmake install +} 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 @@ +SUMMARY = "Firmware files for use with Linux kernel" +SECTION = "kernel" +# Notes: +# This is kind of a mess. Each bit of firmware has their own license. Some free +# some not. Leaving this as Proprietary for now, but this recipe should be probably +# be rethought out a bit more around how it deals with licenses. + +LICENSE = "Proprietary" + +LIC_FILES_CHKSUM = "file://LICENSE.radeon;md5=07b0c31777bd686d8e1609c6940b5e74\ + file://LICENSE.dib0700;md5=f7411825c8a555a1a3e5eab9ca773431 \ + file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \ + file://LICENCE.ralink-firmware.txt;md5=ab2c269277c45476fb449673911a2dfd \ + file://LICENCE.qla2xxx;md5=f5ce8529ec5c17cb7f911d2721d90e91 \ + file://LICENCE.iwlwifi_firmware;md5=8b938534f77ffd453690eb34ed84ae8b \ + file://LICENCE.i2400m;md5=14b901969e23c41881327c0d9e4b7d36 \ + file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13 \ + file://LICENCE.agere;md5=af0133de6b4a9b2522defd5f188afd31 \ + file://LICENCE.rtlwifi_firmware.txt;md5=00d06cfd3eddd5a2698948ead2ad54a5 \ + file://LICENCE.broadcom_bcm43xx;md5=3160c14df7228891b868060e1951dfbc \ + file://LICENCE.ti-connectivity;md5=186e7a43cf6c274283ad81272ca218ea \ + file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13 \ + file://LICENCE.via_vt6656;md5=e4159694cba42d4377a912e78a6e850f \ + file://LICENCE.Marvell;md5=9ddea1734a4baf3c78d845151f42a37a \ + " + +SRCREV = "dec41bce44e0dff6a2c3358a958fadf22bf58858" +PE = "1" +PV = "0.0+git${SRCPV}" + +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git" + +S = "${WORKDIR}/git" + +inherit allarch update-alternatives + +do_compile() { + : +} + +do_install() { + install -d ${D}/lib/firmware/ + cp -r * ${D}/lib/firmware/ + + # Avoid Makefile to be deplyed + rm ${D}/lib/firmware/Makefile + + # Remove unbuild firmware which needs cmake and bash + rm ${D}/lib/firmware/carl9170fw -rf + + # Remove pointless bash script + rm ${D}/lib/firmware/configure + + # Libertas sd8686 + ln -sf libertas/sd8686_v9.bin ${D}/lib/firmware/sd8686.bin + ln -sf libertas/sd8686_v9_helper.bin ${D}/lib/firmware/sd8686_helper.bin + + # fixup wl12xx location, after 2.6.37 the kernel searches a different location for it + ( cd ${D}/lib/firmware ; ln -sf ti-connectivity/* . ) +} + + +PACKAGES =+ "${PN}-ralink \ + ${PN}-radeon \ + ${PN}-marvell-license ${PN}-sd8686 ${PN}-sd8787 ${PN}-sd8797 \ + ${PN}-wl12xx ${PN}-wl18xx ${PN}-vt6656 \ + ${PN}-rtl-license ${PN}-rtl8192cu ${PN}-rtl8192ce ${PN}-rtl8192su \ + ${PN}-broadcom-license ${PN}-bcm4329 ${PN}-bcm4330 ${PN}-bcm4334 \ + ${PN}-atheros-license ${PN}-ar9170 ${PN}-ar3k ${PN}-ath6k ${PN}-ath9k \ + ${PN}-iwlwifi-license ${PN}-iwlwifi-6000g2a-5 ${PN}-iwlwifi-6000g2b-6 ${PN}-iwlwifi-7260-7 \ + ${PN}-iwlwifi-6000g2a-6 ${PN}-iwlwifi-135-6" + + +FILES_${PN}-atheros-license = "/lib/firmware/LICENCE.atheros_firmware" + +LICENSE_${PN}-9170 = "Firmware-atheros_firmware" +FILES_${PN}-ar9170 = " \ + /lib/firmware/ar9170*.fw \ +" +RDEPENDS_${PN}-ar9170 += "${PN}-atheros-license" + +LICENSE_${PN}-ar3k = "Firmware-atheros_firmware" +FILES_${PN}-ar3k = " \ + /lib/firmware/ar3k \ +" +RDEPENDS_${PN}-ath6k += "${PN}-atheros-license" + +LICENSE_${PN}-ath6k = "Firmware-atheros_firmware" +FILES_${PN}-ath6k = " \ + /lib/firmware/ath6k \ +" +RDEPENDS_${PN}-ath6k += "${PN}-atheros-license" + +LICENSE_${PN}-ath9k = "Firmware-atheros_firmware" +FILES_${PN}-ath9k = " \ + /lib/firmware/ar9271.fw \ + /lib/firmware/ar7010*.fw \ + /lib/firmware/htc_9271.fw \ + /lib/firmware/htc_7010.fw \ +" +RDEPENDS_${PN}-ath9k += "${PN}-atheros-license" + +LICENSE_${PN}-ralink = "Firmware-ralink" +FILES_${PN}-ralink = " \ + /lib/firmware/rt*.bin \ + /lib/firmware/LICENCE.ralink-firmware.txt \ +" + +LICENSE_${PN}-radeon = "Firmware-radeon" +FILES_${PN}-radeon = " \ + /lib/firmware/radeon \ + /lib/firmware/LICENCE.radeon \ +" + +FILES_${PN}-marvell-license = "/lib/firmware/LICENCE.Marvell" + +LICENSE_${PN}-sd8686 = "Firmware-Marvell" +FILES_${PN}-sd8686 = " \ + /lib/firmware/libertas/sd8686_v9* \ + /lib/firmware/sd8686* \ +" +RDEPENDS_${PN}-sd8686 += "${PN}-marvell-license" + +LICENSE_${PN}-sd8787 = "Firmware-Marvell" +FILES_${PN}-sd8787 = " \ + /lib/firmware/mrvl/sd8787_uapsta.bin \ +" +RDEPENDS_${PN}-sd8787 += "${PN}-marvell-license" + +LICENSE_${PN}-sd8797 = "Firmware-Marvell" +FILES_${PN}-sd8797 = " \ + /lib/firmware/mrvl/sd8797_uapsta.bin \ +" +RDEPENDS_${PN}-sd8797 += "${PN}-marvell-license" + +FILES_${PN}-rtl-license = " \ + /lib/firmware/LICENCE.rtlwifi_firmware.txt \ +" + +LICENSE_${PN}-rtl8192cu = "Firmware-rtlwifi" +FILES_${PN}-rtl8192cu = " \ + /lib/firmware/rtlwifi/rtl8192cufw.bin \ +" +RDEPENDS_${PN}-rtl8192cu += "${PN}-rtl-license" + +LICENSE_${PN}-rtl8192ce = "Firmware-rtlwifi" +FILES_${PN}-rtl8192ce = " \ + /lib/firmware/rtlwifi/rtl8192cfw.bin \ +" +RDEPENDS_${PN}-rtl8192ce += "${PN}-rtl-license" + + +LICENSE_${PN}-rtl8192su = "Firmware-rtlwifi" +FILES_${PN}-rtl8192su = " \ + /lib/firmware/rtlwifi/rtl8712u.bin \ +" + +LICENSE_${PN}-wl12xx = "Firmware-ti-connectivity" +FILES_${PN}-wl12xx = " \ + /lib/firmware/wl12* \ + /lib/firmware/TI* \ + /lib/firmware/ti-connectivity \ +" + +LICENSE_${PN}-wl18xx = "Firmware-ti-connectivity" +FILES_${PN}-wl18xx = " \ + /lib/firmware/wl18* \ + /lib/firmware/TI* \ + /lib/firmware/ti-connectivity \ +" + +LICENSE_${PN}-vt6656 = "Firmware-via_vt6656" +FILES_${PN}-vt6656 = " \ + /lib/firmware/vntwusb.fw \ +" + +# WARNING: The ALTERNATIVE_* variables are not using ${PN} because of +# a bug in bitbake; when this is fixed and bitbake learns how to proper +# pass variable flags with expansion we can rework this patch. + +ALTERNATIVE_LINK_NAME[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac-sdio.bin" + +FILES_${PN}-broadcom-license = " \ + /lib/firmware/LICENCE.broadcom_bcm43xx \ +" + +LICENSE_${PN}-bcm4329 = "Firmware-bcm4329" +FILES_${PN}-bcm4329 = " \ + /lib/firmware/brcm/brcmfmac4329-sdio.bin \ +" +RDEPENDS_${PN}-bcm4329 += "${PN}-broadcom-license" +ALTERNATIVE_linux-firmware-bcm4329 = "brcmfmac-sdio.bin" +ALTERNATIVE_TARGET_linux-firmware-bcm4329[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4329-sdio.bin" + +LICENSE_${PN}-bcm4330 = "Firmware-bcm4330" +FILES_${PN}-bcm4330 = " \ + /lib/firmware/brcm/brcmfmac4330-sdio.bin \ +" +RDEPENDS_${PN}-bcm4330 += "${PN}-broadcom-license" +ALTERNATIVE_linux-firmware-bcm4330 = "brcmfmac-sdio.bin" +ALTERNATIVE_TARGET_linux-firmware-bcm4330[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4330-sdio.bin" + +LICENSE_${PN}-bcm4334 = "Firmware-bcm4334" +FILES_${PN}-bcm4334 = " \ + /lib/firmware/brcm/brcmfmac4334-sdio.bin \ +" +RDEPENDS_${PN}-bcm4334 += "${PN}-broadcom-license" +ALTERNATIVE_linux-firmware-bcm4334 = "brcmfmac-sdio.bin" +ALTERNATIVE_TARGET_linux-firmware-bcm4334[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4334-sdio.bin" + +RDEPENDS_${PN}-iwlwifi-6000g2a-5 = "${PN}-iwlwifi-license" +RDEPENDS_${PN}-iwlwifi-6000g2a-6 = "${PN}-iwlwifi-license" +RDEPENDS_${PN}-iwlwifi-6000g2b-6 = "${PN}-iwlwifi-license" +RDEPENDS_${PN}-iwlwifi-135-6 = "${PN}-iwlwifi-license" +RDEPENDS_${PN}-iwlwifi-7260-7 = "${PN}-iwlwifi-license" + +FILES_${PN}-iwlwifi-license = "/lib/firmware/LICENCE.iwlwifi_firmware" +FILES_${PN}-iwlwifi-6000g2a-5 = "/lib/firmware/iwlwifi-6000g2a-5.ucode" +FILES_${PN}-iwlwifi-6000g2a-6 = "/lib/firmware/iwlwifi-6000g2a-6.ucode" +FILES_${PN}-iwlwifi-6000g2b-6 = "/lib/firmware/iwlwifi-6000g2b-6.ucode" +FILES_${PN}-iwlwifi-135-6 = "/lib/firmware/iwlwifi-135-6.ucode" +FILES_${PN}-iwlwifi-7260-7 = "/lib/firmware/iwlwifi-7260-7.ucode" + +FILES_${PN} += "/lib/firmware/*" + +# Make linux-firmware depend on all of the split-out packages. +python populate_packages_prepend () { + firmware_pkgs = oe.utils.packages_filter_out_system(d) + d.appendVar('RDEPENDS_linux-firmware', ' ' + ' '.join(firmware_pkgs)) +} 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 @@ +SUMMARY = "Sanitized set of kernel headers for the C library's use" +SECTION = "devel" +LICENSE = "GPLv2" + +######################################################################### +#### PLEASE READ +######################################################################### +# +# You're probably looking here thinking you need to create some new copy +# of linux-libc-headers since you have your own custom kernel. To put +# this simply, you DO NOT. +# +# Why? These headers are used to build the libc. If you customise the +# headers you are customising the libc and the libc becomes machine +# specific. Most people do not add custom libc extensions to the kernel +# and have a machine specific libc. +# +# But you have some kernel headers you need for some driver? That is fine +# but get them from STAGING_KERNEL_DIR where the kernel installs itself. +# This will make the package using them machine specific but this is much +# better than having a machine specific C library. This does mean your +# recipe needs a DEPENDS += "virtual/kernel" but again, that is fine and +# makes total sense. +# +# There can also be a case where your kernel extremely old and you want +# an older libc ABI for that old kernel. The headers installed by this +# recipe should still be a standard mainline kernel, not your own custom +# one. +# +# -- RP + +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" + +python __anonymous () { + major = d.getVar("PV",True).split('.')[0] + if major == "3": + d.setVar("HEADER_FETCH_VER", "3.0") + else: + d.setVar("HEADER_FETCH_VER", "2.6") +} + +inherit kernel-arch + +KORG_ARCHIVE_COMPRESSION ?= "bz2" + +SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/v${HEADER_FETCH_VER}/linux-${PV}.tar.${KORG_ARCHIVE_COMPRESSION}" + +S = "${WORKDIR}/linux-${PV}" + +do_configure() { + oe_runmake allnoconfig +} + +do_compile () { +} + +do_install() { + oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix} + # Kernel should not be exporting this header + rm -f ${D}${exec_prefix}/include/scsi/scsi.h + + # The ..install.cmd conflicts between various configure runs + find ${D}${includedir} -name ..install.cmd | xargs rm -f +} + +BBCLASSEXTEND = "nativesdk" + +#DEPENDS = "cross-linkage" +RDEPENDS_${PN}-dev = "" +RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" + +INHIBIT_DEFAULT_DEPS = "1" +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 @@ +KORG_ARCHIVE_COMPRESSION = "xz" + +require linux-libc-headers.inc + +SRC_URI[md5sum] = "5c569ed649a0c9711879f333e90c5386" +SRC_URI[sha256sum] = "4813ad7927a7d92e5339a873ab16201b242b2748934f12cb5df9ba2cfe1d77a0" + 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 @@ +# Support for device tree generation +FILES_kernel-devicetree = "/${KERNEL_IMAGEDEST}/devicetree*" + +python __anonymous () { + d.appendVar("PACKAGES", " kernel-devicetree") +} + +do_install_append() { + if test -n "${KERNEL_DEVICETREE}"; then + for DTB in ${KERNEL_DEVICETREE}; do + if echo ${DTB} | grep -q '/dts/'; then + bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used." + DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'` + fi + DTB_BASE_NAME=`basename ${DTB} .dtb` + DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` + DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` + DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}" + oe_runmake ${DTB} + if [ ! -e "${DTB_PATH}" ]; then + DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}" + fi + install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb + done + fi +} + +do_deploy_append() { + if test -n "${KERNEL_DEVICETREE}"; then + for DTB in ${KERNEL_DEVICETREE}; do + if echo ${DTB} | grep -q '/dts/'; then + bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used." + DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'` + fi + DTB_BASE_NAME=`basename ${DTB} .dtb` + DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` + DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` + DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}" + if [ ! -e "${DTB_PATH}" ]; then + DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}" + fi + install -d ${DEPLOYDIR} + install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.dtb + cd ${DEPLOYDIR} + ln -sf ${DTB_NAME}.dtb ${DTB_SYMLINK_NAME}.dtb + cd - + done + fi +} + +pkg_postinst_kernel-devicetree () { + cd /${KERNEL_IMAGEDEST} + for DTB_FILE in ${KERNEL_DEVICETREE} + do + DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "." '{print $1}'` + DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` + update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.dtb ${DTB_BASE_NAME}.dtb devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true + done +} + +pkg_postrm_kernel-devicetree () { + cd /${KERNEL_IMAGEDEST} + for DTB_FILE in ${KERNEL_DEVICETREE} + do + DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "." '{print $1}'` + DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` + update-alternatives --remove ${DTB_BASE_NAME}.dtb devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true + done +} 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 @@ +SUMMARY = "Dummy Linux kernel" +DESCRIPTION = "Dummy Linux kernel, to be selected as the preferred \ +provider for virtual/kernel to satisfy dependencies for situations \ +where you wish to build the kernel externally from the build system." +SECTION = "kernel" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe" + +PROVIDES += "virtual/kernel" + +PACKAGES_DYNAMIC += "^kernel-module-.*" +PACKAGES_DYNAMIC += "^kernel-image-.*" +PACKAGES_DYNAMIC += "^kernel-firmware-.*" + +PACKAGES += "kernel-modules" +FILES_kernel-modules = "" +ALLOW_EMPTY_kernel-modules = "1" +DESCRIPTION_kernel-modules = "Kernel modules meta package" + +#COMPATIBLE_MACHINE = "your_machine" + +PR = "r1" + +SRC_URI = "file://COPYING.GPL" +S = "${WORKDIR}" + +do_configure() { + : +} + +do_compile () { + : +} + +do_install() { + : +} + +do_bundle_initramfs() { + : +} + +do_deploy() { + : +} + +addtask bundle_initramfs after do_install before do_deploy +addtask deploy after do_install + 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 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +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 @@ +# This recipe tracks the linux-yocto-dev repository as its upstream source. +# Since this tree is frequently updated, and periodically rebuilt, AUTOREV is +# used to track its contents. +# +# This recipe is just like other linux-yocto variants, with the only difference +# being that to avoid network access during initial parsing, static SRCREVs are +# provided and overridden if the preferred kernel provider is linux-yocto-dev. +# +# To enable this recipe, set PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-dev" + +inherit kernel +require recipes-kernel/linux/linux-yocto.inc + +# provide this .inc to set specific revisions +include recipes-kernel/linux/linux-yocto-dev-revisions.inc + +# Skip processing of this recipe if it is not explicitly specified as the +# PREFERRED_PROVIDER for virtual/kernel. This avoids network access required +# by the use of AUTOREV SRCREVs, which are the default for this recipe. +python () { + if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-dev": + raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-dev to enable it") +} + +KBRANCH = "standard/base" +KMETA = "meta" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta" + +# Set default SRCREVs. Both the machine and meta SRCREVs are statically set +# to the korg v3.7 tag, and hence prevent network access during parsing. If +# linux-yocto-dev is the preferred provider, they will be overridden to +# AUTOREV in following anonymous python routine and resolved when the +# variables are finalized. +SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}' +SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}' + +LINUX_VERSION ?= "3.17+" +LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}" +PV = "${LINUX_VERSION}+git${SRCPV}" + +COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64)" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" +KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc" +KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" + 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 @@ +KBRANCH ?= "standard/preempt-rt/base" +KBRANCH_qemuppc ?= "standard/preempt-rt/qemuppc" + +require recipes-kernel/linux/linux-yocto.inc + +SRCREV_machine ?= "c75818e2932c3c0444ebebfcc0608fecf2440b92" +SRCREV_machine_qemuppc ?= "fc7abf900967db5dea8a8f8648b8a0de7032f8d7" +SRCREV_meta ?= "d5456dd830cad14bd844753b751b83744ced3793" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.10.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta" + +LINUX_VERSION ?= "3.10.65" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +KMETA = "meta" + +LINUX_KERNEL_TYPE = "preempt-rt" + +COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" +KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc" +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 @@ +KBRANCH ?= "standard/preempt-rt/base" +KBRANCH_qemuppc ?= "standard/preempt-rt/qemuppc" + +require recipes-kernel/linux/linux-yocto.inc + +SRCREV_machine ?= "367c3b9712a6e469aed0cb5deebd5d3bfab12b79" +SRCREV_machine_qemuppc ?= "4e827a9b658b6381f6706490e40b6a069a0c4b64" +SRCREV_meta ?= "6eddbf47875ef48ddc5864957a7b63363100782b" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta" + +LINUX_VERSION ?= "3.14.29" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +KMETA = "meta" + +LINUX_KERNEL_TYPE = "preempt-rt" + +COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" +KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" +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 @@ +KBRANCH ?= "standard/tiny/base" + +require recipes-kernel/linux/linux-yocto.inc + +LINUX_KERNEL_TYPE = "tiny" +KCONFIG_MODE = "--allnoconfig" + +LINUX_VERSION ?= "3.10.65" + +KMETA = "meta" + +SRCREV_machine ?= "a2f2be49cd60b8d022fa47daae0a8293c3066b78" +SRCREV_meta ?= "d5456dd830cad14bd844753b751b83744ced3793" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.10.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta" + +COMPATIBLE_MACHINE = "(qemux86)" + +# Functionality flags +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 @@ +KBRANCH ?= "standard/tiny/base" +LINUX_KERNEL_TYPE = "tiny" +KCONFIG_MODE = "--allnoconfig" + +require recipes-kernel/linux/linux-yocto.inc + +LINUX_VERSION ?= "3.14.29" + +KMETA = "meta" + +SRCREV_machine ?= "21ba402e0a5286baf0b8960da132e2d56f020c88" +SRCREV_meta ?= "6eddbf47875ef48ddc5864957a7b63363100782b" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta" + +COMPATIBLE_MACHINE = "(qemux86)" + +# Functionality flags +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 @@ +KBRANCH ?= "standard/tiny/base" +LINUX_KERNEL_TYPE = "tiny" +KCONFIG_MODE = "--allnoconfig" + +require recipes-kernel/linux/linux-yocto.inc + +LINUX_VERSION ?= "3.17.8" + +KMETA = "meta" + +SRCREV_machine ?= "0409b1fbed221e61212e17b7637fa54f908d83f6" +SRCREV_meta ?= "f24c2bf9c298595d00a9d8600841f2b0206e1fba" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.17.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta" + +COMPATIBLE_MACHINE = "(qemux86)" + +# Functionality flags +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 @@ +DESCRIPTION = "Yocto Kernel" +SECTION = "kernel" +LICENSE = "GPLv2" + +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" + +INC_PR = "r4" + +DEPENDS += "xz-native bc-native" + +# A KMACHINE is the mapping of a yocto $MACHINE to what is built +# by the kernel. This is typically the branch that should be built, +# and it can be specific to the machine or shared +# KMACHINE = "UNDEFINED" + +LINUX_KERNEL_TYPE ?= "standard" + +# KMETA ?= "" +KBRANCH ?= "master" +KMACHINE ?= "${MACHINE}" +SRCREV_FORMAT ?= "meta_machine" + +LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" + +do_patch[depends] = "kern-tools-native:do_populate_sysroot" + +addtask kernel_configme before do_configure after do_patch + +# Pick up shared functions +inherit kernel +inherit kernel-yocto +require linux-dtb.inc + +B = "${WORKDIR}/linux-${PACKAGE_ARCH}-${LINUX_KERNEL_TYPE}-build" + +do_install_append(){ + if [ -n "${KMETA}" ]; then + rm -rf ${STAGING_KERNEL_DIR}/${KMETA} + fi +} + +# extra tasks +addtask kernel_link_vmlinux after do_compile before do_install +addtask validate_branches before do_patch after do_kernel_checkout +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 @@ +KBRANCH ?= "standard/base" + +require recipes-kernel/linux/linux-yocto.inc + +# board specific branches +KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs" +KBRANCH_qemumips ?= "standard/mti-malta32" +KBRANCH_qemuppc ?= "standard/qemuppc" +KBRANCH_qemux86 ?= "standard/common-pc/base" +KBRANCH_qemux86-64 ?= "standard/common-pc-64/base" +KBRANCH_qemumips64 ?= "standard/mti-malta64" + +SRCREV_machine_qemuarm ?= "7a8c197b86281f9a445e23378fdfeeb4da0c48e9" +SRCREV_machine_qemumips ?= "926e71942842a9d1a9f64aae0458b2d777d3bca9" +SRCREV_machine_qemuppc ?= "65648fce58a5e095cfe2bf394bc0f6200efb281c" +SRCREV_machine_qemux86 ?= "a2f2be49cd60b8d022fa47daae0a8293c3066b78" +SRCREV_machine_qemux86-64 ?= "a2f2be49cd60b8d022fa47daae0a8293c3066b78" +SRCREV_machine_qemumips64 ?= "06d173388a171e7371816d74567fdec994925aa4" +SRCREV_machine ?= "a2f2be49cd60b8d022fa47daae0a8293c3066b78" +SRCREV_meta ?= "d5456dd830cad14bd844753b751b83744ced3793" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.10.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta" + +LINUX_VERSION ?= "3.10.65" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +KMETA = "meta" + +COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" +KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc" +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 @@ +KBRANCH ?= "standard/base" + +require recipes-kernel/linux/linux-yocto.inc + +# board specific branches +KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs" +KBRANCH_qemumips ?= "standard/mti-malta32" +KBRANCH_qemuppc ?= "standard/qemuppc" +KBRANCH_qemux86 ?= "standard/common-pc/base" +KBRANCH_qemux86-64 ?= "standard/common-pc-64/base" +KBRANCH_qemumips64 ?= "standard/mti-malta64" + +SRCREV_machine_qemuarm ?= "c0ed33beda334dcd387dff89da9804c03e24d648" +SRCREV_machine_qemumips ?= "808071c5f72dc98ed2192de28bdd4e9ba2f7e820" +SRCREV_machine_qemuppc ?= "0f93713ce91cc93f055ae6bcf1bf728d4036d097" +SRCREV_machine_qemux86 ?= "f6aa7aaca80e8532316bfb6e8dd2fbf9ab4f8b8e" +SRCREV_machine_qemux86-64 ?= "21ba402e0a5286baf0b8960da132e2d56f020c88" +SRCREV_machine_qemumips64 ?= "f44eb151dc53822f4f94f50b2ec67a0a1aab041b" +SRCREV_machine ?= "21ba402e0a5286baf0b8960da132e2d56f020c88" +SRCREV_meta ?= "6eddbf47875ef48ddc5864957a7b63363100782b" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta" + +LINUX_VERSION ?= "3.14.29" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +KMETA = "meta" + +COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" +KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc" +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 @@ +KBRANCH ?= "standard/base" + +require recipes-kernel/linux/linux-yocto.inc + +# board specific branches +KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs" +KBRANCH_qemumips ?= "standard/mti-malta32" +KBRANCH_qemuppc ?= "standard/qemuppc" +KBRANCH_qemux86 ?= "standard/common-pc" +KBRANCH_qemux86-64 ?= "standard/common-pc-64/base" +KBRANCH_qemumips64 ?= "standard/mti-malta64" + +SRCREV_machine_qemuarm ?= "12991e8ac40c51ef3e337f17f12aa59c6500fc7f" +SRCREV_machine_qemumips ?= "1f4735ed314defc95ab9929258ad12844cc2c676" +SRCREV_machine_qemuppc ?= "3231dececf867215ecab7c7f9ec3a7a7640a3f32" +SRCREV_machine_qemux86 ?= "0409b1fbed221e61212e17b7637fa54f908d83f6" +SRCREV_machine_qemux86-64 ?= "0409b1fbed221e61212e17b7637fa54f908d83f6" +SRCREV_machine_qemumips64 ?= "7005c584078109dae03567e9c597a847a2bc5136" +SRCREV_machine ?= "0409b1fbed221e61212e17b7637fa54f908d83f6" +SRCREV_meta ?= "f24c2bf9c298595d00a9d8600841f2b0206e1fba" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.17.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta" + +LINUX_VERSION ?= "3.17.8" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +KMETA = "meta" + +COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" +KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc" +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 @@ +Upstream-Status: backport + +babeltrace: Fix support out of tree builds in babeltrace + +Signed-off-by: Lars Persson + +diff --git a/formats/lttng-live/Makefile.am b/formats/lttng-live/Makefile.am +index c834699..2c6b0bd 100644 +--- a/formats/lttng-live/Makefile.am ++++ b/formats/lttng-live/Makefile.am +@@ -1,4 +1,4 @@ +-AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_builddir)/include ++AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir) + + lib_LTLIBRARIES = libbabeltrace-lttng-live.la + + 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 @@ +From 6a0b6cd5133db9e3c72914d4e5dd7fc792360934 Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Wed, 16 Jul 2014 10:58:48 -0400 +Subject: [PATCH] Fix: don't perform unaligned integer read/writes + +Signed-off-by: Mathieu Desnoyers + +Upstream-Status: Backport +Signed-off-by: Saul Wold + +--- + formats/ctf/types/integer.c | 108 ++++++++++++++++++++++++++++---------------- + 1 file changed, 70 insertions(+), 38 deletions(-) + +diff --git a/formats/ctf/types/integer.c b/formats/ctf/types/integer.c +index 189943e..85931be 100644 +--- a/formats/ctf/types/integer.c ++++ b/formats/ctf/types/integer.c +@@ -62,7 +62,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, + { + uint8_t v; + +- v = *(const uint8_t *) ctf_get_pos_addr(pos); ++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); + integer_definition->value._unsigned = v; + break; + } +@@ -70,7 +70,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, + { + uint16_t v; + +- v = *(const uint16_t *) ctf_get_pos_addr(pos); ++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); + integer_definition->value._unsigned = + rbo ? GUINT16_SWAP_LE_BE(v) : v; + break; +@@ -79,7 +79,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, + { + uint32_t v; + +- v = *(const uint32_t *) ctf_get_pos_addr(pos); ++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); + integer_definition->value._unsigned = + rbo ? GUINT32_SWAP_LE_BE(v) : v; + break; +@@ -88,7 +88,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, + { + uint64_t v; + +- v = *(const uint64_t *) ctf_get_pos_addr(pos); ++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); + integer_definition->value._unsigned = + rbo ? GUINT64_SWAP_LE_BE(v) : v; + break; +@@ -102,7 +102,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, + { + int8_t v; + +- v = *(const int8_t *) ctf_get_pos_addr(pos); ++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); + integer_definition->value._signed = v; + break; + } +@@ -110,7 +110,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, + { + int16_t v; + +- v = *(const int16_t *) ctf_get_pos_addr(pos); ++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); + integer_definition->value._signed = + rbo ? (int16_t) GUINT16_SWAP_LE_BE(v) : v; + break; +@@ -119,7 +119,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, + { + int32_t v; + +- v = *(const int32_t *) ctf_get_pos_addr(pos); ++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); + integer_definition->value._signed = + rbo ? (int32_t) GUINT32_SWAP_LE_BE(v) : v; + break; +@@ -128,7 +128,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, + { + int64_t v; + +- v = *(const int64_t *) ctf_get_pos_addr(pos); ++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); + integer_definition->value._signed = + rbo ? (int64_t) GUINT64_SWAP_LE_BE(v) : v; + break; +@@ -163,48 +163,80 @@ int _aligned_integer_write(struct bt_stream_pos *ppos, + if (pos->dummy) + goto end; + if (!integer_declaration->signedness) { +- uint64_t v = integer_definition->value._unsigned; +- + switch (integer_declaration->len) { +- case 8: *(uint8_t *) ctf_get_pos_addr(pos) = (uint8_t) v; ++ case 8: ++ { ++ uint8_t v = integer_definition->value._unsigned; ++ ++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); + break; ++ } + case 16: +- *(uint16_t *) ctf_get_pos_addr(pos) = rbo ? +- GUINT16_SWAP_LE_BE((uint16_t) v) : +- (uint16_t) v; ++ { ++ uint16_t v = integer_definition->value._unsigned; ++ ++ if (rbo) ++ v = GUINT16_SWAP_LE_BE(v); ++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); + break; ++ } + case 32: +- *(uint32_t *) ctf_get_pos_addr(pos) = rbo ? +- GUINT32_SWAP_LE_BE((uint32_t) v) : +- (uint32_t) v; ++ { ++ uint32_t v = integer_definition->value._unsigned; ++ ++ if (rbo) ++ v = GUINT32_SWAP_LE_BE(v); ++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); + break; ++ } + case 64: +- *(uint64_t *) ctf_get_pos_addr(pos) = rbo ? +- GUINT64_SWAP_LE_BE(v) : v; ++ { ++ uint64_t v = integer_definition->value._unsigned; ++ ++ if (rbo) ++ v = GUINT64_SWAP_LE_BE(v); ++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); + break; ++ } + default: + assert(0); + } + } else { +- int64_t v = integer_definition->value._signed; +- + switch (integer_declaration->len) { +- case 8: *(int8_t *) ctf_get_pos_addr(pos) = (int8_t) v; ++ case 8: ++ { ++ uint8_t v = integer_definition->value._signed; ++ ++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); + break; ++ } + case 16: +- *(int16_t *) ctf_get_pos_addr(pos) = rbo ? +- (int16_t) GUINT16_SWAP_LE_BE((int16_t) v) : +- (int16_t) v; ++ { ++ int16_t v = integer_definition->value._signed; ++ ++ if (rbo) ++ v = GUINT16_SWAP_LE_BE(v); ++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); + break; ++ } + case 32: +- *(int32_t *) ctf_get_pos_addr(pos) = rbo ? +- (int32_t) GUINT32_SWAP_LE_BE((int32_t) v) : +- (int32_t) v; ++ { ++ int32_t v = integer_definition->value._signed; ++ ++ if (rbo) ++ v = GUINT32_SWAP_LE_BE(v); ++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); + break; ++ } + case 64: +- *(int64_t *) ctf_get_pos_addr(pos) = rbo ? +- GUINT64_SWAP_LE_BE(v) : v; ++ { ++ int64_t v = integer_definition->value._signed; ++ ++ if (rbo) ++ v = GUINT64_SWAP_LE_BE(v); ++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); + break; ++ } + default: + assert(0); + } +@@ -237,23 +269,23 @@ int ctf_integer_read(struct bt_stream_pos *ppos, struct bt_definition *definitio + if (!integer_declaration->signedness) { + if (integer_declaration->byte_order == LITTLE_ENDIAN) + bt_bitfield_read_le(mmap_align_addr(pos->base_mma) + +- pos->mmap_base_offset, unsigned long, ++ pos->mmap_base_offset, unsigned char, + pos->offset, integer_declaration->len, + &integer_definition->value._unsigned); + else + bt_bitfield_read_be(mmap_align_addr(pos->base_mma) + +- pos->mmap_base_offset, unsigned long, ++ pos->mmap_base_offset, unsigned char, + pos->offset, integer_declaration->len, + &integer_definition->value._unsigned); + } else { + if (integer_declaration->byte_order == LITTLE_ENDIAN) + bt_bitfield_read_le(mmap_align_addr(pos->base_mma) + +- pos->mmap_base_offset, unsigned long, ++ pos->mmap_base_offset, unsigned char, + pos->offset, integer_declaration->len, + &integer_definition->value._signed); + else + bt_bitfield_read_be(mmap_align_addr(pos->base_mma) + +- pos->mmap_base_offset, unsigned long, ++ pos->mmap_base_offset, unsigned char, + pos->offset, integer_declaration->len, + &integer_definition->value._signed); + } +@@ -286,23 +318,23 @@ int ctf_integer_write(struct bt_stream_pos *ppos, struct bt_definition *definiti + if (!integer_declaration->signedness) { + if (integer_declaration->byte_order == LITTLE_ENDIAN) + bt_bitfield_write_le(mmap_align_addr(pos->base_mma) + +- pos->mmap_base_offset, unsigned long, ++ pos->mmap_base_offset, unsigned char, + pos->offset, integer_declaration->len, + integer_definition->value._unsigned); + else + bt_bitfield_write_be(mmap_align_addr(pos->base_mma) + +- pos->mmap_base_offset, unsigned long, ++ pos->mmap_base_offset, unsigned char, + pos->offset, integer_declaration->len, + integer_definition->value._unsigned); + } else { + if (integer_declaration->byte_order == LITTLE_ENDIAN) + bt_bitfield_write_le(mmap_align_addr(pos->base_mma) + +- pos->mmap_base_offset, unsigned long, ++ pos->mmap_base_offset, unsigned char, + pos->offset, integer_declaration->len, + integer_definition->value._signed); + else + bt_bitfield_write_be(mmap_align_addr(pos->base_mma) + +- pos->mmap_base_offset, unsigned long, ++ pos->mmap_base_offset, unsigned char, + pos->offset, integer_declaration->len, + integer_definition->value._signed); + } +-- +1.8.3.1 + 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 @@ +From cae67efbd9ddf2cee6bbefec076dc8933ababc43 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fredrik=20Markstr=C3=B6m?= +Date: Fri, 16 May 2014 10:10:38 +0800 +Subject: [PATCH] Fix: Align buffers from objstack_alloc on sizeof(void *) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Backport + +The buffers from objstack_alloc will store pointers, so they must +be aligned on a pointer's size, or else it will cause issues on the +CPUs which do not support unaligned addresses access. + +Signed-off-by: Fredrik Markstrom +Signed-off-by: Roy Li +Signed-off-by: Jérémie Galarneau +--- + formats/ctf/metadata/objstack.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/formats/ctf/metadata/objstack.c b/formats/ctf/metadata/objstack.c +index 9e264a4..14d9252 100644 +--- a/formats/ctf/metadata/objstack.c ++++ b/formats/ctf/metadata/objstack.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + + #define OBJSTACK_INIT_LEN 128 + #define OBJSTACK_POISON 0xcc +@@ -39,7 +40,7 @@ struct objstack_node { + struct bt_list_head node; + size_t len; + size_t used_len; +- char data[]; ++ char __attribute__ ((aligned (sizeof(void *)))) data[]; + }; + + BT_HIDDEN +@@ -118,6 +119,8 @@ void *objstack_alloc(struct objstack *objstack, size_t len) + struct objstack_node *last_node; + void *p; + ++ len = ALIGN(len, sizeof(void *)); ++ + /* Get last node */ + last_node = bt_list_entry(objstack->head.prev, + struct objstack_node, node); +-- +1.7.10.4 + 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 @@ +SUMMARY = "Babeltrace - Trace Format Babel Tower" +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." +HOMEPAGE = "http://www.efficios.com/babeltrace/" +BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace" + +LICENSE = "MIT & GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa" + +inherit autotools pkgconfig + +DEPENDS = "glib-2.0 util-linux popt bison-native flex-native" + +SRCREV = "66c2a20b4391fb5c7f870aeb0dde854f0ae1fc79" +PV = "1.2.1+git${SRCPV}" + +SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.2 \ + file://0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch \ + file://Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch \ + file://0001-Fix-don-t-perform-unaligned-integer-read-writes.patch \ +" + +S = "${WORKDIR}/git" + +do_configure_prepend () { + ( cd ${S}; ${S}/bootstrap ) +} 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 @@ +Upstream-Status: Backport +Signed-off-by: Bruce Ashfield + +From d3de7f1468be0b18145ff85b3c1a7c7fb1d48c15 Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Fri, 25 Jul 2014 12:30:43 -0400 +Subject: [PATCH 1/3] Fix: noargs probes should calculate alignment and event + length + +A noargs probe could have event fields. noargs just means that the probe +does not receive any argument as parameter. However, it could very well +serialize data into fields (global variables, constants, etc). + +It just happens that LTTng does not serialize any data in noargs events +at the moment, but this may very well change. + +The if (0) with (void) variable access strategy to stop compiler from +complaining from unused variables does not seem to work as expected with +gcc 4.9.1. Use "unused" attribute instead. + +Signed-off-by: Mathieu Desnoyers +--- + probes/lttng-events.h | 49 +++++++++++++++++++++++++++++++++++-------------- + 1 file changed, 35 insertions(+), 14 deletions(-) + +diff --git a/probes/lttng-events.h b/probes/lttng-events.h +index 596b70608584..ba9563b15cf9 100644 +--- a/probes/lttng-events.h ++++ b/probes/lttng-events.h +@@ -456,10 +456,19 @@ static __used struct lttng_probe_desc TP_ID(__probe_desc___, TRACE_SYSTEM) = { + static inline size_t __event_get_size__##_name(size_t *__dynamic_len, _proto) \ + { \ + size_t __event_len = 0; \ +- unsigned int __dynamic_len_idx = 0; \ ++ unsigned int __dynamic_len_idx __attribute__((unused)) = 0; \ ++ \ ++ _tstruct \ ++ return __event_len; \ ++} ++ ++#undef DECLARE_EVENT_CLASS_NOARGS ++#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \ ++static inline size_t __event_get_size__##_name(size_t *__dynamic_len) \ ++{ \ ++ size_t __event_len = 0; \ ++ unsigned int __dynamic_len_idx __attribute__((unused)) = 0; \ + \ +- if (0) \ +- (void) __dynamic_len_idx; /* don't warn if unused */ \ + _tstruct \ + return __event_len; \ + } +@@ -514,6 +523,15 @@ static inline size_t __event_get_align__##_name(_proto) \ + return __event_align; \ + } + ++#undef DECLARE_EVENT_CLASS_NOARGS ++#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \ ++static inline size_t __event_get_align__##_name(void) \ ++{ \ ++ size_t __event_align = 1; \ ++ _tstruct \ ++ return __event_align; \ ++} ++ + #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) + + +@@ -553,12 +571,16 @@ static inline size_t __event_get_align__##_name(_proto) \ + #undef TP_STRUCT__entry + #define TP_STRUCT__entry(args...) args + +-#undef DECLARE_EVENT_CLASS +-#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \ ++#undef DECLARE_EVENT_CLASS_NOARGS ++#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \ + struct __event_typemap__##_name { \ + _tstruct \ + }; + ++#undef DECLARE_EVENT_CLASS ++#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \ ++ DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) ++ + #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) + + +@@ -760,15 +782,11 @@ static void __event_probe__##_name(void *__data, _proto) \ + struct lttng_channel *__chan = __event->chan; \ + struct lib_ring_buffer_ctx __ctx; \ + size_t __event_len, __event_align; \ +- size_t __dynamic_len_idx = 0; \ +- size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)]; \ +- struct __event_typemap__##_name __typemap; \ ++ size_t __dynamic_len_idx __attribute__((unused)) = 0; \ ++ size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)] __attribute__((unused)); \ ++ struct __event_typemap__##_name __typemap __attribute__((unused)); \ + int __ret; \ + \ +- if (0) { \ +- (void) __dynamic_len_idx; /* don't warn if unused */ \ +- (void) __typemap; /* don't warn if unused */ \ +- } \ + if (!_TP_SESSION_CHECK(session, __chan->session)) \ + return; \ + if (unlikely(!ACCESS_ONCE(__chan->session->active))) \ +@@ -800,6 +818,9 @@ static void __event_probe__##_name(void *__data) \ + struct lttng_channel *__chan = __event->chan; \ + struct lib_ring_buffer_ctx __ctx; \ + size_t __event_len, __event_align; \ ++ size_t __dynamic_len_idx __attribute__((unused)) = 0; \ ++ size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)] __attribute__((unused)); \ ++ struct __event_typemap__##_name __typemap __attribute__((unused)); \ + int __ret; \ + \ + if (!_TP_SESSION_CHECK(session, __chan->session)) \ +@@ -810,8 +831,8 @@ static void __event_probe__##_name(void *__data) \ + return; \ + if (unlikely(!ACCESS_ONCE(__event->enabled))) \ + return; \ +- __event_len = 0; \ +- __event_align = 1; \ ++ __event_len = __event_get_size__##_name(__dynamic_len); \ ++ __event_align = __event_get_align__##_name(); \ + lib_ring_buffer_ctx_init(&__ctx, __chan->chan, __event, __event_len, \ + __event_align, -1); \ + __ret = __chan->ops->event_reserve(&__ctx, __event->id); \ +-- +1.8.1.2 + 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 @@ +From 0007344741ef65259bc52dea72259173dfbf96c0 Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Sun, 13 Jul 2014 13:33:21 -0400 +Subject: [PATCH 2/2] Update compaction instrumentation to 3.16 kernel + +Signed-off-by: Mathieu Desnoyers +--- + instrumentation/events/lttng-module/compaction.h | 45 +++++++++++++++++++++++- + 1 file changed, 44 insertions(+), 1 deletion(-) + +diff --git a/instrumentation/events/lttng-module/compaction.h b/instrumentation/events/lttng-module/compaction.h +index 1b237fa45ab0..22024e9ee582 100644 +--- a/instrumentation/events/lttng-module/compaction.h ++++ b/instrumentation/events/lttng-module/compaction.h +@@ -6,6 +6,7 @@ + + #include + #include ++#include + #include + + DECLARE_EVENT_CLASS(mm_compaction_isolate_template, +@@ -45,6 +46,48 @@ DEFINE_EVENT(mm_compaction_isolate_template, mm_compaction_isolate_freepages, + TP_ARGS(nr_scanned, nr_taken) + ) + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) ++TRACE_EVENT(mm_compaction_migratepages, ++ ++ TP_PROTO(unsigned long nr_all, ++ int migrate_rc, ++ struct list_head *migratepages), ++ ++ TP_ARGS(nr_all, migrate_rc, migratepages), ++ ++ TP_STRUCT__entry( ++ __field(unsigned long, nr_migrated) ++ __field(unsigned long, nr_failed) ++ ), ++ ++ TP_fast_assign( ++ tp_assign(nr_migrated, ++ nr_all - ++ (migrate_rc >= 0 ? migrate_rc : ++ ({ ++ unsigned long nr_failed = 0; ++ struct list_head *page_lru; ++ ++ list_for_each(page_lru, migratepages) ++ nr_failed++; ++ nr_failed; ++ }))) ++ tp_assign(nr_failed, ++ ({ ++ unsigned long nr_failed = 0; ++ struct list_head *page_lru; ++ ++ list_for_each(page_lru, migratepages) ++ nr_failed++; ++ nr_failed; ++ })) ++ ), ++ ++ TP_printk("nr_migrated=%lu nr_failed=%lu", ++ __entry->nr_migrated, ++ __entry->nr_failed) ++) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ + TRACE_EVENT(mm_compaction_migratepages, + + TP_PROTO(unsigned long nr_migrated, +@@ -66,7 +109,7 @@ TRACE_EVENT(mm_compaction_migratepages, + __entry->nr_migrated, + __entry->nr_failed) + ) +- ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ + + #endif /* _TRACE_COMPACTION_H */ + +-- +1.8.1.2 + 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 @@ +Upstream-Status: Backport +Signed-off-by: Bruce Ashfield + +From 458c2022e992c057bd21d02e4c77bcc7d4d6cd6c Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Thu, 21 Aug 2014 11:15:50 -0400 +Subject: [PATCH 3/3] Update kvm instrumentation: compile on 3.17-rc1 + +Signed-off-by: Mathieu Desnoyers +--- + instrumentation/events/lttng-module/arch/x86/kvm/trace.h | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h +index 2354884074eb..3c299c58a1cf 100644 +--- a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h ++++ b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h +@@ -724,7 +724,7 @@ TRACE_EVENT(kvm_emulate_insn, + tp_memcpy(insn, + vcpu->arch.emulate_ctxt.decode.fetch.data, + 15) +-#else ++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) + tp_assign(rip, vcpu->arch.emulate_ctxt.fetch.start) + tp_assign(csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS)) + tp_assign(len, vcpu->arch.emulate_ctxt._eip +@@ -732,6 +732,16 @@ TRACE_EVENT(kvm_emulate_insn, + tp_memcpy(insn, + vcpu->arch.emulate_ctxt.fetch.data, + 15) ++#else ++ tp_assign(rip, vcpu->arch.emulate_ctxt._eip - ++ (vcpu->arch.emulate_ctxt.fetch.ptr - ++ vcpu->arch.emulate_ctxt.fetch.data)) ++ tp_assign(csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS)) ++ tp_assign(len, vcpu->arch.emulate_ctxt.fetch.ptr - ++ vcpu->arch.emulate_ctxt.fetch.data) ++ tp_memcpy(insn, ++ vcpu->arch.emulate_ctxt.fetch.data, ++ 15) + #endif + tp_assign(flags, kei_decode_mode(vcpu->arch.emulate_ctxt.mode)) + tp_assign(failed, failed) +-- +1.8.1.2 + 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 @@ +Upstream-Status: Backport +Signed-off-by: Bruce Ashfield + +From 4ba1f53c5aebb4433fedc25d65af010274985043 Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Thu, 21 Aug 2014 10:53:12 -0400 +Subject: [PATCH 2/3] Update statedump to 3.17 nsproxy locking + +This Linux upstream commit introduces locking strategy back and forth: + +commit 728dba3a39c66b3d8ac889ddbe38b5b1c264aec3 +Author: Eric W. Biederman +Date: Mon Feb 3 19:13:49 2014 -0800 + + namespaces: Use task_lock and not rcu to protect nsproxy + +Use the task lock starting from kernel 3.17 rather than RCU to access +the task nsproxy. + +Signed-off-by: Mathieu Desnoyers +--- + lttng-statedump-impl.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c +index dad51ddaa250..e4caa488e436 100644 +--- a/lttng-statedump-impl.c ++++ b/lttng-statedump-impl.c +@@ -378,6 +378,9 @@ int lttng_list_interrupts(struct lttng_session *session) + } + #endif + ++/* ++ * Called with task lock held. ++ */ + static + void lttng_statedump_process_ns(struct lttng_session *session, + struct task_struct *p, +@@ -389,8 +392,18 @@ void lttng_statedump_process_ns(struct lttng_session *session, + struct nsproxy *proxy; + struct pid_namespace *pid_ns; + ++ /* ++ * Back and forth on locking strategy within Linux upstream for nsproxy. ++ * See Linux upstream commit 728dba3a39c66b3d8ac889ddbe38b5b1c264aec3 ++ * "namespaces: Use task_lock and not rcu to protect nsproxy" ++ * for details. ++ */ ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) + rcu_read_lock(); + proxy = task_nsproxy(p); ++#else /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */ ++ proxy = p->nsproxy; ++#endif /* #else #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */ + if (proxy) { + pid_ns = lttng_get_proxy_pid_ns(proxy); + do { +@@ -402,7 +415,9 @@ void lttng_statedump_process_ns(struct lttng_session *session, + trace_lttng_statedump_process_state(session, + p, type, mode, submode, status, NULL); + } ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) + rcu_read_unlock(); ++#endif /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */ + } + + static +-- +1.8.1.2 + 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 @@ +From 5defe623568273e9b87da1b817e373ff087fd862 Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Sun, 13 Jul 2014 13:27:01 -0400 +Subject: [PATCH 1/2] Update vmscan instrumentation to 3.16 kernel + +Signed-off-by: Mathieu Desnoyers +--- + instrumentation/events/lttng-module/vmscan.h | 39 ++++++++++++++++++++++++++++ + 1 file changed, 39 insertions(+) + +diff --git a/instrumentation/events/lttng-module/vmscan.h b/instrumentation/events/lttng-module/vmscan.h +index 1fd50ba7c235..0b4aa56761dc 100644 +--- a/instrumentation/events/lttng-module/vmscan.h ++++ b/instrumentation/events/lttng-module/vmscan.h +@@ -238,6 +238,44 @@ TRACE_EVENT(mm_shrink_slab_start, + __entry->total_scan) + ) + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) ++TRACE_EVENT(mm_shrink_slab_end, ++ TP_PROTO(struct shrinker *shr, int nid, int shrinker_retval, ++ long unused_scan_cnt, long new_scan_cnt, long total_scan), ++ ++ TP_ARGS(shr, nid, shrinker_retval, unused_scan_cnt, new_scan_cnt, ++ total_scan), ++ ++ TP_STRUCT__entry( ++ __field(struct shrinker *, shr) ++ __field(int, nid) ++ __field(void *, shrink) ++ __field(long, unused_scan) ++ __field(long, new_scan) ++ __field(int, retval) ++ __field(long, total_scan) ++ ), ++ ++ TP_fast_assign( ++ tp_assign(shr, shr) ++ tp_assign(nid, nid) ++ tp_assign(shrink, shr->scan_objects) ++ tp_assign(unused_scan, unused_scan_cnt) ++ tp_assign(new_scan, new_scan_cnt) ++ tp_assign(retval, shrinker_retval) ++ tp_assign(total_scan, total_scan) ++ ), ++ ++ TP_printk("%pF %p: nid %d unused scan count %ld new scan count %ld total_scan %ld last shrinker return val %d", ++ __entry->shrink, ++ __entry->shr, ++ __entry->nid, ++ __entry->unused_scan, ++ __entry->new_scan, ++ __entry->total_scan, ++ __entry->retval) ++) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ + TRACE_EVENT(mm_shrink_slab_end, + TP_PROTO(struct shrinker *shr, int shrinker_retval, + long unused_scan_cnt, long new_scan_cnt), +@@ -274,6 +312,7 @@ TRACE_EVENT(mm_shrink_slab_end, + __entry->total_scan, + __entry->retval) + ) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ + #endif + + DECLARE_EVENT_CLASS(mm_vmscan_lru_isolate_template, +-- +1.8.1.2 + 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 @@ +Upstream-Status: Pending + +In 3.14, bi_sector and bi_size were moved into an iterator, thus +breaking any tracepoints that still expect them in the bio. Fix up +the lttng-module tracepoints to use the new scheme when the kernel +version is >= 3.14. + +Signed-off-by: Tom Zanussi + +diff --git a/instrumentation/events/lttng-module/block.h b/instrumentation/events/lttng-module/block.h +index f3b8bff..0a61543 100644 +--- a/instrumentation/events/lttng-module/block.h ++++ b/instrumentation/events/lttng-module/block.h +@@ -341,9 +341,15 @@ TRACE_EVENT(block_bio_bounce, + TP_fast_assign( + tp_assign(dev, bio->bi_bdev ? + bio->bi_bdev->bd_dev : 0) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) ++ tp_assign(sector, bio->bi_iter.bi_sector) ++ tp_assign(nr_sector, bio->bi_iter.bi_size >> 9) ++ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_assign(sector, bio->bi_sector) + tp_assign(nr_sector, bio->bi_size >> 9) + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_memcpy(comm, current->comm, TASK_COMM_LEN) + ), + +@@ -385,14 +391,24 @@ TRACE_EVENT(block_bio_complete, + + TP_fast_assign( + tp_assign(dev, bio->bi_bdev->bd_dev) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) ++ tp_assign(sector, bio->bi_iter.bi_sector) ++ tp_assign(nr_sector, bio->bi_iter.bi_size >> 9) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_assign(sector, bio->bi_sector) + tp_assign(nr_sector, bio->bi_size >> 9) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ ++ + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)) + tp_assign(error, error) + #else + tp_assign(error, 0) + #endif ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) ++ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + ), + + TP_printk("%d,%d %s %llu + %u [%d]", +@@ -419,9 +435,15 @@ DECLARE_EVENT_CLASS(block_bio_merge, + + TP_fast_assign( + tp_assign(dev, bio->bi_bdev->bd_dev) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) ++ tp_assign(sector, bio->bi_iter.bi_sector) ++ tp_assign(nr_sector, bio->bi_iter.bi_size >> 9) ++ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_assign(sector, bio->bi_sector) + tp_assign(nr_sector, bio->bi_size >> 9) + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_memcpy(comm, current->comm, TASK_COMM_LEN) + ), + +@@ -485,9 +507,15 @@ TRACE_EVENT(block_bio_queue, + + TP_fast_assign( + tp_assign(dev, bio->bi_bdev->bd_dev) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) ++ tp_assign(sector, bio->bi_iter.bi_sector) ++ tp_assign(nr_sector, bio->bi_iter.bi_size >> 9) ++ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_assign(sector, bio->bi_sector) + tp_assign(nr_sector, bio->bi_size >> 9) + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_memcpy(comm, current->comm, TASK_COMM_LEN) + ), + +@@ -513,9 +541,15 @@ DECLARE_EVENT_CLASS(block_bio, + + TP_fast_assign( + tp_assign(dev, bio->bi_bdev ? bio->bi_bdev->bd_dev : 0) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) ++ tp_assign(sector, bio->bi_iter.bi_sector) ++ tp_assign(nr_sector, bio->bi_iter.bi_size >> 9) ++ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_assign(sector, bio->bi_sector) + tp_assign(nr_sector, bio->bi_size >> 9) + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_memcpy(comm, current->comm, TASK_COMM_LEN) + ), + +@@ -587,10 +621,17 @@ DECLARE_EVENT_CLASS(block_get_rq, + + TP_fast_assign( + tp_assign(dev, bio ? bio->bi_bdev->bd_dev : 0) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) ++ tp_assign(sector, bio ? bio->bi_iter.bi_sector : 0) ++ tp_assign(nr_sector, bio ? bio->bi_iter.bi_size >> 9 : 0) ++ blk_fill_rwbs(rwbs, bio ? bio->bi_rw : 0, ++ bio ? bio->bi_iter.bi_size >> 9 : 0) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_assign(sector, bio ? bio->bi_sector : 0) + tp_assign(nr_sector, bio ? bio->bi_size >> 9 : 0) + blk_fill_rwbs(rwbs, bio ? bio->bi_rw : 0, + bio ? bio->bi_size >> 9 : 0) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_memcpy(comm, current->comm, TASK_COMM_LEN) + ), + +@@ -759,9 +800,15 @@ TRACE_EVENT(block_split, + + TP_fast_assign( + tp_assign(dev, bio->bi_bdev->bd_dev) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) ++ tp_assign(sector, bio->bi_iter.bi_sector) ++ tp_assign(new_sector, new_sector) ++ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_assign(sector, bio->bi_sector) + tp_assign(new_sector, new_sector) + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_memcpy(comm, current->comm, TASK_COMM_LEN) + ), + +@@ -805,11 +852,19 @@ TRACE_EVENT(block_remap, + + TP_fast_assign( + tp_assign(dev, bio->bi_bdev->bd_dev) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) ++ tp_assign(sector, bio->bi_iter.bi_sector) ++ tp_assign(nr_sector, bio->bi_iter.bi_size >> 9) ++ tp_assign(old_dev, dev) ++ tp_assign(old_sector, from) ++ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_assign(sector, bio->bi_sector) + tp_assign(nr_sector, bio->bi_size >> 9) + tp_assign(old_dev, dev) + tp_assign(old_sector, from) + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + ), + + 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 @@ +From af48c7b08de4b811d3d974e65e362b86ce8c4a34 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Wed, 10 Dec 2014 03:19:28 -0500 +Subject: [PATCH] compaction: fix mm_compaction_isolate_template build + +linux-stable integrated the 3.16 commit f8c9301fa5a2a [mm/compaction: do +not count migratepages when unnecessary] with the 3.14.25 update. + +So we have to update the lttng-module linux version codes to use the +new definition in builds greater than 3.14.24 or 3.16. + +Signed-off-by: Bruce Ashfield +--- + instrumentation/events/lttng-module/compaction.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/instrumentation/events/lttng-module/compaction.h b/instrumentation/events/lttng-module/compaction.h +index 22024e9ee582..07afbe06f1a6 100644 +--- a/instrumentation/events/lttng-module/compaction.h ++++ b/instrumentation/events/lttng-module/compaction.h +@@ -46,7 +46,7 @@ DEFINE_EVENT(mm_compaction_isolate_template, mm_compaction_isolate_freepages, + TP_ARGS(nr_scanned, nr_taken) + ) + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) || LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,25)) + TRACE_EVENT(mm_compaction_migratepages, + + TP_PROTO(unsigned long nr_all, +@@ -87,7 +87,7 @@ TRACE_EVENT(mm_compaction_migratepages, + __entry->nr_migrated, + __entry->nr_failed) + ) +-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) || LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,25)) */ + TRACE_EVENT(mm_compaction_migratepages, + + TP_PROTO(unsigned long nr_migrated, +-- +2.1.0 + 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 @@ + +Upstream-Status: Backport + +commit 7df57eb5d6bdc85ddcf2b9afb6cd0cacfb22096e +Author: Nitin A Kamble +Date: Thu Sep 25 18:19:43 2014 -0700 + + asoc.h: fix build with v3.17 kernel + + The snd_soc_codec structure has changed in the v3.17 kernel. Some + of the redundant fields have been removed. To be specific this commit + from the v3.17 kernel causes the build failure for lttng-modules. + + |commit f4333203ec933f9272c90c7add01774ec2cf94d3 + |Author: Lars-Peter Clausen + |Date: Mon Jun 16 18:13:02 2014 +0200 + | + | ASoC: Move name and id from CODEC/platform to component + | + | The component struct already has a name and id field which are initialized to + | the same values as the same fields in the CODEC and platform structs. So remove + | them from the CODEC and platform structs and used the ones from the component + | struct instead. + | + | Signed-off-by: Lars-Peter Clausen + | Signed-off-by: Mark Brown + + The asoc.h is changed according to the change in the above kernel commit + to fix the lttng-modules build. The change in the lttng-modules code is + conditional on the kernel version, so that it does not break builds with + previous kernel versions. + + Signed-off-by: Nitin A Kamble + Signed-off-by: Mathieu Desnoyers + +diff --git a/instrumentation/events/lttng-module/asoc.h b/instrumentation/events/lttng-module/asoc.h +index 672bea4..bf9cf86 100644 +--- a/instrumentation/events/lttng-module/asoc.h ++++ b/instrumentation/events/lttng-module/asoc.h +@@ -21,6 +21,14 @@ struct snd_soc_card; + struct snd_soc_dapm_widget; + #endif + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) ++#define CODEC_NAME_FIELD component.name ++#define CODEC_ID_FIELD component.id ++#else ++#define CODEC_NAME_FIELD name ++#define CODEC_ID_FIELD id ++#endif ++ + /* + * Log register events + */ +@@ -32,15 +40,15 @@ DECLARE_EVENT_CLASS(snd_soc_reg, + TP_ARGS(codec, reg, val), + + TP_STRUCT__entry( +- __string( name, codec->name ) ++ __string( name, codec->CODEC_NAME_FIELD ) + __field( int, id ) + __field( unsigned int, reg ) + __field( unsigned int, val ) + ), + + TP_fast_assign( +- tp_strcpy(name, codec->name) +- tp_assign(id, codec->id) ++ tp_strcpy(name, codec->CODEC_NAME_FIELD) ++ tp_assign(id, codec->CODEC_ID_FIELD) + tp_assign(reg, reg) + tp_assign(val, val) + ), +@@ -77,15 +85,15 @@ DECLARE_EVENT_CLASS(snd_soc_preg, + TP_ARGS(platform, reg, val), + + TP_STRUCT__entry( +- __string( name, platform->name ) ++ __string( name, platform->CODEC_NAME_FIELD ) + __field( int, id ) + __field( unsigned int, reg ) + __field( unsigned int, val ) + ), + + TP_fast_assign( +- tp_strcpy(name, platform->name) +- tp_assign(id, platform->id) ++ tp_strcpy(name, platform->CODEC_NAME_FIELD) ++ tp_assign(id, platform->CODEC_ID_FIELD) + tp_assign(reg, reg) + tp_assign(val, val) + ), +@@ -399,17 +407,17 @@ TRACE_EVENT(snd_soc_cache_sync, + TP_ARGS(codec, type, status), + + TP_STRUCT__entry( +- __string( name, codec->name ) ++ __string( name, codec->CODEC_NAME_FIELD ) + __string( status, status ) + __string( type, type ) + __field( int, id ) + ), + + TP_fast_assign( +- tp_strcpy(name, codec->name) ++ tp_strcpy(name, codec->CODEC_NAME_FIELD) + tp_strcpy(status, status) + tp_strcpy(type, type) +- tp_assign(id, codec->id) ++ tp_assign(id, codec->CODEC_ID_FIELD) + ), + + 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 @@ +This is required in order the make the build succeed for +machine k2hk-evm, image enea-image-demo. + +The patch for commit 7bd36014460f793c19e7d6c94dab67b0afcfcb7f is already part of the build. +It is located here: +poky/meta-ti/recipes-kernel/linux/linux-keystone-3.10.10/Fix_HRTICK_related_deadlock_from_ntp_lock.patch +and it is applied for kernel recipe poky/meta-ti/recipes-kernel/linux/linux-keystone_3.10.bb, +that is the kernel used for k2hk-evm. + +In this regard, I removed the check until TI upgrade their +kernels to a supported version. + +Upstream-Status: Not Applicable + +Signed-off-by: Liviu Gheorghisan + +--- +--- a/wrapper/trace-clock.h 2014-07-25 15:54:00.677739746 +0200 ++++ b/wrapper/trace-clock.h 2014-07-25 15:55:49.807390266 +0200 +@@ -36,10 +36,6 @@ + #include "../lttng-kernel-version.h" + #include "random.h" + +-#if LTTNG_KERNEL_RANGE(3,10,0, 3,10,14) || LTTNG_KERNEL_RANGE(3,11,0, 3,11,3) +-#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." +-#endif +- + static inline u64 trace_clock_monotonic_wrapper(void) + { + 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 @@ +Upstream-Status: Inappropriate [embedded specific] + +lttng-modules: replace KERNELDIR with KERNEL_SRC + +Since lttng-modules uses the default way of module.bbclass to +build and install lttng-modules, we do this replacement for +it as-is. + +Signed-off-by: Zumeng Chen + +diff --git a/Makefile b/Makefile +index a9d1cb1..c1b65b9 100644 +--- a/Makefile ++++ b/Makefile +@@ -43,19 +43,19 @@ obj-m += lib/ + endif # CONFIG_TRACEPOINTS + + else # KERNELRELEASE +- KERNELDIR ?= /lib/modules/$(shell uname -r)/build ++ KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build + PWD := $(shell pwd) + CFLAGS = $(EXTCFLAGS) + + default: +- $(MAKE) -C $(KERNELDIR) M=$(PWD) modules ++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules + + modules_install: +- $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install ++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules_install + + clean: +- $(MAKE) -C $(KERNELDIR) M=$(PWD) clean ++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean + + %.i: %.c +- $(MAKE) -C $(KERNELDIR) M=$(PWD) $@ ++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) $@ + endif # KERNELRELEASE +diff --git a/README b/README +index 8c5dd46..6bd3334 100644 +--- a/README ++++ b/README +@@ -27,8 +27,8 @@ access to your full kernel source tree), and use: + If you need to specify the target directory to the kernel you want to build + against, use: + +-% KERNELDIR=path_to_kernel_dir make +-# KERNELDIR=path_to_kernel_dir make modules_install ++% KERNEL_SRC=path_to_kernel_dir make ++# KERNEL_SRC=path_to_kernel_dir make modules_install + # depmod -a kernel_version + + Use lttng-tools to control the tracer. LTTng tools should automatically load +diff --git a/probes/Makefile b/probes/Makefile +index 225803c..3449866 100644 +--- a/probes/Makefile ++++ b/probes/Makefile +@@ -212,18 +212,18 @@ endif + endif + + else +- KERNELDIR ?= /lib/modules/$(shell uname -r)/build ++ KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build + PWD := $(shell pwd) + CFLAGS = $(EXTCFLAGS) + + default: +- $(MAKE) -C $(KERNELDIR) M=$(PWD) modules ++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules + + modules_install: +- $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install ++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules_install + /sbin/depmod -a + + clean: +- $(MAKE) -C $(KERNELDIR) M=$(PWD) clean ++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean + + 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 @@ +SECTION = "devel" +SUMMARY = "Linux Trace Toolkit KERNEL MODULE" +DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules" +LICENSE = "LGPLv2.1 & GPLv2 & MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1412caf5a1aa90d6a48588a4794c0eac \ + file://gpl-2.0.txt;md5=751419260aa954499f7abaabaa882bbe \ + file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad" + +DEPENDS = "virtual/kernel" + +inherit module + +SRCREV = "789fd1d06d07aeb9a403bdce1b3318560cfc6eca" + +COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|arm).*-linux' + +SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.5 \ + file://lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch \ + file://Update-compaction-instrumentation-to-3.16-kernel.patch \ + file://Update-vmscan-instrumentation-to-3.16-kernel.patch \ + file://lttng-modules-remove-kernel-version-check.patch \ + file://Fix-noargs-probes-should-calculate-alignment-and-eve.patch \ + file://Update-statedump-to-3.17-nsproxy-locking.patch \ + file://Update-kvm-instrumentation-compile-on-3.17-rc1.patch \ + file://fix_build_with_v3.17_kernel.patch \ + file://compaction-fix-mm_compaction_isolate_template-build.patch \ + " + +export INSTALL_MOD_DIR="kernel/lttng-modules" +export KERNEL_SRC="${STAGING_KERNEL_DIR}" + + +S = "${WORKDIR}/git" + +do_install_append() { + # Delete empty directories to avoid QA failures if no modules were built + find ${D}/lib -depth -type d -empty -exec rmdir {} \; +} + +python do_package_prepend() { + if not os.path.exists(os.path.join(d.getVar('D', True), 'lib/modules')): + bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN', True)) +} + 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 @@ +#!/bin/sh + +make -C tests installcheck + 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 @@ +diff --git a/Makefile.am b/Makefile.am +index 584f59b..c2bcabd 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -12,3 +12,9 @@ dist_doc_DATA = LICENSE \ + dist_noinst_DATA = CodingStyle + + EXTRA_DIST = extras/lttng-bash_completion gpl-2.0.txt lgpl-2.1.txt ++ ++install-ptest: ++ cp -r $(srcdir)/tests $(DESTDIR) ++ for m in $$(find $(DESTDIR)/tests -name Makefile); do \ ++ sed -i -e 's|^Makefile:|_Makefile:|' $$m; \ ++ done +diff --git a/tests/run.sh b/tests/run.sh +index c6c50fd..6455359 100755 +--- a/tests/run.sh ++++ b/tests/run.sh +@@ -19,4 +19,7 @@ + + [ -z "$1" ] && echo "Error: No testlist. Please specify a testlist to run." && exit 1 + +-prove --merge --exec '' - < $1 ++prove --merge -v --exec '' - < $1 | sed \ ++ -e 's|^ok \(.*\)|PASS: \1|' \ ++ -e 's|^not ok \(.*\)|FAIL: \1|' \ ++ | 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 @@ +diff --git a/Makefile.am b/Makefile.am +index 584f59b..c2bcabd 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -12,3 +12,9 @@ dist_doc_DATA = LICENSE \ + dist_noinst_DATA = CodingStyle + + EXTRA_DIST = extras/lttng-bash_completion gpl-2.0.txt lgpl-2.1.txt ++ ++install-ptest: ++ cp -r $(srcdir)/tests $(DESTDIR) ++ for m in $$(find $(DESTDIR)/tests -name Makefile); do \ ++ sed -i -e 's|^Makefile:|_Makefile:|' $$m; \ ++ done +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 6d5b00d..3774f9d 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -1,14 +1,17 @@ + SUBDIRS = utils regression unit stress + +-if USE_PYTHON +-check-am: ++installcheck-am: + ./run.sh unit_tests + ./run.sh fast_regression ++if USE_PYTHON + ./run.sh with_bindings_regression +-else ++endif ++ + check-am: + ./run.sh unit_tests + ./run.sh fast_regression ++if USE_PYTHON ++ ./run.sh with_bindings_regression + endif + + dist_noinst_SCRIPTS = run.sh unit_tests fast_regression long_regression root_regression with_bindings_regression +diff --git a/tests/run.sh b/tests/run.sh +index c6c50fd..6455359 100755 +--- a/tests/run.sh ++++ b/tests/run.sh +@@ -19,4 +19,7 @@ + + [ -z "$1" ] && echo "Error: No testlist. Please specify a testlist to run." && exit 1 + +-prove --merge --exec '' - < $1 ++prove --merge -v --exec '' - < $1 | sed \ ++ -e 's|^ok \(.*\)|PASS: \1|' \ ++ -e 's|^not ok \(.*\)|FAIL: \1|' \ ++ | 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 @@ +SECTION = "devel" +SUMMARY = "Linux Trace Toolkit Control" +DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \ +to extract program execution details from the Linux operating system \ +and interpret them." + +LICENSE = "GPLv2 & LGPLv2.1" +LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \ + file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca" + +DEPENDS = "liburcu popt lttng-ust libxml2" +RDEPENDS_${PN}-ptest += "make perl bash" + +SRCREV = "8b27cacb277c2cdab791139b08da8eb87ab14a88" +PV = "v2.5.0" + +PYTHON_OPTION = "am_cv_python_pyexecdir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \ + am_cv_python_pythondir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \ + PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}' \ +" +PACKAGECONFIG ??= "lttng-ust" +PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python swig-native" +PACKAGECONFIG[lttng-ust] = ", --disable-lttng-ust, lttng-ust" + +SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.5 \ + file://runtest-2.4.0.patch \ + file://run-ptest \ + " + +S = "${WORKDIR}/git" + +inherit autotools-brokensep ptest pkgconfig + +export KERNELDIR="${STAGING_KERNEL_DIR}" + +FILES_${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \ + ${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" +FILES_${PN}-dbg += "${libdir}/lttng/libexec/.debug \ + ${libdir}/python2.7/site-packages/.debug" +FILES_${PN}-staticdev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a" +FILES_${PN}-dev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.la" + +# Since files are installed into ${libdir}/lttng/libexec we match +# the libexec insane test so skip it. +# Python module needs to keep _lttng.so +INSANE_SKIP_${PN} = "libexec dev-so" +INSANE_SKIP_${PN}-dbg = "libexec" + +do_configure_prepend () { + # Delete a shipped m4 file that overrides our patched one + rm -f ${S}/config/libxml.m4 +} + +do_install_ptest () { + chmod +x ${D}${PTEST_PATH}/tests/utils/utils.sh + for i in `find ${D}${PTEST_PATH} -perm /u+x -type f`; do + sed -e "s:\$TESTDIR.*/src/bin/lttng/\$LTTNG_BIN:\$LTTNG_BIN:g" \ + -e "s:\$TESTDIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \ + -e "s:\$DIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \ + -e "s:\$TESTDIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \ + -e "s:\$DIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \ + -e "s:\$TESTDIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \ + -e "s:\$DIR/../src/bin/lttng-sessiond/lttng-sessiond:\$SESSIOND_BIN:g" \ + -e "s:\$DIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \ + -e "s:\$DIR/../bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \ + -i $i + done + + sed -e "s:src/bin/lttng-sessiond:$bindir:g" \ + -e "s:src/bin/lttng-consumerd:${libexecdir}/libexec/:g" \ + -i ${D}${PTEST_PATH}/tests/regression/run-report.py + sed -e "s:src/bin:bin:g" -e "s:lt-::g" \ + -i ${D}${PTEST_PATH}/tests/utils/utils.sh + sed -e "s:ini_config:\.libs\/ini_config:" \ + -i ${D}${PTEST_PATH}/tests/unit/ini_config/test_ini_config +} 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 @@ +diff --git a/configure.ac b/configure.ac +index f507883..40a57d8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -194,6 +194,8 @@ changequote([,])dnl + s390) NO_UNALIGNED_ACCESS=1 ;; + s390x) NO_UNALIGNED_ACCESS=1 ;; + arm*) NO_UNALIGNED_ACCESS=1 ;; ++ aarch64) NO_UNALIGNED_ACCESS=1 ;; ++ aarch64_be) NO_UNALIGNED_ACCESS=1 ;; + mips*) NO_UNALIGNED_ACCESS=1 ;; + tile*) NO_UNALIGNED_ACCESS=1 ;; + *) 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 @@ +Upstream-Status: Inappropriate [embedded specific] + +Don't build the doc examples - we don't need them and in fact they +never successfully built in previous iterations of the lttng-ust +recipe anyway. + +Signed-off-by: Tom Zanussi + +Index: doc/Makefile.am +=================================================================== +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . examples ++SUBDIRS = . + + dist_man_MANS = man/lttng-gen-tp.1 \ + 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 @@ +SUMMARY = "Linux Trace Toolkit Userspace Tracer 2.x" +DESCRIPTION = "The LTTng UST 2.x package contains the userspace tracer library to trace userspace codes." +HOMEPAGE = "http://lttng.org/ust" +BUGTRACKER = "https://bugs.lttng.org/projects/lttng-ust" + +LICENSE = "LGPLv2.1+ & MIT & GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=c963eb366b781252b0bf0fdf1624d9e9 \ + file://snprintf/snprintf.c;endline=32;md5=d3d544959d8a3782b2e07451be0a903c \ + file://snprintf/various.h;endline=31;md5=89f2509b6b4682c4fc95255eec4abe44" + +inherit autotools lib_package + +DEPENDS = "liburcu util-linux" +RDEPENDS_${PN}-bin = "python-core" + +# For backwards compatibility after rename +RPROVIDES_${PN} = "lttng2-ust" +RREPLACES_${PN} = "lttng2-ust" +RCONFLICTS_${PN} = "lttng2-ust" + +SRCREV = "ce59a997afdb7dc8af02b464430bb7e35549fa66" +PV = "2.5.0" +PE = "2" + +SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.5 \ + file://lttng-ust-doc-examples-disable.patch \ + file://add-aarch64.patch \ + " + +S = "${WORKDIR}/git" + +do_configure_prepend () { + ( cd ${S}; ${S}/bootstrap ) +} 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 @@ +Upstream-Status: Inappropriate [licensing] + +Index: modutils-initscripts-1.0/LICENSE +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ modutils-initscripts-1.0/LICENSE 2010-12-06 14:26:03.570339002 -0800 +@@ -0,0 +1 @@ ++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 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: module-init-tools +# Required-Start: +# Required-Stop: +# Should-Start: checkroot +# Should-stop: +# Default-Start: S +# Default-Stop: +# Short-Description: Process /etc/modules. +# Description: Load the modules listed in /etc/modules. +### END INIT INFO + +LOAD_MODULE=modprobe +[ -f /proc/modules ] || exit 0 +[ -f /etc/modules ] || [ -d /etc/modules-load.d ] || exit 0 +[ -e /sbin/modprobe ] || LOAD_MODULE=insmod + +if [ ! -f /lib/modules/`uname -r`/modules.dep ]; then + [ "$VERBOSE" != no ] && echo "Calculating module dependencies ..." + depmod -Ae +fi + +loaded_modules=" " + +process_file() { + file=$1 + + (cat $file; echo; ) | + while read module args + do + case "$module" in + \#*|"") continue ;; + esac + [ -n "$(echo $loaded_modules | grep " $module ")" ] && continue + [ "$VERBOSE" != no ] && echo -n "$module " + eval "$LOAD_MODULE $module $args >/dev/null 2>&1" + loaded_modules="${loaded_modules}${module} " + done +} + +[ "$VERBOSE" != no ] && echo -n "Loading modules: " +[ -f /etc/modules ] && process_file /etc/modules + +[ -d /etc/modules-load.d ] || exit 0 + +for f in /etc/modules-load.d/*.conf; do + process_file $f +done +[ "$VERBOSE" != no ] && echo + +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 @@ +SUMMARY = "Initscript for auto-loading kernel modules on boot" +SECTION = "base" +LICENSE = "PD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7bf87fc37976e93ec66ad84fac58c098" +SRC_URI = "file://modutils.sh \ + file://PD.patch" +PR = "r7" + +INITSCRIPT_NAME = "modutils.sh" +INITSCRIPT_PARAMS = "start 05 S ." + +inherit update-rc.d + +do_compile () { +} + +do_install () { + install -d ${D}${sysconfdir}/init.d/ + install -m 0755 ${WORKDIR}/modutils.sh ${D}${sysconfdir}/init.d/ +} + +DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}" +pkg_postinst_${PN} () { + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + if [ -n "$D" ]; then + OPTS="--root=$D" + fi + systemctl $OPTS mask modutils.service + fi +} 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 @@ +SUMMARY = "System-Wide Profiler" +DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \ +of profiling all running code at low overhead." +HOMEPAGE = "http://oprofile.sourceforge.net/news/" +BUGTRACKER = "http://sourceforge.net/tracker/?group_id=16191&atid=116191" + +LICENSE = "LGPLv2.1+ & GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://libopagent/opagent.h;beginline=5;endline=26;md5=4f16f72c7a493d8a4704aa18d03d15c6 \ + " +SECTION = "devel" + +DEPENDS = "popt binutils" +RDEPENDS_${PN} = "binutils-symlinks" +RRECOMMENDS_${PN} = "kernel-vmlinux" + +FILES_${PN} = "${bindir} ${libdir}/${BPN}/lib*${SOLIBS} ${datadir}/${BPN}" +FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/lib*.la" +FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a" + +SRC_URI = "file://opstart.patch \ + file://acinclude.m4 \ + file://automake-foreign.patch \ + file://oprofile-cross-compile-tests.patch \ + file://run-ptest \ + file://root-home-dir.patch" + +inherit autotools-brokensep pkgconfig ptest + +EXTRA_OECONF = "--with-kernel=${STAGING_KERNEL_DIR} --without-x" +do_configure () { + cp ${WORKDIR}/acinclude.m4 ${S}/ + autotools_do_configure +} + +EXTRA_OEMAKE = "SRCDIR=${PTEST_PATH}/libutil++/tests" +do_compile_ptest() { + oe_runmake check +} + +do_install_ptest() { + subdirs="libdb/tests libutil++/tests libregex/tests libutil/tests libop/tests libdb/tests " + cd ${S} + for tooltest in ${subdirs} + do + find ${tooltest} -perm /u=x -type f| cpio -pvdu ${D}${PTEST_PATH} + done + + # needed by some libop tests + cp -r events ${D}${PTEST_PATH} + + # needed by libregex regex_test + cp libregex/stl.pat ${D}${PTEST_PATH}/libregex + cp libregex/tests/mangled-name ${D}${PTEST_PATH}/libregex/tests + + # needed by litutil++ file_manip_tests + cp libutil++/tests/file_manip_tests.cpp \ + libutil++/tests/file_manip_tests.o ${D}${PTEST_PATH}/libutil++/tests +} 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 @@ +From ca3f796b3a7742215ed35b56fc072595174c410e Mon Sep 17 00:00:00 2001 +From: Ting Liu +Date: Thu, 5 Sep 2013 07:43:55 -0500 +Subject: [PATCH 1/2] Add freescale e500mc support + +Upstream-Status: Backport + +Signed-off-by: George Stephen +Signed-off-by: Zhenhua Luo +Signed-off-by: Ting Liu +--- + events/Makefile.am | 1 + + events/ppc/e500mc/events | 120 ++++++++++++++++++++++++++++++++++++++++++ + events/ppc/e500mc/unit_masks | 4 ++ + libop/op_cpu_type.c | 1 + + libop/op_cpu_type.h | 1 + + libop/op_events.c | 1 + + utils/ophelp.c | 1 + + 7 files changed, 129 insertions(+), 0 deletions(-) + create mode 100644 events/ppc/e500mc/events + create mode 100644 events/ppc/e500mc/unit_masks + +diff --git a/events/Makefile.am b/events/Makefile.am +index be87781..e496f98 100644 +--- a/events/Makefile.am ++++ b/events/Makefile.am +@@ -76,6 +76,7 @@ event_files = \ + ppc/7450/events ppc/7450/unit_masks \ + ppc/e500/events ppc/e500/unit_masks \ + ppc/e500v2/events ppc/e500v2/unit_masks \ ++ ppc/e500mc/events ppc/e500mc/unit_masks \ + ppc/e300/events ppc/e300/unit_masks \ + tile/tile64/events tile/tile64/unit_masks \ + tile/tilepro/events tile/tilepro/unit_masks \ +diff --git a/events/ppc/e500mc/events b/events/ppc/e500mc/events +new file mode 100644 +index 0000000..8197a7d +--- /dev/null ++++ b/events/ppc/e500mc/events +@@ -0,0 +1,120 @@ ++# e500mc Events ++# ++# Copyright (C) 2010 Freescale Semiconductor, Inc. ++# ++event:0x1 counters:0,1,2,3 um:zero minimum:100 name:CPU_CLK : Cycles ++event:0x2 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_INSNS : Completed Instructions (0, 1, or 2 per cycle) ++event:0x3 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_OPS : Completed Micro-ops (counts 2 for load/store w/update) ++event:0x4 counters:0,1,2,3 um:zero minimum:500 name:INSTRUCTION_FETCHES : Instruction fetches ++event:0x5 counters:0,1,2,3 um:zero minimum:500 name:DECODED_OPS : Micro-ops decoded ++event:0x8 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_BRANCHES : Branch Instructions completed ++event:0x9 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_LOAD_OPS : Load micro-ops completed ++event:0xa counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_STORE_OPS : Store micro-ops completed ++event:0xb counters:0,1,2,3 um:zero minimum:500 name:COMPLETION_REDIRECTS : Number of completion buffer redirects ++event:0xc counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_FINISHED : Branches finished ++event:0xd counters:0,1,2,3 um:zero minimum:500 name:TAKEN_BRANCHES_FINISHED : Taken branches finished ++event:0xe counters:0,1,2,3 um:zero minimum:500 name:BIFFED_BRANCHES_FINISHED : Biffed branches finished ++event:0xf counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_MISPREDICTED : Branch instructions mispredicted due to direction, target, or IAB prediction ++event:0x10 counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_MISPREDICTED_DIRECTION : Branches mispredicted due to direction prediction ++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 ++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 ++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 ++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 ++event:0x15 counters:0,1,2,3 um:zero minimum:500 name:SRS0_SCHEDULE_STALLED : Cycles SRS0 is not empty but 0 instructions scheduled ++event:0x16 counters:0,1,2,3 um:zero minimum:500 name:SRS1_SCHEDULE_STALLED : Cycles SRS1 is not empty but 0 instructions scheduled ++event:0x17 counters:0,1,2,3 um:zero minimum:500 name:VRS_SCHEDULE_STALLED : Cycles VRS is not empty but 0 instructions scheduled ++event:0x18 counters:0,1,2,3 um:zero minimum:500 name:LRS_SCHEDULE_STALLED : Cycles LRS is not empty but 0 instructions scheduled ++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 ++event:0x1a counters:0,1,2,3 um:zero minimum:500 name:TOTAL_TRANSLATED : Total Ldst microops translated. ++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.) ++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.) ++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.) ++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) ++event:0x1f counters:0,1,2,3 um:zero minimum:500 name:CACHEINHIBITED_ACCESSES_TRANSLATED : Number of cache inhibited accesses translated ++event:0x20 counters:0,1,2,3 um:zero minimum:500 name:GUARDED_LOADS_TRANSLATED : Number of guarded loads translated ++event:0x21 counters:0,1,2,3 um:zero minimum:500 name:WRITETHROUGH_STORES_TRANSLATED : Number of write-through stores translated ++event:0x22 counters:0,1,2,3 um:zero minimum:500 name:MISALIGNED_ACCESSES_TRANSLATED : Number of misaligned load or store accesses translated. ++event:0x23 counters:0,1,2,3 um:zero minimum:500 name:TOTAL_ALLOCATED_DLFB : Total allocated to dLFB ++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.) ++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.) ++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.) ++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.) ++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.) ++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. ++event:0x2a counters:0,1,2,3 um:zero minimum:500 name:DL1_CASTOUTS : dL1 castouts. Does not count castouts due to DCBF. ++event:0x2b counters:0,1,2,3 um:zero minimum:500 name:DETECTED_REPLAYS : Times detected replay condition - Load miss with dLFB full. ++event:0x2c counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_QUEUE_FULL_REPLAYS : Load miss with load queue full. ++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. ++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. ++event:0x2f counters:0,1,2,3 um:zero minimum:500 name:ADDRESS_COLLISION_REPLAYS : Address collision. ++event:0x30 counters:0,1,2,3 um:zero minimum:500 name:DMMU_MISS_REPLAYS : DMMU_MISS_REPLAYS : DMMU miss. ++event:0x31 counters:0,1,2,3 um:zero minimum:500 name:DMMU_BUSY_REPLAYS : DMMU_BUSY_REPLAYS : DMMU busy. ++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. ++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. ++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. ++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. ++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. ++event:0x37 counters:0,1,2,3 um:zero minimum:500 name:ADDRESS_COLLISION_CYCLES : Cycles stalled on replay condition - Address collision. ++event:0x38 counters:0,1,2,3 um:zero minimum:500 name:DMMU_MISS_CYCLES : Cycles stalled on replay condition - DMMU miss. ++event:0x39 counters:0,1,2,3 um:zero minimum:500 name:DMMU_BUSY_CYCLES : Cycles stalled on replay condition - DMMU busy. ++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. ++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.) ++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. ++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) ++event:0x3e counters:0,1,2,3 um:zero minimum:500 name:IMMU_TLB4K_RELOADS : iMMU TLB4K reloads ++event:0x3f counters:0,1,2,3 um:zero minimum:500 name:IMMU_VSP_RELOADS : iMMU VSP reloads ++event:0x40 counters:0,1,2,3 um:zero minimum:500 name:DMMU_TLB4K_RELOADS : dMMU TLB4K reloads ++event:0x41 counters:0,1,2,3 um:zero minimum:500 name:DMMU_VSP_RELOADS : dMMU VSP reloads ++event:0x42 counters:0,1,2,3 um:zero minimum:500 name:L2MMU_MISSES : Counts iTLB/dTLB error interrupt ++event:0x43 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_REQUESTS : Number of master transactions. (Number of master TSs.) ++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.) ++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.) ++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.) ++event:0x48 counters:0,1,2,3 um:zero minimum:500 name:SNOOP_REQUESTS : Number of externally generated snoop requests. (Counts snoop TSs.) ++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) ++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.) ++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. ++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. ++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. ++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. ++event:0x56 counters:0,1,2,3 um:zero minimum:500 name:INTERRUPTS : Number of interrupts taken ++event:0x57 counters:0,1,2,3 um:zero minimum:500 name:EXTERNAL_INTERRUPTS : Number of external input interrupts taken ++event:0x58 counters:0,1,2,3 um:zero minimum:500 name:CRITICAL_INTERRUPTS : Number of critical input interrupts taken ++event:0x59 counters:0,1,2,3 um:zero minimum:500 name:SC_TRAP_INTERRUPTS : Number of system call and trap interrupts ++event:0x5b counters:0,1,2,3 um:zero minimum:500 name:L2_LINEFILL_REQ : Number L2 Linefill requests ++event:0x5c counters:0,1,2,3 um:zero minimum:500 name:L2_VICTIM_SELECT : Number L2 Victim selects ++event:0x6e counters:0,1,2,3 um:zero minimum:500 name:L2_ACCESS : Number L2 cache accesses ++event:0x6f counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_ACCESS : Number L2 hit cache accesses ++event:0x70 counters:0,1,2,3 um:zero minimum:500 name:L2_DATA_ACCESS : Number L2 data cache accesses ++event:0x71 counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_DATA_ACCESS : Number L2 hit data cache accesses ++event:0x72 counters:0,1,2,3 um:zero minimum:500 name:L2_INST_ACCESS : Number L2 instruction cache accesses ++event:0x73 counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_INST_ACCESS : Number L2 hit instruction cache accesses ++event:0x74 counters:0,1,2,3 um:zero minimum:500 name:L2_ALLOC : Number L2 cache allocations ++event:0x75 counters:0,1,2,3 um:zero minimum:500 name:L2_DATA_ALLOC : Number L2 data cache allocations ++event:0x76 counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_DATA_ALLOC : Number L2 dirty data cache allocations ++event:0x77 counters:0,1,2,3 um:zero minimum:500 name:L2_INST_ALLOC : Number L2 instruction cache allocations ++event:0x78 counters:0,1,2,3 um:zero minimum:500 name:L2_UPDATE : Number L2 cache updates ++event:0x79 counters:0,1,2,3 um:zero minimum:500 name:L2_CLEAN_UPDATE : Number L2 cache clean updates ++event:0x7a counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_UPDATE : Number L2 cache dirty updates ++event:0x7b counters:0,1,2,3 um:zero minimum:500 name:L2_CLEAN_REDU_UPDATE : Number L2 cache clean redundant updates ++event:0x7c counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_REDU_UPDATE : Number L2 cache dirty redundant updates ++event:0x7d counters:0,1,2,3 um:zero minimum:500 name:L2_LOCKS : Number L2 cache locks ++event:0x7e counters:0,1,2,3 um:zero minimum:500 name:L2_CASTOUT : Number L2 cache castouts ++event:0x7f counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_DATA_DIRTY : Number L2 cache data dirty hits ++event:0x82 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_CLEAN : Number L2 cache invalidation of clean lines ++event:0x83 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_INCOHER : Number L2 cache invalidation of incoherent lines ++event:0x84 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_COHER : Number L2 cache invalidation of coherent lines ++event:0x94 counters:0,1,2,3 um:zero minimum:500 name:DVT0 : Detection of write to DEVENT with DVT0 set ++event:0x95 counters:0,1,2,3 um:zero minimum:500 name:DVT1 : Detection of write to DEVENT with DVT1 set ++event:0x96 counters:0,1,2,3 um:zero minimum:500 name:DVT2 : Detection of write to DEVENT with DVT2 set ++event:0x97 counters:0,1,2,3 um:zero minimum:500 name:DVT3 : Detection of write to DEVENT with DVT3 set ++event:0x98 counters:0,1,2,3 um:zero minimum:500 name:DVT4 : Detection of write to DEVENT with DVT4 set ++event:0x99 counters:0,1,2,3 um:zero minimum:500 name:DVT5 : Detection of write to DEVENT with DVT5 set ++event:0x9a counters:0,1,2,3 um:zero minimum:500 name:DVT6 : Detection of write to DEVENT with DVT6 set ++event:0x9b counters:0,1,2,3 um:zero minimum:500 name:DVT7 : Detection of write to DEVENT with DVT7 set ++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 ++event:0xb0 counters:0,1,2,3 um:zero minimum:500 name:DECORATED_LOAD : Number of decorated loads. ++event:0xb1 counters:0,1,2,3 um:zero minimum:500 name:DECORATED_STORE : Number of decorated stores ++event:0xb2 counters:0,1,2,3 um:zero minimum:500 name:LOAD_RETRY : Number of load retries ++event:0xb3 counters:0,1,2,3 um:zero minimum:500 name:STWCX_SUCCESS : Number of successful stwcx. instructions ++event:0xb4 counters:0,1,2,3 um:zero minimum:500 name:STWCX_UNSUCCESS : Number of unsuccessful stwcx. instructions +diff --git a/events/ppc/e500mc/unit_masks b/events/ppc/e500mc/unit_masks +new file mode 100644 +index 0000000..395c653 +--- /dev/null ++++ b/events/ppc/e500mc/unit_masks +@@ -0,0 +1,4 @@ ++# e500 possible unit masks ++# ++name:zero type:mandatory default:0x0 ++ 0x0 No unit mask +diff --git a/libop/op_cpu_type.c b/libop/op_cpu_type.c +index 89d5a92..7d50a2d 100644 +--- a/libop/op_cpu_type.c ++++ b/libop/op_cpu_type.c +@@ -125,6 +125,7 @@ static struct cpu_descr const cpu_descrs[MAX_CPU_TYPE] = { + { "AMD64 generic", "x86-64/generic", CPU_AMD64_GENERIC, 4 }, + { "IBM Power Architected Events V1", "ppc64/architected_events_v1", CPU_PPC64_ARCH_V1, 6 }, + { "ppc64 POWER8", "ppc64/power8", CPU_PPC64_POWER8, 6 }, ++ { "e500mc", "ppc/e500mc", CPU_PPC_E500MC, 4 }, + }; + + static size_t const nr_cpu_descrs = sizeof(cpu_descrs) / sizeof(struct cpu_descr); +diff --git a/libop/op_cpu_type.h b/libop/op_cpu_type.h +index aeb6bb2..10f000b 100644 +--- a/libop/op_cpu_type.h ++++ b/libop/op_cpu_type.h +@@ -105,6 +105,7 @@ typedef enum { + CPU_AMD64_GENERIC, /**< AMD64 Generic */ + CPU_PPC64_ARCH_V1, /** < IBM Power architected events version 1 */ + CPU_PPC64_POWER8, /**< ppc64 POWER8 family */ ++ CPU_PPC_E500MC, /**< e500mc */ + MAX_CPU_TYPE + } op_cpu; + +diff --git a/libop/op_events.c b/libop/op_events.c +index bb86833..638dc5c 100644 +--- a/libop/op_events.c ++++ b/libop/op_events.c +@@ -1308,6 +1308,7 @@ void op_default_event(op_cpu cpu_type, struct op_default_event_descr * descr) + + case CPU_PPC_E500: + case CPU_PPC_E500_2: ++ case CPU_PPC_E500MC: + case CPU_PPC_E300: + descr->name = "CPU_CLK"; + break; +diff --git a/utils/ophelp.c b/utils/ophelp.c +index 1b913ca..0647360 100644 +--- a/utils/ophelp.c ++++ b/utils/ophelp.c +@@ -753,6 +753,7 @@ int main(int argc, char const * argv[]) + + case CPU_PPC_E500: + case CPU_PPC_E500_2: ++ case CPU_PPC_E500MC: + event_doc = + "See PowerPC e500 Core Complex Reference Manual\n" + "Chapter 7: Performance Monitor\n" +-- 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 @@ +From 27edaef9c6d66dfc324630ef40cb27e78031eeeb Mon Sep 17 00:00:00 2001 +From: Marcin Juszkiewicz +Date: Tue, 15 Jan 2013 07:37:33 +0100 +Subject: [PATCH] Add rmb() definition for AArch64 architecture + +Signed-off-by: Marcin Juszkiewicz + +Upstream-Status: backport +--- + libperf_events/operf_utils.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/libperf_events/operf_utils.h b/libperf_events/operf_utils.h +index 815d51d..2df00b7 100644 +--- a/libperf_events/operf_utils.h ++++ b/libperf_events/operf_utils.h +@@ -148,6 +148,11 @@ void op_release_resources(void); + #define cpu_relax() asm volatile("":::"memory") + #endif + ++#ifdef __aarch64__ ++#define rmb() asm volatile("dmb ld" ::: "memory") ++#define cpu_relax() asm volatile("yield" ::: "memory") ++#endif ++ + #ifdef __mips__ + #include + #define rmb() asm volatile( \ +-- +1.8.0 + 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 @@ +Upstream-Status: Backport + +From 63b5692aace5ff6022f892822b4bfdc51ed25bfb Mon Sep 17 00:00:00 2001 +From: Alan Modra +Date: Fri, 2 May 2014 07:54:08 -0500 +Subject: [PATCH] Tidy powerpc64 bfd target check + +Testing for a bfd_target vector might (will!) break. See +https://sourceware.org/ml/binutils/2014-04/msg00283.html + +It's safer to ask BFD for the target name. I left the direct target +vector checks in configure tests, and updated them, even though the +target vector is no longer used in oprofile code, because a run-time +configure test for powerpc64 support in bfd: + #include + int main(void) + { return !bfd_find_target("elf64-powerpc", (void *)0); } +unfortunately isn't possible when cross-compiling. + +The bfd_target vector tests could be omitted if we aren't bothered by +the small runtime overhead of a strncmp on targets other than +powerpc64. + + * libutil++/bfd_support.cpp (get_synth_symbols): Don't check for + ppc64 target vector, use bfd_get_target to return the target + name instead. + * m4/binutils.m4: Modernize bfd_get_synthetic_symtab checks to + use AC_LINK_IFELSE. Check for either powerpc_elf64_vec or + bfd_elf64_powerpc_vec. + +Signed-off-by: Alan Modra +--- + libutil++/bfd_support.cpp | 10 +++++++-- + m4/binutils.m4 | 50 ++++++++++++++++++++++----------------------- + 2 files changed, 33 insertions(+), 27 deletions(-) + +Index: oprofile-0.9.9/libutil++/bfd_support.cpp +=================================================================== +--- oprofile-0.9.9.orig/libutil++/bfd_support.cpp 2013-07-29 08:55:06.000000000 -0700 ++++ oprofile-0.9.9/libutil++/bfd_support.cpp 2014-05-02 09:12:05.761146347 -0700 +@@ -633,10 +633,16 @@ + + bool bfd_info::get_synth_symbols() + { +- extern const bfd_target bfd_elf64_powerpc_vec; +- extern const bfd_target bfd_elf64_powerpcle_vec; +- bool is_elf64_powerpc_target = (abfd->xvec == &bfd_elf64_powerpc_vec) +- || (abfd->xvec == &bfd_elf64_powerpcle_vec); ++ const char* targname = bfd_get_target(abfd); ++ // Match elf64-powerpc and elf64-powerpc-freebsd, but not ++ // elf64-powerpcle. elf64-powerpcle is a different ABI without ++ // function descriptors, so we don't need the synthetic ++ // symbols to have function code marked by a symbol. ++ bool is_elf64_powerpc_target = (!strncmp(targname, "elf64-powerpc", 13) ++ && (targname[13] == 0 ++ || targname[13] == '-')); ++ ++ + + if (!is_elf64_powerpc_target) + return false; +Index: oprofile-0.9.9/m4/binutils.m4 +=================================================================== +--- oprofile-0.9.9.orig/m4/binutils.m4 2013-07-29 08:55:07.000000000 -0700 ++++ oprofile-0.9.9/m4/binutils.m4 2014-05-02 09:07:32.471148147 -0700 +@@ -22,32 +22,32 @@ + + AC_LANG_PUSH(C) + # Determine if bfd_get_synthetic_symtab macro is available +-OS="`uname`" +-if test "$OS" = "Linux"; then +- AC_MSG_CHECKING([whether bfd_get_synthetic_symtab() exists in BFD library]) +- rm -f test-for-synth +- AC_LANG_CONFTEST( +- [AC_LANG_PROGRAM([[#include ]], +- [[asymbol * synthsyms; bfd * ibfd = 0; +- long synth_count = bfd_get_synthetic_symtab(ibfd, 0, 0, 0, 0, &synthsyms); +- extern const bfd_target bfd_elf64_powerpc_vec; +- extern const bfd_target bfd_elf64_powerpcle_vec; +- char * ppc_name = bfd_elf64_powerpc_vec.name; +- char * ppcle_name = bfd_elf64_powerpcle_vec.name; +- printf("%s %s\n", ppc_name, ppcle_name);]]) +- ]) +- $CC conftest.$ac_ext $CFLAGS $LDFLAGS $LIBS -o test-for-synth > /dev/null 2>&1 +- if test -f test-for-synth; then +- echo "yes" +- SYNTHESIZE_SYMBOLS='1' +- else +- echo "no" +- SYNTHESIZE_SYMBOLS='0' +- fi +- AC_DEFINE_UNQUOTED(SYNTHESIZE_SYMBOLS, $SYNTHESIZE_SYMBOLS, [Synthesize special symbols when needed]) +- rm -f test-for-synth* ++AC_MSG_CHECKING([whether bfd_get_synthetic_symtab() exists in BFD library]) ++AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ++ ]], ++ [[asymbol * synthsyms; bfd * ibfd = 0; ++ long synth_count = bfd_get_synthetic_symtab(ibfd, 0, 0, 0, 0, &synthsyms); ++ extern const bfd_target powerpc_elf64_vec; ++ char *ppc_name = powerpc_elf64_vec.name; ++ printf("%s\n", ppc_name); ++ ]])], ++ [AC_MSG_RESULT([yes]) ++ SYNTHESIZE_SYMBOLS=2], ++ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ++ ]], ++ [[asymbol * synthsyms; bfd * ibfd = 0; ++ long synth_count = bfd_get_synthetic_symtab(ibfd, 0, 0, 0, 0, &synthsyms); ++ extern const bfd_target bfd_elf64_powerpc_vec; ++ char *ppc_name = bfd_elf64_powerpc_vec.name; ++ printf("%s\n", ppc_name); ++ ]])], ++ [AC_MSG_RESULT([yes]) ++ SYNTHESIZE_SYMBOLS=1], ++ [AC_MSG_RESULT([no]) ++ SYNTHESIZE_SYMBOLS=0]) ++ ]) ++AC_DEFINE_UNQUOTED(SYNTHESIZE_SYMBOLS, $SYNTHESIZE_SYMBOLS, [Synthesize special symbols when needed]) + +-fi + AC_LANG_POP(C) + ] + ) 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 @@ +From b91794fd855177946719b34ea5cd3822c7993caa Mon Sep 17 00:00:00 2001 +From: Ting Liu +Date: Thu, 5 Sep 2013 07:45:52 -0500 +Subject: [PATCH 2/2] Add freescale e6500 support + +Upstream-Status: Backport + +Signed-off-by: Zhenhua Luo +Signed-off-by: Ting Liu +--- + events/Makefile.am | 1 + + events/ppc/e6500/events | 266 +++++++++++++++++++++++++++++++++++++++++++ + events/ppc/e6500/unit_masks | 4 + + libop/op_cpu_type.c | 1 + + libop/op_cpu_type.h | 1 + + libop/op_events.c | 1 + + utils/ophelp.c | 1 + + 7 files changed, 275 insertions(+), 0 deletions(-) + create mode 100644 events/ppc/e6500/events + create mode 100644 events/ppc/e6500/unit_masks + +diff --git a/events/Makefile.am b/events/Makefile.am +index e496f98..d91d44b 100644 +--- a/events/Makefile.am ++++ b/events/Makefile.am +@@ -77,6 +77,7 @@ event_files = \ + ppc/e500/events ppc/e500/unit_masks \ + ppc/e500v2/events ppc/e500v2/unit_masks \ + ppc/e500mc/events ppc/e500mc/unit_masks \ ++ ppc/e6500/events ppc/e6500/unit_masks \ + ppc/e300/events ppc/e300/unit_masks \ + tile/tile64/events tile/tile64/unit_masks \ + tile/tilepro/events tile/tilepro/unit_masks \ +diff --git a/events/ppc/e6500/events b/events/ppc/e6500/events +new file mode 100644 +index 0000000..f34f82d +--- /dev/null ++++ b/events/ppc/e6500/events +@@ -0,0 +1,266 @@ ++# e6500 Events ++# ++# Copyright (C) 2012 Freescale Semiconductor, Inc. ++# ++event:0x1 counters:0,1,2,3,4,5 um:zero minimum:100 name:CPU_CLK : Cycles ++event:0x2 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_INSNS : Completed Instructions (0, 1, or 2 per cycle) ++event:0x3 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_OPS : Completed Micro-ops ++event:0x5 counters:0,1,2,3,4,5 um:zero minimum:500 name:DECODED_OPS : Micro-ops decoded ++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 ++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 ++event:0x8 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_BRANCHES : Branch Instructions completed ++event:0x9 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_LOAD_OPS : Load micro-ops completed ++event:0xa counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_STORE_OPS : Store micro-ops completed ++event:0xb counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETION_REDIRECTS : Number of completion buffer redirects ++event:0xc counters:0,1,2,3,4,5 um:zero minimum:500 name:BRANCHES_FINISHED : Branches finished ++event:0xd counters:0,1,2,3,4,5 um:zero minimum:500 name:TAKEN_BRANCHES_FINISHED : Taken branches finished ++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 ++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 ++event:0x10 counters:0,1,2,3,4,5 um:zero minimum:500 name:BRANCHES_MISPREDICTED_DIRECTION : Branches mispredicted due to direction prediction ++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 ++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 ++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 ++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 ++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 ++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 ++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 ++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 ++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 ++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 ++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) ++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) ++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 ++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) ++event:0x1f counters:0,1,2,3,4,5 um:zero minimum:500 name:CACHEINHIBITED_ACCESSES_TRANSLATED : Number of cache inhibited accesses translated ++event:0x20 counters:0,1,2,3,4,5 um:zero minimum:500 name:GUARDED_LOADS_TRANSLATED : Number of guarded loads translated ++event:0x21 counters:0,1,2,3,4,5 um:zero minimum:500 name:WRITETHROUGH_STORES_TRANSLATED : Number of write-through stores translated ++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. ++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. ++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. ++event:0x25 counters:0,1,2,3,4,5 um:zero minimum:500 name:GENERATED_FETCH_PREFETCHES : Number of prefetches generated. ++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. ++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 ++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. ++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. ++event:0x2f counters:0,1,2,3,4,5 um:zero minimum:500 name:ADDRESS_COLLISION_REPLAYS : Address collision. ++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. ++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. ++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. ++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. ++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. ++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. ++event:0x37 counters:0,1,2,3,4,5 um:zero minimum:500 name:ADDRESS_COLLISION_CYCLES : Cycles stalled on replay condition - Address collision. ++event:0x38 counters:0,1,2,3,4,5 um:zero minimum:500 name:DTLB_MISS_CYCLES : Cycles stalled on replay condition - DTLB miss. ++event:0x39 counters:0,1,2,3,4,5 um:zero minimum:500 name:DTLB_BUSY_CYCLES : Cycles stalled on replay condition - DTLB busy. ++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. ++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. ++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. ++event:0x3e counters:0,1,2,3,4,5 um:zero minimum:500 name:IMMU_TLB4K_RELOADS : iMMU TLB4K reloads ++event:0x3f counters:0,1,2,3,4,5 um:zero minimum:500 name:IMMU_VSP_RELOADS : iMMU VSP reloads ++event:0x40 counters:0,1,2,3,4,5 um:zero minimum:500 name:DMMU_TLB4K_RELOADS : dMMU TLB4K reloads ++event:0x41 counters:0,1,2,3,4,5 um:zero minimum:500 name:DMMU_VSP_RELOADS : dMMU VSP reloads ++event:0x42 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2MMU_MISSES : Counts iTLB/dTLB error interrupt ++event:0x43 counters:0,1,2,3,4,5 um:zero minimum:500 name:TAKEN_BRANCHES : Completed branch instructions that were taken. ++event:0x44 counters:0,1,2,3,4,5 um:zero minimum:500 name:TAKEN_BLR : Completed blr instructions that were taken. ++event:0x45 counters:0,1,2,3,4,5 um:zero minimum:500 name:BTB_TARGET_MISPREDICT : Number of target mispredicts (BTB). ++event:0x46 counters:0,1,2,3,4,5 um:zero minimum:500 name:MISPREDICT_TARGET_BLR : Number of link stack mispredicts (LS). ++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). ++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. ++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. ++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. ++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. ++event:0x56 counters:0,1,2,3,4,5 um:zero minimum:500 name:INTERRUPTS : Number of interrupts taken ++event:0x57 counters:0,1,2,3,4,5 um:zero minimum:500 name:EXTERNAL_INTERRUPTS : Number of external input interrupts taken ++event:0x58 counters:0,1,2,3,4,5 um:zero minimum:500 name:CRITICAL_INTERRUPTS : Number of critical input interrupts taken ++event:0x59 counters:0,1,2,3,4,5 um:zero minimum:500 name:SC_TRAP_INTERRUPTS : Number of system call and trap interrupts ++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]. ++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. ++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. ++event:0x61 counters:0,1,2,3,4,5 um:zero minimum:500 name:L1_STASH_HIT : Stash hits in L1 Data Cache. ++event:0x63 counters:0,1,2,3,4,5 um:zero minimum:500 name:L1_STASH_REQ : Stash requests to L1 Data Cache. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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 ++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. ++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 ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++event:0x88 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC5S : Every valid IAC5 detection. ++event:0x89 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC6S : Every valid IAC6 detection. ++event:0x8a counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC7S : Every valid IAC7 detection. ++event:0x8b counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC8S : Every valid IAC8 detection. ++event:0x8c counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC1S : Every valid IAC1 detection. ++event:0x8d counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC2S : Every valid IAC2 detection. ++event:0x8e counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC3S : Every valid IAC3 detection. ++event:0x8f counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC4S : Every valid IAC4 detection. ++event:0x90 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DAC1S : Every valid DAC1 detection. ++event:0x91 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DAC2S : Every valid DAC2 detection. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++event:0xa1 counters:0,1,2,3,4,5 um:zero minimum:500 name:FPU_FINISH : FPU finish. ++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). ++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. ++event:0xa4 counters:0,1,2,3,4,5 um:zero minimum:500 name:FPU_DENORM_OUTPUT : FPU denorm output. ++event:0xa5 counters:0,1,2,3,4,5 um:zero minimum:500 name:FPU_FPSCR_FULL_STALL : FPU FPSCR stall. ++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. ++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. ++event:0xa8 counters:0,1,2,3,4,5 um:zero minimum:500 name:FPU_INSTRUCTIONS_GEN_FLAG : FPU instruction sets FPSCR[FEX]. ++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. ++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. ++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. ++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. ++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. ++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) ++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. ++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. ++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 ++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. ++event:0xba counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_SFX_MICROOPS : SFX micro-ops completed. ++event:0xbb counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_SINCLK_SFX_MICROOPS : SFX single-cycle micro-ops completed. ++event:0xbc counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_DBLCLK_SFX_MICROOPS : SFX double-cycle micro-ops completed. ++event:0xbe counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_CFX_INSTRUCTIONS : CFX instructions completed. ++event:0xbf counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_SFX_CFX_INSTRUCTIONS : SFX or CFX instructions completed. ++event:0xc0 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_FPU_INSTRUCTIONS : FPU instructions completed. ++event:0xc1 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_FPR_MICROOPS_LOADS : FPR load micro-ops completed. ++event:0xc2 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_FPR_MICROOPS_STORES : FPR store micro-ops completed. ++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. ++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. ++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. ++event:0xc6 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_ALTIVEC_INSTRUCTIONS : AltiVec instructions completed. (non-LSU). ++event:0xc7 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_ALTIVEC_VSFX_INSTRUCTIONS : AltiVec VSFX instructions completed. ++event:0xc8 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_ALTIVEC_VCFX_INSTRUCTIONS : AltiVec VCFX instructions completed. ++event:0xc9 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_ALTIVEC_VPU_INSTRUCTIONS : AltiVec VPU instructions completed. ++event:0xca counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_ALTIVEC_VFPU_INSTRUCTIONS : AltiVec VFPU instructions completed. ++event:0xcb counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_VR_LOADS_MICROOPS : VR load micro-ops completed. ++event:0xcc counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_VR_STORES_MICROOPS : VR store micro-ops completed. ++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. ++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. ++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. ++event:0xd4 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_CFX_IDLE : Cycles Complex Fixed Point Unit is idle. ++event:0xd5 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_LSU_IDLE : Cycles Load Store Unit is idle. ++event:0xd6 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_BU_IDLE : Cycles Branch Unit is idle. ++event:0xd7 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_FPU_IDLE : Cycles Floating Point Unit is idle. ++event:0xd8 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VPU_IDLE : Cycles AltiVec Permute Unit is idle. ++event:0xd9 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VFPU_IDLE : Cycles AltiVec Floating Point Unit is idle. ++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. ++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. ++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). ++event:0xde counters:0,1,2,3,4,5 um:zero minimum:500 name:L1_CACHE_LOAD_MISSES : Data L1 cache load misses. ++event:0xdf counters:0,1,2,3,4,5 um:zero minimum:500 name:L1_CACHE_STORE_MISSES : Data L1 cache store misses. ++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). ++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. ++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. ++event:0xe3 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_ALLOC : Number of Store Gather Buffer allocates. ++event:0xe4 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_GATHERS : Number of Store Gather Buffer gathers. ++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). ++event:0xe6 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_PROMOTIONS : Number of Store Gather Buffer promotions. ++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). ++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. ++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). ++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). ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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). ++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). ++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). ++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). ++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. ++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. ++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. ++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). ++event:0x100 counters:0,1,2,3,4,5 um:zero minimum:500 name:IMMU_MISSES : Counts misses in the level 1 Instruction MMU. ++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. ++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. ++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. ++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). ++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). ++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). ++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. ++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). ++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. ++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). ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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). ++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). ++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). ++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). ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++event:0x1dd counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_SNOOPS_MINT : Number of L2 Cache snoops causing MINT. ++event:0x1de counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_SNOOPS_SINT : Number of L2 Cache snoops causing SINT. ++event:0x1df counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_SNOOPS_PUSHES : Number of L2 Cache snoop pushes. ++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. ++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. ++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. ++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. ++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. ++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. ++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. ++event:0x1ee counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_SNPQ_STALL : Stall for Snoop Queue entry (cycles). ++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). ++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). ++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). ++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). ++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. ++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). ++ +diff --git a/events/ppc/e6500/unit_masks b/events/ppc/e6500/unit_masks +new file mode 100644 +index 0000000..b7e7a23 +--- /dev/null ++++ b/events/ppc/e6500/unit_masks +@@ -0,0 +1,4 @@ ++# e6500 possible unit masks ++# ++name:zero type:mandatory default:0x0 ++ 0x0 no unit mask +diff --git a/libop/op_cpu_type.c b/libop/op_cpu_type.c +index 7d50a2d..badb7ba 100644 +--- a/libop/op_cpu_type.c ++++ b/libop/op_cpu_type.c +@@ -126,6 +126,7 @@ static struct cpu_descr const cpu_descrs[MAX_CPU_TYPE] = { + { "IBM Power Architected Events V1", "ppc64/architected_events_v1", CPU_PPC64_ARCH_V1, 6 }, + { "ppc64 POWER8", "ppc64/power8", CPU_PPC64_POWER8, 6 }, + { "e500mc", "ppc/e500mc", CPU_PPC_E500MC, 4 }, ++ { "e6500", "ppc/e6500", CPU_PPC_E6500, 6 }, + }; + + static size_t const nr_cpu_descrs = sizeof(cpu_descrs) / sizeof(struct cpu_descr); +diff --git a/libop/op_cpu_type.h b/libop/op_cpu_type.h +index 10f000b..934fe9e 100644 +--- a/libop/op_cpu_type.h ++++ b/libop/op_cpu_type.h +@@ -106,6 +106,7 @@ typedef enum { + CPU_PPC64_ARCH_V1, /** < IBM Power architected events version 1 */ + CPU_PPC64_POWER8, /**< ppc64 POWER8 family */ + CPU_PPC_E500MC, /**< e500mc */ ++ CPU_PPC_E6500, /**< e6500 */ + MAX_CPU_TYPE + } op_cpu; + +diff --git a/libop/op_events.c b/libop/op_events.c +index 638dc5c..9d2aa5e 100644 +--- a/libop/op_events.c ++++ b/libop/op_events.c +@@ -1309,6 +1309,7 @@ void op_default_event(op_cpu cpu_type, struct op_default_event_descr * descr) + case CPU_PPC_E500: + case CPU_PPC_E500_2: + case CPU_PPC_E500MC: ++ case CPU_PPC_E6500: + case CPU_PPC_E300: + descr->name = "CPU_CLK"; + break; +diff --git a/utils/ophelp.c b/utils/ophelp.c +index 0647360..3b2896a 100644 +--- a/utils/ophelp.c ++++ b/utils/ophelp.c +@@ -754,6 +754,7 @@ int main(int argc, char const * argv[]) + case CPU_PPC_E500: + case CPU_PPC_E500_2: + case CPU_PPC_E500MC: ++ case CPU_PPC_E6500: + event_doc = + "See PowerPC e500 Core Complex Reference Manual\n" + "Chapter 7: Performance Monitor\n" +-- 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 @@ +dnl AX_KERNEL_OPTION(option, action-if-found, action-if-not-found) +dnl see if autoconf.h defines the option +AC_DEFUN([AX_KERNEL_OPTION], [ +SAVE_CFLAGS=$CFLAGS +CFLAGS="-I$KINC -O2 -D__KERNEL__" +AC_TRY_COMPILE( [#include ], +[ +#ifndef $1 +break_me_hard(\\\); +#endif +],[$2],[$3],) +CFLAGS=$SAVE_CFLAGS +]) + +dnl Handle the 2.4 module inside module/ +AC_DEFUN([AX_CONFIG_MODULE], +[ +if test ! -f $KINC/linux/autoconf.h; then + AC_MSG_ERROR([no suitably configured kernel include tree found]) +fi + +dnl --- Get Linux kernel version and compile parameters --- + +AC_SUBST(KVERS) +AC_MSG_CHECKING([for kernel version]) +dnl it's like this to handle mandrake's fubar version.h - bug #471448 +eval KVERS=`gcc -I$KINC -E -dM $KINC/linux/version.h | grep -w UTS_RELEASE | awk '{print $[]3}'` +AC_MSG_RESULT([$KVERS]) +case "$KVERS" in +2.2.*|2.4.*) ;; +*) AC_MSG_ERROR([Unsupported kernel version]) +esac + +dnl Check for the minimal kernel version supported +AC_MSG_CHECKING([kernel version]) +AX_KERNEL_VERSION(2, 2, 10, <=, AC_MSG_RESULT([ok]), AC_MSG_ERROR([check html documentation install section])) + +dnl linux/spinlock.h added at some point in past +AC_MSG_CHECKING([for $KINC/linux/spinlock.h]) +if test -f $KINC/linux/spinlock.h; then + EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DHAVE_LINUX_SPINLOCK_HEADER" + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +AC_MSG_CHECKING([for rtc_lock]) +gcc -I$KINC -E $KINC/linux/mc146818rtc.h | grep rtc_lock >/dev/null +if test "$?" -eq 0; then + EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DRTC_LOCK" + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +arch="unknown" +AC_MSG_CHECKING(for x86-64 architecture) +AX_KERNEL_OPTION(CONFIG_X86_64, x8664=1, x8664=0) +AX_MSG_RESULT_YN($x8664) +BUILD_HAMMER=no +if test "$x8664" -eq 1; then + arch="x86" + BUILD_HAMMER=yes +else + AC_MSG_CHECKING(for x86 architecture) + AX_KERNEL_OPTION(CONFIG_X86, x86=1, x86=0) + AX_KERNEL_OPTION(CONFIG_X86_WP_WORKS_OK, x86=1, x86=$x86) + AX_MSG_RESULT_YN($x86) + test "$x86" = 1 && arch="x86" + + if test "$arch" = "unknown"; then + AC_MSG_CHECKING(for ia64 architecture) + AX_KERNEL_OPTION(CONFIG_IA64, ia64=1, ia64=0) + AX_MSG_RESULT_YN($ia64) + test "$ia64" = 1 && arch="ia64" + fi + +fi +AC_SUBST(BUILD_HAMMER) + +test "$arch" = "unknown" && AC_MSG_ERROR(Unsupported architecture) + +dnl check to see if kernel verion appropriate for arch +AC_MSG_CHECKING(arch/kernel version combination) +case "$arch" in +ia64) + AX_KERNEL_VERSION(2, 4, 18, <, AC_MSG_RESULT([ok]), + AC_MSG_ERROR([unsupported arch/kernel])) ;; +*) AC_MSG_RESULT([ok]) +esac + +dnl for now we do not support PREEMPT patch +AC_MSG_CHECKING([for preempt patch]) +AX_KERNEL_OPTION(CONFIG_PREEMPT,preempt=1,preempt=0) +AX_MSG_RESULT_YN([$preempt]) +test "$preempt" = 0 || AC_MSG_ERROR([unsupported kernel configuration : CONFIG_PREEMPT]) + +AC_SUBST(KINC) + +MODINSTALLDIR=/lib/modules/$KVERS + +OPROFILE_MODULE_ARCH=$arch +AC_SUBST(OPROFILE_MODULE_ARCH) +] +) + +dnl AX_MSG_RESULT_YN(a) +dnl results "yes" iff a==1, "no" else +AC_DEFUN([AX_MSG_RESULT_YN], [x=no +test "x$1" = "x1" && x=yes +AC_MSG_RESULT($x)]) + +dnl AX_MALLOC_ATTRIBUTE - see if gcc will take __attribute__((malloc)) +AC_DEFUN([AX_MALLOC_ATTRIBUTE], +[ +AC_MSG_CHECKING([whether malloc attribute is understood]) +SAVE_CFLAGS=$CFLAGS +CFLAGS="-Werror $CFLAGS" +AC_TRY_COMPILE(,[ +void monkey() __attribute__((malloc)); +],AC_MSG_RESULT([yes]); AC_DEFINE(MALLOC_ATTRIBUTE_OK, 1, [whether malloc attribute is understood]), AC_MSG_RESULT([no])) +CFLAGS=$SAVE_CFLAGS +] +) + +dnl builtin_expect is used in module we can't add that in config.h +AC_DEFUN([AX_BUILTIN_EXPECT], +[ +AC_MSG_CHECKING([whether __builtin_expect is understood]) +SAVE_CFLAGS=$CFLAGS +CFLAGS="-Werror $CFLAGS" +AC_TRY_LINK(,[ +int i; +if (__builtin_expect(i, 0)) { } +], +AC_MSG_RESULT([yes]); EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DEXPECT_OK", +AC_MSG_RESULT([no]);) +CFLAGS=$SAVE_CFLAGS +] +) + +dnl AX_EXTRA_DIRS - Let user specify extra dirs for include/libs +AC_DEFUN([AX_EXTRA_DIRS], +[ +AC_ARG_WITH(extra-includes, +[ --with-extra-includes=DIR add extra include paths], + use_extra_includes="$withval", + use_extra_includes=NO +) +if test -n "$use_extra_includes" && \ + test "$use_extra_includes" != "NO"; then + ac_save_ifs=$IFS + IFS=':' + for dir in $use_extra_includes; do + extra_includes="$extra_includes -I$dir" + done + IFS=$ac_save_ifs + CPPFLAGS="$CPPFLAGS $extra_includes" +fi + +AC_ARG_WITH(extra-libs, +[ --with-extra-libs=DIR add extra library paths], + use_extra_libs=$withval, + use_extra_libs=NO +) +if test -n "$use_extra_libs" && \ + test "$use_extra_libs" != "NO"; then + ac_save_ifs=$IFS + IFS=':' + for dir in $use_extra_libs; do + extra_libraries="$extra_libraries -L$dir" + done + IFS=$ac_save_ifs + LDFLAGS="$LDFLAGS $extra_libraries" +fi +] +) + +dnl AX_POPT_CONST - check popt prototype +AC_DEFUN([AX_POPT_CONST], +[ +AC_MSG_CHECKING([popt prototype]) +SAVE_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-Werror $CXXFLAGS" +AC_TRY_COMPILE([#include ], +[ +int c; char **v; +poptGetContext(0, c, v, 0, 0); +], +AC_MSG_RESULT([takes char **]);, +AC_MSG_RESULT([takes const char **]); AC_DEFINE(CONST_POPT, 1, [whether popt prototype takes a const char **])) +CXXFLAGS="$SAVE_CXXFLAGS" +] +) + +dnl AX_CHECK_SSTREAM - check if local sstream is needed to compile OK +AC_DEFUN([AX_CHECK_SSTREAM], +[ +AC_MSG_CHECKING([whether to use included sstream]) +AC_TRY_COMPILE([#include ], [], +AC_MSG_RESULT([no]);, +AC_MSG_RESULT([yes]); OP_CXXFLAGS="$OP_CXXFLAGS -I\${top_srcdir}/include") +] +) + +dnl AX_CHECK_TYPEDEF(typedef_name, type, action-if-true, action-if-false) +dnl exec action-if-true if typedef_name is a typedef to type else exec +dnl action-if-false +dnl currently work only with type typedef'ed in stddef.h +AC_DEFUN([AX_CHECK_TYPEDEF], [ +dnl AC_LANG_PUSH(C) not in autoconf 2.13 +AC_LANG_SAVE +AC_LANG_C +SAVE_CFLAGS=$CFLAGS +CFLAGS="-Werror $CFLAGS" + +AC_TRY_COMPILE( + [ + #include + ], + [ + typedef void (*fct1)($1); + typedef void (*fct2)($2); + fct1 f1 = 0; + fct2 f2 = 0; + if (f1 == f2) {} + ], +[$3],[$4]) + +CFLAGS=$SAVE_CFLAGS +AC_LANG_RESTORE +]) + + +dnl AX_TYPEDEFED_NAME(typedef_name, candidate_list, var_name) +dnl set var_name to the typedef name of $1 which must be in canditate_list +dnl else produce a fatal error +AC_DEFUN([AX_TYPEDEFED_NAME], [ + AC_MSG_CHECKING([type of $1]) + for f in $2; do + AX_CHECK_TYPEDEF($1, $f, $3="$f", $3="") + if test -n "${$3}"; then + break + fi + done + if test -n "${$3}"; then + AC_MSG_RESULT([${$3}]) + else + AC_MSG_ERROR([not found]) + fi +]) + +dnl find a binary in the path +AC_DEFUN([QT_FIND_PATH], +[ + AC_MSG_CHECKING([for $1]) + AC_CACHE_VAL(qt_cv_path_$1, + [ + qt_cv_path_$1="NONE" + if test -n "$$2"; then + qt_cv_path_$1="$$2"; + else + dirs="$3" + qt_save_IFS=$IFS + IFS=':' + for dir in $PATH; do + dirs="$dirs $dir" + done + IFS=$qt_save_IFS + + for dir in $dirs; do + if test -x "$dir/$1"; then + if test -n "$5"; then + evalstr="$dir/$1 $5 2>&1 " + if eval $evalstr; then + qt_cv_path_$1="$dir/$1" + break + fi + else + qt_cv_path_$1="$dir/$1" + break + fi + fi + done + fi + ]) + + if test -z "$qt_cv_path_$1" || test "$qt_cv_path_$1" = "NONE"; then + AC_MSG_RESULT(not found) + $4 + else + AC_MSG_RESULT($qt_cv_path_$1) + $2=$qt_cv_path_$1 + fi +]) + +dnl Find the uic compiler on the path or in qt_cv_dir +AC_DEFUN([QT_FIND_UIC], +[ + QT_FIND_PATH(uic, ac_uic, $qt_cv_dir/bin) + if test -z "$ac_uic" -a "$FATAL" = 1; then + AC_MSG_ERROR([uic binary not found in \$PATH or $qt_cv_dir/bin !]) + fi +]) + +dnl Find the right moc in path/qt_cv_dir +AC_DEFUN([QT_FIND_MOC], +[ + QT_FIND_PATH(moc2, ac_moc2, $qt_cv_dir/bin) + QT_FIND_PATH(moc, ac_moc1, $qt_cv_dir/bin) + + if test -n "$ac_moc1" -a -n "$ac_moc2"; then + dnl found both. Prefer Qt3's if it exists else moc2 + $ac_moc1 -v 2>&1 | grep "Qt 3" >/dev/null + if test "$?" = 0; then + ac_moc=$ac_moc1; + else + ac_moc=$ac_moc2; + fi + else + if test -n "$ac_moc1"; then + ac_moc=$ac_moc1; + else + ac_moc=$ac_moc2; + fi + fi + + if test -z "$ac_moc" -a "$FATAL" = 1; then + AC_MSG_ERROR([moc binary not found in \$PATH or $qt_cv_dir/bin !]) + fi +]) + +dnl check a particular libname +AC_DEFUN([QT_TRY_LINK], +[ + SAVE_LIBS="$LIBS" + LIBS="$LIBS $1" + AC_TRY_LINK([ + #include + #include + ], + [ + QString s("mangle_failure"); + #if (QT_VERSION < 221) + break_me_(\\\); + #endif + ], + qt_cv_libname=$1, + ) + LIBS="$SAVE_LIBS" +]) + +dnl check we can do a compile +AC_DEFUN([QT_CHECK_COMPILE], +[ + AC_MSG_CHECKING([for Qt library name]) + + AC_CACHE_VAL(qt_cv_libname, + [ + AC_LANG_CPLUSPLUS + SAVE_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $QT_INCLUDES $QT_LDFLAGS" + + for libname in -lqt-mt -lqt3 -lqt2 -lqt; + do + QT_TRY_LINK($libname) + if test -n "$qt_cv_libname"; then + break; + fi + done + + CXXFLAGS=$SAVE_CXXFLAGS + ]) + + if test -z "$qt_cv_libname"; then + AC_MSG_RESULT([failed]) + if test "$FATAL" = 1 ; then + AC_MSG_ERROR([Cannot compile a simple Qt executable. Check you have the right \$QTDIR !]) + fi + else + AC_MSG_RESULT([$qt_cv_libname]) + fi +]) + +dnl get Qt version we're using +AC_DEFUN([QT_GET_VERSION], +[ + AC_CACHE_CHECK([Qt version],lyx_cv_qtversion, + [ + AC_LANG_CPLUSPLUS + SAVE_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $QT_INCLUDES" + + cat > conftest.$ac_ext < +"%%%"QT_VERSION_STR"%%%" +EOF + lyx_cv_qtversion=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \ + grep '^"%%%"' 2>/dev/null | \ + sed -e 's/"%%%"//g' -e 's/"//g'` + rm -f conftest.$ac_ext + CPPFLAGS=$SAVE_CPPFLAGS + ]) + + QT_VERSION=$lyx_cv_qtversion + AC_SUBST(QT_VERSION) +]) + +dnl start here +AC_DEFUN([QT_DO_IT_ALL], +[ + dnl Please leave this alone. I use this file in + dnl oprofile. + FATAL=0 + + AC_ARG_WITH(qt-dir, [ --with-qt-dir where the root of Qt is installed ], + [ qt_cv_dir=`eval echo "$withval"/` ]) + + AC_ARG_WITH(qt-includes, [ --with-qt-includes where the Qt includes are. ], + [ qt_cv_includes=`eval echo "$withval"` ]) + + AC_ARG_WITH(qt-libraries, [ --with-qt-libraries where the Qt library is installed.], + [ qt_cv_libraries=`eval echo "$withval"` ]) + + dnl pay attention to $QTDIR unless overridden + if test -z "$qt_cv_dir"; then + qt_cv_dir=$QTDIR + fi + + dnl derive inc/lib if needed + if test -n "$qt_cv_dir"; then + if test -z "$qt_cv_includes"; then + qt_cv_includes=$qt_cv_dir/include + fi + if test -z "$qt_cv_libraries"; then + qt_cv_libraries=$qt_cv_dir/lib + fi + fi + + dnl flags for compilation + QT_INCLUDES= + QT_LDFLAGS= + if test -n "$qt_cv_includes"; then + QT_INCLUDES="-I$qt_cv_includes" + fi + if test -n "$qt_cv_libraries"; then + QT_LDFLAGS="-L$qt_cv_libraries" + fi + AC_SUBST(QT_INCLUDES) + AC_SUBST(QT_LDFLAGS) + + QT_FIND_MOC + MOC=$ac_moc + AC_SUBST(MOC) + QT_FIND_UIC + UIC=$ac_uic + AC_SUBST(UIC) + + QT_CHECK_COMPILE + + QT_LIB=$qt_cv_libname; + AC_SUBST(QT_LIB) + + if test -n "$qt_cv_libname"; then + QT_GET_VERSION + fi +]) + +dnl AX_CXXFLAGS_OPTIONS(var-name, option) +dnl add option to var-name if $CXX support it. +AC_DEFUN([AX_CHECK_PRECOMPILED_HEADER], [ +AC_MSG_CHECKING([whether ${CXX} support precompiled header]) +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +SAVE_CXXFLAGS=$CXXFLAGS +dnl we consider than if -Winvalid-pch is accepted pch will works ... +CXXFLAGS=-Winvalid-pch +dnl but we don't want -Winvalid-pch else compilation will fail due -Werror and +dnl the fact than some pch will be invalid for the given compilation option +AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} -include bits/stdc++.h", AC_MSG_RESULT([no])) +CXXFLAGS=$SAVE_CXXFLAGS +AC_LANG_RESTORE +]) + +dnl AX_CHECK_DOCBOOK +AC_DEFUN([AX_CHECK_DOCBOOK], [ +# It's just rude to go over the net to build +XSLTPROC_FLAGS=--nonet +DOCBOOK_ROOT= +if test ! -f /etc/xml/catalog; then + for i in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh /usr/share/sgml/docbook/xsl-stylesheets/; + do + if test -d "$i"; then + DOCBOOK_ROOT=$i + fi + done + + # Last resort - try net + if test -z "$DOCBOOK_ROOT"; then + XSLTPROC_FLAGS= + fi +else + XML_CATALOG=/etc/xml/catalog + CAT_ENTRY_START='' +fi + +AC_CHECK_PROG(XSLTPROC,xsltproc,xsltproc,) +XSLTPROC_WORKS=no +if test -n "$XSLTPROC"; then + AC_MSG_CHECKING([whether xsltproc works]) + + if test -n "$XML_CATALOG"; then + DB_FILE="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" + else + DB_FILE="$DOCBOOK_ROOT/docbook.xsl" + fi + + $XSLTPROC $XSLTPROC_FLAGS $DB_FILE >/dev/null 2>&1 << END + + + + +END + if test "$?" = 0; then + XSLTPROC_WORKS=yes + fi + AC_MSG_RESULT($XSLTPROC_WORKS) +fi +AM_CONDITIONAL(have_xsltproc, test "$XSLTPROC_WORKS" = "yes") + +AC_SUBST(XML_CATALOG) +AC_SUBST(XSLTPROC_FLAGS) +AC_SUBST(DOCBOOK_ROOT) +AC_SUBST(CAT_ENTRY_START) +AC_SUBST(CAT_ENTRY_END) +]) + +dnl AX_CFLAGS_OPTIONS(var-name, option) +dnl add option to var-name if $CC support it. +AC_DEFUN([AX_CFLAGS_OPTION], [ +AC_MSG_CHECKING([whether ${CC} $2 is understood]) +AC_LANG_SAVE +AC_LANG_C +SAVE_CFLAGS=$CFLAGS +CFLAGS=$2 +AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} $2",AC_MSG_RESULT([no])) +CFLAGS=$SAVE_CFLAGS +AC_LANG_RESTORE +]) + + +dnl AX_CXXFLAGS_OPTIONS(var-name, option) +dnl add option to var-name if $CXX support it. +AC_DEFUN([AX_CXXFLAGS_OPTION], [ +AC_MSG_CHECKING([whether ${CXX} $2 is understood]) +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +SAVE_CXXFLAGS=$CXXFLAGS +CXXFLAGS=$2 +AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} $2",AC_MSG_RESULT([no])) +CXXFLAGS=$SAVE_CXXFLAGS +AC_LANG_RESTORE +]) + +dnl AX_COPY_IF_CHANGE(source, dest) +dnl copy source to dest if they don't compare equally or if dest doesn't exist +AC_DEFUN([AX_COPY_IF_CHANGE], [ +if test -r $2; then + if cmp $1 $2 > /dev/null; then + echo $2 is unchanged + else + cp -f $1 $2 + fi +else + cp -f $1 $2 +fi +]) + 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 @@ +diff --git a/configure.ac b/configure.ac +index 5740585..cf6c316 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -16 +16 @@ AC_CONFIG_SRCDIR([libop/op_config.h]) +-AM_INIT_AUTOMAKE ++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 @@ +Prevent running check tests on host if cross compiling + +This patch enables running the 'make check' tests on the target +in a cross-compiled environment. If not cross-compiling, then 'make + check' builds and executes the tests; no change from this patch. +In a cross-compiling environment, the make variable CROSS_COMPILE is +set which bypasses assiging tests to the makekfile variable TESTS. +Since TESTS is empty, the 'make check' process never tries to run the +tests on the hosts. On the target, the tests must be run manually. + +Also, in the libutil++ tests, a makefile variable SRCDIR is passed into +the compilation phase, pointing to the runtime location of the test +'file-manip-tests'. The mechanism used for a host test, based on +'topdir' doesn't work. Instead, if CROSS_COMPILE is set, the +makefile takes the path of SRCDIR from the build environment and not +from an expression based on the host path 'topdir'. + +Upstream-Status: Pending + +Signed-off-by: Dave Lerner + +diff --git a/configure.ac b/configure.ac +index 41ece64..ce5a16f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -392,6 +392,7 @@ AC_ARG_ENABLE(account-check, + enable_account_check=$enableval, enable_account_check=yes) + + AM_CONDITIONAL(CHECK_ACCOUNT, test "x$enable_account_check" = "xyes") ++AM_CONDITIONAL(CROSS_COMPILE, test "x$cross_compiling" = "xyes") + + AC_SUBST(OP_CFLAGS) + AC_SUBST(OP_CXXFLAGS) +diff --git a/libdb/tests/Makefile.am b/libdb/tests/Makefile.am +index 8a69003..d820090 100644 +--- a/libdb/tests/Makefile.am ++++ b/libdb/tests/Makefile.am +@@ -13,4 +13,6 @@ check_PROGRAMS = db_test + db_test_SOURCES = db_test.c + db_test_LDADD = ../libodb.a ../../libutil/libutil.a + ++if ! CROSS_COMPILE + TESTS = ${check_PROGRAMS} ++endif +diff --git a/libop/tests/Makefile.am b/libop/tests/Makefile.am +index 8a79eb5..6d417c4 100644 +--- a/libop/tests/Makefile.am ++++ b/libop/tests/Makefile.am +@@ -33,4 +33,6 @@ load_events_files_tests_LDADD = ${COMMON_LIBS} + mangle_tests_SOURCES = mangle_tests.c + mangle_tests_LDADD = ${COMMON_LIBS} + ++if ! CROSS_COMPILE + TESTS = ${check_PROGRAMS} utf8_checker.sh ++endif +diff --git a/libregex/tests/Makefile.am b/libregex/tests/Makefile.am +index 6f19838..1d176f9 100644 +--- a/libregex/tests/Makefile.am ++++ b/libregex/tests/Makefile.am +@@ -18,4 +18,6 @@ java_test_LDADD = \ + + EXTRA_DIST = mangled-name.in + ++if ! CROSS_COMPILE + TESTS = ${check_PROGRAMS} ++endif +diff --git a/libutil++/tests/Makefile.am b/libutil++/tests/Makefile.am +index 51af031..a01ea2d 100644 +--- a/libutil++/tests/Makefile.am ++++ b/libutil++/tests/Makefile.am +@@ -1,7 +1,9 @@ + + REALPATH= readlink -f + ++if ! CROSS_COMPILE + SRCDIR := $(shell $(REALPATH) $(topdir)/libutil++/tests/ ) ++endif + + AM_CPPFLAGS = \ + -I ${top_srcdir}/libutil++ -D SRCDIR="\"$(SRCDIR)/\"" @OP_CPPFLAGS@ +@@ -46,4 +48,6 @@ cached_value_tests_LDADD = ${COMMON_LIBS} + utility_tests_SOURCES = utility_tests.cpp + utility_tests_LDADD = ${COMMON_LIBS} + ++if ! CROSS_COMPILE + TESTS = ${check_PROGRAMS} ++endif +diff --git a/libutil/tests/Makefile.am b/libutil/tests/Makefile.am +index dfcd6ec..e8831b5 100644 +--- a/libutil/tests/Makefile.am ++++ b/libutil/tests/Makefile.am +@@ -12,4 +12,6 @@ file_tests_LDADD = ../libutil.a + string_tests_SOURCES = string_tests.c + string_tests_LDADD = ../libutil.a + ++if ! CROSS_COMPILE + TESTS = ${check_PROGRAMS} ++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 @@ +Upstream-Status: Pending + +The patch gives a low overhead way of starting/stopping oprofile which +doesn't involve script exection. + +(written by RP in OpenedHand days) + +diff --git a/utils/Makefile.am b/utils/Makefile.am +index d34b060..dff15f9 100644 +--- oprofile.orig/utils/Makefile.am ++++ oprofile/utils/Makefile.am +@@ -7,7 +7,7 @@ AM_LDFLAGS = @OP_LDFLAGS@ + + LIBS=@POPT_LIBS@ @LIBERTY_LIBS@ + +-bin_PROGRAMS = ophelp op-check-perfevents ++bin_PROGRAMS = ophelp op-check-perfevents opstart + dist_bin_SCRIPTS = opcontrol + + op_check_perfevents_SOURCES = op_perf_events_checker.c +@@ -15,3 +15,10 @@ op_check_perfevents_CPPFLAGS = ${AM_CFLAGS} @PERF_EVENT_FLAGS@ + + ophelp_SOURCES = ophelp.c + ophelp_LDADD = ../libop/libop.a ../libutil/libutil.a ++ ++opstart_SOURCES = opstart.c ++ ++install-exec-local: ++ cd $(DESTDIR)/$(bindir) && \ ++ rm -f opstop && \ ++ $(LN_S) opstart opstop +Index: oprofile/utils/opstart.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ oprofile/utils/opstart.c 2008-07-02 15:14:07.000000000 +0100 +@@ -0,0 +1,110 @@ ++/** ++ * @file opstart.c ++ * Start/Stop oprofile ++ * ++ * @remark Copyright 2007 Openedhand Ltd. ++ * @remark Read the file COPYING ++ * ++ * @author Richard Purdie ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++int main(const int argc, const char* argv[]) ++{ ++ const char *enable = "/dev/oprofile/enable"; ++ const char *lockfile; ++ unsigned long dpid; ++ struct stat sbuf; ++ FILE *lfile, *efile; ++ int sig, enb, err; ++ ++ if (argc >= 2) { ++ printf("Error: Invalid options.\n"); ++ return 1; ++ } ++ ++ lockfile = getenv("LOCK_FILE"); ++ if (!lockfile) ++ lockfile = "/var/lib/oprofile/lock"; ++ ++ /* Add SESSION_DIR support? */ ++ ++ if (geteuid()) { ++ printf("Error: This program must be run as root.\n"); ++ return 1; ++ } ++ ++ if (stat(enable, &sbuf)) { ++ printf("Error: Could not find /dev/oprofile/enable, the" ++ " kernel module probably isn't loaded.\n"); ++ printf("This binary only works with 2.6 kernels and oprofile" ++ " must have been initialised with 'opcontrol --start-daemon'.\n"); ++ return 1; ++ } ++ ++ if (stat(lockfile, &sbuf)) { ++ printf("Error: Could not find lockfile %s.\n", lockfile); ++ printf("The oprofile daemon must be running (oprofile must" ++ " have been initialised with 'opcontrol --start-daemon').\n"); ++ return 1; ++ } ++ ++ lfile = fopen(lockfile, "r"); ++ if (!lfile) { ++ printf("Error opening lockfile %s.\n", lockfile); ++ return 1; ++ } ++ ++ err = fscanf(lfile, "%lud", (unsigned long *) &dpid); ++ if (err != 1) { ++ printf("Error reading pid from lockfile %s.\n", lockfile); ++ return 1; ++ } ++ fclose(lfile); ++ ++ efile = fopen(enable, "r"); ++ if (!efile) { ++ printf("Error opening %s.\n", enable); ++ return 1; ++ } ++ ++ if (strstr(argv[0], "opstart")) { ++ printf("Starting Profiler\n"); ++ sig = SIGUSR1; ++ enb = 1; ++ } else if (strstr(argv[0], "opstop")) { ++ printf("Stopping Oprofile.\n"); ++ printf("You need to run 'opcontrol --dump' when the session" ++ " is finished.\n"); ++ sig = SIGUSR2; ++ enb = 0; ++ } else { ++ printf("Error: Please call as 'opstart' or 'opstop'\n"); ++ return 1; ++ } ++ ++ err = kill(dpid, 0); ++ if (err) { ++ printf("Error sending signal to oprofiled. Stale lockfile" ++ " (%s) ?\n", lockfile); ++ return 1; ++ } ++ ++ fprintf(efile, "%d\n", enb); ++ err = kill(dpid, sig); ++ if (err) { ++ printf("Error sending signal to oprofiled. Stale lockfile" ++ " (%s) ?\n", lockfile); ++ return 1; ++ } ++ ++ return 0; ++} ++ +Index: oprofile/configure.ac +=================================================================== +--- oprofile.orig/configure.ac 2008-07-02 15:13:58.000000000 +0100 ++++ oprofile/configure.ac 2008-07-02 15:17:37.000000000 +0100 +@@ -16,6 +16,7 @@ + AM_CONFIG_HEADER(config.h) + + AC_PROG_RANLIB ++AC_PROG_LN_S + AC_PROG_LIBTOOL + + dnl for the man page +@@ -241,6 +242,8 @@ + doc/xsl/catalog-1.xml \ + doc/oprofile.1 \ + doc/opcontrol.1 \ ++ doc/opstart.1 \ ++ doc/opstop.1 \ + doc/ophelp.1 \ + doc/opreport.1 \ + doc/opannotate.1 \ +Index: oprofile/doc/Makefile.am +=================================================================== +--- oprofile.orig/doc/Makefile.am 2008-07-02 15:13:59.000000000 +0100 ++++ oprofile/doc/Makefile.am 2008-07-02 15:14:07.000000000 +0100 +@@ -11,6 +11,8 @@ + man_MANS = \ + oprofile.1 \ + opcontrol.1 \ ++ opstart.1 \ ++ opstop.1 \ + opreport.1 \ + opannotate.1 \ + opgprof.1 \ +Index: oprofile/doc/opstart.1.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ oprofile/doc/opstart.1.in 2008-07-02 15:14:07.000000000 +0100 +@@ -0,0 +1,27 @@ ++.TH OPSTART 1 "@DATE@" "oprofile @VERSION@" ++.UC 4 ++.SH NAME ++opstart \- start OProfile profiling ++.SH SYNOPSIS ++.br ++.B opstart ++.SH DESCRIPTION ++.B opstart ++is a simple optimised command to start profiling with 2.6 Linux kernels. ++OProfile should have already been initialised by calling "opcontrol --start-daemon". ++ ++.SH ENVIRONMENT ++No special environment variables are recognised by opstart. ++ ++.SH FILES ++.TP ++.I /var/lib/oprofile/samples/ ++The location of the generated sample files. ++ ++.SH VERSION ++.TP ++This man page is current for @PACKAGE@-@VERSION@. ++ ++.SH SEE ALSO ++.BR @OP_DOCDIR@, ++.BR oprofile(1) +Index: oprofile/doc/opstop.1.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ oprofile/doc/opstop.1.in 2008-07-02 15:14:07.000000000 +0100 +@@ -0,0 +1,28 @@ ++.TH OPSTOP 1 "@DATE@" "oprofile @VERSION@" ++.UC 4 ++.SH NAME ++opstop \- stop OProfile profiling ++.SH SYNOPSIS ++.br ++.B opstop ++.SH DESCRIPTION ++.B opstop ++is a simple optimsed command to stop profiling with 2.6 Linux kernels. ++You need to run "opcontrol --dump" before being able to view a profile ++with opreport. ++ ++.SH ENVIRONMENT ++No special environment variables are recognised by opstop. ++ ++.SH FILES ++.TP ++.I /var/lib/oprofile/samples/ ++The location of the generated sample files. ++ ++.SH VERSION ++.TP ++This man page is current for @PACKAGE@-@VERSION@. ++ ++.SH SEE ALSO ++.BR @OP_DOCDIR@, ++.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 @@ +oprofile: Determine the root home directory dynamically + +This commit detects the root home directory dynamically with changes to +the opcontrol script and the oprofile gui app source. + +The commit replaces an earlier fix that detected and adjusted a +'non-standard' root home directory at build time. The advantage of this +patch is that the oprofile tools are adjusted to the current run-time +path to ~root, not the build time path. + +Upstream-Status: inappropriate [OE specific] + +Signed-off-by: Dave Lerner + +diff --git a/doc/opcontrol.1.in b/doc/opcontrol.1.in +index c434704..f57eb76 100644 +--- a/doc/opcontrol.1.in ++++ b/doc/opcontrol.1.in +@@ -171,7 +171,7 @@ No special environment variables are recognised by opcontrol. + + .SH FILES + .TP +-.I /root/.oprofile/daemonrc ++.I ~root/.oprofile/daemonrc + Configuration file for opcontrol + .TP + .I /var/lib/oprofile/samples/ +diff --git a/doc/oprofile.1.in b/doc/oprofile.1.in +index 3d0f0ed..5c623e1 100644 +--- a/doc/oprofile.1.in ++++ b/doc/oprofile.1.in +@@ -150,7 +150,7 @@ No special environment variables are recognised by oprofile. + .I $HOME/.oprofile/ + Configuration files + .TP +-.I /root/.oprofile/daemonrc ++.I ~root/.oprofile/daemonrc + Configuration file for opcontrol + .TP + .I @prefix@/share/oprofile/ +diff --git a/doc/oprofile.html b/doc/oprofile.html +index 128d9f7..d7e4dea 100644 +--- a/doc/oprofile.html ++++ b/doc/oprofile.html +@@ -1394,7 +1394,7 @@ The opcontrol script provides the +
+

+ Followed by list arguments for profiling set up. List of arguments +- saved in /root/.oprofile/daemonrc. ++ saved in ~root/.oprofile/daemonrc. + Giving this option is not necessary; you can just directly pass one + of the setup options, e.g. opcontrol --no-vmlinux. +

+@@ -1430,7 +1430,7 @@ The opcontrol script provides the +
+

+ Start data collection with either arguments provided by --setup +- or information saved in /root/.oprofile/daemonrc. Specifying ++ or information saved in ~root/.oprofile/daemonrc. Specifying + the addition --verbose makes the daemon generate lots of debug data + whilst it is running. +

+diff --git a/doc/oprofile.xml b/doc/oprofile.xml +index 6a17c6d..0968d76 100644 +--- a/doc/oprofile.xml ++++ b/doc/oprofile.xml +@@ -568,7 +568,7 @@ The opcontrol script provides the following actions : + + + Followed by list arguments for profiling set up. List of arguments +- saved in /root/.oprofile/daemonrc. ++ saved in ~root/.oprofile/daemonrc. + Giving this option is not necessary; you can just directly pass one + of the setup options, e.g. opcontrol --no-vmlinux. + +@@ -592,7 +592,7 @@ The opcontrol script provides the following actions : + + + Start data collection with either arguments provided by +- or information saved in /root/.oprofile/daemonrc. Specifying ++ or information saved in ~root/.oprofile/daemonrc. Specifying + the addition makes the daemon generate lots of debug data + whilst it is running. + +diff --git a/gui/oprof_start_util.cpp b/gui/oprof_start_util.cpp +index d293431..d13fa8f 100644 +--- a/gui/oprof_start_util.cpp ++++ b/gui/oprof_start_util.cpp +@@ -20,6 +20,8 @@ + #include + #include + #include ++#include ++#include + + #include + #include +@@ -39,7 +41,8 @@ namespace { + // return the ~ expansion suffixed with a '/' + string const get_config_dir() + { +- return "/root"; ++ struct *pw = getpwnam("root"); ++ return pw->pw_dir; + } + + string daemon_pid; +diff --git a/utils/opcontrol b/utils/opcontrol +index 09fa5a7..a8acdae 100644 +--- a/utils/opcontrol ++++ b/utils/opcontrol +@@ -385,7 +385,7 @@ do_init() + OPROFILED="$OPDIR/oprofiled" + + # location for daemon setup information +- SETUP_DIR="/root/.oprofile" ++ SETUP_DIR="`grep root /etc/passwd | cut -d: -f6`/.oprofile" + SETUP_FILE="$SETUP_DIR/daemonrc" + SEC_SETUP_FILE="$SETUP_DIR/daemonrc_new" + 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 @@ +#!/bin/sh + +saved_dir=$PWD +for dir in */tests ; do + cd $dir + for atest in * ; do + if [ \( -x $atest \) -a \( -f $atest \) ] ; then + ./$atest > ${atest}.stdout 2> ${atest}.stderr + if [ $? = 0 ] ; then + echo "PASS: $dir $atest" + rm ${atest}.stdout ${atest}.stderr + else + echo "FAIL: ${dir}/${atest}" + fi + fi + done + cd $saved_dir +done + 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 @@ +require oprofile.inc + +DEPENDS += "virtual/kernel" +DEPENDS_append_powerpc64 = " libpfm4" + +SRC_URI += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ + file://0001-Add-rmb-definition-for-AArch64-architecture.patch \ + file://0001-Tidy-powerpc64-bfd-target-check.patch \ + file://0001-Add-freescale-e500mc-support.patch \ + file://0002-Add-freescale-e6500-support.patch \ + " +SRC_URI[md5sum] = "00aec1287da2dfffda17a9b1c0a01868" +SRC_URI[sha256sum] = "1e523400daaba7b8d0d15269e977a08b40edfea53970774b69ae130e25117597" + + +S = "${WORKDIR}/oprofile-${PV}" + 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 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: oprofile-server +# Required-Start: $network +# Required-Stop: $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: OProfileUI server +# Description: +### END INIT INFO + +. /etc/init.d/functions + +case "$1" in + start) + echo "Starting OProfileUI server" + . /etc/profile + /usr/bin/oprofile-server & + ;; + + stop) + echo "Stopping OProfileUI server" + killproc oprofile-server + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + *) + echo "usage: $0 { start | stop | restart }" + ;; +esac + +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 @@ +[Unit] +Description=OProfileUI Server +After=network.target + +[Service] +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 @@ +require oprofileui.inc + +SRCREV = "389e1875af4721d52c7e65cf9cfffb69b0ed6a59" +PV = "0.0+git${SRCPV}" + +S = "${WORKDIR}/git" + +SRC_URI = "git://git.yoctoproject.org/oprofileui \ + file://init \ + file://oprofileui-server.service " + +DEPENDS += "intltool-native" + +EXTRA_OECONF += "--disable-client --enable-server" + +RDEPENDS_${PN} = "oprofile avahi-daemon" + +do_install_append() { + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/oprofileui-server + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/oprofileui-server.service ${D}${systemd_unitdir}/system/ + sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + -e 's,@BINDIR@,${bindir},g' ${D}${systemd_unitdir}/system/oprofileui-server.service +} + +inherit update-rc.d systemd + +INITSCRIPT_NAME = "oprofileui-server" +INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ." + +SYSTEMD_SERVICE_${PN} = "oprofileui-server.service" +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 @@ +SUMMARY = "User Interface for the System-Wide Profiler" +DESCRIPTION = "User interface for the OProfile tool" +HOMEPAGE = "http://labs.o-hand.com/oprofileui/" +BUGTRACKER = "http://bugzilla.yoctoproject.org/" + +SECTION = "x11" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +DEPENDS = "glib-2.0 avahi intltool-native" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--with-avahi" + 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 @@ +require oprofileui.inc + +DEPENDS += "gtk+ libglade libxml2 avahi-ui gconf" + +SRCREV = "389e1875af4721d52c7e65cf9cfffb69b0ed6a59" +PV = "0.0+git${SRCPV}" + +S = "${WORKDIR}/git" + +SRC_URI = "git://git.yoctoproject.org/oprofileui" + +EXTRA_OECONF += "--enable-client --disable-server" + +PACKAGES =+ "oprofileui-viewer" + +FILES_oprofileui-viewer = "${bindir}/oparchconv ${bindir}/oprofile-viewer ${datadir}/applications/ ${datadir}/oprofileui/ ${datadir}/icons" +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 @@ +PERF_FEATURES_ENABLE ?= "perf-scripting perf-tui" + +def perf_feature_enabled(feature, trueval, falseval, d): + """ + Check which perf features are enabled. + + The PERF_FEATURES_ENABLE variable lists the perf features to + enable. Override it if you want something different from what's + listed above, which is the default. If empty, the build won't + enable any features (which may be exactly what you want, just a + barebones perf without any extra baggage, what you get if you + specify an empty feature list). + + Available perf features: + perf-scripting: enable support for Perl and Python bindings + perf-tui: enable support for the perf TUI (via libnewt) + + """ + enabled_features = d.getVar("PERF_FEATURES_ENABLE", True) or "" + if feature in enabled_features: + return trueval + 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 @@ +SUMMARY = "Performance analysis tools for Linux" +DESCRIPTION = "Performance counters for Linux are a new kernel-based \ +subsystem that provide a framework for all things \ +performance analysis. It covers hardware level \ +(CPU/PMU, Performance Monitoring Unit) features \ +and software features (software counters, tracepoints) \ +as well." + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" + +PR = "r9" + +require perf-features.inc + +BUILDPERF_libc-uclibc = "no" + +# gui support was added with kernel 3.6.35 +# since 3.10 libnewt was replaced by slang +# to cover a wide range of kernel we add both dependencies +TUI_DEPENDS = "${@perf_feature_enabled('perf-tui', 'libnewt slang', '',d)}" +SCRIPTING_DEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl python', '',d)}" +LIBUNWIND_DEPENDS = "${@perf_feature_enabled('perf-libunwind', 'libunwind', '',d)}" + +DEPENDS = "virtual/kernel \ + virtual/${MLPREFIX}libc \ + ${MLPREFIX}elfutils \ + ${MLPREFIX}binutils \ + ${TUI_DEPENDS} \ + ${SCRIPTING_DEPENDS} \ + ${LIBUNWIND_DEPENDS} \ + bison flex \ +" + +PROVIDES = "virtual/perf" + +inherit linux-kernel-base kernel-arch pythonnative + +# needed for building the tools/perf Python bindings +inherit python-dir +export STAGING_INCDIR +export STAGING_LIBDIR +export BUILD_SYS +export HOST_SYS + +#kernel 3.1+ supports WERROR to disable warnings as errors +export WERROR = "0" + +do_populate_lic[depends] += "virtual/kernel:do_populate_sysroot" + +# needed for building the tools/perf Perl binding +inherit perlnative cpan-base +# Env var which tells perl if it should use host (no) or target (yes) settings +export PERLCONFIGTARGET = "${@is_target(d)}" +export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}/CORE" +export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" +export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" + +S = "${STAGING_KERNEL_DIR}" +# The source should be ready after the do_unpack +do_unpack[depends] += "virtual/kernel:do_populate_sysroot" + +B = "${WORKDIR}/${BPN}-${PV}" + +SCRIPTING_DEFINES = "${@perf_feature_enabled('perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}" +TUI_DEFINES = "${@perf_feature_enabled('perf-tui', '', 'NO_NEWT=1',d)}" +LIBUNWIND_DEFINES = "${@perf_feature_enabled('perf-libunwind', '', 'NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1',d)}" + +# The LDFLAGS is required or some old kernels fails due missing +# symbols and this is preferred than requiring patches to every old +# supported kernel. +LDFLAGS="-ldl -lutil" + +EXTRA_OEMAKE = '\ + -C ${S}/tools/perf \ + O=${B} \ + CROSS_COMPILE=${TARGET_PREFIX} \ + ARCH=${ARCH} \ + CC="${CC}" \ + AR="${AR}" \ + EXTRA_CFLAGS="-ldw" \ + perfexecdir=${libexecdir} \ + NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} ${SCRIPTING_DEFINES} \ +' + +EXTRA_OEMAKE += "\ + 'prefix=${prefix}' \ + 'bindir=${bindir}' \ + 'sharedir=${datadir}' \ + 'sysconfdir=${sysconfdir}' \ + 'perfexecdir=${libexecdir}/perf-core' \ + \ + 'ETC_PERFCONFIG=${@os.path.relpath(sysconfdir, prefix)}' \ + 'sharedir=${@os.path.relpath(datadir, prefix)}' \ + 'mandir=${@os.path.relpath(mandir, prefix)}' \ + 'infodir=${@os.path.relpath(infodir, prefix)}' \ +" + +PARALLEL_MAKE = "" + +do_compile() { + # Linux kernel build system is expected to do the right thing + unset CFLAGS + oe_runmake all +} + +do_install() { + # Linux kernel build system is expected to do the right thing + unset CFLAGS + oe_runmake DESTDIR=${D} install + # we are checking for this make target to be compatible with older perf versions + if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" -a $(grep install-python_ext ${S}/tools/perf/Makefile) = "0" ]; then + oe_runmake DESTDIR=${D} install-python_ext + fi +} + +do_configure_prepend () { + # Fix for rebuilding + rm -rf ${B}/ + mkdir ${B}/ + + #kernels before 3.1 do not support WERROR env variable + sed -i 's,-Werror ,,' ${S}/tools/perf/Makefile + if [ -e "${S}/tools/perf/config/Makefile" ]; then + sed -i 's,-Werror ,,' ${S}/tools/perf/config/Makefile + fi + + # If building a multlib based perf, the incorrect library path will be + # detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 bit + # build, with a 64 bit multilib, the arch won't match and the detection of a + # 64 bit build (and library) are not exected. To ensure that libraries are + # installed to the correct location, we can use the weak assignment in the + # config/Makefile. + if [ -e "${S}/tools/perf/config/Makefile" ]; then + # Match $(prefix)/$(lib) and $(prefix)/lib + sed -i -e 's,^libdir = \($(prefix)/.*lib\),libdir ?= \1,' \ + -e 's,^perfexecdir = \(.*\),perfexecdir ?= \1,' \ + ${S}/tools/perf/config/Makefile + fi + # We need to ensure the --sysroot option in CC is preserved + if [ -e "${S}/tools/perf/Makefile.perf" ]; then + sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/perf/Makefile.perf + sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/perf/Makefile.perf + fi + if [ -e "${S}/tools/lib/api/Makefile" ]; then + sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/api/Makefile + sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/api/Makefile + fi + if [ -e "${S}/tools/perf/config/feature-checks/Makefile" ]; then + sed -i 's,CC := $(CROSS_COMPILE)gcc -MD,CC += -MD,' ${S}/tools/perf/config/feature-checks/Makefile + fi + + # 3.17-rc1+ has a include issue for arm/powerpc. Temporarily sed in the appropriate include + if [ -e "${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c" ]; then + 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 + fi + if [ -e "${S}/tools/perf/arch/arm/util/unwind-libunwind.c" ] && [ -e "${S}/tools/perf/arch/arm/tests/dwarf-unwind.c" ]; then + 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 + 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 + fi +} + +python do_package_prepend() { + bb.data.setVar('PKGV', get_kernelversion('${S}').split("-")[0], d) +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" + + +PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python" + +RDEPENDS_${PN} += "elfutils" +RDEPENDS_${PN}-archive =+ "bash" +RDEPENDS_${PN}-python =+ "bash python" +RDEPENDS_${PN}-perl =+ "bash perl perl-modules" +RDEPENDS_${PN}-tests =+ "python" + +RSUGGESTS_SCRIPTING = "${@perf_feature_enabled('perf-scripting', '${PN}-perl ${PN}-python', '',d)}" +RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}" + +FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent" +FILES_${PN}-dbg += "${libdir}/python*/site-packages/.debug" +FILES_${PN}-archive = "${libdir}/perf/perf-core/perf-archive" +FILES_${PN}-tests = "${libdir}/perf/perf-core/tests" +FILES_${PN}-python = "${libdir}/python*/site-packages ${libdir}/perf/perf-core/scripts/python" +FILES_${PN}-perl = "${libdir}/perf/perf-core/scripts/perl" + + +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 @@ +SUMMARY = "Power usage tool" +DESCRIPTION = "Linux tool to diagnose issues with power consumption and power management." +HOMEPAGE = "http://01.org/powertop/" +BUGTRACKER = "http://bugzilla.lesswatts.org/" +DEPENDS = "ncurses libnl pciutils" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" + +SRC_URI = "http://01.org/powertop/sites/default/files/downloads/powertop-${PV}.tar.gz" + +SRC_URI[md5sum] = "4391e7b0af854ecf722cdf712f24b631" +SRC_URI[sha256sum] = "034cde6d5bb433fe0d29251d5cde5d4c2948abf05fe29ef10966b659331b20e4" + +inherit autotools gettext pkgconfig + +# we need to explicitly link with libintl in uClibc systems +EXTRA_LDFLAGS ?= "" +EXTRA_LDFLAGS_libc-uclibc = "-lintl" +LDFLAGS += "${EXTRA_LDFLAGS}" + +# we do not want libncursesw if we can +do_configure_prepend() { + # configure.ac checks for delwin() in "ncursesw ncurses" so let's drop first one + sed -i -e "s/ncursesw//g" ${S}/configure.ac + mkdir -p ${B}/src/tuning/ +} + +inherit update-alternatives +ALTERNATIVE_${PN} = "powertop" +ALTERNATIVE_TARGET[powertop] = "${sbindir}/powertop" +ALTERNATIVE_LINK_NAME[powertop] = "${sbindir}/powertop" +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 @@ +On uclibc elf.h does not have GNU extentions but we need this define +so we define it locally if its not getting it from elf.h + +Signed-off-by: Khem Raj + +Upstream-Status: Pending + +Index: git/elfparser.h +=================================================================== +--- git.orig/elfparser.h 2011-07-16 18:57:41.000000000 -0700 ++++ git/elfparser.h 2011-07-16 20:28:54.733829895 -0700 +@@ -17,6 +17,10 @@ + */ + #include + ++#ifndef NT_GNU_BUILD_ID ++#define NT_GNU_BUILD_ID 3 ++#endif ++ + typedef struct ElfSym ElfSym; + typedef struct ElfParser ElfParser; + 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 @@ + +Upstream-Status: Pending + +Index: git/util.h +=================================================================== +--- git.orig/util.h 2010-12-07 22:41:57.156243001 -0600 ++++ git/util.h 2010-12-07 22:43:47.616243002 -0600 +@@ -37,4 +37,13 @@ + #define cpu_relax() asm volatile("" ::: "memory"); + #endif + ++#ifdef __arm__ ++/* ++ * Use the __kuser_memory_barrier helper in the CPU helper page. See ++ * arch/arm/kernel/entry-armv.S in the kernel source for details. ++ */ ++#define rmb() ((void(*)(void))0xffff0fa0)() ++#define cpu_relax() asm volatile("":::"memory") ++#endif ++ + #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 @@ +Upstream-Status: Pending + +Index: git/util.h +=================================================================== +--- git.orig/util.h 2010-12-08 01:22:44.486243001 -0600 ++++ git/util.h 2010-12-08 01:23:27.836243001 -0600 +@@ -37,4 +37,15 @@ + #define cpu_relax() asm volatile("" ::: "memory"); + #endif + ++#ifdef __mips__ ++#define rmb() asm volatile( \ ++ ".set mips2\n\t" \ ++ "sync\n\t" \ ++ ".set mips0" \ ++ : /* no output */ \ ++ : /* no input */ \ ++ : "memory") ++#define cpu_relax() asm volatile("" ::: "memory") ++#endif ++ + #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 @@ +SUMMARY = "System-wide Performance Profiler for Linux" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +DEPENDS = "gtk+ libglade" + +SRCREV = "cd44ee6644c3641507fb53b8a2a69137f2971219" +PV = "1.2.0+git${SRCPV}" + +SRC_URI = "git://git.gnome.org/sysprof \ + file://define-NT_GNU_BUILD_ID.patch \ + " + +SRC_URI_append_arm = " file://rmb-arm.patch" +SRC_URI_append_mips = " file://rmb-mips.patch" +SRC_URI_append_mips64 = " file://rmb-mips.patch" +SRC_URI_append_mips64n32 = " file://rmb-mips.patch" + +S = "${WORKDIR}/git" + +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 @@ +SUMMARY = "UProbes kernel module for SystemTap" + +require systemtap_git.inc + +DEPENDS = "systemtap virtual/kernel" + +PR = "r1" + +# On systems without CONFIG_UTRACE, this package is empty. +ALLOW_EMPTY_${PN} = "1" + +inherit module-base gettext + +FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemtap:" + +FILES_${PN} += "${datadir}/systemtap/runtime/uprobes" + +EXTRA_OEMAKE = "" + +# Compile and install the uprobes kernel module on machines with utrace +# support. Note that staprun expects it in the systemtap/runtime directory, +# not in /lib/modules. +do_compile() { + if grep -q "CONFIG_UTRACE=y" ${STAGING_KERNEL_DIR}/.config + then + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC LD CPP + oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ + AR="${KERNEL_AR}" \ + -C ${STAGING_KERNEL_DIR} scripts + oe_runmake KDIR=${STAGING_KERNEL_DIR} \ + M="${S}/runtime/uprobes/" \ + CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ + AR="${KERNEL_AR}" \ + -C "${S}/runtime/uprobes/" + fi +} + +do_install() { + if [ -e "${S}/runtime/uprobes/uprobes.ko" ] + then + install -d ${D}${datadir}/systemtap/runtime/uprobes/ + install -m 0644 ${S}/runtime/uprobes/uprobes.ko ${D}${datadir}/systemtap/runtime/uprobes/ + fi +} 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 @@ +From 5eb10d90af9178edb65e6091ae939d1b5b19bb78 Mon Sep 17 00:00:00 2001 +From: Wenzong Fan +Date: Tue, 23 Sep 2014 04:47:10 -0400 +Subject: [PATCH] systemtap: allow to disable libvirt + +Upstream-Status: Pending + +Signed-off-by: Wenzong Fan +--- + configure.ac | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index a631ae7..cb4885b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -525,10 +525,15 @@ dnl Check for the libvirt and libxml2 devel packages + + dnl We require libvirt >= 1.0.2 because stapvirt relies on the + dnl virDomainOpenChannel function, which was implemented in 1.0.2. +-PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [ +- have_libvirt=yes +- AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed]) +- ], [have_libvirt=no]) ++AC_ARG_ENABLE([libvirt], ++ AS_HELP_STRING([--disable-libvirt], [Do not use libvirt even if present])) ++ ++if test "$enable_libvirt" != no; then ++ PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [ ++ have_libvirt=yes ++ AC_DEFINE([HAVE_LIBVIRT],[1],[Define to 1 if libvirt development libraries are installed]) ++ ], [have_libvirt=no]) ++fi + AM_CONDITIONAL([HAVE_LIBVIRT], [test "${have_libvirt}" = "yes"]) + PKG_CHECK_MODULES([libxml2], [libxml-2.0], [ + have_libxml2=yes +-- +1.7.9.5 + 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 @@ +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Tom Zanussi + +Index: git/doc/SystemTap_Tapset_Reference/Makefile.am +=================================================================== +--- git.orig/doc/SystemTap_Tapset_Reference/Makefile.am 2012-04-13 08:43:46.263339003 -0500 ++++ git/doc/SystemTap_Tapset_Reference/Makefile.am 2012-04-13 09:31:22.470083915 -0500 +@@ -27,6 +27,10 @@ + noinst_PROGRAMS = docproc + SRCTREE=$(abs_top_srcdir)/ + DOCPROC=$(abs_builddir)/docproc ++docproc_LINK = $(CC_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ ++ ++docproc.o: $(srcdir)/docproc.c ++ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -o $@ $(srcdir)/docproc.c + + all: $(PDFDOCS) stamp-htmldocs stamp-mandocs + 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 @@ +Upstream-Status: Pending + +Signed-off-by: Marko Lindqvist +Index: git/configure.ac +=================================================================== +--- git.orig/configure.ac ++++ git/configure.ac +@@ -19,7 +19,6 @@ AC_PROG_LN_S + AC_PROG_CC + AC_PROG_CXX + AC_PROG_CPP +-AM_PROG_CC_STDC + AM_PROG_CC_C_O + AC_PROG_RANLIB + 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 @@ +scheduler.stp: Handle missing symbols. + +Compiler output code optimization leads to missing debug data for some +target variables, in particular some inline functions parameters, e.g. +context_switch. + +Handle this by testing for variable name resolvability and provide default +variable values in case no suitable target data is available through variable +name. Affected functions: ctxswitch,wakeup. + +This fix does not affect the intended context switch tracing. + + +Upstream-Status: Pending + +Signed-off-by: George Nita + + +diff --git a/tapset/linux/scheduler.stp b/tapset/linux/scheduler.stp +index 7596a46..539a0f1 100644 +--- a/tapset/linux/scheduler.stp ++++ b/tapset/linux/scheduler.stp +@@ -120,7 +120,7 @@ probe scheduler.ctxswitch = kernel.trace("sched_switch") !, + %( arch != "x86_64" && arch != "ia64" && arch != "arm" %? + kernel.function("__switch_to") + %: +- kernel.function("context_switch") ++ kernel.function("prepare_task_switch") + %) + { + name = "ctxswitch" +@@ -140,7 +140,7 @@ probe scheduler.ctxswitch = kernel.trace("sched_switch") !, + prev_task_name = task_execname($prev_p) + prevtsk_state = $prev_p->state + } +- else { ++ else if (@defined($prev)) { + prev_priority = $prev->prio + prev_pid = $prev->tgid + prev_tid = $prev->pid +@@ -148,6 +148,15 @@ probe scheduler.ctxswitch = kernel.trace("sched_switch") !, + prev_task_name = task_execname($prev) + prevtsk_state = $prev->state + } ++ else { ++ prev_priority = 0 ++ prev_pid = 0 ++ prev_tid = 0 ++ /* No prev_task, dummy */ ++ prev_task = task_current() ++ prev_task_name = "UNAVAILABLE" ++ prevtsk_state = 0 ++ } + + if (@defined($next)) { + next_priority = $next->prio +@@ -165,7 +174,7 @@ probe scheduler.ctxswitch = kernel.trace("sched_switch") !, + next_task_name = task_execname($next_p) + nexttsk_state = $next_p->state + } +- else { ++ else if (@defined($new)) { + next_priority = $new->prio + next_pid = $new->tgid + next_tid = $new->pid +@@ -173,6 +182,14 @@ probe scheduler.ctxswitch = kernel.trace("sched_switch") !, + next_task_name = task_execname($new) + nexttsk_state = $new->state + } ++ else { ++ next_task = task_current() ++ next_priority = task_prio(next_task) ++ next_pid = task_pid(next_task) ++ next_tid = task_tid(next_task) ++ next_task_name = task_execname(next_task) ++ nexttsk_state = task_state(next_task) ++ } + } + + +@@ -254,12 +271,22 @@ probe scheduler.wakeup = + kernel.function("try_to_wake_up") + { + name = "wakeup" +- task = $p +- task_pid = $p->tgid +- task_tid = $p->pid +- task_priority = $p->prio +- task_cpu = task_cpu($p) +- task_state = task_state($p) ++ if (@defined($p)) { ++ task = $p ++ task_pid = $p->tgid ++ task_tid = $p->pid ++ task_priority = $p->prio ++ task_cpu = task_cpu($p) ++ task_state = task_state($p) ++ } ++ else { ++ task = task_current() ++ task_pid = task_pid(task) ++ task_tid = task_tid(task) ++ task_priority = task_prio(task) ++ task_cpu = task_cpu(task) ++ task_state = task_state(task) ++ } + } + + /** 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 @@ +systemtap: Cross compilation fix + +This is a cross compilation fix. It allows systemtap to find +the kernel map file in the right place, i.e. in the kernel build tree. +Without this fix it takes a map file from the build host, if available. + +Upstream-Status: Pending + +Signed-off-by: Mikhail Durnev + +Index: git/session.cxx +=================================================================== +--- git.orig/session.cxx ++++ git/session.cxx +@@ -1634,7 +1634,7 @@ systemtap_session::parse_kernel_function + clog << _F("Kernel symbol table %s unavailable, (%s)", + system_map_path.c_str(), strerror(errno)) << endl; + +- system_map_path = "/boot/System.map-" + kernel_release; ++ system_map_path = kernel_build_tree + "/System.map-" + kernel_release; + system_map.clear(); + system_map.open(system_map_path.c_str(), ifstream::in); + 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 @@ +systemtap: Fixed probe syscall.sendfile failure + +compat_sendfile syscall is unavailable in kernels starting version 3.8. +Hence systemtap scripts like 'probe syscall.* { if (target()==pid()) log(name." ".argstr) }' fail. +This problem is solved by marking __syscall.compat_sendfile as optional in tapset/linux/syscalls2.stp + +Upstream-Status: Pending + +Signed-off-by: Mikhail Durnev + +diff -Naur old/tapset/linux/syscalls2.stp new/tapset/linux/syscalls2.stp +--- old/tapset/linux/syscalls2.stp 2014-04-21 01:28:41.000000000 -0500 ++++ new/tapset/linux/syscalls2.stp 2014-04-21 01:38:14.961233914 -0500 +@@ -1953,7 +1953,7 @@ + # COMPAT_SYSCALL_DEFINE4(sendfile64, int, out_fd, int, in_fd, + # compat_loff_t __user *, offset, compat_size_t, count) + # +-probe syscall.sendfile = __syscall.sendfile, __syscall.compat_sendfile ++probe syscall.sendfile = __syscall.sendfile, __syscall.compat_sendfile ? + { + name = "sendfile" + 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 @@ +SUMMARY = "Script-directed dynamic tracing and performance analysis tool for Linux" + +require systemtap_git.inc + +DEPENDS = "elfutils sqlite3 systemtap-native" +DEPENDS_class-native = "elfutils-native sqlite3-native gettext-native" +DEPENDS_class-nativesdk = "nativesdk-elfutils nativesdk-sqlite3 nativesdk-gettext" + +RDEPENDS_${PN} += "python bash" +RDEPENDS_${PN}_class-native += "python-native" +RDEPENDS_${PN}_class-nativesdk += "python-native" + +EXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \ + --without-nss --without-avahi --without-dyninst \ + --disable-server --disable-grapher --enable-prologues \ + ac_cv_prog_have_javac=no \ + ac_cv_prog_have_jar=no " + +STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs" + +EXTRA_OECONF += "${STAP_DOCS} " + +PACKAGECONFIG ??= "" +PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt" + +inherit autotools gettext pkgconfig + +BBCLASSEXTEND = "native nativesdk" + +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 @@ +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" +SRCREV = "8f0fcd995f7f650a2ee0a94539f90c99e6d19e1d" +PV = "2.5+git${SRCPV}" + +SRC_URI = "git://sourceware.org/git/systemtap.git \ + file://docproc-build-fix.patch \ + file://obsolete_automake_macros.patch \ + file://scheduler-stp.patch \ + file://system_map_location.patch \ + file://tapset-linux-sendfile-syscall.patch \ + file://configure-allow-to-disable-libvirt.patch \ + " + +# systemtap doesn't support mips +COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64).*-linux' + +S = "${WORKDIR}/git" + +# systemtap can't be built without optimization, if someone tries to compile an +# entire image as -O0, we override it with -O2 here and give a note about it. +def get_optimization(d): + selected_optimization = d.getVar("SELECTED_OPTIMIZATION", True) + if bb.utils.contains("SELECTED_OPTIMIZATION", "-O0", "x", "", d) == "x": + bb.note("systemtap can't be built with -O0, -O2 will be used instead.") + return selected_optimization.replace("-O0", "-O2") + return selected_optimization + +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 @@ +kernelshark: fix syntax error of shell + +Delete "<<<" syntax of bash in Makefile, else we would get following error: + + Syntax error: redirection unexpected + +Upstream-Status: Pending + +Signed-off-by: Chong Lu +--- + Makefile | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index c1fa906..be84415 100644 +--- a/Makefile ++++ b/Makefile +@@ -89,8 +89,7 @@ endif + + # $(call test-build, snippet, ret) -> ret if snippet compiles + # -> empty otherwise +-test-build = $(if $(shell $(CC) -o /dev/null -c -x c - > /dev/null 2>&1 \ +- <<<'$1' && echo y), $2) ++test-build = $(if $(shell echo '$1' |$(CC) -o /dev/null -c -x c - > /dev/null 2>&1 && echo y), $2) + + # have udis86 disassembler library? + udis86-flags := $(call test-build,\#include ,-DHAVE_UDIS86 -ludis86) +-- +1.7.9.5 + 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 @@ +SUMMARY = "Graphical trace viewer for Ftrace" +LICENSE = "GPLv2" + +require trace-cmd.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ + file://kernel-shark.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e" + +DEPENDS = "gtk+ libxml2" +RDEPENDS_${PN} = "trace-cmd" + +SRC_URI_append = "file://kernelshark-fix-syntax-error-of-shell.patch" + +EXTRA_OEMAKE = "'CC=${CC}' 'AR=${AR}' 'prefix=${prefix}' gui" + +do_compile_prepend() { + # Make sure the recompile is OK + rm -f ${B}/.*.d +} + +do_install() { + oe_runmake CC="${CC}" AR="${AR}" prefix="${prefix}" DESTDIR="${D}" install_gui + rm ${D}${bindir}/trace-cmd + rm -rf ${D}${datadir}/trace-cmd + rmdir ${D}${datadir} +} 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 @@ +SRCREV = "7055ffd37beeb44714e86a4abc703f7e175a0db5" +PR = "r3" +PV = "1.2+git${SRCPV}" + +inherit pkgconfig pythonnative + +FILESEXTRAPATHS =. "${FILE_DIRNAME}/trace-cmd:" + +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git \ + file://addldflags.patch \ + file://make-docs-optional.patch \ + file://blktrace-api-compatibility.patch \ +" +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 @@ +trace-cmd: Cross-compile fixes for LDFLAGS and include path + +Add ability for the Makefile to respect LDFLAGS. +Also remove hardcoded /usr/local/include include path. + +Upstream-Status: Accepted [Post 1.2: 5f576e9af7ad706774d9764a9ae3989376797c0e] + +Signed-off-by: Richard Purdie +Signed-off-by: Darren Hart + +--- + Makefile | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +Index: git/Makefile +=================================================================== +--- git.orig/Makefile ++++ git/Makefile +@@ -202,12 +202,13 @@ export Q VERBOSE + TRACECMD_VERSION = $(TC_VERSION).$(TC_PATCHLEVEL).$(TC_EXTRAVERSION) + KERNELSHARK_VERSION = $(KS_VERSION).$(KS_PATCHLEVEL).$(KS_EXTRAVERSION) + +-INCLUDES = -I. -I/usr/local/include $(CONFIG_INCLUDES) ++INCLUDES = -I. $(CONFIG_INCLUDES) + + include features.mk + + # Set compile option CFLAGS if not set elsewhere + CFLAGS ?= -g -Wall ++LDFLAGS ?= + + ifndef NO_PTRACE + ifneq ($(call try-cc,$(SOURCE_PTRACE),),y) +@@ -251,7 +252,7 @@ do_fpic_compile = \ + + do_app_build = \ + ($(print_app_build) \ +- $(CC) $^ -rdynamic -o $@ $(CONFIG_LIBS) $(LIBS)) ++ $(CC) $^ -rdynamic -o $@ $(LDFLAGS) $(CONFIG_LIBS) $(LIBS)) + + do_compile_shared_library = \ + ($(print_shared_lib_compile) \ +@@ -263,7 +264,7 @@ do_compile_plugin_obj = \ + + do_plugin_build = \ + ($(print_plugin_build) \ +- $(CC) $(CFLAGS) -shared -nostartfiles -o $@ $<) ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -nostartfiles -o $@ $<) + + do_build_static_lib = \ + ($(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 @@ +trace-cmd: Add blktrace_api compatibility for TC_BARRIER + +Newer kernels replace TC_BARRIER with TC_FLUSH. Ensure trace-cmd +can build regardless of the linux-kernel-headers version. + +Upstream-Status: Innapropriate [Stop gap] + +Signed-off-by: Darren Hart + +diff --git a/plugin_blk.c b/plugin_blk.c +index 9327b17..c8e5e1c 100644 +--- a/plugin_blk.c ++++ b/plugin_blk.c +@@ -44,6 +44,15 @@ struct blk_data { + unsigned short pdu_len; + }; + ++/* ++ * Newer kernels don't define BLK_TC_BARRIER and have replaced it with ++ * BLK_TC_FLUSH. In this case, define it here and report FLUSHES as BARRIERS as ++ * a workaround, as described in: ++ * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=c09c47caedc9854d59378d6e34c989e51cfdd2b4 ++ */ ++#ifndef BLK_TC_BARRIER ++#define BLK_TC_BARRIER 1<<2 ++#endif + static void fill_rwbs(char *rwbs, int action, unsigned int bytes) + { + 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 @@ +Disable building docs until we have asciidocs available as a recipe. + +Upstream-Status: Inappropriate [Account for missing dependency, the lazy way] + +Signed-off-by: Darren Hart + +--- + Makefile | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +Index: git/Makefile +=================================================================== +--- git.orig/Makefile ++++ git/Makefile +@@ -327,7 +327,9 @@ TARGETS = $(CMD_TARGETS) $(GUI_TARGETS) + # If you want kernelshark, then do: make gui + ### + +-all: all_cmd doc show_gui_make ++# Make doc optional ++#all: all_cmd doc show_gui_make ++all: all_cmd show_gui_make + + all_cmd: $(CMD_TARGETS) + +@@ -503,7 +505,9 @@ install_python: $(PYTHON_SO_INSTALL) $(P + install_cmd: all_cmd install_plugins install_python + $(Q)$(call do_install,trace-cmd,$(bindir_SQ)) + +-install: install_cmd install_doc ++# Make doc optional ++#install: install_cmd install_doc ++install: install_cmd + @echo "Note: to install the gui, type \"make install_gui\"" + + 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 @@ +SUMMARY = "User interface to Ftrace" +LICENSE = "GPLv2 & LGPLv2.1" + +require trace-cmd.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ + file://trace-cmd.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e \ + file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff \ + file://trace-input.c;beginline=5;endine=8;md5=dafd8a1cade30b847a8686dd3628cea4 \ +" +SRCREV = "79e08f8edb38c4c5098486caaa87ca90ba00f547" + +PV = "2.3.2+git${SRCPV}" + +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;protocol=git;branch=trace-cmd-stable-v2.3 \ +" + +EXTRA_OEMAKE = "\ + 'prefix=${prefix}' \ + 'bindir=${bindir}' \ + 'man_dir=${mandir}' \ + 'html_install=${datadir}/kernelshark/html' \ + 'img_install=${datadir}/kernelshark/html/images' \ + \ + 'bindir_relative=${@oe.path.relative(prefix, bindir)}' \ + 'libdir=${@oe.path.relative(prefix, libdir)}' \ + \ + NO_PYTHON=1 \ +" + +FILES_${PN}-dbg += "${libdir}/trace-cmd/plugins/.debug" + +do_compile_prepend() { + # Make sure the recompile is OK + rm -f ${B}/.*.d +} + +do_install() { + oe_runmake DESTDIR="${D}" install +} + -- cgit v1.2.3-54-g00ecf