README for XFree86 3.1.2 on BSD/OS 2.0 Hans Nasten 24 July 1995 THIS DOCUMENT IS OUT OF DATE 1. What and Where is XFree86? XFree86 3.1.2 is a port of X11R6 that supports several versions of Intel-based Unix. It is derived from X386 1.2, which was the X server distributed with X11R5. This release consists of many new features and performance improvements as well as many bug fixes. The release is available as source patches against the X Consortium X11R6 code, as well as binary distributions for many architec­ tures. The sources for XFree86 are available by anonymous ftp from: ftp://ftp.XFree86.org/pub/XFree86/current Binaries for BSD/OS 2.0 will be available from: ftp://ftp.XFree86.org/pub/XFree86/current/binaries/Bsdi If you're running a earlier version of BSD/OS, you'll have to build the distri­ bution from source. Building the distribution on BSD/386 1.1 and 1.0 is untested, but believed to work correctly. If you run into trouble building on a earlier release, please let us know so that we can correct any incompatibili­ ties. If you've done it and want to share your binaries, please let the Bsdi mailing list know. The binaries are built using gcc 2.6.3 as distributed with BSD/OS 2.0. If you build the distribution from source using a gcc compiler built using the generic gcc source code, you may run into problems using the binaries on a 386/486 not equipped with a math coprocessor. 2. Bug Reports for This Document Send email to nasten@Everyware.SE (Hans Nasten) or XFree86@XFree86.org if you have comments or suggestions about this file and we'll revise it. 3. Installing the Binaries The binary distribution is composed of a number of gzipped tar archives which contains the executables, servers, fonts, libraries, include files, man pages, config files, and the server link kit. All tar archives should be extracted as root with / as the default directory. The full distribution takes over 40MB of disk space. The file names are converted to be compatible with CD-rom README for XFree86 3.1.2 on BSD/OS 2.0 README for XFree86 3.1.2 on BSD/OS 2.0 conventions. Note that many clients were moved from the X11R6 distribution to the `contrib' area. However, they are still distributed with the XFree86 binary distribution. The contents of the archives are: REQUIRED: X312doc.tgz READMEs and XFree86 specific man pages. X312bin.tgz all of the executable X client applications. X312fnts.tgz all fonts except the cyrillic fonts X312lib.tgz data files needed at runtime Choose at least one of the following to match your hardware: X312SVGA.tgz the 8-bit pseudo-color X server for Super VGA cards X312VG16.tgz the 4-bit pseudo-color X server for VGA & SVGA cards. X312Mono.tgz the Monochrome X Server X3128514.tgz the X server for IBM 8514/A and compatible boards X312AGX.tgz the X server for AGX boards X312Ma8.tgz the X server for ATI Mach8 boards X312Ma32.tgz the X server for ATI Mach32 boards X312Ma64.tgz the X server for ATI Mach64 boards X312P9K.tgz the X server for P9000 based boards X312S3.tgz the X server for S3 based boards README for XFree86 3.1.2 on BSD/OS 2.0 X312W32.tgz the X server for ET4000/W32 and ET6000 based boards OPTIONAL: X312fsrv.tgz the font server with man pages. X312cfnt.tgz cyrillic fonts X312prog.tgz the include/X11 header files and static libraries needed only for compiling other X applications X312man.tgz all man pages X312link.tgz the server reconfiguration kit. If this is your first time, then you should be able to safely install all of the packages. As a minimal install, you'll need doc, bin, fonts lib and one X server. To unpack and install the archives: 1. create some destination directory in which you'd like the X distribution to live. /usr/X11R6 is recommended, but if that partition is full (as it is on my machine), then just create an alternate directory, and sym-link /usr/X11R6 to this place. ie, on my machine, I do the following: % cd /usr/local % mkdir X11R6 % ln -s /usr/local/X11R6 /usr/X11R6 2. You must be logged in as root to unpack the archives and use a `umask' value of 022. Typing `umask 022' sets it. Caution: If you do not extract the files as user `root' with the correct umask you may not be able to run XFree86 3.1.2. The X server needs special permissions that are only granted to the root user. You must also cd to / before extract­ ing the archives. 3. Create a symbolic link in /usr/X11R6/bin named `X' that points to the server that matches your video card: See the XF86_* man pages for hard­ ware details. For example, if you have an ET4000 based SVGA card: cd /usr/X11R6/bin rm -f X README for XFree86 3.1.2 on BSD/OS 2.0 ln -s XF86_SVGA X Note: you don't need to uncompress the fonts files in lib/X11/fonts. If you want to uncompress them anyway, don't forget to run `mkfontdir' in each direc­ tory after that. 4. Installing Xdm, the display manager The display manager makes your PC look like an X terminal. That is, it pre­ sents you with a login screen that runs under X. To start the display manager, log in as root on the console and type `xdm -nodaemon'. You can start xdm automatically on bootup by disabling the console getty and adding the following code to /etc/rc.local: if [ -x /usr/X11R6/bin/xdm ]; then echo -n ' xdm'; /usr/X11R6/bin/xdm fi To disable the console getty, change `on' to `off' in the console entry in /etc/ttys: console "/usr/libexec/getty std.9600" ibmpc3 off secure 5. Configuring X for Your Hardware The XF86Config file tells the X server what kind of monitor, video card and mouse you have. You must create it to tell the server what specific hardware you have. XFree86 3.1 and later releases uses a new configuration file format. Consult the XF86Config man page and the general INSTALL file for instructions. If you have a Xconfig file for XFree86 2.x, use reconfig to translate part of it into the new format: # reconfig XF86Config and complete the rest according to the XF86Config man page and the XF86Con­ fig.sample file as a template. In order to protect your hardware from damage, the server will no longer read XF86Config files from a user's home directory, but requires that it be in /etc/XF86Config, /usr/X11R6/lib/X11/XF86Config.hostname or /usr/X11R6/lib/X11/XF86Config. You'll need info on your hardware: o Your mouse type, baud rate and its /dev entry. README for XFree86 3.1.2 on BSD/OS 2.0 o The video card's chipset (e.g. ET4000, S3, etc). o Your monitor's sync frequencies. The easiest way to find which device your mouse is plugged into is to use `cat' or `kermit' to look at the output of the mouse. Connect to it and just make sure that it generates output when the mouse is moved or clicked: % cat < /dev/tty00 If you can't find the right mouse device then use `dmesg|grep com' to get a list of devices that were detected upon booting: % dmesg|grep com com0 at isa0 iobase 0x3f8 irq 4 com0 is the hardware port used for /dev/tty00 and com1 is /dev/tty01. If you plan to fine tune the screen size or position on your monitor you'll need the specs for sync frequencies from your monitor's manual. 6. Running X 8mb of memory is a recommended minimum for running X. The server, window man­ ager and an xterm take about 4 Mb of memory themselves. On a 4Mb system that would leave nothing left over for the kernel and other applications like gcc that expect a few meg free. The easiest way for new users to start X windows is to type `xinit >& xinit.log'. Error messages are lost unless you redirect them because the server takes over the screen. To get out of X windows, type `exit' in the console xterm. You can customize your X by creating .xinitrc, .xserverrc, and .twmrc files in your home direc­ tory as described in the xinit and startx man pages. 7. Rebuilding the XFree86 Distribution The server link kit allows you to rebuild just the X server with a minimum amount of disk space. Just unpack it, make the appropriate changes to the site.def, type `./mkmf' and `make' to link the server. See /usr/X11R6/lib/Server/README for more info. See /usr/X11R6/lib/X11/etc/INSTALL for instructions on unbundling and building the source distribution. You will need about 250Mb free for the sources, objects and binaries during the build. You should configure the distribution by editing xc/config/cf/xf86site.def before compiling. To compile the sources, invoke make World README for XFree86 3.1.2 on BSD/OS 2.0 in the xc directory. 8. Building New X Clients The easiest way to build a new client (X application) is to use xmkmf if an Imakefile is included in the sources. Type `xmkmf' to create the Makefiles, check the configuration if necessary and type `make'. Whenever you install additional man pages you should update whatis.db by running `makewhatis /usr/X11R6/man'. To avoid the `Virtual memory exhausted' message from cc while compiling, increase the data and stack size limits (in csh type `limit datasize 32M' and `limit stacksize 16M'). Note: Starting with XFree86 2.1, the symbol ``__386BSD__'' no longer gets defined or via the X config files for *BSD systems. When porting clients to *BSD systems, make use of the symbol ``BSD'' for code which is truly BSD-spe­ cific. The value of the symbol can be used to distinguish different BSD releases. For example, code specific to the Net-2 and later releases can use: #if (BSD >= 199103) To ensure that this symbol is correctly defined, include in the source that requires it. Note that the symbol CSRG_BASED is defined for *BSD systems in XFree86 3.1.1 and later. This should be used to protect the inclu­ sion of . For code that really is specific to a particular i386 BSD port, use __FreeBSD__ for FreeBSD, __NetBSD__ for NetBSD, __OpenBSD__ for OpenBSD, __386BSD__ for 386BSD, and __bsdi__ for BSD/OS. 9. Linear access to the frame buffer using BSD/386 1.1 The stock BSD/386 1.1 kernel has problems when trying to mmap the frame buffer as a linear ( unbanked ) memory area in high memory. This patch removes the check in /sys/i386/isa/vga.c that disables mmapping the frame buffer in linear mode. Please consult the BSD/386 1.1 release notes for instructions on how to build a new kernel. This patch is not needed on BSD/OS 2.0. o save the patch below in a separate file. o cd to /sys/i386/isa. o apply the patch with ``patch -p vgap->vga_mem_size) return (-1); ! #else if (off + NBPG > IOM_END) return (-1); #endif --- 159,165 ---- #if 0 if (off + NBPG > vgap->vga_mem_size) return (-1); ! /*#else*/ if (off + NBPG > IOM_END) return (-1); #endif $XFree86: xc/programs/Xserver/hw/xfree86/doc/README.Bsdi,v 3.26 1997/01/27 22:12:34 dawes Exp $ $XConsortium: Bsdi.sgml /main/8 1996/10/27 11:05:51 kaleb $ README for XFree86 3.1.2 on BSD/OS 2.0 CONTENTS 1. What and Where is XFree86? .............................................. 1 2. Bug Reports for This Document ........................................... 1 3. Installing the Binaries ................................................. 1 4. Installing Xdm, the display manager ..................................... 4 5. Configuring X for Your Hardware ......................................... 4 6. Running X ............................................................... 5 7. Rebuilding the XFree86 Distribution ..................................... 5 8. Building New X Clients .................................................. 6 9. Linear access to the frame buffer using BSD/386 1.1 ...................... 6 i $XFree86: xc/programs/Xserver/hw/xfree86/doc/README.Bsdi,v 3.26 1997/01/27 22:12:34 dawes Exp $