From: Tal Shorer <tal.shorer@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/usbip: new package
Date: Sun, 11 Dec 2016 21:44:42 +0200 [thread overview]
Message-ID: <1481485482-19671-1-git-send-email-tal.shorer@gmail.com> (raw)
In-Reply-To: <1481479965-26226-1-git-send-email-tal.shorer@gmail.com>
usbip is part of the linux tree, so it should be part of the
linux-tools infra. However, it uses autotools, which are rather
difficult to use in the linux-tools infra.
So we make it a proper, separate autotools package. We only rely on
the kernel to be extracted and use that as the source.
Signed-off-by: Tal Shorer <tal.shorer@gmail.com>
---
Note: in order for the user-friendly error to appear when the source
directory is wrong (depends on a config item, was moved in linux-3.17),
it requires that the patch to fix the hook order in the
rsync command (https://patchwork.ozlabs.org/patch/704859/) goes
in first.
---
package/linux-tools/Config.in | 2 ++
package/usbip/Config.in | 14 ++++++++++++++
package/usbip/usbip.mk | 29 +++++++++++++++++++++++++++++
3 files changed, 45 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..7cd6c29
--- /dev/null
+++ b/package/usbip/Config.in
@@ -0,0 +1,14 @@
+# Prompt in the linux-tools package
+# Here only for the menuconfig; it's a real package
+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.
+
+if BR2_PACKAGE_USBIP
+
+config BR2_PACKAGE_USBIP_3_16_OR_EARLIER
+ bool "use old directory path for usbip (Linux kernel <= 3.16)"
+
+endif
diff --git a/package/usbip/usbip.mk b/package/usbip/usbip.mk
new file mode 100644
index 0000000..51c0480
--- /dev/null
+++ b/package/usbip/usbip.mk
@@ -0,0 +1,29 @@
+################################################################################
+#
+# usbib
+#
+################################################################################
+
+ifeq ($(BR2_PACKAGE_USBIP_3_16_OR_EARLIER),y)
+USBIP_BASE_DIR = drivers/staging/usbip/userspace
+else
+USBIP_BASE_DIR = tools/usb/usbip
+endif
+USBIP_SITE = $(LINUX_DIR)/$(USBIP_BASE_DIR)
+USBIP_SITE_METHOD = local
+USBIP_LICENSE = GPLv2
+USBIP_LICENSE_FILES = COPYING
+USBIP_INSTALL_STAGING = YES
+USBIP_PATCH_DEPENDENCIES = linux
+
+USBIP_AUTORECONF = yes
+
+define USBIP_CHECK_SRC
+ @if [ ! -d $(USBIP_SITE) ]; then \
+ echo "Your kernel does not have usbip in $(USBIP_BASE_DIR)" >&2; \
+ exit 1; \
+ fi
+endef
+USBIP_PRE_RSYNC_HOOKS += USBIP_CHECK_SRC
+
+$(eval $(autotools-package))
--
2.7.4
next prev parent reply other threads:[~2016-12-11 19:44 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-09 8:37 [Buildroot] [PATCH] usbip: add a new package Tal Shorer
2016-12-10 13:31 ` Thomas Petazzoni
2016-12-10 18:39 ` Tal Shorer
2016-12-11 10:06 ` Yann E. MORIN
2016-12-11 13:56 ` Yann E. MORIN
2016-12-11 17:39 ` Tal Shorer
2016-12-11 17:45 ` Yann E. MORIN
2016-12-11 18:12 ` [Buildroot] [PATCH] pkg-generic: run $(PKG)_PRE_RSYNC_HOOKS before checking for the existence of $(SRCDIR) Tal Shorer
2016-12-11 19:19 ` Yann E. MORIN
2016-12-11 19:44 ` Tal Shorer [this message]
2016-12-17 15:00 ` Thomas Petazzoni
2016-12-11 18:31 ` [Buildroot] [PATCH] usbip: add a new package Tal Shorer
2016-12-11 19:24 ` Yann E. MORIN
2016-12-11 19:59 ` Arnout Vandecappelle
2016-12-11 21:40 ` Yann E. MORIN
2016-12-11 21:46 ` Tal Shorer
2016-12-11 22:05 ` Yann E. MORIN
2016-12-11 22:11 ` Tal Shorer
2016-12-11 22:20 ` Yann E. MORIN
2016-12-11 22:30 ` Tal Shorer
2016-12-12 9:40 ` Arnout Vandecappelle
2016-12-12 17:25 ` Yann E. MORIN
2016-12-12 22:17 ` Tal Shorer
2016-12-12 22:21 ` [Buildroot] [PATCH v3] usbip: " Tal Shorer
2016-12-13 17:53 ` Yann E. MORIN
2016-12-14 17:28 ` [Buildroot] [PATCH v4] " Tal Shorer
2016-12-21 22:17 ` Tal Shorer
2016-12-22 20:45 ` Yann E. MORIN
2016-12-23 18:24 ` Yann E. MORIN
2016-12-23 19:10 ` Yann E. MORIN
2016-12-13 17:35 ` [Buildroot] [PATCH] usbip: add a " Yann E. MORIN
2016-12-12 17:09 ` [Buildroot] [PATCH v2 1/2] package: linux-tools: allow tools to define configure hooks Tal Shorer
2016-12-12 17:09 ` [Buildroot] [PATCH v2 2/2] package: linux-tools: add usbip Tal Shorer
2016-12-12 17:26 ` Yann E. MORIN
-- strict thread matches above, loose matches on Subject: below --
2024-12-20 16:44 [Buildroot] [PATCH] package/usbip: new package yann.morin
2024-12-27 12:14 ` Julien Olivain
2025-01-02 9:01 ` yann.morin
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=1481485482-19671-1-git-send-email-tal.shorer@gmail.com \
--to=tal.shorer@gmail.com \
--cc=buildroot@busybox.net \
/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