From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 13 04:05:29 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 AC2BF16A41F for ; Thu, 13 Oct 2005 04:05:29 +0000 (GMT) (envelope-from brucem@mail.cruzio.com) Received: from cruzio.com (dsl3-63-249-85-132.cruzio.com [63.249.85.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 63A3E43D45 for ; Thu, 13 Oct 2005 04:05:29 +0000 (GMT) (envelope-from brucem@mail.cruzio.com) Received: from mail.cruzio.com (localhost [127.0.0.1]) by cruzio.com (8.12.10/8.12.10) with ESMTP id j9D47MRf000286; Wed, 12 Oct 2005 21:07:27 -0700 (PDT) (envelope-from brucem@mail.cruzio.com) Received: (from brucem@localhost) by mail.cruzio.com (8.12.10/8.12.10/Submit) id j9D47MsY000285; Wed, 12 Oct 2005 21:07:22 -0700 (PDT) (envelope-from brucem) Date: Wed, 12 Oct 2005 21:07:22 -0700 (PDT) From: "Bruce R. Montague" Message-Id: <200510130407.j9D47MsY000285@mail.cruzio.com> To: freebsd-hackers@freebsd.org Cc: TheManifestShadow@gmail.com Subject: Re: Driver Development Books? 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: Thu, 13 Oct 2005 04:05:29 -0000 Hi, re: > The problem that I am having > right now is > that I have a fairly nice graphics card which, for the moment is only > supported on Windows Operating systems, and old 2.4 Linux kernels. Someone mentioned X drivers; current X drivers are dynamically loaded into the X server, which runs in user-space, not in the FreeBSD kernel. The X server has its own ELF loader to load modules and drivers. This approach allows X drivers to be independent of OS. There is some documentation on writing X drivers at: http://cvsweb.xfree86.org/cvsweb/xc/programs/Xserver/hw/xfree86/doc/DESIGN (Click on the "(download)" link at the top of the page) For a walk through writing a driver, see Section 20 at the end, "Some notes about writing a driver". Alternatively, access http://cvs.freedesktop.org/xorg/xc/programs/Xserver/hw/xfree86/doc/ and select "DESIGN", etc.. FreeBSD currently uses x.org (cvs.freedesktop.org), but the DESIGN doc is probably similar. The design doc has a lot of good background and conceptual material, enough to enable reading of "real" X drivers, which are the real definition of how things work. Although the mechanics of writting (or modifying) an X driver are very easy (almost trivial), if you have never worked with C or drivers before, expect a steep learing curve... probably starting by rebuilding X from source would be a good "first" step. - bruce