You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.7 KiB

  1. #
  2. # Copyright (C) 2010-2011 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=ap51-flash
  9. PKG_VERSION:=2016-10-16
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=git://dev.cloudtrax.com/ap51-flash.git
  13. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  14. PKG_SOURCE_VERSION:=48b3fbac1c30c5968b2608eb09b53ea37c310a24
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
  16. PKG_MIRROR_HASH:=4d00a1ceb480793db95e359cb95d63630920335415c7ffdcd05f2616cf1bc034
  17. PKG_MAINTAINER:=Russell Senior <russell@personaltelco.net>
  18. include $(INCLUDE_DIR)/package.mk
  19. ifeq ($(CONFIG_BIG_ENDIAN),y)
  20. STAMP_BUILT:=$(STAMP_BUILT)_big
  21. endif
  22. define Package/ap51-flash
  23. SECTION:=utils
  24. CATEGORY:=Utilities
  25. TITLE:=A tool for flashing (nearly) all ap51/ap61 based routers
  26. URL:=http://dev.cloudtrax.com/wiki/ap51-flash-station
  27. endef
  28. TARGET_EXTRA_CFLAGS:=-DFLASH_FROM_FILE -DNO_LIBPCAP -D_GNU_SOURCE
  29. ifeq ($(CONFIG_BIG_ENDIAN),y)
  30. TARGET_EXTRA_CFLAGS:=$(TARGET_EXTRA_CFLAGS) -DUIP_CONF_BYTE_ORDER=1234
  31. endif
  32. # pass optimization flags
  33. MAKE_FLAGS += \
  34. OFLAGS="$(TARGET_CFLAGS)" \
  35. EXTRA_CFLAGS="$(TARGET_EXTRA_CFLAGS)" \
  36. REVISION="$(PKG_VERSION)" \
  37. ap51-flash
  38. define Package/ap51-flash/install
  39. $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d $(1)/usr/sbin \
  40. $(1)/usr/lib/ap51-flash
  41. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ap51-flash $(1)/usr/sbin/
  42. $(INSTALL_BIN) ./files/ap51-flash.init $(1)/etc/init.d/ap51-flash
  43. $(INSTALL_BIN) ./files/ap51-flash.sh $(1)/usr/lib/ap51-flash/ap51-flash.sh
  44. $(INSTALL_DATA) ./files/ap51-flash.config $(1)/etc/config/ap51-flash
  45. endef
  46. define Package/ap51-flash/conffiles
  47. /etc/config/ap51-flash
  48. endef
  49. $(eval $(call BuildPackage,ap51-flash))