Add fxload (#1093)
authorFlorian Fainelli <florian@openwrt.org>
Thu, 28 Dec 2006 18:15:39 +0000 (18:15 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Thu, 28 Dec 2006 18:15:39 +0000 (18:15 +0000)
SVN-Revision: 5920

utils/fxload/Makefile [new file with mode: 0644]
utils/fxload/patches/010-compile_fix.patch [new file with mode: 0644]

diff --git a/utils/fxload/Makefile b/utils/fxload/Makefile
new file mode 100644 (file)
index 0000000..63c67c0
--- /dev/null
@@ -0,0 +1,48 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=fxload
+PKG_VERSION:=2002_04_11
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/linux-hotplug
+PKG_MD5SUM:=cafd71a5bff0c57bcd248273b2541c05
+PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/fxload
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=@USB_SUPPORT +udev
+  TITLE:=Downloading firmware into EZ-USB microcontrollers
+  URL:=http://linux-hotplug.sourceforge.net/
+endef
+
+define Build/Compile
+       $(call Build/Compile/Default,
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               CC="$(TARGET_CC)" \
+               CROSS="$(TARGET_CROSS)" \
+               EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
+       )
+endef
+
+define Package/fxload/install
+       $(INSTALL_DIR) $(1)/sbin
+       $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/sbin/
+       $(INSTALL_DIR) $(1)/usr/share/usb
+       $(CP) $(PKG_BUILD_DIR)/a3load.hex $(1)/usr/share/usb
+endef
+
+$(eval $(call BuildPackage,fxload))
diff --git a/utils/fxload/patches/010-compile_fix.patch b/utils/fxload/patches/010-compile_fix.patch
new file mode 100644 (file)
index 0000000..82914ac
--- /dev/null
@@ -0,0 +1,18 @@
+--- fxload-2002_04_11/ezusb.c.old      2006-12-18 18:51:26.000000000 -0700
++++ fxload-2002_04_11/ezusb.c  2006-12-18 18:51:59.000000000 -0700
+@@ -29,8 +29,14 @@
+ # include  <sys/ioctl.h>
+ # include  <linux/version.h>
+-# include  <linux/usb.h>
++typedef unsigned long kernel_ulong_t;
++
++#ifndef BITS_PER_LONG
++#define BITS_PER_LONG 32
++#endif
++
+ # include  <linux/usbdevice_fs.h>
++# include  <linux/usb.h>
+ # include "ezusb.h"