mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
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> Co-authored-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
parent
f14fbd6e0d
commit
0079447c6f
@ -40,10 +40,26 @@ define Package/libusb-1.0/description
|
|||||||
many different operating systems.
|
many different operating systems.
|
||||||
endef
|
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)
|
TARGET_CFLAGS += $(FPIC)
|
||||||
CONFIGURE_ARGS += \
|
CONFIGURE_ARGS += \
|
||||||
--disable-udev \
|
--enable-examples-build \
|
||||||
--disable-log
|
--disable-log \
|
||||||
|
--disable-udev
|
||||||
|
|
||||||
define Build/InstallDev
|
define Build/InstallDev
|
||||||
$(INSTALL_DIR) $(1)/usr/include/libusb-1.0
|
$(INSTALL_DIR) $(1)/usr/include/libusb-1.0
|
||||||
@ -59,4 +75,10 @@ define Package/libusb-1.0/install
|
|||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb-1.0.so.* $(1)/usr/lib/
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb-1.0.so.* $(1)/usr/lib/
|
||||||
endef
|
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,libusb-1.0))
|
||||||
|
$(eval $(call BuildPackage,fxload))
|
||||||
|
Loading…
Reference in New Issue
Block a user