                       README for X11R6.8.2 on LynxOS

                               Thomas Mueller

                               25 August 2004

1.  What and Where is X11R6.8.2?

X11R6.8.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 X11R6.8.2 version has been tested on `LynxOS 3.1.0a i386'
and `LynxOS 4.0.0 i386'.

Previous releases of X11R6.8.2 supported LynxOS on the x86 and on the PowerPC
platform. Building on PowerPC platforms has not been tested recently.

2.  Installing X11R6.8.2

Please refer to the Installation Document for detailed installation instruc-
tions.

It may be necessary to increase the process stack limit in order to build
X11R6.8.2 and run X11R6.8.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 X11R6.8.2 (section 3., page 1) for further
information on necessary configuration steps before running X11R6.8.2 on
LynxOS.

2.1  Accessing X11R6.8.2 manual pages

Include /usr/X11R6/man in the MANPATH environment variable or add the direc-
tory /usr/X11R6/man to /usr/Lib/man.config

3.  Running X11R6.8.2

This section describes the changes to the LynxOS environment which may be
necessary to successfully run X11R6.8.2.

3.1  System tuning

3.1.1  Tunable parameters

To reasonably run X11R6.8.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.

3.1.2  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.

3.1.3  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.

3.1.4  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
X11R6.8.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).

3.1.5  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

3.2  Mouse support in X11R6.8.2

X11R6.8.2 includes support for PnP mice (see also Mouse Support in
X11R6.8.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.

3.3  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 2004
       +++ /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 count)
        {
               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

3.4  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
                      ^

3.5  X Server debug diagnostics output and other VT peculiarities

Output made by the X11R6.8.2 X on its stdout or stderr will be lost after the
server switches to graphics mode. The X11R6.8.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 inconsis-
tent with what one would expect (i.e. random).

4.  Compiling the X11R6.8.2 Distribution

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

4.1  Disk space requirements

Currently there is no support for shared libraries in the LynxOS X11R6.8.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.

4.2  Changes to system environment (LynxOS x86)

Before compiling the X11R6.8.2 distribution you will have to make a few lit-
tle adjustments to your system:

   o 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 pro-
     grams 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

   o 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 pro-
     prietary 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

4.3  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 X11R6.8.2. After some time (and hopefully a successful build of
the X11R6.8.2 system) you can install the software using

          make install

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

4.4  Installing X11R6.8.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).

X11R6.8.2 manual pages may be installed using

          make install.man

The index and whatis database for the X11R6.8.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


$XdotOrg: xc/programs/Xserver/hw/xfree86/doc/README.LynxOS,v 1.3.2.2 2005/02/08 00:44:27 kem Exp $
