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 <[email protected]> > --- > 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 > [email protected] -- 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 [email protected]
