Makefile 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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:=https://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. --enable-usb_blaster_libftdi \
  53. --enable-openjtag_ftdi \
  54. --enable-presto_libftdi
  55. define Build/Compile
  56. +$(MAKE_VARS) \
  57. $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)
  58. endef
  59. define Package/openocd/install
  60. $(INSTALL_DIR) $(1)/usr/bin
  61. $(INSTALL_DIR) $(1)/usr/share/openocd
  62. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/openocd $(1)/usr/bin/
  63. $(CP) $(PKG_INSTALL_DIR)/usr/share/openocd/scripts $(1)/usr/share/openocd
  64. endef
  65. $(eval $(call BuildPackage,openocd))