From 0163546e8221e8f33e2de1b6ea030b65aad0c5f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AA=B7=E9=AB=85=E5=A4=B4?= <74764072+DHDAXCW@users.noreply.github.com> Date: Tue, 22 Nov 2022 17:40:57 +0800 Subject: [PATCH] Update Makefile --- package/libs/libusb/Makefile | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/package/libs/libusb/Makefile b/package/libs/libusb/Makefile index 6b80b3848..ce5440509 100644 --- a/package/libs/libusb/Makefile +++ b/package/libs/libusb/Makefile @@ -40,10 +40,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 @@ -59,4 +75,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))