From owner-freebsd-questions@FreeBSD.ORG Fri Jan 23 05:51:55 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B72BC16A4CE for ; Fri, 23 Jan 2004 05:51:55 -0800 (PST) Received: from anchor-post-35.mail.demon.net (anchor-post-35.mail.demon.net [194.217.242.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4033143D41 for ; Fri, 23 Jan 2004 05:51:25 -0800 (PST) (envelope-from admin@sycos.co.uk) Received: from sycos.demon.co.uk ([158.152.248.21] helo=dpc27) by anchor-post-35.mail.demon.net with smtp (Exim 3.35 #1) id 1Ak1iT-000FKH-0Z; Fri, 23 Jan 2004 13:51:22 +0000 Message-ID: <004c01c3e1b7$fe93cdf0$1c77fea9@dpc27> From: "Admin" To: Date: Fri, 23 Jan 2004 13:50:05 -0000 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.1 cc: peter@sycos.co.uk Subject: PCI driver development problems X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2004 13:51:55 -0000 I am using FreeBSD Version 5.1. I am developing a driver for a PCI interface. I have spent almost a = month to understand the FreeBSD architecture and how to develop a device = driver. I have a number of issues requiring immediate help: 1. I have tried using the = /usr/share/examples/drivers/make_device_driver.sh file to generate a = skeleton driver and it failed with a number of errors and warnings. 2. I used the examples for 'echo' Pseudo device driver (FreeBSD = Architecture Handbook) and managed to compile the code. When I tried to = load the driver, the load failed due to there being no node in the /dev = directory. I tried using mknod /dev/echo c 33 0 and the following error = message was returned: No such file or directory. I can create a node in = any other directory but not in /dev directory. 3. I have tried compiling /usr/share/examples/kld file and they are = giving errors. I have tried compiling PUC driver code and it fails on = header files. I managed to find other files, but, I could not find = opt_puc.h header file. 4. I have modified the make_device_driver.sh to generate code for a pci = device driver. when I try to compile the kernel with the pci driver = node, it won't compile, because I am unable to enter device node in /dev = directory. Can I communicate with my PCI card without creating the = device node? 5. I can see the product hardware details using pciconf -l command. But, = when I try using pciconf -a(selector), it returns error "cannot parse = selector". 6. Is there a document which covers how to convert a driver into kld? 7. I am currently using FreeBSD 5.1. Have any of the above problems been = addressed in FreeBSD 5.2? 8. Are there any kernel debugging tools in the system I can use? 9. Are there any working examples in FreeBSD 5.2? I am stuck and desperately need your help. Would you please advise = a.s.a.p. If you have an up-to-date example of a PCI interface device driver that = works, I would be very grateful to receive a copy to assist me. Regards Gurdial Chandra=20 =20