mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Grzeschik <m.grzeschik@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] kernel: add usbip package
Date: Thu, 27 Jul 2017 18:09:21 +0200	[thread overview]
Message-ID: <20170727160921.11942-1-m.grzeschik@pengutronix.de> (raw)

We add the option to enable and compile the usbip util in the kernel
package. The install stage prepares it to the userland with the
library and cmdline tool.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
 rules/kernel.in   |  6 ++++++
 rules/kernel.make | 17 +++++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/rules/kernel.in b/rules/kernel.in
index be5753ed3..ea5b90e51 100644
--- a/rules/kernel.in
+++ b/rules/kernel.in
@@ -34,4 +34,10 @@ config KERNEL_TOOL_IIO
 	help
 	  IIO tools help to access and analyze the iio devices.
 
+config KERNEL_TOOL_USBIP
+	select KERNEL_XPKG
+	bool "usbip"
+	help
+	  usbip includes the userspace tools to setup the vhci server.
+
 endif
diff --git a/rules/kernel.make b/rules/kernel.make
index 3ed90c4ae..e96f868a3 100644
--- a/rules/kernel.make
+++ b/rules/kernel.make
@@ -199,6 +199,13 @@ ifdef PTXCONF_KERNEL_TOOL_IIO
 		CPPFLAGS="-D__EXPORTED_HEADERS__ -I$(KERNEL_DIR)/include/uapi -I$(KERNEL_DIR)/include" \
 		$(KERNEL_MAKEVARS) -C tools/iio
 endif
+ifdef PTXCONF_KERNEL_TOOL_USBIP
+	@+cd $(KERNEL_DIR)/tools/usb/usbip && $(KERNEL_PATH) $(KERNEL_ENV) $(CROSS_ENV) ./autogen.sh
+	@+cd $(KERNEL_DIR)/tools/usb/usbip && $(KERNEL_PATH) $(KERNEL_ENV) $(CROSS_ENV) ./configure $(CROSS_AUTOCONF_USR)
+	@+cd $(KERNEL_DIR) && $(KERNEL_PATH) $(KERNEL_ENV) $(CROSS_ENV) $(MAKE) \
+		CPPFLAGS="-D__EXPORTED_HEADERS__ -I$(KERNEL_DIR)/include/uapi -I$(KERNEL_DIR)/include" \
+		$(KERNEL_MAKEVARS) -C tools/usb/usbip
+endif
 	@$(call touch)
 
 endif # !PTXCONF_PROJECT_USE_PRODUCTION
@@ -217,6 +224,10 @@ endif
 ifdef PTXCONF_KERNEL_DTC
 	@install -m 755 "$(KERNEL_DIR)/scripts/dtc/dtc" "$(PTXCONF_SYSROOT_HOST)/bin/dtc"
 endif
+ifdef PTXCONF_KERNEL_TOOL_USBIP
+	cd $(KERNEL_DIR) && $(KERNEL_PATH) $(KERNEL_ENV) $(CROSS_ENV) $(MAKE) \
+		$(KERNEL_MAKEVARS) DESTDIR=$(KERNEL_PKGDIR) -C tools/usb/usbip install
+endif
 
 	@$(call touch)
 
@@ -262,6 +273,12 @@ ifdef PTXCONF_KERNEL_TOOL_IIO
 		/usr/bin/iio_event_monitor)
 endif
 
+ifdef PTXCONF_KERNEL_TOOL_USBIP
+	@$(call install_lib, kernel, 0, 0, 0644, libusbip)
+	@$(call install_copy, kernel, 0, 0, 0755, -, /usr/sbin/usbipd)
+	@$(call install_copy, kernel, 0, 0, 0755, -, /usr/sbin/usbip)
+endif
+
 	@$(call install_finish, kernel)
 endif
 
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2017-07-27 16:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-27 16:09 Michael Grzeschik [this message]
2017-08-03  6:52 ` Michael Olbrich

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=20170727160921.11942-1-m.grzeschik@pengutronix.de \
    --to=m.grzeschik@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /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