From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 17 09:06:24 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2085F16A417 for ; Mon, 17 Dec 2007 09:06:24 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id D517913C44B for ; Mon, 17 Dec 2007 09:06:23 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A56241.dip.t-dialin.net [84.165.98.65]) by redbull.bpaserver.net (Postfix) with ESMTP id 3F6BF2E060; Mon, 17 Dec 2007 10:06:14 +0100 (CET) Received: from webmail.leidinger.net (webmail.Leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 378E762AAB; Mon, 17 Dec 2007 10:06:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1197882370; bh=5qysj05onGhvp2KntOOiYrhsvjaLwzKPg biKLD4oWqA=; h=Message-ID:X-Priority:Date:From:To:Cc:Subject: References:In-Reply-To:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:User-Agent; b=Ec6O/f hgbDTTpqOVUdZAKPhWZ8RQ31aVLLQligPN8KvZPFw8OyLi+LPt9whFvyvqKXlwKWs3b itoZ26NDD4sFF5fbyqOihfYeUZLUCtUe6rJKcS3aY7D2Yf31D8w6vE2hdylwwSDaaTS SyD3Cfsr/2XX1A9PDp2bb/jvMETOLwzHqZRqJiM6yqqedCnp6p63t9GDYtZEekT/uUB euQrC4g+OoJq9FwxVXpl1IeaF3SIU6Z/A6vuPzhBCSFYNYfo8OrRQCaHfeGYzDi+lQB hVMm6G6gA3a/YddVrNhiM98sCYJtm2JAtO4ch0JF8lCul8LL9P2xXY+GtOFYuRbW5rE A== Received: (from www@localhost) by webmail.leidinger.net (8.14.1/8.13.8/Submit) id lBH969Vx060767; Mon, 17 Dec 2007 10:06:09 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Mon, 17 Dec 2007 10:06:08 +0100 Message-ID: <20071217100608.sti502z4skk4g4g8@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Mon, 17 Dec 2007 10:06:08 +0100 From: Alexander Leidinger To: "Daniel O'Connor" References: <200712171626.59808.doconnor@gsoft.com.au> In-Reply-To: <200712171626.59808.doconnor@gsoft.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.4) / FreeBSD-7.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-14.9, required 6, BAYES_00 -15.00, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, RDNS_DYNAMIC 0.10) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No X-Mailman-Approved-At: Mon, 17 Dec 2007 12:20:32 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: Linux version of libusb that works with FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2007 09:06:24 -0000 Quoting Daniel O'Connor (from Mon, 17 Dec 2007 =20 16:26:58 +1030): > I am wondering if anyone has tried building such a beast? > ie a Lunux libusb that will be able to access devices in FreeBSD.. > > The reason I'd like it is that I want to use this > http://rmdir.de/~michael/xilinx/ in FreeBSD so I can talk to a USB JTAG > cable. > > The thing I am not sure about is how ioctl's would get mangled on the > way through. They get interpreted as linux ioctl, as they are handled by the =20 linuxulator. You could try to write a wrapper there... > I guess the other approach would be to use a standard Linux libusb but > emulate the device tree it uses in Linux.. Would be a lot of work > though I think. As long as you can specify the devices in the linux app, it's enough =20 to translate the ioctl's. Apart from that, there's some kind of =20 translation layer for devices already, but I don't know if it just a =20 Linux major/minor -> FreeBSD dev mapping, or if you can map linux dev =20 -> FreeBSD dev. AFAIR HPS' USB stack has linux compatibility, maybe you should ask him =20 / have a look at it. Bye, Alexander. --=20 Power is poison. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137