ports/101435: [NEW PORT] devel/jtag: Utility to work with JTAG-aware boards

Stanislav Sedov ssedov at mbsd.msk.ru
Sat Aug 5 20:50:16 UTC 2006


>Number:         101435
>Category:       ports
>Synopsis:       [NEW PORT] devel/jtag: Utility to work with JTAG-aware boards
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 05 20:50:15 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Stanislav Sedov
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
MBSD labs, Inc.
>Environment:
System: FreeBSD fonon.realnet 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Wed Aug  2 21:44:37 MSD
>Description:
JTAG Tools is a software package which enables working with JTAG-aware
(IEEE 1149.1) hardware devices (parts) and boards through JTAG adapter.

This package has open and modular architecture with ability to write
miscellaneous extensions (like board testers, flash memory programmers,
and so on).

Author:	Marcel Telka <marcel at telka.sk>
WWW:	http://openwince.sourceforge.net/jtag/

Note: this port depends on openwince-include PR.

>How-To-Repeat:
>Fix:

--- jtag-0.5.1.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	jtag
#	jtag/pkg-descr
#	jtag/Makefile
#	jtag/pkg-plist
#	jtag/distinfo
#	jtag/files
#	jtag/files/patch-libbrux_cmd_cmd_detectflash.c
#	jtag/files/patch-libbrux_flash_detectflash.c
#	jtag/files/patch-src_tap_parport_direct.c
#	jtag/files/patch-libbrux_flash_jedec.c
#
echo c - jtag
mkdir -p jtag > /dev/null 2>&1
echo x - jtag/pkg-descr
sed 's/^X//' >jtag/pkg-descr << 'END-of-jtag/pkg-descr'
XJTAG Tools is a software package which enables working with JTAG-aware
X(IEEE 1149.1) hardware devices (parts) and boards through JTAG adapter.
X
XThis package has open and modular architecture with ability to write
Xmiscellaneous extensions (like board testers, flash memory programmers,
Xand so on).
X
XAuthor:	Marcel Telka <marcel at telka.sk>
XWWW:	http://openwince.sourceforge.net/jtag/
END-of-jtag/pkg-descr
echo x - jtag/Makefile
sed 's/^X//' >jtag/Makefile << 'END-of-jtag/Makefile'
X# New ports collection makefile for:	jtag
X# Date created:		2006-08-05
X# Whom:			Stanislav Sedov <ssedov at mbsd.msk.ru>
X#
X# $MBSDlabs$
X# $FreeBSD$
X#
X
XPORTNAME=	jtag
XPORTVERSION=	0.5.1
XCATEGORIES=	devel
XMASTER_SITES=	${MASTER_SITE_SOURVEFORGE}
XMASTER_SITE_SUBDIR=openwince
X
XMAINTAINER=	ssedov at mbsd.msk.ru
XCOMMENT=	Utility to work with JTAG-aware boards
X
XBUILD_DEPENDS=	${OPENWINCE_INCLUDE_DEP}:${PORTSDIR}/devel/openwince-include
XRUN_DEPENDS=	${BUILD_DEPENDS}
X
XUSE_BZIP2=	yes
XUSE_GETTEXT=	yes
XGNU_CONFIGURE=	yes
X
XONLY_FOR_ARCHS=	i386
XOPENWINCE_INCLUDE=${LOCALBASE}/include/openwince
XOPENWINCE_INCLUDE_DEP=${OPENWINCE_INCLUDE}/common.h
X
X.if !defined(NOPORTDOCS)
XPORTDOCS=	*
X.endif
X
X.include <bsd.port.pre.mk>
X
X#
X# We haven't this on FreeBSD version prior to 5.1
X#
X.if ${OSVERSION} < 501000
XCFLAGS+=	-Duseconds_t=long
X.endif
X
X.if ${OSVERSION} < 500000 || exists(${LOCALBASE}/lib/libreadline.so.5)
XLIB_DEPENDS+=	readline.5:${PORTSDIR}/devel/readline
X.endif
X
Xpost-extract:
X	@${REINPLACE_CMD} -E -e \
X		"s,/usr/local/include/openwince,${OPENWINCE_INCLUDE}," \
X		${WRKSRC}/configure
X
Xpost-install:
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X	${INSTALL_DATA} ${WRKSRC}/README ${WRKSRC}/TODO \
X		${WRKSRC}/doc/internals.xml ${DOCSDIR}
X.endif
X
X.include <bsd.port.post.mk>
END-of-jtag/Makefile
echo x - jtag/pkg-plist
sed 's/^X//' >jtag/pkg-plist << 'END-of-jtag/pkg-plist'
Xbin/bsdl2jtag
Xbin/jtag
X%%DATADIR%%/MANUFACTURERS
X%%DATADIR%%/altera/PARTS
X%%DATADIR%%/altera/ep1c20f400/STEPPINGS
X%%DATADIR%%/altera/ep1c20f400/ep1c20f400
X%%DATADIR%%/altera/epm7128aetc100/STEPPINGS
X%%DATADIR%%/altera/epm7128aetc100/epm7128aetc100
X%%DATADIR%%/atmel/PARTS
X%%DATADIR%%/atmel/atmega128/STEPPINGS
X%%DATADIR%%/atmel/atmega128/atmega128
X%%DATADIR%%/broadcom/PARTS
X%%DATADIR%%/broadcom/bcm1250/STEPPINGS
X%%DATADIR%%/broadcom/bcm1250/bcm1250
X%%DATADIR%%/broadcom/bcm3310/STEPPINGS
X%%DATADIR%%/broadcom/bcm3310/bcm3310
X%%DATADIR%%/broadcom/bcm5421s/STEPPINGS
X%%DATADIR%%/broadcom/bcm5421s/bcm5421s
X%%DATADIR%%/dec/PARTS
X%%DATADIR%%/dec/sa1100/STEPPINGS
X%%DATADIR%%/dec/sa1100/sa1100
X%%DATADIR%%/hitachi/PARTS
X%%DATADIR%%/hitachi/sh7727/STEPPINGS
X%%DATADIR%%/hitachi/sh7727/sh7727
X%%DATADIR%%/intel/PARTS
X%%DATADIR%%/intel/ixp425/STEPPINGS
X%%DATADIR%%/intel/ixp425/ixp425
X%%DATADIR%%/intel/pxa250/STEPPINGS
X%%DATADIR%%/intel/pxa250/pxa250
X%%DATADIR%%/intel/pxa250/pxa250c0
X%%DATADIR%%/intel/sa1110/STEPPINGS
X%%DATADIR%%/intel/sa1110/sa1110
X%%DATADIR%%/philips/PARTS
X%%DATADIR%%/philips/xcr3128xl-cs144/STEPPINGS
X%%DATADIR%%/philips/xcr3128xl-cs144/xcr3128xl-cs144
X%%DATADIR%%/samsung/s3c4510b/s3c4510b
X%%DATADIR%%/xilinx/PARTS
X%%DATADIR%%/xilinx/xc2c256-tq144/STEPPINGS
X%%DATADIR%%/xilinx/xc2c256-tq144/xc2c256-tq144
X%%DATADIR%%/xilinx/xcr3128xl-cs144/STEPPINGS
X%%DATADIR%%/xilinx/xcr3128xl-cs144/xcr3128xl-cs144
X%%DATADIR%%/xilinx/xcr3256xl-ft256/STEPPINGS
X%%DATADIR%%/xilinx/xcr3256xl-ft256/xcr3256xl-ft256
X at dirrm %%DATADIR%%/xilinx/xcr3256xl-ft256
X at dirrm %%DATADIR%%/xilinx/xcr3128xl-cs144
X at dirrm %%DATADIR%%/xilinx/xc2c256-tq144
X at dirrm %%DATADIR%%/xilinx
X at dirrm %%DATADIR%%/samsung/s3c4510b
X at dirrm %%DATADIR%%/samsung
X at dirrm %%DATADIR%%/philips/xcr3128xl-cs144
X at dirrm %%DATADIR%%/philips
X at dirrm %%DATADIR%%/intel/sa1110
X at dirrm %%DATADIR%%/intel/pxa250
X at dirrm %%DATADIR%%/intel/ixp425
X at dirrm %%DATADIR%%/intel
X at dirrm %%DATADIR%%/hitachi/sh7727
X at dirrm %%DATADIR%%/hitachi
X at dirrm %%DATADIR%%/dec/sa1100
X at dirrm %%DATADIR%%/dec
X at dirrm %%DATADIR%%/broadcom/bcm5421s
X at dirrm %%DATADIR%%/broadcom/bcm3310
X at dirrm %%DATADIR%%/broadcom/bcm1250
X at dirrm %%DATADIR%%/broadcom
X at dirrm %%DATADIR%%/atmel/atmega128
X at dirrm %%DATADIR%%/atmel
X at dirrm %%DATADIR%%/altera/epm7128aetc100
X at dirrm %%DATADIR%%/altera/ep1c20f400
X at dirrm %%DATADIR%%/altera
X at dirrm %%DATADIR%%
END-of-jtag/pkg-plist
echo x - jtag/distinfo
sed 's/^X//' >jtag/distinfo << 'END-of-jtag/distinfo'
XMD5 (jtag-0.5.1.tar.bz2) = 3171d51fec40e9f338ea2d388544fd66
XSHA256 (jtag-0.5.1.tar.bz2) = 4036f97ef693e9cbe6f99137ad6920b2679ba97d58cf5e78442a4d60308563b6
XSIZE (jtag-0.5.1.tar.bz2) = 314857
END-of-jtag/distinfo
echo c - jtag/files
mkdir -p jtag/files > /dev/null 2>&1
echo x - jtag/files/patch-libbrux_cmd_cmd_detectflash.c
sed 's/^X//' >jtag/files/patch-libbrux_cmd_cmd_detectflash.c << 'END-of-jtag/files/patch-libbrux_cmd_cmd_detectflash.c'
X--- libbrux/cmd/cmd_detectflash.c.orig	Sat Aug  5 23:45:49 2006
X+++ libbrux/cmd/cmd_detectflash.c	Sat Aug  5 23:50:04 2006
X@@ -40,7 +40,7 @@
X 		return 1;
X 	}
X 
X-	detectflash( bus );
X+	detectflash( bus, 0 );
X 
X 	return 1;
X }
END-of-jtag/files/patch-libbrux_cmd_cmd_detectflash.c
echo x - jtag/files/patch-libbrux_flash_detectflash.c
sed 's/^X//' >jtag/files/patch-libbrux_flash_detectflash.c << 'END-of-jtag/files/patch-libbrux_flash_detectflash.c'
X--- libbrux/flash/detectflash.c.orig	Sat Aug  5 23:48:47 2006
X+++ libbrux/flash/detectflash.c	Sat Aug  5 23:49:40 2006
X@@ -43,7 +43,7 @@
X int jedec_detect( bus_t *bus, uint32_t adr, cfi_array_t **cfi_array );
X 
X void
X-detectflash( bus_t *bus )
X+detectflash( bus_t *bus , uint32_t adr )
X {
X 	cfi_array_t *cfi_array = NULL;
X 	cfi_query_structure_t *cfi;
END-of-jtag/files/patch-libbrux_flash_detectflash.c
echo x - jtag/files/patch-src_tap_parport_direct.c
sed 's/^X//' >jtag/files/patch-src_tap_parport_direct.c << 'END-of-jtag/files/patch-src_tap_parport_direct.c'
X--- src/tap/parport/direct.c.orig	Sat Aug  5 23:51:32 2006
X+++ src/tap/parport/direct.c	Sat Aug  5 23:57:38 2006
X@@ -46,28 +46,14 @@
X static __inline int
X ioperm( unsigned long from, unsigned long num, int permit )
X {
X-	u_long ports[32];
X-	u_long i;
X-
X-	if (i386_get_ioperm( ports ) == -1)
X-		return -1;
X-
X-	for (i = from; i < (from + num); i++)
X-		if (permit)
X-			ports[i / 32] &= ~(1 << (i % 32));
X-		else
X-			ports[i / 32] |= (1 << (i % 32));
X-
X-	if (i386_set_ioperm( ports ) == -1)
X-		return -1;
X-
X+	return i386_set_ioperm(from, num, permit);
X 	return 0;
X }
X 
X static __inline int
X iopl( int level )
X {
X-	return i386_iopl( level );
X+	return 0;
X }
X 
X static __inline unsigned char
END-of-jtag/files/patch-src_tap_parport_direct.c
echo x - jtag/files/patch-libbrux_flash_jedec.c
sed 's/^X//' >jtag/files/patch-libbrux_flash_jedec.c << 'END-of-jtag/files/patch-libbrux_flash_jedec.c'
X--- libbrux/flash/jedec.c.orig	Sun Aug  6 00:17:33 2006
X+++ libbrux/flash/jedec.c	Sun Aug  6 00:17:50 2006
X@@ -37,6 +37,7 @@
X {
X 	int mid;
X 	int did;
X+	cfi_query_structure_t *cfi;
X 
X 	/* Query flash. */
X 	bus_write( bus, 0x0, 0xf0 );
X@@ -55,7 +56,7 @@
X 	if (!(*cfi_array)->cfi_chips[0])
X 		return -2;	/* out of memory */
X 
X-	cfi_query_structure_t *cfi = &(*cfi_array)->cfi_chips[0]->cfi;
X+	cfi = &(*cfi_array)->cfi_chips[0]->cfi;
X 
X 	cfi->identification_string.pri_id_code = CFI_VENDOR_AMD_SCS;
X 	cfi->identification_string.pri_vendor_tbl = NULL;
END-of-jtag/files/patch-libbrux_flash_jedec.c
exit
--- jtag-0.5.1.shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list