From: Xiangfu <[email protected]> --- utils/urjtag/Makefile | 57 ++++++++++++++++++++++ utils/urjtag/patches/0001-disable-inb-outb.patch | 34 +++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 utils/urjtag/Makefile create mode 100644 utils/urjtag/patches/0001-disable-inb-outb.patch
diff --git a/utils/urjtag/Makefile b/utils/urjtag/Makefile new file mode 100644 index 0000000..acb451e --- /dev/null +++ b/utils/urjtag/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2012 xiangfu liu <[email protected]> +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=urjtag +PKG_VERSION:=20120715 +PKG_REV:=2f2c7920242addf60b3f498528741812d3c9beda +PKG_RELEASE:=1 +PKG_INSTALL:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz +PKG_SOURCE_URL:=git://urjtag.git.sourceforge.net/gitroot/urjtag/urjtag +PKG_SOURCE_PROTO:=git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=$(PKG_REV) + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/urjtag + MAINTAINER:="Xiangfu Liu" <[email protected]> + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Urjtag + URL:=http://urjtag.org/ + DEPENDS:=+libusb +libusb-1.0 +libftdi $(INTL_DEPENDS) +libreadline +libncurses +endef + +TARGET_CFLAGS += $(INTL_CFLAGS) +TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(INTL_LDFLAGS) +MAKE_FLAGS += -C urjtag + +CONFIGURE_PATH = ./urjtag +CONFIGURE_CMD = ./autogen.sh +CONFIGURE_ARGS += --with-libusb --with-libftdi --without-ftd2xx \ + --disable-svf --disable-bsdl --disable-python + +define Package/urjtag/description +Universal JTAG library, server and tools +endef + +define Package/urjtag/install + $(INSTALL_DIR) \ + $(1)/usr/bin/ \ + $(1)/usr/share/urjtag/ \ + $(1)/usr/lib/ + + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jtag $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/urjtag/* $(1)/usr/share/urjtag/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liburjtag.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,urjtag)) diff --git a/utils/urjtag/patches/0001-disable-inb-outb.patch b/utils/urjtag/patches/0001-disable-inb-outb.patch new file mode 100644 index 0000000..268ff2a --- /dev/null +++ b/utils/urjtag/patches/0001-disable-inb-outb.patch @@ -0,0 +1,34 @@ +diff --git a/urjtag/src/tap/parport/direct.c b/urjtag/src/tap/parport/direct.c +index 10bea4d..bc3bada 100644 +--- a/urjtag/src/tap/parport/direct.c ++++ b/urjtag/src/tap/parport/direct.c +@@ -37,6 +37,20 @@ + #include <urjtag/cable.h> + #include "../parport.h" + ++#ifdef __linux__ ++#if defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) \ ++|| defined(__powerpc__) || defined(__s390__) || defined(__s390x__)\ ++|| defined(__mips__) || defined(__mc68000__) || defined(__sh__) ++ ++#define NO_SYSIO ++ ++#define inb(addr) (*(volatile unsigned char *)(addr)) ++#define outb(b,addr) (*(volatile unsigned char *)(addr)) = (b) ++ ++#endif /* architechtures */ ++#endif /* __linux__ */ ++ ++ + #if defined(HAVE_INPOUTXX) + + static HINSTANCE inpout32_dll_handle = NULL; +@@ -50,7 +64,7 @@ static outfuncPtr Out32; + #define inb(p) (Inp32)(p) + #define outb(d,p) (Out32)(p,d) + +-#elif defined(HAVE_IOPERM) ++#elif defined(HAVE_IOPERM) && !defined(NO_SYSIO) + + #include <sys/io.h> + -- 1.7.9.5 _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
