All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] package/libusb-compat: bump to version 0.1.9
@ 2026-10-09  7:49 Zoltan Gyarmati
  2026-10-09  7:49 ` [Buildroot] [PATCH 2/3] package/libusb-compat: add option to build/install examples Zoltan Gyarmati
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Zoltan Gyarmati @ 2026-10-09  7:49 UTC (permalink / raw)
  To: buildroot; +Cc: Zoltan Gyarmati

Release notes:
https://github.com/libusb/libusb-compat-0.1/releases/tag/v0.1.9

Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
---
 package/libusb-compat/libusb-compat.hash | 2 +-
 package/libusb-compat/libusb-compat.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/libusb-compat/libusb-compat.hash b/package/libusb-compat/libusb-compat.hash
index b22fa5434d..ea3a89187c 100644
--- a/package/libusb-compat/libusb-compat.hash
+++ b/package/libusb-compat/libusb-compat.hash
@@ -1,3 +1,3 @@
 # Locally computed:
-sha256  d199c173fd3cd9d27c7f4bb6608befc7eb761984e6664da7d9d4386ff66fe6fc  libusb-compat-0.1.8.tar.gz
+sha256  b09aa33e943080352041ea3d5ac01fd90ea96e9337212865de0dda776886dbb9  libusb-compat-0.1.9.tar.gz
 sha256  5df07007198989c622f5d41de8d703e7bef3d0e79d62e24332ee739a452af62a  COPYING
diff --git a/package/libusb-compat/libusb-compat.mk b/package/libusb-compat/libusb-compat.mk
index b54dbded27..4e78a213b7 100644
--- a/package/libusb-compat/libusb-compat.mk
+++ b/package/libusb-compat/libusb-compat.mk
@@ -5,7 +5,7 @@
 ################################################################################
 
 LIBUSB_COMPAT_VERSION_MAJOR = 0.1
-LIBUSB_COMPAT_VERSION = $(LIBUSB_COMPAT_VERSION_MAJOR).8
+LIBUSB_COMPAT_VERSION = $(LIBUSB_COMPAT_VERSION_MAJOR).9
 LIBUSB_COMPAT_SITE = https://github.com/libusb/libusb-compat-0.1/releases/download/v$(LIBUSB_COMPAT_VERSION)
 LIBUSB_COMPAT_DEPENDENCIES = host-pkgconf libusb
 HOST_LIBUSB_COMPAT_DEPENDENCIES = host-pkgconf host-libusb
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 2/3] package/libusb-compat: add option to build/install examples
  2026-10-09  7:49 [Buildroot] [PATCH 1/3] package/libusb-compat: bump to version 0.1.9 Zoltan Gyarmati
@ 2026-10-09  7:49 ` Zoltan Gyarmati
  2026-10-09  7:49 ` [Buildroot] [PATCH 3/3] support/testing/tests/package/test_libusb_compat: new runtime test Zoltan Gyarmati
  2026-10-10  5:40 ` [Buildroot] [PATCH 1/3] package/libusb-compat: bump to version 0.1.9 Thomas Petazzoni via buildroot
  2 siblings, 0 replies; 4+ messages in thread
From: Zoltan Gyarmati @ 2026-10-09  7:49 UTC (permalink / raw)
  To: buildroot; +Cc: Zoltan Gyarmati

The examples are not installed by upstream, and their names conflict
with other packages (lsusb from busybox/usbutils, testlibusb from the
libusb examples), so install them in /usr/libexec/libusb-compat/examples.

Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
---
 package/libusb-compat/Config.in        | 11 +++++++++++
 package/libusb-compat/libusb-compat.mk | 14 ++++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/package/libusb-compat/Config.in b/package/libusb-compat/Config.in
index 076d7b8d77..5efa9bbe3d 100644
--- a/package/libusb-compat/Config.in
+++ b/package/libusb-compat/Config.in
@@ -5,3 +5,14 @@ config BR2_PACKAGE_LIBUSB_COMPAT
 	  libusb-0.1 compatibility layer for libusb-1.0.
 
 	  http://libusb.info/
