From owner-freebsd-questions@FreeBSD.ORG Fri Jan 23 06:08:21 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 8AB9316A4CE for ; Fri, 23 Jan 2004 06:08:21 -0800 (PST) Received: from dswu26.btconnect.com (dswu26.btconnect.com [193.113.154.27]) by mx1.FreeBSD.org (Postfix) with SMTP id 400F743D2D for ; Fri, 23 Jan 2004 06:08:19 -0800 (PST) (envelope-from BPICKLES@btconnect.com) Received: from sdlbase (actually host 219.181.136.81.in-addr.arpa) by dswu26 with SMTP-CUST (XT-PP) with ESMTP; Fri, 23 Jan 2004 14:08:17 +0000 Message-ID: <017701c3e1bb$4947ebd0$1d02a8c0@sdlbase> From: "Bob Pickles" To: "Admin" , References: <004c01c3e1b7$fe93cdf0$1c77fea9@dpc27> Date: Fri, 23 Jan 2004 14:14:42 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: peter@sycos.co.uk Subject: Re: PCI driver development problems X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Bob Pickles List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2004 14:08:21 -0000 Gurdial I am in the same position, but have gone past most of these issues, I only have 5 days experience though. The device should be made in your attach() function using make_dev(), then the device should be installed... use tail -f /var/log/messages to see errors that kldload reports, this is helpful, as it will give silly errors, when it's just link errors. Hope this helps. Bob Pickles SBS Technologies. ----- Original Message ----- From: "Admin" To: Cc: Sent: Friday, January 23, 2004 1:50 PM Subject: PCI driver development problems 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 _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" ***This message has been scanned for virus, spam, and undesirable content.*** ***For further information, contact your mail administrator.***