Skip to content

Commit

Permalink
Merge pull request #938 from dorssel/update_usbip
Browse files Browse the repository at this point in the history
Update WSL usbip
  • Loading branch information
dorssel committed May 3, 2024
2 parents 5b36605 + 1630290 commit 92e5da3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 34 deletions.
41 changes: 7 additions & 34 deletions Usbipd/WSL/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,69 +10,42 @@ The binary `usbip` was built from sources subject to different (compatible) lice

- Part of the Linux kernel, in particular the sources in `tools/usb/usbip`

A copy of these sources was used from [Windows Subsystem for Linux (WSL)](https://github.com/microsoft/WSL2-Linux-Kernel/tree/linux-msft-wsl-5.15.133.1)
A copy of these sources was used from [WSL2-Linux-Kernel](https://github.com/microsoft/WSL2-Linux-Kernel)
subject to the terms and conditions of the
[GNU General Public License, version 2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).

With the binary distribution of WSL came a written offer to download the source code from
<https://github.com/microsoft/WSL2-Linux-Kernel/tree/linux-msft-wsl-5.15.133.1/>.
With the binary distribution of WSL2-Linux-Kernel came a written offer to download the source code from
<https://github.com/microsoft/WSL2-Linux-Kernel/tree/linux-msft-wsl-5.15.146.1/>.

This README is to conform to clause 3c of the license.

Note that the subset of sources in `tools/usb/usbip` are in fact licensed under GNU General Public License, version 2 *or later*.

- `libudev-zero`

`usbip` is statically linked against [`libudev-zero`](https://github.com/illiliti/libudev-zero)
`usbip` is statically linked against [`libudev-zero`](https://github.com/illiliti/libudev-zero) version 1.0.3
subject to the terms and conditions of the
[ISC License](https://opensource.org/license/isc-license-txt/).

# diff

The following changes were made to the source and the build script for `usbip`:
The following changes were made to the build script for `usbip`:

- All commands except 'attach' removed
- Linking against `libudev-zero`
- Static linking
- Stripped output

```diff
diff --git a/tools/usb/usbip/src/Makefile.am b/tools/usb/usbip/src/Makefile.am
index e26f39e0579d..212f40de7607 100644
index e26f39e0579d..2c9db4e68ced 100644
--- a/tools/usb/usbip/src/Makefile.am
+++ b/tools/usb/usbip/src/Makefile.am
@@ -2,11 +2,11 @@
@@ -2,6 +2,7 @@
AM_CPPFLAGS = -I$(top_srcdir)/libsrc -DUSBIDS_FILE='"@USBIDS_DIR@/usb.ids"'
AM_CFLAGS = @EXTRA_CFLAGS@
LDADD = $(top_builddir)/libsrc/libusbip.la
+LDFLAGS = -all-static -L../../../../../libudev-zero/ -s

sbin_PROGRAMS := usbip usbipd

usbip_SOURCES := usbip.h utils.h usbip.c utils.c usbip_network.c \
- usbip_attach.c usbip_detach.c usbip_list.c \
- usbip_bind.c usbip_unbind.c usbip_port.c
+ usbip_attach.c

usbipd_SOURCES := usbip_network.h usbipd.c usbip_network.c
diff --git a/tools/usb/usbip/src/usbip.c b/tools/usb/usbip/src/usbip.c
index f7c7220d9766..4183d6c72572 100644
--- a/tools/usb/usbip/src/usbip.c
+++ b/tools/usb/usbip/src/usbip.c
@@ -57,6 +57,7 @@ static const struct command cmds[] = {
.help = "Attach a remote USB device",
.usage = usbip_attach_usage
},
+#if 0
{
.name = "detach",
.fn = usbip_detach,
@@ -87,6 +88,7 @@ static const struct command cmds[] = {
.help = "Show imported USB devices",
.usage = NULL
},
+#endif
{ NULL, NULL, NULL, NULL }
};

```
Binary file modified Usbipd/WSL/usbip
Binary file not shown.

0 comments on commit 92e5da3

Please sign in to comment.