Installation Guide for XFree86 2.1 ---------------------------------- Contents -------- 1) Building XFree86 2) Using and configuring XFree86 3) Reconfiguring the Server (source distribution) 4) Reconfiguring the Server (binary distribution) 1 - Building XFree86 -------------------- NOTE - Refer to the appropriate OS-specific README file before attempting to build XFree86. These files contain additional information that you may need to successfully build under your OS. 0. We highly recommend using GCC-2 to build XFree86. Do not use versions 2.3.2 or 2.4.x versions prior to 2.4.5 due to bugs that cause either build or execution failures. Most of the XFree86 2.0 binary kits are built with GCC 2.4.5. Use of GCC's -m486 option will yield approximately 5% better performance on a 486, with no degradation (other than larger binaries) on a 386. (gcc-2 is available from prep.ai.mit.edu and other sites archiving GNU source.) 1. You need the following: - about 70-80MB of free disk space is required for building XFree86. An additional 20-30MB (for OSs with shared libraries) or 30-50MB (for OSs without shared libraries) is required to install the built binaries, fonts, etc, - MIT X11R5 distribution with fixes 01-26 applied. If you want to minimise disk usage, you can remove some or all of the following directories: mit/doc mit/hardcopy mit/lib/CLX mit/server/ddx/dec mit/server/ddx/ibm mit/server/ddx/macII mit/server/ddx/mips mit/server/ddx/omron mit/server/ddx/snf mit/server/ddx/sun mit/server/ddx/tek If you don't want to build PEX, you can remove the following directories. Since XFree86 now includes PEX support, doing this will cause some patches to fail (but they can safely be ignored). mit/demos/auto_box mit/extensions/lib/PEX mit/demos/beach_ball mit/extensions/server/PEX mit/demos/gpc mit/extensions/test/InsPEX mit/fonts/PEX mit/extensions/lib/PEXlib mit/util/PEX The following large fonts in mit/fonts/bdf/misc can also be removed if you don't need them: k14.bdf hang*.bdf jiskan*.bdf - It is possible to configure a cut-down source tree for building only the XFree86 servers. Building from a cut-down source tree requires about 30-35MB of disk space. Such a source tree can be obtained by additionally removing the following directories: mit/clients mit/demos mit/extensions/lib mit/fonts/bdf mit/fonts/clients mit/fonts/scaled mit/fonts/server mit/lib/X mit/lib/Xaw mit/lib/Xmu mit/lib/Xt mit/lib/nls mit/man - XFree86-2.1.diff.gz, XFree86-2.1.tar.gz, and optionally Type1.tar.gz, Type1.patch1.gz, Type1.patch2.gz if you wish to built the Adobe Type-1 font renderer. - If you are upgrading from XFree86 version 2.0, you will only need 2.0-2.1.diff.gz. 2. If you are starting from the stock MIT PL26 distribution, go to the directory above your 'mit' directory, and run: rm -fr mit/server/ddx/x386 then extract XFree86-2.1.tar.gz: gzip -d < XFree86-2.1.tar.gz | tar vxf - This tar file contains the XFree86 2.1 version of mit/server/ddx/x386. Then apply the patch: gzip -d < XFree86-2.1.diff.gz | patch -p If you are installing in an unmodified tree there shouldn't be any problems. Check for any patch rejections and resolve them. If you've modified some files (e.g. x386.cf, site.def) you should rename them, and restore the standard versions before patching. If you don't have backups of the originals, individual files can be easily obtained from the /pub/R5untarred directory on ftp.x.org. If you are patching a tree that you've previously used, make sure you run 'make clean' from the 'mit' directory before applying the diffs. 3. If you are upgrading your source tree from XFree86 version 2.0, go to the directory above your 'mit' directory, and run: gzip -d < 2.0-2.1.diff.gz | patch -p -E If your version of 'patch' doesn't support the '-E' flag, get a newer version before patching. The use of the '-E' flag is important because it ensures that files which are empty after patching are removed. If these files are not removed there will be build problems. If you are installing in an unmodified tree there shouldn't be any problems. Check for any patch rejections and resolve them. If you've modified some files (e.g. x386.cf, site.def) you should rename them, and restore the 2.0 versions before patching. If you are patching a tree that you've previously used, make sure you run 'make clean' from the 'mit' directory before applying the diffs. 4. If you want to include the Type1 font code, extract Type1.tar.gz in mit/fonts/lib/font, and then apply the Type1 patches. Some contributed fonts can be found on ftp.x.org in: /pub/R5untarred/contrib/fonts/scaled/Type1 /pub/R5untarred/contrib/fonts/Utopia 5. Have a look at config/site.def. Set the various parameters to suit your configuration. If it is your first build, you should set BuildFonts, InstallXdmConfig, InstallXinitConfig to YES (as well as InstallFSConfig if you are building the Font Server). If you have installed Type1.tar.gz, set BuildType1 to YES. If you want to build the large fonts in mit/fonts/bdf/misc set BuildLargeMiscFonts to YES. If you want to build the 100dpi fonts as well as the 75dpi fonts set Build100Dpi to YES. If you are using a cut-down source tree for building only the servers, set BuildServersOnly to YES. Set the defines to specify which server(s) you want to build: Colour SVGA server (XF86_SVGA): XF86SVGAServer 16 colour (S)VGA server (XF86_VGA16): XF86VGA16Server Monochrome server (XF86_Mono): XF86MonoServer S3 accelerated server (XF86_S3): XF86S3Server 8514/A accelerated server (XF86_8514): XF86I8514Server Mach8 accelerated server (XF86_Mach8): XF86Mach8Server Mach32 accelerated server (XF86_Mach32): XF86Mach32Server Set XFree86DefaultServer to the server you want linked to "X". If this isn't specified, it will default to either XF86_SVGA or XF86_Mono (if XF86_SVGA isn't built). The drivers and font renderers you wish to include in the server are also selected in site.def. The choice of font renderers is made by setting the value of FontRenderers. Setting this in site.def overrides the BuildType1 and BuildSpeedo parameters. The drivers used for the 256 colour server are set by the X386Vga256Drivers parameter. This should be a list of the driver directory names (in lower case). The ordering determines the order in which the drivers are probed at startup. The default is to include all supplied drivers. Similarly the following parameters specify drivers for the other servers: X386Vga16Drivers XF86_VGA16 X386Vga2Drivers XF86_Mono (vga drivers) X386Hga2Drivers XF86_Mono (Hercules driver) X386Bdm2Drivers XF86_Mono (bdm2 drivers) XF86S3Drivers XF86_S3 The VGA16 and VGA2 screens both have `generic' drivers, and these should always be last in the list because their probe will succeed for any VGA card. Similarly, the S3 server has a 's3_generic' driver which will function with any S3 card. Note: it is not possible to have both the monochrome and colour drivers in the same server executable. 6. The following server connection defaults are set up by x386.cf, and there should be little reason to change them. For an explanation of how these connection modes are used, refer to the XFree86(1) manual page. For SVR4, both server and client-side local connections are enabled, as well as the MIT standard TCP/IP and Unix-domain socket connections. By default, support for SVR3-style (SCO and ISC) local connections are compiled in, but the devices to use them only exist in SVR4.0.4 and SVR4.2 (and later releases). For SVR3.2, the default for both the server and clients is to use the STREAMS based LOCALCONN. If HasSockets is set, TCPCONN is also used. Note that selecting LOCALCONN and not TCPCONN does not allow the server to run without TCP/IP installed. You still need to have TCP/IP installed to run even if you are only using local connections. For the BSD-based OSs, Mach386, OSF/1 and Linux, the default for both server and clients is to use UNIXCONN and TCPCONN. LOCALCONN is not applicable to these systems. If you want to change the setting of ConnectionFlags directly, add something like the following to the AfterVendorCF section of config/site.def: #undef ConnectionFlags #define ConnectionFlags YOUR_CHOICE_OF_FLAGS 7. Before building the distribution, read through the OS-specific README file in mit/server/ddx/x386 that is relevant to you. Once those OS-specific details have been taken care of, go the 'mit' directory and: For SVR4, run: make World BOOTSTRAPCFLAGS='-DSVR4 -DSYSV386' > World.Log 2>&1 & For NCR, run: make World BOOTSTRAPCFLAGS='-DSVR4 -DSYSV386 -DNCR' > World.Log 2>&1 & For Solaris, run: make World BOOTSTRAPCFLAGS='-DSVR4 -DSYSV386 -DSOLX86' > World.Log 2>&1 & For 386BSD, NetBSD, BSD/386, Mach386, OSF/1, Linux, Minix-386 and Amoeba, run: make World BOOTSTRAPCFLAGS= > World.Log 2>&1 & For FreeBSD, run: make World BOOTSTRAPCFLAGS=-D__FreeBSD__ > World.Log 2>&1 & For SVR3, run: make World BOOTSTRAPCFLAGS='-DSYSV -DSYSV386 -DVENDOR' > World.Log 2>&1 & where VENDOR is one of: ISC, ESIX, ATT, SCO (note that ESIX is not yet supported). For some versions of ISC and SCO, additional flags are required: For ISC 2.0.2, run: make World BOOTSTRAPCFLAGS='-DSYSV -DSYSV386 -DISC -DISC202' > \ World.Log 2>&1 & For ISC 3.0, run: make World BOOTSTRAPCFLAGS='-DSYSV -DSYSV386 -DISC -DISC30' > \ World.Log 2>&1 & For ISC 4.0, run: make World BOOTSTRAPCFLAGS='-DSYSV -DSYSV386 -DISC -DISC40' > \ World.Log 2>&1 & For SCO 3.2.4, run: make World BOOTSTRAPCFLAGS='-DSYSV -DSYSV386 -DSCO -DSCO324' > \ World.Log 2>&1 & 8. If all goes well, that will finish successfully in anything from two to eight hours depending on your CPU/RAM/OS/compiler/disks. You should check World.Log to see if there were any problems. If there weren't any then you can do a 'make install' and a 'make install.man'. Make sure you have enough space in /usr/X386 for the install to succeed. If you want to install on a filesystem other than /usr, make a symbolic link to /usr/X386 before installing. To install the binary Link Kit (in /usr/X386/lib/Server), run: make install.linkkit 2 - Using and configuring XFree86 --------------------------------- 1. Add /usr/X386/bin to your PATH and /usr/X386/man to your MANPATH. 2. Check through the /usr/X386/lib/X11/etc/x386install script (only required for SVR3 (except SCO), SVR4, 386BSD, FreeBSD and NetBSD). If it looks OK for your system, run it. 3. Set up an Xconfig file. The default location for this file is in /usr/X386/lib/X11. There is a sample file installed in that directory called Xconfig.sample, and this should be used as a starting point. For details, refer to the README.Config file (which can be found in /usr/X386/lib/X11/etc). 4. If you use a ${HOME}/.xserverrc file with xinit, make sure that the script exec's the server (e.g 'exec /usr/X386/bin/XF86_SVGA' rather than just '/usr/X386/bin/XF86_SVGA'). If you don't do this, the server may not exit when your last client finishes. 5. startx has been modified so that a server can be easily started by specifying only its name rather than its full path. E.g., the mono server can be started by running: startx -- XF86_Mono [server options] ... 3 - Reconfiguring the server (source distribution) -------------------------------------------------- To build a different set of servers: 1. Change the settings of the server defines (eg XF86SVGAServer as described in 1.6 above) in site.def to specify which servers you wish to build. Also, change the driver and font renderer lists to suit your needs. 2. From mit/config, run: make Makefiles 3. From mit/server, run: make Makefile make Makefiles make depend make To relink a server with a different set of drivers and/or font renderers do the following: 1. Make sure the source for the drivers/renderers is in the correct place (e.g., driver source for the SVGA server should be in a subdir of mit/server/ddx/x386/vga256/drivers). Font renderer source should be in a subdir of mit/fonts/lib/font. 2. Modify site.def to specify which drivers you wish to include. 3. From mit/server, run: make reloadSERVERNAME where "SERVERNAME" is the name of the server you want to relink (e.g., XF86_SVGA). This will automatically rebuild everything required and relink the server. 4 - Reconfiguring the server (binary distribution) -------------------------------------------------- If you have installed the server Binary Link Kit, it is possible to reconfigure the drivers and font renderers in the server. To do this, go to the configuration directory (/usr/X386/lib/Server) and do the following: 0. For systems which don't use gcc-2, you may need to install libgcc.a if the binary distribution you are using was built with gcc-2. 1. Edit the site.def file to define which servers you want to build, and the drivers and font renderers you want included. - Set HasGcc and HasGcc2 to match the compiler you are using if the defaults aren't correct. - If the linkkit was built with gcc-2.x and you are using some other compiler, you must install libgcc.a and set NeedLibGcc to YES. - To build the 256 colour server: set XF86SVGAServer to YES. - To build the 16 colour server: set XF86VGA16Server to YES. - To build the monochrome server: set XF86MonoServer to YES. - To build the S3 server: set XF86S3Server to YES. - To build the Mach8 server: set XF86Mach8Server to YES. - To build the Mach32 server: set XF86Mach32Server to YES. - To build the IBM 8514/A server: set XF86I8514Server to YES. - Set X386Vga256Drivers to the list of drivers you want to include in the 256 colour server. - Set X386Vga16Drivers to the list of drivers you want to include in the 16 colour server. - Set X386Vga2Drivers to the list of drivers you want to include in the monochrome vga server. The vga2 driver can be disabled by defining this list to be empty. - Set X386Hga2Drivers to hga6845 to enable the hga2 driver in the monochrome server. The hga2 driver can be disabled by defining this to be empty. - Set X386Bdm2Drivers to hgc1280 to enable the Hyundai bdm2 driver in the monochrome server. The bdm2 driver can be disabled by defining this to be empty. - Set XF86S3Drivers to the list of drivers you want to include in the S3 server. - Set FontRenderers to the list of font renderers you want to include in the server. Note: the ordering of drivers determines the order in which the probing is done. The 'generic' driver should be the last one included in the monochrome and 16 colour servers because its probe always succeeds. The 's3_generic' driver should be the last one included in the S3 servers for similar reasons. 2. If you are including a driver that it not part of the standard distribution, make a directory in drivers/vga256 (drivers/vga2 if it is for the monochrome server, drivers/vga16 if it is for the 16 colour server, or drivers/bdm2 if it is for the bdm2 monochrome server's bdm2 screen) and copy either the source or .o file and a suitable Imakefile into that directory. The name of the directory should be the same as the name of the driver (refer to the documentation in the VGADriverDoc directory for more details). If you are adding an additional font renderer, put the library in renderers/. 3. To build the Makefile, run ./mkmf 4. Run 'make' to link the server(s) as configured. 5. Run 'make install' to install the new server(s). 6. Run 'make clean' to remove the files that were created by this procedure. 7. It is possible to see which drivers are included in the server by running it with the '-showconfig' flag. $XFree86: mit/server/ddx/x386/INSTALL,v 2.7 1994/03/05 08:22:22 dawes Exp $