README for X11R7.2 on LynxOS
           _______________________________________________

   Table of Contents
   What and Where is X11R7.2?
   Installing X11R7.2
   Running X11R7.2
   Compiling the X11R7.2 Distribution

What and Where is X11R7.2?

   X11R7.2 is a port of X11R6.4 that supports several versions of
   Intel-based Unix. It is derived from XFree86 4.4 rc2 which was
   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.

   See the Copyright Notice.

   Building of this X11R7.2 version has been tested on `LynxOS
   3.1.0a i386' and `LynxOS 4.0.0 i386'.

   Previous releases of X11R7.2 supported LynxOS on the x86 and on
   the PowerPC platform. Building on PowerPC platforms has not
   been tested recently.
     __________________________________________________________

Installing X11R7.2

   Please refer to the Installation Document for detailed
   installation instructions.

   It may be necessary to increase the process stack limit in
   order to build X11R7.2 and run X11R7.2 on your system. Edit
   /etc/startab and reboot your system to make the changes active
   before you begin the installation.

   Also, be sure to include /usr/X11R6/bin in your PATH
   environment variable.

   Refer to the next section Running X11R7.2 for further
   information on necessary configuration steps before running
   X11R7.2 on LynxOS.
     __________________________________________________________

Accessing X11R7.2 manual pages

   Include /usr/X11R6/man in the MANPATH environment variable or
   add the directory /usr/X11R6/man to /usr/Lib/man.config
     __________________________________________________________

Running X11R7.2

   This section describes the changes to the LynxOS environment
   which may be necessary to successfully run X11R7.2.
     __________________________________________________________

System tuning

Tunable parameters

   To reasonably run X11R7.2 you may have to adjust a few system
   parameters.

   On LynxOS 3.1.0 and 4.0.0 include a line
   #define X_WINDOWS

   in /sys/lynx.os/uparam.h.
     __________________________________________________________

Adjustment for "nv" driver for NVidia graphics cards

   If you're using the "nv" driver (Riva 128, nVidia TNT, TNT2,
   GeForce) on LynxOS `3.1.0', you will have to increase the value
   of the SMEMS parameter in /sys/lynx.os/uparam.h from 10 to 20.
     __________________________________________________________

Increase number of ptys

   You should also increase the number of ptys to be able run a
   couple more xterms. You may replace /sys/cfg/pty.cfg with
   /usr/X11R6/lib/X11/etc/pty.cfg.
     __________________________________________________________

MTRR device driver

   If you're using an Intel PentiumPRO or Pentium II (or higher)
   class CPU you might want to install the MTRR device driver.
   This driver enables the X11R7.2 X server to manipulate the CPU
   memory type range registers which may improve performance on
   certain systems.

   To install the driver follow these steps:

  # cd /
  # bash /usr/X11R6/lib/X11/etc/MTRR-Lynx.shar
  # cd sys/drivers/mtrr
  # make install

   Then add a line
     I:../drivers/mtrr/mtrr.cfg

   to /sys/lynx.os/CONFIG.TBL and rebuild the kernel (see next
   section).
     __________________________________________________________

Kernel build

   If you plan to use a PS/2 mouse to the following sections
   before rebuilding the kernel, if not, you should rebuild the
   kernel now:

     # cd /sys/lynx.os
     # make install
     # reboot -N
     __________________________________________________________

Mouse support in X11R7.2

   X11R7.2 includes support for PnP mice (see also Mouse Support
   in X11R7.2). The current LynxOS TTY device driver doesn't allow
   the necessary manipulation of the RTS line and therefore the
   support for PnP mice has been disabled for LynxOS.
     __________________________________________________________

PS/2 mouse drivers

   LynxOS x86 comes with a PS/2 mouse driver. If it is not
   currently installed on your system, install it with
   /usr/bin/Install.ps2mouse.

   The LynxOS PS/2 mouse driver is not always able to properly
   handle the mouse initialization performed by the X server. If
   your mouse is not responding after the X server has started up,
   modify the PS/2 mouse driver as follows:

  --- /sys/drivers/ps2mouse/mousedrvr.c.orig      Wed Aug 25 09:51:02 20
04
  +++ /sys/drivers/ps2mouse/mousedrvr.c   Wed Aug 25 09:50:54 2004
  @@ -261,6 +261,7 @@
   int mousewrite(struct statics *s, struct file *f, char *buff, int cou
nt)
   {
          int i;
  +       return 0;
   #ifdef DEBUG
          kkprintf("Mouse: write %d %x\n", count, buff[0] & 0x0FF);
   #endif

   Then rebuild both the mouse driver and the kernel:

     # cd /sys/drivers/ps2mouse
     # make
     # cd /sys/lynx.os
     # make install
     # reboot
     __________________________________________________________

ATC console driver and VT switching

   Currently there is no support for virtual terminal switching
   once the server has started. Support for this feature may be
   added in future versions (it requires a patch to the vt100
   LynxOS terminal driver).

   You will need a free console which the X server will use for
   keyboard input. You must disable login on at least one of the
   four virtual terminals in /etc/ttys, e.g. /dev/atc3:

change
       /dev/atc3:1:default:vt100at:/bin/login

to
       /dev/atc3:0:default:vt100at:/bin/login
                 ^
     __________________________________________________________

X Server debug diagnostics output and other VT peculiarities

   Output made by the X11R7.2 X on its stdout or stderr will be
   lost after the server switches to graphics mode. The X11R7.2
   server stores its output in /usr/adm/Xorg.n.log (where n is the
   screen number).

   When the X server is running output made to other consoles will
   be lost. After server shutdown the screen contents of other
   consoles may be inconsistent with what one would expect (i.e.
   random).
     __________________________________________________________

Compiling the X11R7.2 Distribution

   The next sections contain LynxOS specific notes with respect to
   the build process.
     __________________________________________________________

Disk space requirements

   Currently there is no support for shared libraries in the
   LynxOS X11R7.2 port. A complete binary installation along with
   manual pages will require approximately 250 MBytes of disk
   space. To compile the system you will need at least 350 MBytes
   of free disk space.
     __________________________________________________________

Changes to system environment (LynxOS x86)

   Before compiling the X11R7.2 distribution you will have to make
   a few little adjustments to your system:

     * If not already installed, on your `LynxOS 3.1.0a' system
       create a shell script named /lib/cpp as follows:

  #!/bin/sh
  /usr/lib/gcc-lib/i386-coff-lynxos/2.9-gnupro-98r2/cpp \
     -traditional "$@"

       On other platforms than the x86 the paths for the compiler
       support programs are different. You may use

  gcc -v

       to find out the correct path. Set the file mode of /lib/cpp
       with

  # chown root /lib/cpp
  # chmod 755 /lib/cpp

     * Modify /lib/liblynx.a. On `LynxOS 3.1.0a' the X servers
       need the smem_create() system call to map the frame buffer
       into their address space. The system call is in liblynx
       library along with other Lynx proprietary calls which
       (unfortunately) overlap with calls in libc. To reduce
       confusion you should modify liblynx as follows:

  # mv /lib/liblynx.a /lib/liblynx.a.ORG
  # mkdir /tmp/xx; cd /tmp/xx
  # ar xv /lib/liblynx.a.ORG
  # ar rv /lib/liblynx.a *smem*
  # ranlib /lib/liblynx.a
     __________________________________________________________

make World

   If you have the MTRR device driver installed, add a line

    #define HasMTRRSupport YES

   to the config/cf/host.def file.

   You may then issue a

     make World

   to compile X11R7.2. After some time (and hopefully a successful
   build of the X11R7.2 system) you can install the software using

     make install

   You must be logged in as super-user (root) when you invoke
   `make install'.
     __________________________________________________________

Installing X11R7.2 manual pages

   LynxOS uses cat-able manual pages, and because a doc
   preparation system is definitely not a vital component of a
   real-time operating system you must first install groff-1.09
   (or newer).

   X11R7.2 manual pages may be installed using

     make install.man

   The index and whatis database for the X11R7.2 manual pages will
   be created automatically. If you already have a whatis database
   or index file in the destination directories you should perform
   a sort/uniq operation to remove duplicate entries:

     for i in 1 3 5
     do
       rm -f /tmp/tmpfile
       sort /usr/X11R6/man/cat$i/LIST$i | uniq > /tmp/tmpfile
       mv /tmp/tmpfile /usr/X11R6/man/cat$i/LIST$i
     done
     sort /usr/X11R6/man/whatis | uniq > /tmp/tmpfile
     mv /tmp/tmpfile /usr/X11R6/man/whatis
