Skip to contentSkip to conversation

Breakpad and ktap recipes

PATCH New Anders Darander 1 participant 3 messages Oct 18, 2013

lore
Share & tools
lore
#0 lore raw

cover Breakpad and ktap recipes

[Resending with meta-oe in subject.]

These are a couple of recipes that we've been using internally for some time. They were developed and mostly used on a dylan-based setup. Testing has primarily been performed on ARM, both qemuarm and our custom machine.

Breakpad is a crash reporting tool, that's getting a wider use. Please, let me know if there's a more efficient way (or otherwise better way) to have the bbclass generate the symbol file.

Ktap is a new scripting dynamic tracing tool for Linux. This recipe will be of use until everyone is on 3.13+ kernels (ktap has been merged for the 3.13 series).

The following changes since commit f8903f53db717294d63a8d79b5ef7ca34b3c189e:

libhugetlbfs: install perl lib to directory perl instead of perl5 (2013-10-15 13:43:53 +0200)

are available in the git repository at:

git://github.com/darander/meta-oe breakpad-ktap
https://github.com/darander/meta-oe/tree/breakpad-ktap

Anders Darander (2):
breakpad: add initial recipe
ktap: add initial recipe

 meta-oe/classes/breakpad.bbclass                  | 32 ++++++++++
 meta-oe/recipes-devtools/breakpad/breakpad_svn.bb | 72 +++++++++++++++++++++++
 meta-oe/recipes-kernel/ktap/ktap-module_0.3.bb    | 19 ++++++
 meta-oe/recipes-kernel/ktap/ktap.inc              | 11 ++++
 meta-oe/recipes-kernel/ktap/ktap_0.3.bb           | 17 ++++++
 5 files changed, 151 insertions(+)
 create mode 100644 meta-oe/classes/breakpad.bbclass
 create mode 100644 meta-oe/recipes-devtools/breakpad/breakpad_svn.bb
 create mode 100644 meta-oe/recipes-kernel/ktap/ktap-module_0.3.bb
 create mode 100644 meta-oe/recipes-kernel/ktap/ktap.inc
 create mode 100644 meta-oe/recipes-kernel/ktap/ktap_0.3.bb
Signature · 1 line
1.8.4.rc3
#1 lore raw

PATCH 1/2 breakpad: add initial recipe

Breakpad is an open-source multi-platform crash reporting system.

Apart from the breakpad recipe, add a bbclass for applications that want to use this library. This bbclass will set up the include path and also generate the symbol file.

---
 meta-oe/classes/breakpad.bbclass                  | 32 ++++++++++
 meta-oe/recipes-devtools/breakpad/breakpad_svn.bb | 72 +++++++++++++++++++++++
 2 files changed, 104 insertions(+)
 create mode 100644 meta-oe/classes/breakpad.bbclass
 create mode 100644 meta-oe/recipes-devtools/breakpad/breakpad_svn.bb
meta-oe/classes/breakpad.bbclass new file +32 -0
new file mode 100644
index 0000000..8c49ca7
@@ -0,0 +1,32 @@
+# Class to inherit when you want to build against Breakpad.
+# Apart from inheriting this class, you need to set BREAKPAD_BIN in
+# your recipe, and make sure that you link against libbreakpad_client.a.
+
+DEPENDS += "breakpad breakpad-native"
+
+CFLAGS += "-I${STAGING_DIR_TARGET}${includedir}/breakpad "
+
+BREAKPAD_BIN ?= ""
+
+python () {
+    breakpad_bin = d.getVar("BREAKPAD_BIN", True)
+
+    if not breakpad_bin:
+       PN = d.getVar("PN", True)
+       FILE = os.path.basename(d.getVar("FILE", True))
+       bb.error("To build %s, see breakpad.bbclass for instructions on \
+                 setting up your Breakpad configuration" % PN)
+       raise ValueError('BREAKPAD_BIN not defined in %s' % PN)
+}
+
+# Add creation of symbols here
+PACKAGE_PREPROCESS_FUNCS += "breakpad_package_preprocess"
+breakpad_package_preprocess () {
+    mkdir -p ${PKGD}/usr/share/breakpad-syms
+    find ${D} -name ${BREAKPAD_BIN} -exec sh -c "dump_syms {} > ${PKGD}/usr/share/breakpad-syms/${BREAKPAD_BIN}.syms" \;
+}
+
+PACKAGES =+ "${PN}-breakpad"
+
+FILES_${PN}-breakpad = "/usr/share/breakpad-syms"
+
meta-oe/recipes-devtools/breakpad/breakpad_svn.bb new file +72 -0

72 lines not on this page · raw message

Signature · 1 line
1.8.4.rc3
#2 lore raw

PATCH 2/2 ktap: add initial recipe

In reply to Anders Darander

Ktap is a new scripting dynamic tracing tool for Linux.

From kernel v3.13 it'll live inside the kernel tree, but for earlier kernels, this recipe will be usefull.

---
 meta-oe/recipes-kernel/ktap/ktap-module_0.3.bb | 19 +++++++++++++++++++
 meta-oe/recipes-kernel/ktap/ktap.inc           | 11 +++++++++++
 meta-oe/recipes-kernel/ktap/ktap_0.3.bb        | 17 +++++++++++++++++
 3 files changed, 47 insertions(+)
 create mode 100644 meta-oe/recipes-kernel/ktap/ktap-module_0.3.bb
 create mode 100644 meta-oe/recipes-kernel/ktap/ktap.inc
 create mode 100644 meta-oe/recipes-kernel/ktap/ktap_0.3.bb
meta-oe/recipes-kernel/ktap/ktap-module_0.3.bb new file +19 -0
new file mode 100644
index 0000000..12167ea
@@ -0,0 +1,19 @@
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require ktap.inc
+
+DESCRIPTION = "KTAP is a scripting dynamic tracing tool for Linux"
+
+inherit module
+
+# Only build the module
+MAKE_TARGETS = "mod"
+
+# Kernel module packages MUST begin with 'kernel-module-', otherwise
+# multilib image generation can fail.
+#
+# The following line is only necessary if the recipe name does not begin
+# with kernel-module-.
+#
+PKG_${PN} = "kernel-module-${PN}"
+
meta-oe/recipes-kernel/ktap/ktap.inc new file +11 -0
new file mode 100644
index 0000000..7fde165
@@ -0,0 +1,11 @@
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+HOMEPAGE = "http://www.ktap.org"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE-GPL;md5=eb723b61539feef013de476e68b5c50a"
+
+SRCREV = "6a5100b77321ce5792dfea34fa500ea537b1858c"
+SRC_URI = "git://github.com/ktap/ktap.git"
+
+S = "${WORKDIR}/git"
+
meta-oe/recipes-kernel/ktap/ktap_0.3.bb new file +17 -0
new file mode 100644
index 0000000..f5dd62f
@@ -0,0 +1,17 @@
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require ktap.inc
+
+SUMMARY = "KTAP is a scripting dynamic tracing tool for Linux"
+DEPENDS = "ktap-module"
+
+# Only build the userspace app
+EXTRA_OEMAKE = "ktap"
+
+do_install() {
+    install -d ${D}${bindir}
+    install -m 0755 ${S}/ktap ${D}${bindir}/
+}
+
+RDEPENDS_${PN} = "kernel-module-ktapvm"
+
Signature · 1 line
1.8.4.rc3