From owner-freebsd-hackers Thu Dec 12 3:46:22 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2EA4137B404 for ; Thu, 12 Dec 2002 03:46:20 -0800 (PST) Received: from mailout.informatik.tu-muenchen.de (mailout.informatik.tu-muenchen.de [131.159.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0929943EB2 for ; Thu, 12 Dec 2002 03:46:19 -0800 (PST) (envelope-from langd@informatik.tu-muenchen.de) Received: from mailrelay1.informatik.tu-muenchen.de (mailrelay1.informatik.tu-muenchen.de [131.159.254.5]) by mailout.informatik.tu-muenchen.de (Postfix) with ESMTP id 25AAC62C6 for ; Thu, 12 Dec 2002 12:46:18 +0100 (MET) Received: from atrbg11.informatik.tu-muenchen.de (atrbg11.informatik.tu-muenchen.de [131.159.42.129]) by mailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id 0DCE07942 for ; Thu, 12 Dec 2002 12:46:18 +0100 (MET) Received: by atrbg11.informatik.tu-muenchen.de (Postfix, from userid 20455) id 9A14413691; Thu, 12 Dec 2002 12:46:17 +0100 (CET) Date: Thu, 12 Dec 2002 12:46:17 +0100 From: Daniel Lang To: freebsd-hackers@freebsd.org Subject: Style question Message-ID: <20021212114617.GE80992@atrbg11.informatik.tu-muenchen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Geek: GCS/CC d-- s: a- C++$ UBS++++$ P+++$ L- E-(---) W+++(--) N++ o K w--- O? M? V? PS+(++) PE--(+) Y+ PGP+ t++ 5+++ X R+(-) tv+ b+ DI++ D++ G++ e+++ h---(-) r++>+++ y+ User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, As I already have stated here, I'm currently trying to develop a driver for the MOXA Intellio boards. To get things working, firmware must be uploaded to the board and box by the driver. The linux driver does this, using a userland program _after_ the driver-module has been loaded. As I don't know much about driver development, yet, I use the si(4) driver as a reference, which seems closely related enough. The si(4) driver packs the firmware file into c-code and loads it during the attachement of the driver. What approach should I use? I fancy the si(4) way more, but could there be a reason for not doing in during this stage? A related question would be, if I should separate the firmware code. I have already transformed it into c-code by using hexdump(1). The firmware file is divided into several sections, which are documented to me. Should I put the different sections into separate structures, or should I put them into one single structure, and let the download code sort it out. The advantage in the second case, would be, that it is probably easier to exchange the firmware code, if a new revision would be available, since in the first case, the separation needs to be done manually during coding. Also, I'm concerend with a License issue: To get hold of MOXA documentation, I needed to sign an NDA. I already asked about this here, and Poul-Henning Kamp has pointed me to the "encumered" code possiblity, as he has used it for the fla(4) devices. I have also now read the sections in the developers handbook. BUT, the linux driver is completely available in source code, to be downloaded from MOXA, and also the driver says it is under GPL. Of course I would not port the driver to freebsd (it's a mess for all I can say), but I could obtain the crucial information, as well from this driver. Would the NDA still apply then? Would I need to encapsulate code in an encumbered fashion? Thanks for your help so far. Best regards, Daniel -- IRCnet: Mr-Spock - Eddie would go! - Daniel Lang * dl@leo.org * +49 89 289 18532 * http://www.leo.org/~dl/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message