From owner-freebsd-ports@FreeBSD.ORG Tue Nov 4 22:34:41 2008 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61AFE1065677 for ; Tue, 4 Nov 2008 22:34:41 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.31]) by mx1.freebsd.org (Postfix) with ESMTP id 0C9418FC14 for ; Tue, 4 Nov 2008 22:34:40 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so1247293ywe.13 for ; Tue, 04 Nov 2008 14:34:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :sender:to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=vU8mutIgToqJxN870gLUOQ5iDd6W/PtzIpMJn+HOBmU=; b=eRQS29axfYP/Udii2otAo5Prm6L+TGbTS5sB+poRZTLEBgKOZZ6+9zCmx2AdVOBeQh N6xxTqa1g3kOP3rSz/Gz36/8GdSc6FMZ2wtTa4bguVTcfmJVqt+9Yv1BV/He2C5bZZCy PExS8g9MJNbjoek2QF8mLD6tBQ855c5MrWrB0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references:x-google-sender-auth; b=hhNyZ55A+PqLiQAXriKAAzsfs55SAWBk4fOs94QKt3rfTgLqdHc8t2ntvBOJMQMHhF VQhFdnAMloNwxSlZOXc7KOz45MxrwbyrrAOOMtz4hJ6mD/SAuUjhA4fTC/vd0Hm7O/MF 3UNFLgCWqiD4fV5Dx/FQYqwtuY2h5voON9Kb8= Received: by 10.100.11.14 with SMTP id 14mr73248ank.89.1225838080094; Tue, 04 Nov 2008 14:34:40 -0800 (PST) Received: by 10.100.132.8 with HTTP; Tue, 4 Nov 2008 14:34:40 -0800 (PST) Message-ID: <539c60b90811041434t4d98e5d5pf53dddd1dbba342a@mail.gmail.com> Date: Tue, 4 Nov 2008 15:34:40 -0700 From: "Steve Franks" Sender: bahamasfranks@gmail.com To: "Bruce M. Simpson" In-Reply-To: <48F0A008.1040900@incunabulum.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48F0A008.1040900@incunabulum.net> X-Google-Sender-Auth: 276a562d46b87851 Cc: ports@freebsd.org Subject: Re: [Fwd: Re: OpenOCD] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: stevefranks@ieee.org List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Nov 2008 22:34:41 -0000 Bruce, I've been playing with your makefile for openocd. Awhile back I was told that the *right* way to do this as a real port was to get the svn, make a tgz in distfiles, and then build the port from that. Looks like you did the svn->distfiles part manually in your origonal makefile, right? I was given an example of this, but it has some major problems. (1) I'd think everything should go from scratch (after a make clean && make distclean) with just a 'make' for general-purpose use. Unfortunaetly, the makefile I'm starting from requires a 'make gen-dist' call before make will work. I'm a completely incompetent script programmer and can't get that to go automatically. Really, the script in gen-dist should just be part of the dependancies for plain 'make', right? If the distfile doesn't exist, get it from svn... (2) The gen-dist script is supposed to do a make makesum on the bz2 file in distfiles, but for reasons beyond me, it doesn't, probably the filename is mangled incorrectly with the date? (3) If I manually do a gen-dist, and then make makesum, I still get: ===> Configuring for openocd-20081103 cd: can't cd to /usr/ports/devel/openocd2/work/openocd-20081103 Which is probably a naming problem too, right? Is there a -debug option for ports so I can see what it's trying to do? Well that little bitty list is all my problems making a 'real' port... I'm not sure about mailing attatchments to freebsd lists, so the makefile is just cat'ed to my email after my name, below... Steve # New ports collection makefile for: openocd # Date created: # Whom: franks@rudbek.com # # $FreeBSD: ports/devel/openocd/Makefile,v $ # PORTNAME= openocd DISTVERSION= ${SNAPDATE} PORTVERSION= ${SNAPDATE} CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_LOCAL} #~ PKGNAMESUFFIX= -devel MAINTAINER= franks@rudbek.com COMMENT= Open OCD On-chip debugger, flash programmer, and debug tool FETCH_DEPENDS+= svn:${PORTSDIR}/devel/subversion BUILD_DEPENDS+= ${PORTSDIR}/devel/libusb ${PORTSDIR}/devel/libftdi USE_BZIP2= yes SVN_SNAPDATE!= date -v-1d +%Y-%m-%d SNAPDATE= ${SVN_SNAPDATE:S/-//g} USE_GMAKE= yes GNU_CONFIGURE= yes INFO= ${PORTNAME} CONFIGURE_ENV+= CPPFLAGS=-I${LOCALBASE}/include \ LDFLAGS=-L${LOCALBASE}/lib CONFIGURE_ARGS+= --enable-ft2232_libftdi LIB_DEPENDS+= usb:${PORTSDIR}/devel/libusb \ ftdi.10:${PORTSDIR}/devel/libftdi #~ WRKSRC= ${WRKDIR}/${PORTNAME} SVNROOT= svn://svn.berlios.de/openocd/trunk gen-dist: @if [ ! -d ${WRKDIR} ]; then \ mkdir ${WRKDIR}; \ fi @if [ ! -d ${WRKDIR}/svn ]; then \ mkdir ${WRKDIR}/svn; \ fi @if [ ! -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \ svn co ${SVNROOT} ${WRKDIR}/svn/openocd; \ ${TAR} cfj ${_DISTDIR}${DISTFILES} ${WRKDIR}/svn/openocd; \ ${MAKE} ${__softMAKEFLAGS} makesum; \ fi .include On Sat, Oct 11, 2008 at 5:46 AM, Bruce M. Simpson wrote: > Forwarding here as others might also have dongles that work, and debugging > NSLU2 ARM would cleary need OCD capability to figure out exactly what is > going wrong here. > > thanks > BMS > > > ---------- Forwarded message ---------- > From: Bruce M Simpson > To: stevefranks@ieee.org > Date: Sat, 11 Oct 2008 05:44:23 +0100 > Subject: Re: OpenOCD > Steve, > > Here's a port for OpenOCD. > > I haven't been able to test it for real, because I don't have a supported > JTAG dongle; > it seems my Altera USBByteBlaster clone is not supported. > > You said you had an Olimex, perhaps you can give it a try? Let me know and > I'll commit, if you want to take the reins as maintainer let me now. > > Here are some notes I was gonna put into the commit message (not committing > it as I really want to see it work "for real" first) :- > > %%% > Add new port of OpenOCD, an open source on-chip debug utility for > ARM and other processor families. > > Note: I haven't actually tested this with a real dongle yet, > but it looks sane. It builds from a locally hosted source snapshot, > as OpenOCD doesn't appear to have a release schedule of its own. > The diff to svn trunk is extremely minimal. > 'gmake dist-gzip' doesn't work right, so a manual tarball was rolled. > It appears that the Altera USB ByteBlaster clone I have is not supported. > > > %%% > > cheers > BMS > > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@freebsd.org" > >