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.

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