<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Directory Tree Structure </TITLE>
</HEAD>
<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">

<A HREF="VGADriver.html"><EM> How to add an (S)VGA driver to XFree86</EM></A>
 <b>:</b> <EM>Directory Tree Structure </EM><BR>
<b>Previous:</b> <A HREF="VGADriver2.html"><EM>Getting Started </EM></A><BR>
<b>Next:</b> <A HREF="VGADriver4.html"><EM>Setting Up The Build Information </EM></A>


<HR NOSHADE>
  <H2><A NAME="3"></A>3. Directory Tree Structure </H2>
<p>Here is an outline of the directory tree structure for the source tree.
Only directories/files that are relevant to writing a driver are presented.
The structure for the Link Kit is presented below.</p>
<p>
<dl>
<dt><b>xc/config/cf/</b><dd><p>
<dl>
<dt><b>site.def</b><dd><p>Local configuration customization</p>
<dt><b>xf86site.def</b><dd><p>XFree86 local configuration customization</p>
</dl>
</p>

<dt><b>xc/programs/Xserver/hw/xfree86/</b><dd><p>The server source
<dl>
<dt><b>common/</b><dd><p>Files common to all of the server (XF86Config
parser, I/O device handlers, etc)
<dl>
<dt><b>xf86.h</b><dd><p>Contains the `ScrnInfoRec' data structure</p>
<dt><b>xf86_Option.h</b><dd><p>Contains option flags</p>
<dt><b>compiler.h</b><dd><p>Contains in-line assembler macros and
utility functions</p>
</dl>
</p>
<dt><b>os-support/</b><dd><p>OS-support layer 
<dl>
<dt><b>assyntax.h</b><dd><p>Contains macro-ized assembler mnemonics</p>
<dt><b>xf86_OSlib.h</b><dd><p>OS-support includes, defines, and prototypes</p>
</dl>
</p>
<dt><b>LinkKit/</b><dd><p>
<dl>
<dt><b>site.def.LK</b><dd><p>Template for Link Kit site.def</p>
</dl>
</p>
<dt><b>vga256/</b><dd><p>256-color VGA server directories
<dl>
<dt><b>vga/</b><dd><p>The generic VGA handling code
<dl>
<dt><b>vga.h</b><dd><p>Contains the `vgaVideoChipRec' and `vgaHWRec'
data structures</p>
<dt><b>vgaHW.c</b><dd><p>Contains the generic-VGA-register handling
functions <b>vgaHWInit()</b>,
<b>vgaHWSave()</b> and 
<b>vgaHWRestore()</b>.</p>
</dl>
</p>
<dt><b>drivers/</b><dd><p>Contains the SVGA driver subdirectories.
Each contains an Imakefile, a .c file for
the driver, and a .s file for the bank-
switching functions.</p>
</dl>
</p>
<dt><b>vga2/</b><dd><p>The monochrome vga server directories.  Most of
the files are linked from vga256, and the
differences handled by conditional compilation.
<dl>
<dt><b>drivers/</b><dd><p>The SVGA driver subdirectories.  The `generic'
VGA driver is also located here.</p>
</dl>
</p>
<dt><b>vga16/</b><dd><p>The 16-color vga server directories.  Most of
the files are linked from vga256, and the
differences handled by conditional compilation.
<dl>
<dt><b>drivers/</b><dd><p>The SVGA driver subdirectories.</p>
</dl>
</p>
<dt><b>VGADriverDoc/</b><dd><p>This documentation and the stub driver.</p>
</dl>
</p>
</dl>

The Link Kit is usually installed in /usr/X11R6/lib/Server.
The Link Kit
contains everything that is needed to relink the server.  It is possible
to write a new driver and build a new server without having even the server
source installed.
<dl>
<dt><b>Server/</b><dd><p>
<dl>
<dt><b>site.def</b><dd><p>Local configuration customization</p>
<dt><b>include/</b><dd><p>All of the include files listed under the
`common' directory above</p>
<dt><b>drivers/</b><dd><p>All of the SVGA drivers
<dl>
<dt><b>vga2/</b><dd><p>The SVGA driver subdirectories.</p>
<dt><b>vga16/</b><dd><p>The SVGA driver subdirectories.</p>
<dt><b>vga256/</b><dd><p>The SVGA driver subdirectories.</p>
</dl>
</p>
<dt><b>VGADriverDoc/</b><dd><p>The directory with this documentation and
the stub driver.  `vgaHW.c' is also copied
here, for reference (it is not built as
part of the Link Kit).</p>
</dl>
</p>
</dl>
</p>

 <HR NOSHADE>
<A HREF="VGADriver.html"><EM> How to add an (S)VGA driver to XFree86</EM></A>
 <b>:</b> <EM>Directory Tree Structure </EM><BR>
<b>Previous:</b> <A HREF="VGADriver2.html"><EM>Getting Started </EM></A><BR>
<b>Next:</b> <A HREF="VGADriver4.html"><EM>Setting Up The Build Information </EM></A>



</BODY>
</HTML>