+
+if BR2_PACKAGE_LIBUSB_COMPAT
+
+config BR2_PACKAGE_LIBUSB_COMPAT_EXAMPLES
+	bool "build libusb-compat examples"
+	help
+	  Build and install the libusb-compat example programs (lsusb,
+	  testlibusb and hotplug_monitor) in
+	  /usr/libexec/libusb-compat/examples.
+
+endif
diff --git a/package/libusb-compat/libusb-compat.mk b/package/libusb-compat/libusb-compat.mk
index 4e78a213b7..c8dabe2068 100644
--- a/package/libusb-compat/libusb-compat.mk
+++ b/package/libusb-compat/libusb-compat.mk
@@ -20,5 +20,19 @@ LIBUSB_COMPAT_CONF_ENV += \
 			   |sed -r -e '/\(SONAME\)/!d; s/.*\[(.+)\]$$/\1/'`
 endif
 
+ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT_EXAMPLES),y)
+LIBUSB_COMPAT_CONF_OPTS += --enable-examples-build
+# Examples are not installed by upstream, and their names conflict
+# with other packages (e.g. lsusb, testlibusb), so install them in a
+# package-specific directory.
+define LIBUSB_COMPAT_INSTALL_TARGET_EXAMPLES
+	$(foreach example,lsusb testlibusb hotplug_monitor,
+		$(INSTALL) -D -m0755 $(@D)/examples/$(example) \
+			$(TARGET_DIR)/usr/libexec/libusb-compat/examples/$(example)
+	)
+endef
+LIBUSB_COMPAT_POST_INSTALL_TARGET_HOOKS += LIBUSB_COMPAT_INSTALL_TARGET_EXAMPLES
+endif
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 3/3] support/testing/tests/package/test_libusb_compat: new runtime test
  2026-10-09  7:49 [Buildroot] [PATCH 1/3] package/libusb-compat: bump to version 0.1.9 Zoltan Gyarmati
  2026-10-09  7:49 ` [Buildroot] [PATCH 2/3] package/libusb-compat: add option to build/install examples Zoltan Gyarmati
@ 2026-10-09  7:49 ` Zoltan Gyarmati
  2026-10-10  5:40 ` [Buildroot] [PATCH 1/3] package/libusb-compat: bump to version 0.1.9 Thomas Petazzoni via buildroot
  2 siblings, 0 replies; 4+ messages in thread
From: Zoltan Gyarmati @ 2026-10-09  7:49 UTC (permalink / raw)
  To: buildroot; +Cc: Zoltan Gyarmati

Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
---
 DEVELOPERS                                    |  2 +
 .../tests/package/test_libusb_compat.py       | 58 +++++++++++++++++++
 .../test_libusb_compat/linux-usb.fragment     |  2 +
 3 files changed, 62 insertions(+)
 create mode 100644 support/testing/tests/package/test_libusb_compat.py
 create mode 100644 support/testing/tests/package/test_libusb_compat/linux-usb.fragment

diff --git a/DEVELOPERS b/DEVELOPERS
index 32ac338dc8..c850878e57 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -3628,4 +3628,6 @@ F:	package/quazip/
 F:	package/shapelib/
 F:	package/simple-mail/
 F:	package/tinc/
+F:	support/testing/tests/package/test_libusb_compat.py
+F:	support/testing/tests/package/test_libusb_compat/
 F:	support/testing/tests/package/test_quazip.py
