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.

77 lines
2.1 KiB

  1. #
  2. # Copyright (C) 2015 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:=openocd
  9. PKG_VERSION:=v0.10.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=git://git.code.sf.net/p/openocd/code
  13. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  14. PKG_SOURCE_VERSION:=$(PKG_VERSION)
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
  16. PKG_MIRROR_HASH:=ef8a71daa581a3a2296fd3dafff21de2ca7b86319ec3a5c24ed6a216d1fdff45
  17. PKG_LICENSE:=GPL-2.0
  18. PKG_LICENSE_FILES:=COPYING
  19. PKG_MAINTAINER:=Paul Fertser <fercerpav@gmail.com>
  20. PKG_BUILD_PARALLEL:=1
  21. PKG_INSTALL:=1
  22. PKG_FIXUP:=autoreconf
  23. include $(INCLUDE_DIR)/package.mk
  24. include $(INCLUDE_DIR)/nls.mk
  25. define Package/openocd
  26. SECTION:=utils
  27. CATEGORY:=Utilities
  28. TITLE:=OpenOCD Utility
  29. URL:=http://openocd.sf.net/
  30. DEPENDS:=+libusb-1.0 +libusb-compat +libftdi1 +hidapi
  31. endef
  32. define Package/openocd/description
  33. OpenOCD provides on-chip programming and debugging support with a
  34. layered architecture of JTAG interface and TAP support including:
  35. - (X)SVF playback to facilitate automated boundary scan and FPGA/CPLD
  36. programming;
  37. - debug target support (e.g. ARM, MIPS): single-stepping,
  38. breakpoints/watchpoints, gprof profiling, etc;
  39. - flash chip drivers (e.g. CFI, NAND, internal flash);
  40. - embedded TCL interpreter for easy scripting.
  41. Several network interfaces are available for interacting with OpenOCD:
  42. telnet, TCL, and GDB. The GDB server enables OpenOCD to function as a
  43. "remote target" for source-level debugging of embedded systems using
  44. the GNU GDB program (and the others who talk GDB protocol, e.g. IDA
  45. Pro).
  46. endef
  47. CONFIGURE_ARGS += \
  48. --prefix="/usr" \
  49. --disable-werror \
  50. MAKEINFO=true \
  51. --enable-dummy \
  52. --enable-sysfsgpio
  53. define Build/Compile
  54. +$(MAKE_VARS) \
  55. $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)
  56. endef
  57. define Package/openocd/install
  58. $(INSTALL_DIR) $(1)/usr/bin
  59. $(INSTALL_DIR) $(1)/usr/share/openocd
  60. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/openocd $(1)/usr/bin/
  61. $(CP) $(PKG_INSTALL_DIR)/usr/share/openocd/scripts $(1)/usr/share/openocd
  62. endef
  63. $(eval $(call BuildPackage,openocd))