* [Buildroot] [PATCH] usbip: new package
@ 2012-12-26 6:44 Marcin Bis
2012-12-26 7:06 ` Baruch Siach
0 siblings, 1 reply; 11+ messages in thread
From: Marcin Bis @ 2012-12-26 6:44 UTC (permalink / raw)
To: buildroot
Hi
The following patch adds new package: usbip (tools for sharing USB
devices over network).
I have tested it under various ARM builds.
Please consider adding it to Buildroot.
Signed-off-by: Marcin Bis <marcin@bis.org.pl>
--
package/Config.in | 1 +
package/usbip/Config.in | 13 +++++++++++++
package/usbip/usbip.mk | 15 +++++++++++++++
3 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/package/Config.in b/package/Config.in
index 3d556b2..c773c46 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -684,6 +684,7 @@ source "package/transmission/Config.in"
source "package/ttcp/Config.in"
source "package/udpcast/Config.in"
source "package/ulogd/Config.in"
+source "package/usbip/Config.in"
source "package/ushare/Config.in"
source "package/vde2/Config.in"
source "package/vpnc/Config.in"
diff --git a/package/usbip/Config.in b/package/usbip/Config.in
new file mode 100644
index 0000000..3cdbbc7
--- /dev/null
+++ b/package/usbip/Config.in
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_USBIP
+ bool "usbip"
+ select BR2_PACKAGE_LIBGLIB2
+ select BR2_PACKAGE_LIBSYSFS
+ help
+ Userspace tools for sharing USB devices over TCP/IP network.
+
+ http://usbip.sourceforge.net/
+
+ This package adds both: client and server support.
+ Note: For exporting or connecting to exported USB devices
+ additional kernel drivers are needed (available since 2.6.28
+ under Stagging).
diff --git a/package/usbip/usbip.mk b/package/usbip/usbip.mk
new file mode 100644
index 0000000..2ec3ce9
--- /dev/null
+++ b/package/usbip/usbip.mk
@@ -0,0 +1,15 @@
+#############################################################
+#
+# usbip
+#
+#############################################################
+
+USBIP_VERSION = 0.1.7
+USBIP_SITE = http://downloads.sourceforge.net/project/usbip/usbip/$(USBIP_VERSION)
+USBIP_LICENSE = GPLv2+
+USBIP_LICENSE_FILES = COPYING
+USBIP_CONF_OPT = --without-tcpwrappers
+USBIP_SUBDIR = src
+USBIP_AUTORECONF = YES
+
+$(eval $(autotools-package))
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] usbip: new package
2012-12-26 6:44 [Buildroot] [PATCH] usbip: new package Marcin Bis
@ 2012-12-26 7:06 ` Baruch Siach
2012-12-26 8:27 ` [Buildroot] [PATCH v2] " Marcin Bis
2012-12-26 8:49 ` [Buildroot] [PATCH] " Thomas Petazzoni
0 siblings, 2 replies; 11+ messages in thread
From: Baruch Siach @ 2012-12-26 7:06 UTC (permalink / raw)
To: buildroot
Hi Marcin,
On Wed, Dec 26, 2012 at 07:44:32AM +0100, Marcin Bis wrote:
> The following patch adds new package: usbip (tools for sharing USB
> devices over network).
> I have tested it under various ARM builds.
>
> Please consider adding it to Buildroot.
This sentence is not part of the commit log. You can put it below...
>
> Signed-off-by: Marcin Bis <marcin@bis.org.pl>
> --
here.
> package/Config.in | 1 +
> package/usbip/Config.in | 13 +++++++++++++
> package/usbip/usbip.mk | 15 +++++++++++++++
> 3 files changed, 29 insertions(+), 0 deletions(-)
>
> diff --git a/package/Config.in b/package/Config.in
> index 3d556b2..c773c46 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -684,6 +684,7 @@ source "package/transmission/Config.in"
> source "package/ttcp/Config.in"
> source "package/udpcast/Config.in"
> source "package/ulogd/Config.in"
> +source "package/usbip/Config.in"
> source "package/ushare/Config.in"
> source "package/vde2/Config.in"
> source "package/vpnc/Config.in"
> diff --git a/package/usbip/Config.in b/package/usbip/Config.in
> new file mode 100644
> index 0000000..3cdbbc7
> --- /dev/null
> +++ b/package/usbip/Config.in
> @@ -0,0 +1,13 @@
> +config BR2_PACKAGE_USBIP
> + bool "usbip"
> + select BR2_PACKAGE_LIBGLIB2
> + select BR2_PACKAGE_LIBSYSFS
Please add a 'depends' for each dependency of these packages. glib2 depends on
BR2_USE_WCHAR.
> + help
> + Userspace tools for sharing USB devices over TCP/IP network.
> +
> + http://usbip.sourceforge.net/
> +
> + This package adds both: client and server support.
Letting the user select the client and server support independently from each
other would be nice, but this can be done later.
> + Note: For exporting or connecting to exported USB devices
> + additional kernel drivers are needed (available since 2.6.28
> + under Stagging).
> diff --git a/package/usbip/usbip.mk b/package/usbip/usbip.mk
> new file mode 100644
> index 0000000..2ec3ce9
> --- /dev/null
> +++ b/package/usbip/usbip.mk
> @@ -0,0 +1,15 @@
> +#############################################################
> +#
> +# usbip
> +#
> +#############################################################
> +
> +USBIP_VERSION = 0.1.7
> +USBIP_SITE = http://downloads.sourceforge.net/project/usbip/usbip/$(USBIP_VERSION)
> +USBIP_LICENSE = GPLv2+
> +USBIP_LICENSE_FILES = COPYING
> +USBIP_CONF_OPT = --without-tcpwrappers
> +USBIP_SUBDIR = src
> +USBIP_AUTORECONF = YES
Why is this needed? Please add an explanation comment.
You also need to add a USBIP_DEPENDENCIES listing the packages that you select
in Config.in, to ensure correct build order.
> +
> +$(eval $(autotools-package))
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH v2] usbip: new package
2012-12-26 7:06 ` Baruch Siach
@ 2012-12-26 8:27 ` Marcin Bis
2012-12-26 8:49 ` [Buildroot] [PATCH] " Thomas Petazzoni
1 sibling, 0 replies; 11+ messages in thread
From: Marcin Bis @ 2012-12-26 8:27 UTC (permalink / raw)
To: buildroot
Signed-off-by: Marcin Bis <marcin@bis.org.pl>
--
package/Config.in | 1 +
package/usbip/Config.in | 33 +++++++++++++++++++++++++++++++++
package/usbip/usbip.mk | 32 ++++++++++++++++++++++++++++++++
3 files changed, 66 insertions(+), 0 deletions(-)
diff --git a/package/Config.in b/package/Config.in
index 3d556b2..c773c46 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -684,6 +684,7 @@ source "package/transmission/Config.in"
source "package/ttcp/Config.in"
source "package/udpcast/Config.in"
source "package/ulogd/Config.in"
+source "package/usbip/Config.in"
source "package/ushare/Config.in"
source "package/vde2/Config.in"
source "package/vpnc/Config.in"
diff --git a/package/usbip/Config.in b/package/usbip/Config.in
new file mode 100644
index 0000000..7abf1d1
--- /dev/null
+++ b/package/usbip/Config.in
@@ -0,0 +1,33 @@
+config BR2_PACKAGE_USBIP
+ bool "usbip"
+ depends on BR2_USE_WCHAR # glib2
+ select BR2_PACKAGE_LIBGLIB2
+ select BR2_PACKAGE_LIBSYSFS
+ help
+ Userspace tools for sharing USB devices over TCP/IP network.
+
+ http://usbip.sourceforge.net/
+
+ Depends on glib.
+
+ Note: For exporting or connecting to exported USB devices
+ additional kernel drivers are needed (available since 2.6.28
+ under Stagging).
+
+comment "usbip requires a toolchain with WCHAR support"
+ depends on !BR2_USE_WCHAR
+
+if BR2_PACKAGE_USBIP
+
+config BR2_USBIP_CLIENT
+ bool "usbip client"
+ default y
+ help
+ the client part of usbip
+
+config BR2_USBIP_SERVER
+ bool "usbip server"
+ help
+ the server part of usbip
+
+endif
diff --git a/package/usbip/usbip.mk b/package/usbip/usbip.mk
new file mode 100644
index 0000000..d1f7021
--- /dev/null
+++ b/package/usbip/usbip.mk
@@ -0,0 +1,32 @@
+#############################################################
+#
+# usbip
+#
+#############################################################
+
+USBIP_VERSION = 0.1.7
+USBIP_SITE = http://downloads.sourceforge.net/project/usbip/usbip/$(USBIP_VERSION)
+USBIP_LICENSE = GPLv2+
+USBIP_LICENSE_FILES = COPYING
+USBIP_CONF_OPT = --without-tcpwrappers
+USBIP_DEPENDENCIES = libglib2 libsysfs
+
+#The userspace applications are in the src/ subdirectory.
+USBIP_SUBDIR = src
+#Running autogen.sh is needed to create configure script.
+USBIP_AUTORECONF = YES
+
+ifneq ($(BR2_USBIP_CLIENT),y)
+ USBIP_TOREMOVE += usbip
+endif
+ifneq ($(BR2_USBIP_SERVER),y)
+ USBIP_TOREMOVE += usbipd bind_driver
+endif
+
+define USBIP_CLEANUP_AFTER_INSTALL
+ rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(USBIP_TOREMOVE))
+endef
+
+USBIP_POST_INSTALL_TARGET_HOOKS += USBIP_CLEANUP_AFTER_INSTALL
+
+$(eval $(autotools-package))
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] usbip: new package
2012-12-26 7:06 ` Baruch Siach
2012-12-26 8:27 ` [Buildroot] [PATCH v2] " Marcin Bis
@ 2012-12-26 8:49 ` Thomas Petazzoni
2012-12-26 8:55 ` [Buildroot] [PATCH v3] " Marcin Bis
1 sibling, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2012-12-26 8:49 UTC (permalink / raw)
To: buildroot
On Wed, 26 Dec 2012 09:06:12 +0200, Baruch Siach wrote:
> Hi Marcin,
>
> On Wed, Dec 26, 2012 at 07:44:32AM +0100, Marcin Bis wrote:
> > The following patch adds new package: usbip (tools for sharing USB
> > devices over network).
> > I have tested it under various ARM builds.
> >
> > Please consider adding it to Buildroot.
>
> This sentence is not part of the commit log. You can put it below...
>
> >
> > Signed-off-by: Marcin Bis <marcin@bis.org.pl>
Please use a real e-mail here, i.e marcin at bis.org.pl
> > --
>
> here.
And the separator should be --- and not --, if I'm correct.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH v3] usbip: new package
2012-12-26 8:49 ` [Buildroot] [PATCH] " Thomas Petazzoni
@ 2012-12-26 8:55 ` Marcin Bis
2012-12-26 16:35 ` Baruch Siach
2013-08-13 21:20 ` Thomas Petazzoni
0 siblings, 2 replies; 11+ messages in thread
From: Marcin Bis @ 2012-12-26 8:55 UTC (permalink / raw)
To: buildroot
Signed-off-by: Marcin Bis <marcin@bis.org.pl>
---
package/Config.in | 1 +
package/usbip/Config.in | 33 +++++++++++++++++++++++++++++++++
package/usbip/usbip.mk | 32 ++++++++++++++++++++++++++++++++
3 files changed, 66 insertions(+), 0 deletions(-)
diff --git a/package/Config.in b/package/Config.in
index 3d556b2..c773c46 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -684,6 +684,7 @@ source "package/transmission/Config.in"
source "package/ttcp/Config.in"
source "package/udpcast/Config.in"
source "package/ulogd/Config.in"
+source "package/usbip/Config.in"
source "package/ushare/Config.in"
source "package/vde2/Config.in"
source "package/vpnc/Config.in"
diff --git a/package/usbip/Config.in b/package/usbip/Config.in
new file mode 100644
index 0000000..7abf1d1
--- /dev/null
+++ b/package/usbip/Config.in
@@ -0,0 +1,33 @@
+config BR2_PACKAGE_USBIP
+ bool "usbip"
+ depends on BR2_USE_WCHAR # glib2
+ select BR2_PACKAGE_LIBGLIB2
+ select BR2_PACKAGE_LIBSYSFS
+ help
+ Userspace tools for sharing USB devices over TCP/IP network.
+
+ http://usbip.sourceforge.net/
+
+ Depends on glib.
+
+ Note: For exporting or connecting to exported USB devices
+ additional kernel drivers are needed (available since 2.6.28
+ under Stagging).
+
+comment "usbip requires a toolchain with WCHAR support"
+ depends on !BR2_USE_WCHAR
+
+if BR2_PACKAGE_USBIP
+
+config BR2_USBIP_CLIENT
+ bool "usbip client"
+ default y
+ help
+ the client part of usbip
+
+config BR2_USBIP_SERVER
+ bool "usbip server"
+ help
+ the server part of usbip
+
+endif
diff --git a/package/usbip/usbip.mk b/package/usbip/usbip.mk
new file mode 100644
index 0000000..d1f7021
--- /dev/null
+++ b/package/usbip/usbip.mk
@@ -0,0 +1,32 @@
+#############################################################
+#
+# usbip
+#
+#############################################################
+
+USBIP_VERSION = 0.1.7
+USBIP_SITE = http://downloads.sourceforge.net/project/usbip/usbip/$(USBIP_VERSION)
+USBIP_LICENSE = GPLv2+
+USBIP_LICENSE_FILES = COPYING
+USBIP_CONF_OPT = --without-tcpwrappers
+USBIP_DEPENDENCIES = libglib2 libsysfs
+
+#The userspace applications are in the src/ subdirectory.
+USBIP_SUBDIR = src
+#Running autogen.sh is needed to create configure script.
+USBIP_AUTORECONF = YES
+
+ifneq ($(BR2_USBIP_CLIENT),y)
+ USBIP_TOREMOVE += usbip
+endif
+ifneq ($(BR2_USBIP_SERVER),y)
+ USBIP_TOREMOVE += usbipd bind_driver
+endif
+
+define USBIP_CLEANUP_AFTER_INSTALL
+ rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(USBIP_TOREMOVE))
+endef
+
+USBIP_POST_INSTALL_TARGET_HOOKS += USBIP_CLEANUP_AFTER_INSTALL
+
+$(eval $(autotools-package))
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH v3] usbip: new package
2012-12-26 8:55 ` [Buildroot] [PATCH v3] " Marcin Bis
@ 2012-12-26 16:35 ` Baruch Siach
2012-12-26 16:49 ` Jeremy Rosen
2013-08-13 21:20 ` Thomas Petazzoni
1 sibling, 1 reply; 11+ messages in thread
From: Baruch Siach @ 2012-12-26 16:35 UTC (permalink / raw)
To: buildroot
Hi Marcin,
On Wed, Dec 26, 2012 at 09:55:47AM +0100, Marcin Bis wrote:
[...]
> +USBIP_VERSION = 0.1.7
This package is very old. Newer version is distributed with the kernel sources
under drivers/staging/usbip/userspace/. I'm not sure how to extract these
files during build. Maybe the experts here have an Idea?
baruch
> +USBIP_SITE = http://downloads.sourceforge.net/project/usbip/usbip/$(USBIP_VERSION)
> +USBIP_LICENSE = GPLv2+
> +USBIP_LICENSE_FILES = COPYING
> +USBIP_CONF_OPT = --without-tcpwrappers
> +USBIP_DEPENDENCIES = libglib2 libsysfs
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH v3] usbip: new package
2012-12-26 16:35 ` Baruch Siach
@ 2012-12-26 16:49 ` Jeremy Rosen
2012-12-26 17:32 ` Thomas Petazzoni
0 siblings, 1 reply; 11+ messages in thread
From: Jeremy Rosen @ 2012-12-26 16:49 UTC (permalink / raw)
To: buildroot
>
> This package is very old. Newer version is distributed with the
> kernel sources
> under drivers/staging/usbip/userspace/. I'm not sure how to extract
> these
> files during build. Maybe the experts here have an Idea?
>
I would be interested too, more and more tools are distributed with the kernel that we might want to build... I'm thinking of the perf tools in particular
is there an example somewhere on how to handle these ?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH v3] usbip: new package
2012-12-26 16:49 ` Jeremy Rosen
@ 2012-12-26 17:32 ` Thomas Petazzoni
0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2012-12-26 17:32 UTC (permalink / raw)
To: buildroot
Dear Jeremy Rosen,
On Wed, 26 Dec 2012 17:49:57 +0100 (CET), Jeremy Rosen wrote:
> I would be interested too, more and more tools are distributed with
> the kernel that we might want to build... I'm thinking of the perf
> tools in particular
>
> is there an example somewhere on how to handle these ?
Unfortunately, there isn't a really good and nice way of handling these
in Buildroot for now.
I see two options:
* Add sub-options to the "Linux kernel" package, to allow the
installation of perf, usbip or other userspace packages whose source
code is bundled with the kernel source code. This is the easiest
solution, since the kernel version, sources and al. is already
defined. But it also has major drawbacks: 1/ it makes those tools
available only if you build your kernel with Buildroot and 2/ it
puts the configuration options to install those tools inside the
"Linux kernel" menu, which is not very intuitive.
* Add separate packages for each of those tools in package/, with
those packages depending on the "linux" package. The extract step of
those packages could copy the source code of these tools from the
Linux kernel source tree into their build directory, or simply build
then directly from within the Linux kernel source tree. It solves
drawback (2) described above, but not drawback (1).
* Add separate packages for each of those tools in package/, and make
them independent from the Linux package. They would for example
download the latest stable version of the Linux kernel source code,
and use that as a source. The extract step could be customized to
only extract the part of the kernel sources that are actually
relevant for this package. This would solve both drawbacks (1) and
(2), but adds different drawbacks: it's another place where we have
to bump the kernel version regularly, and people may want to
configure the version of the kernel sources used to build those
tools: the primary reason why those tools are bundled with the
kernel sources is because the userspace-to-kernel ABI specific to
those tools gets changed from time to time, and therefore there may
be compatibility issues in running those tools from kernel version X
under a system running kernel version Y.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH v3] usbip: new package
2012-12-26 8:55 ` [Buildroot] [PATCH v3] " Marcin Bis
2012-12-26 16:35 ` Baruch Siach
@ 2013-08-13 21:20 ` Thomas Petazzoni
1 sibling, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2013-08-13 21:20 UTC (permalink / raw)
To: buildroot
Dear Marcin Bis,
On Wed, 26 Dec 2012 09:55:47 +0100, Marcin Bis wrote:
> Signed-off-by: Marcin Bis <marcin@bis.org.pl>
> ---
> package/Config.in | 1 +
> package/usbip/Config.in | 33 +++++++++++++++++++++++++++++++++
> package/usbip/usbip.mk | 32 ++++++++++++++++++++++++++++++++
> 3 files changed, 66 insertions(+), 0 deletions(-)
Are you still interested in getting usbip packaged in Buildroot? If so,
could you rework your patch to use instead the code bundled with the
kernel in drivers/staging/usbip/userspace, as suggested by Baruch?
The package/perf package provides an example on how to create a package
for a tool whose source code is shipped directly within the kernel
sources.
Since those comments have been made in December 2012, without further
postings from you, I'm marking the patch as "Changes requested" in
patchwork. This means that unless you post an updated version at some
point in the future, we'll no longer have 'usbip' in the list of
patches to integrate.
Thanks for your contribution!
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] usbip: add a new package
@ 2016-12-12 22:17 Tal Shorer
2016-12-12 22:21 ` [Buildroot] [PATCH v3] usbip: " Tal Shorer
0 siblings, 1 reply; 11+ messages in thread
From: Tal Shorer @ 2016-12-12 22:17 UTC (permalink / raw)
To: buildroot
On Mon, Dec 12, 2016 at 7:25 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Tal, Arnout, All,
>
> On 2016-12-12 10:40 +0100, Arnout Vandecappelle spake thusly:
>> On 11-12-16 23:30, Tal Shorer wrote:
>> > Both don't deal with source-check, though. I think we should consider
>> > linux-tools again at this point, since it doesn't have any of these
>> > problems (it has its own problems, but I'm beginning to think I'd
>> > rather deal with those). If nobody objects to this approach I'll
>>
>> +1 to that approach.
>
> Still, I don't like the custom autotools commands we'll have to have.
> What about (mock-up, just for the sake of the example):
>
> ###############
> # usbip
> ###############
>
> # No USBIP_SITE, no USB_VERSION, we vampirise the code from the
> # linux kernel
> USBIP_PATCH_DEPENDENCIES = linux
>
> USBIP_SRC_DIR = $)(wildcard \
> $(LINUX_DIR)/tools/usb/usbip \
> $(LINUX_DIR)/drivers/staging/blabla)
>
> define USBIP_EXTRACT_CMDS
> if [ -z "$(USB_SRC_DIR)" ]; then \
> echo "No usbip source in your kernel tree" 2>&1; \
> exit 1; \
> fi
> rsync $(USB_SRC_DIR) $(@D)
> endef
>
> $(eval $(autotools-package))
>
> This way, we still have a proper autotools package, we don;t fail on
> source-check, and we re-use the kernel sources.
This works after some modifications. We end up duplicating the rsync
command from pkg-generic, but the argument that this is better than
duplicating the configure command is easily made.
I'll send a new patch
>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
> | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
> '------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH v3] usbip: new package
2016-12-12 22:17 [Buildroot] [PATCH] usbip: add a " Tal Shorer
@ 2016-12-12 22:21 ` Tal Shorer
2016-12-13 17:53 ` Yann E. MORIN
0 siblings, 1 reply; 11+ messages in thread
From: Tal Shorer @ 2016-12-12 22:21 UTC (permalink / raw)
To: buildroot
add the usbip package from the kernel source, allowing users to share
usb devices over a network connection
Signed-off-by: Tal Shorer <tal.shorer@gmail.com>
---
package/linux-tools/Config.in | 2 ++
package/usbip/Config.in | 5 +++++
package/usbip/usbip.mk | 21 +++++++++++++++++++++
3 files changed, 28 insertions(+)
create mode 100644 package/usbip/Config.in
create mode 100644 package/usbip/usbip.mk
diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in
index db9ed9f..7fceca7 100644
--- a/package/linux-tools/Config.in
+++ b/package/linux-tools/Config.in
@@ -83,4 +83,6 @@ comment "selftests needs BR2_PACKAGE_BUSYBOX_SHOW_OTHERS"
depends on BR2_USE_MMU
depends on !BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
+source package/usbip/Config.in
+
endmenu
diff --git a/package/usbip/Config.in b/package/usbip/Config.in
new file mode 100644
index 0000000..becc437
--- /dev/null
+++ b/package/usbip/Config.in
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_USBIP
+ bool"usbip"
+ help
+ usbip is a set of tools that allows machines to share their
+ usb devices over the network, to be driven by a remote client.
diff --git a/package/usbip/usbip.mk b/package/usbip/usbip.mk
new file mode 100644
index 0000000..72c5c58
--- /dev/null
+++ b/package/usbip/usbip.mk
@@ -0,0 +1,21 @@
+###############
+# usbip
+###############
+
+# No USBIP_SITE, no USB_VERSION, we vampirise the code from the
+# linux kernel
+USBIP_PATCH_DEPENDENCIES = linux
+
+USBIP_SRC_DIR = $(wildcard \
+ $(LINUX_DIR)/tools/usb/usbip \
+ $(LINUX_DIR)/drivers/staging/usbip/userspace)
+
+define USBIP_EXTRACT_CMDS
+ if [[ -z "$(USBIP_SRC_DIR)" ]]; then \
+ echo "No usbip source in your kernel tree" 2>&1; \
+ exit 1; \
+ fi
+ rsync -a $(USBIP_SRC_DIR)/ $(@D)
+endef
+
+$(eval $(autotools-package))
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH v3] usbip: new package
2016-12-12 22:21 ` [Buildroot] [PATCH v3] usbip: " Tal Shorer
@ 2016-12-13 17:53 ` Yann E. MORIN
0 siblings, 0 replies; 11+ messages in thread
From: Yann E. MORIN @ 2016-12-13 17:53 UTC (permalink / raw)
To: buildroot
Tal, All,
On 2016-12-13 00:21 +0200, Tal Shorer spake thusly:
> add the usbip package from the kernel source, allowing users to share
> usb devices over a network connection
>
> Signed-off-by: Tal Shorer <tal.shorer@gmail.com>
> ---
> package/linux-tools/Config.in | 2 ++
> package/usbip/Config.in | 5 +++++
> package/usbip/usbip.mk | 21 +++++++++++++++++++++
> 3 files changed, 28 insertions(+)
> create mode 100644 package/usbip/Config.in
> create mode 100644 package/usbip/usbip.mk
>
> diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in
> index db9ed9f..7fceca7 100644
> --- a/package/linux-tools/Config.in
> +++ b/package/linux-tools/Config.in
> @@ -83,4 +83,6 @@ comment "selftests needs BR2_PACKAGE_BUSYBOX_SHOW_OTHERS"
> depends on BR2_USE_MMU
> depends on !BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
>
> +source package/usbip/Config.in
> +
> endmenu
> diff --git a/package/usbip/Config.in b/package/usbip/Config.in
> new file mode 100644
> index 0000000..becc437
> --- /dev/null
> +++ b/package/usbip/Config.in
> @@ -0,0 +1,5 @@
Maybe add a small comment above the config option to state that this is
included from the linux-tools infra, rather than from the usual
package/Config.in, to avoid confusing developpers later on...
> +config BR2_PACKAGE_USBIP
> + bool"usbip"
So you dropped the dependency on !static. Does that mean you were able
to test it with a static build?
It also required libudev, so you have to depend on BR2_PACKAGE_HAS_UDEV.
It needs usb.ids from usbutils, so you also need to select it:
# This file is included from linux-tools, not from the usual
# package/Config.in location, because it is a linux tools, but uses
# the autotool infra
config BR2_PACKAGE_USBIP
bool "usbip"
depends on BR2_PACKAGE_HAS_UDEV
depends on BR2_TOOLCHAIN_HAS_THREADS # usbutils <- libusb
select BR2_PACKAGE_USBUTILS
comment "usbip needs udev /dev management and toolchain w/ threads"
depends on !BR2_PACKAGE_HAS_UDEV \
|| !BR2_TOOLCHAIN_HAS_THREADS
It also has optional support for libwrap, which we do not have in
Buildroot. See below...
> + help
> + usbip is a set of tools that allows machines to share their
> + usb devices over the network, to be driven by a remote client.
> diff --git a/package/usbip/usbip.mk b/package/usbip/usbip.mk
> new file mode 100644
> index 0000000..72c5c58
> --- /dev/null
> +++ b/package/usbip/usbip.mk
> @@ -0,0 +1,21 @@
> +###############
> +# usbip
> +###############
Incorrect header. ;-)
> +# No USBIP_SITE, no USB_VERSION, we vampirise the code from the
> +# linux kernel
> +USBIP_PATCH_DEPENDENCIES = linux
Since it uses udev, you also have to depend on it:
USBIP_PATCH_DEPENDENCIES = linux
USBIP_DEPENDENCIES = udev
(Just to show that you have both types of dependencies.)
Also, it can use libwrap, which we do not have in Buildroot, so you
may want to forcibly disable it:
USBIP_CONF_OPTS = --without-tcp-wrappers
> +USBIP_SRC_DIR = $(wildcard \
> + $(LINUX_DIR)/tools/usb/usbip \
> + $(LINUX_DIR)/drivers/staging/usbip/userspace)
> +
> +define USBIP_EXTRACT_CMDS
> + if [[ -z "$(USBIP_SRC_DIR)" ]]; then \
No need to use [[...]], you can simply use [...] here.
> + echo "No usbip source in your kernel tree" 2>&1; \
> + exit 1; \
> + fi
> + rsync -a $(USBIP_SRC_DIR)/ $(@D)
I think you will want to really mimick the rsync rule we use elsewhere:
rsync -au --chmod=u=rwX,go=rX $(RSYNC_VCS_EXCLUSIONS) $(USBIP_SRC_DIR)/ $(@D)
Cordialement,
Yann E. MORIN.
> +endef
> +
> +$(eval $(autotools-package))
> --
> 2.7.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-12-13 17:53 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-26 6:44 [Buildroot] [PATCH] usbip: new package Marcin Bis
2012-12-26 7:06 ` Baruch Siach
2012-12-26 8:27 ` [Buildroot] [PATCH v2] " Marcin Bis
2012-12-26 8:49 ` [Buildroot] [PATCH] " Thomas Petazzoni
2012-12-26 8:55 ` [Buildroot] [PATCH v3] " Marcin Bis
2012-12-26 16:35 ` Baruch Siach
2012-12-26 16:49 ` Jeremy Rosen
2012-12-26 17:32 ` Thomas Petazzoni
2013-08-13 21:20 ` Thomas Petazzoni
2016-12-12 22:17 [Buildroot] [PATCH] usbip: add a " Tal Shorer
2016-12-12 22:21 ` [Buildroot] [PATCH v3] usbip: " Tal Shorer
2016-12-13 17:53 ` Yann E. MORIN
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.