diff --git a/support/testing/tests/package/test_libusb_compat.py b/support/testing/tests/package/test_libusb_compat.py
new file mode 100644
index 0000000000..d0bb57d4cc
--- /dev/null
+++ b/support/testing/tests/package/test_libusb_compat.py
@@ -0,0 +1,58 @@
+import os
+
+import infra.basetest
+
+
+class TestLibusbCompat(infra.basetest.BRTest):
+    # enable USB 2.0 support so we can test the USB enumeration in qemu
+    linux_fragment = \
+        infra.filepath("tests/package/test_libusb_compat/linux-usb.fragment")
+    config = \
+        f"""
+        BR2_aarch64=y
+        BR2_TOOLCHAIN_EXTERNAL=y
+        BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+        BR2_LINUX_KERNEL=y
+        BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+        BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.73"
+        BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+        BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
+        BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{linux_fragment}"
+        BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+        BR2_PACKAGE_LIBUSB=y
+        BR2_PACKAGE_LIBUSB_COMPAT=y
+        BR2_PACKAGE_LIBUSB_COMPAT_EXAMPLES=y
+        BR2_TARGET_ROOTFS_CPIO=y
+        BR2_TARGET_ROOTFS_CPIO_GZIP=y
+        # BR2_TARGET_ROOTFS_TAR is not set
+        """
+
+    examples_dir = "/usr/libexec/libusb-compat/examples"
+
+    def test_run(self):
+        img = os.path.join(self.builddir, "images", "rootfs.cpio.gz")
+        kern = os.path.join(self.builddir, "images", "Image")
+        # We add a USB keyboard device for the test.
+        self.emulator.boot(arch="aarch64",
+                           kernel=kern,
+                           kernel_cmdline=["console=ttyAMA0"],
+                           options=["-M", "virt", "-cpu", "cortex-a57", "-m", "256M",
+                                    "-initrd", img,
+                                    "-device", "usb-ehci,id=ehci",
+                                    "-device", "usb-kbd,bus=ehci.0"])
+        self.emulator.login()
+
+        # The lsusb example prints "idVendor:idProduct" for every
+        # device. We expect the Linux Foundation 2.0 root hub
+        # (1d6b:0002) and the QEMU USB keyboard (0627:0001).
+        output, exit_code = self.emulator.run(f"{self.examples_dir}/lsusb")
+        self.assertEqual(exit_code, 0)
+        self.assertIn("1d6b:0002", output)
+        self.assertIn("0627:0001", output)
+
+        # The testlibusb example opens every device and prints its
+        # descriptors. The keyboard should show up as a HID
+        # (bInterfaceClass 3) device.
+        output, exit_code = self.emulator.run(f"{self.examples_dir}/testlibusb -v")
+        self.assertEqual(exit_code, 0)
+        self.assertIn("bInterfaceClass:    3", "\n".join(output))
diff --git a/support/testing/tests/package/test_libusb_compat/linux-usb.fragment b/support/testing/tests/package/test_libusb_compat/linux-usb.fragment
new file mode 100644
index 0000000000..d9abd2821e
--- /dev/null
+++ b/support/testing/tests/package/test_libusb_compat/linux-usb.fragment
@@ -0,0 +1,2 @@
+CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/3] package/libusb-compat: bump to version 0.1.9
  2026-10-09  7:49 [Buildroot] [PATCH 1/3] package/libusb-compat: bump to version 0.1.9 Zoltan Gyarmati
  2026-10-09  7:49 ` [Buildroot] [PATCH 2/3] package/libusb-compat: add option to build/install examples Zoltan Gyarmati
  2026-10-09  7:49 ` [Buildroot] [PATCH 3/3] support/testing/tests/package/test_libusb_compat: new runtime test Zoltan Gyarmati
@ 2026-10-10  5:40 ` Thomas Petazzoni via buildroot
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-10-10  5:40 UTC (permalink / raw)
  To: Zoltan Gyarmati; +Cc: buildroot

On Fri, Oct 09, 2026 at 09:49:35AM +0200, Zoltan Gyarmati wrote:
> Release notes:
> https://github.com/libusb/libusb-compat-0.1/releases/tag/v0.1.9
> 
> Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>

Thanks a lot, series applied to master!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2026-10-10  5:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-09  7:49 [Buildroot] [PATCH 1/3] package/libusb-compat: bump to version 0.1.9 Zoltan Gyarmati
2026-10-09  7:49 ` [Buildroot] [PATCH 2/3] package/libusb-compat: add option to build/install examples Zoltan Gyarmati
2026-10-09  7:49 ` [Buildroot] [PATCH 3/3] support/testing/tests/package/test_libusb_compat: new runtime test Zoltan Gyarmati
2026-10-10  5:40 ` [Buildroot] [PATCH 1/3] package/libusb-compat: bump to version 0.1.9 Thomas Petazzoni via buildroot

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.