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.2 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_SOURCE_VERSION:=0.10.0
  10. PKG_VERSION:=v$(PKG_SOURCE_VERSION)
  11. PKG_RELEASE:=2
  12. PKG_SOURCE_URL:=@SF/openocd
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
  15. PKG_HASH:=7312e7d680752ac088b8b8f2b5ba3ff0d30e0a78139531847be4b75c101316ae
  16. PKG_LICENSE:=GPL-2.0
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_MAINTAINER:=Paul Fertser <fercerpav@gmail.com>
  19. PKG_CPE_ID:=cpe:/a:openocd:open_on-chip_debugger
  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))