mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] kernel: add usbip package
@ 2017-07-27 16:09 Michael Grzeschik
  2017-08-03  6:52 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Grzeschik @ 2017-07-27 16:09 UTC (permalink / raw)
  To: ptxdist

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [PATCH] kernel: add usbip package
  2017-07-27 16:09 [ptxdist] [PATCH] kernel: add usbip package Michael Grzeschik
@ 2017-08-03  6:52 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2017-08-03  6:52 UTC (permalink / raw)
  To: ptxdist

On Thu, Jul 27, 2017 at 06:09:21PM +0200, Michael Grzeschik wrote:
> 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.

I think this would be cleaner as a separate package. Talk to me if you need
help getting the variables right.

Also, this need libudev.

Michael

> 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

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-03  6:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-27 16:09 [ptxdist] [PATCH] kernel: add usbip package Michael Grzeschik
2017-08-03  6:52 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox