Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Sverdlin <alexander.sverdlin@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] linux-tools: Add liblockdep
Date: Sun, 11 Nov 2018 16:06:48 +0100	[thread overview]
Message-ID: <20181111150652.17459-3-alexander.sverdlin@gmail.com> (raw)
In-Reply-To: <20181111150652.17459-1-alexander.sverdlin@gmail.com>

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---
 package/linux-tools/Config.in                | 13 ++++++++
 package/linux-tools/linux-tool-liblockdep.mk | 34 ++++++++++++++++++++
 2 files changed, 47 insertions(+)
 create mode 100644 package/linux-tools/linux-tool-liblockdep.mk

diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in
index 349dc6bf0d..63b48cfa80 100644
--- a/package/linux-tools/Config.in
+++ b/package/linux-tools/Config.in
@@ -34,6 +34,19 @@ config BR2_PACKAGE_LINUX_TOOLS_IIO
 
 	  These tools are available only from kernel version 4.7.
 
+config BR2_PACKAGE_LINUX_TOOLS_LIBLOCKDEP
+	bool "liblockdep"
+	help
+	  liblockdep is a tiny wrapper built around kernel/lockdep.c.
+	  The aim is to provide the same functionality the kernel gets
+	  from lockdep to userspace.
+
+	  The bulk of the code here is the LD_PRELOAD support which
+	  provides users an easy way to test their code without having
+	  to integrate liblockdep into said code.
+
+	  http://lwn.net/Articles/536363/
+
 config BR2_PACKAGE_LINUX_TOOLS_PERF
 	bool "perf"
 	select BR2_PACKAGE_LINUX_TOOLS
diff --git a/package/linux-tools/linux-tool-liblockdep.mk b/package/linux-tools/linux-tool-liblockdep.mk
new file mode 100644
index 0000000000..63c6fa3500
--- /dev/null
+++ b/package/linux-tools/linux-tool-liblockdep.mk
@@ -0,0 +1,34 @@
+################################################################################
+#
+# liblockdep
+#
+################################################################################
+
+LINUX_TOOLS += liblockdep
+
+LIBLOCKDEP_MAKE_FLAGS = \
+	$(LINUX_MAKE_FLAGS) \
+	prefix=/usr
+
+define LIBLOCKDEP_BUILD_CMDS
+	$(Q)if test ! -f $(@D)/tools/lib/lockdep/Makefile ; then \
+		echo "Your kernel version is too old and does not have the liblockdep." ; \
+		echo "At least kernel 4.1 must be used." ; \
+		exit 1 ; \
+	fi
+
+	$(TARGET_MAKE_ENV) $(MAKE) $(LIBLOCKDEP_MAKE_FLAGS) -C $(@D)/tools \
+		liblockdep
+endef
+
+define LIBLOCKDEP_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(LIBLOCKDEP_MAKE_FLAGS) -C $(@D)/tools \
+		DESTDIR=$(STAGING_DIR) \
+		liblockdep_install
+endef
+
+define LIBLOCKDEP_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(LIBLOCKDEP_MAKE_FLAGS) -C $(@D)/tools \
+		DESTDIR=$(TARGET_DIR) \
+		liblockdep_install
+endef
-- 
2.19.1

  parent reply	other threads:[~2018-11-11 15:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-11 15:06 [Buildroot] [PATCH] libtool: Make libltdl a separate package Alexander Sverdlin
2018-11-11 15:06 ` [Buildroot] [PATCH] Add syslinux installer host package Alexander Sverdlin
2018-11-11 20:33   ` Thomas Petazzoni
2018-11-12  0:03     ` Carlos Santos
2018-11-11 15:06 ` Alexander Sverdlin [this message]
2018-11-11 21:53   ` [Buildroot] [PATCH] linux-tools: Add liblockdep Thomas Petazzoni
2018-11-11 15:06 ` [Buildroot] [PATCH] Add mini-snmpd package Alexander Sverdlin
2018-11-13 21:52   ` Thomas Petazzoni
2018-11-22 17:55     ` Alexander Sverdlin
2018-11-11 15:06 ` [Buildroot] [PATCH] acpid: Add systemd service Alexander Sverdlin
2018-11-11 20:46   ` Thomas Petazzoni
2018-11-11 15:06 ` [Buildroot] [PATCH] acpid: Make bundled event files optional Alexander Sverdlin
2018-11-11 20:50   ` Thomas Petazzoni
2018-11-11 23:36     ` Carlos Santos
2018-11-11 15:06 ` [Buildroot] [PATCH] systemd: Explicitly configure split-usr=false and split-bin=true Alexander Sverdlin
2018-11-11 16:34   ` Yann E. MORIN
2018-11-11 20:55   ` Thomas Petazzoni
2018-11-11 23:41     ` Alexander Sverdlin
2018-11-12  8:08     ` Yann E. MORIN
2018-11-13 22:19     ` Alexander Sverdlin
2018-11-11 21:17 ` [Buildroot] [PATCH] libtool: Make libltdl a separate package Thomas Petazzoni
2018-11-11 22:15   ` Arnout Vandecappelle
2018-11-12  8:06     ` Yann E. MORIN
2018-11-22 19:02       ` Alexander Sverdlin
2018-11-23  8:04         ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181111150652.17459-3-alexander.sverdlin@gmail.com \
    --to=alexander.sverdlin@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox