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.

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