aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/libusb/Makefile
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2022-09-14 20:16:50 +0100
committerDaniel Golle <daniel@makrotopia.org>2022-09-17 00:44:08 +0100
commit1c785d2567639dea98df7fc13cbc75f64847cd04 (patch)
tree4c732a8a923e3a198fbcfb911e6643eefc6c18b8 /package/libs/libusb/Makefile
parent2b1e651178b7731729b73786d44bc4c3b5bbad14 (diff)
downloadupstream-1c785d2567639dea98df7fc13cbc75f64847cd04.tar.gz
upstream-1c785d2567639dea98df7fc13cbc75f64847cd04.tar.bz2
upstream-1c785d2567639dea98df7fc13cbc75f64847cd04.zip
packages: libusb: add package 'fxload' (from libusb examples)
The 'fxload' tool contained in the examples provided with libusb is actually useful and turns out to be the only way to load firmware into some rather ancient EZ-USB microcontrollers made by Cypress (formerly Anchor Chips). The original 'fxload' tool from hotplug-linux has been abandonned long ago and requires usbfs to be mounted in /proc/bus/usb/ (like it was in Linux 2.4...). Hence the best option is to package the modern 'fxload' from the libusb examples which (unsurprisingly) uses libusb and works on modern systems. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/libs/libusb/Makefile')
-rw-r--r--package/libs/libusb/Makefile26
1 files changed, 24 insertions, 2 deletions
diff --git a/package/libs/libusb/Makefile b/package/libs/libusb/Makefile
index 5d89568937..65c624409d 100644
--- a/package/libs/libusb/Makefile
+++ b/package/libs/libusb/Makefile
@@ -41,10 +41,26 @@ define Package/libusb-1.0/description
many different operating systems.
endef
+define Package/fxload
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=fxload firmware loader
+ URL:=http://linux-hotplug.sourceforge.net
+ DEPENDS:=+libusb-1.0
+endef
+
+define Package/fxload/description
+This program is conveniently able to download firmware into FX, FX2,
+and FX2LP EZ-USB devices, as well as the original AnchorChips EZ-USB.
+It is intended to be invoked by hotplug scripts when the unprogrammed
+device appears on the bus.
+endef
+
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
- --disable-udev \
- --disable-log
+ --enable-examples-build \
+ --disable-log \
+ --disable-udev
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/libusb-1.0
@@ -60,4 +76,10 @@ define Package/libusb-1.0/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb-1.0.so* $(1)/usr/lib/
endef
+define Package/fxload/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/examples/.libs/fxload $(1)/usr/sbin
+endef
+
$(eval $(call BuildPackage,libusb-1.0))
+$(eval $(call BuildPackage,fxload))