








		       README for XFree86 3.3 on LynxOS

				Thomas Mueller

			 Last modified on: 26 May 1997



1.  What and Where is XFree86?

XFree86 is a port of X11R6.3 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.3 code, as well as binary distributions for many archi-
tectures.

See the Copyright Notice in Copyright Notice.

The sources for XFree86 are available by anonymous ftp from:

ftp://ftp.XFree86.org/pub/XFree86/current

Binaries of the 3.3 release for LynxOS AT are available from:

ftp://ftp.XFree86.org/pub/XFree86/current/binaries/LynxOS

The binaries are built on `LynxOS 2.5.0 012797-G i386'. These binaries don't
run on earlier LynxOS versions because of the changes made to the networking
code in LynxOS 2.5.0. This XFree86 version has never been tested on LynxOS ver-
sions earlier than 2.3.0.

XFree86 supports LynxOS on the AT, on the microSPARC and on the PowerPC plat-
form. X servers are currently available on the AT and microSPARC platform.
Refer to section Building on microSPARC and PowerPC (section 7., page 13) for
details on XFree86 on the non-AT platforms.

If you need binaries for other platforms than the one on the XFree86 FTP server
contact me (tm@systrix.de).

Send email to tm@systrix.de (Thomas Mueller) or XFree86@XFree86.org if you have
comments or suggestions about this file and we'll revise it.


2.  Installing the Binaries

The binary distribution is composed of a number of  tar archives which are the
executables, servers, fonts, libraries, include files, man pages, config files,
and the server link kit.  The full distribution takes over 95MB of disk space.

At minimum you need to unpack the 'required' X33*.tgz archives plus at least
one server that matches your vga card. If you will be using the new XF86Setup


README for XFree86 3.3 on LynxOS





README for XFree86 3.3 on LynxOS



utility you will also need the VGA16 server.  You'll need about 40Mb for the
minimum required run-time binaries only.

      REQUIRED:

		  X33bin
			Clients, run-time libs, and app-defaults files

		  X33doc
			Documentation

		  X33fnts
			75dpi and misc fonts

		  X33lib
			Data files required at run-time

		  X33cfg
			sample config files for xinit, xdm

		  X33set
			XF86Setup utility

		  X33VG16
			16 colour VGA server (XF86Setup needs this server)

	    Choose at least one of the following server to match your hardware:

		  X338514
			8514/A server

		  X33AGX
			AGX server

		  X33I128
			I128 server

		  X33Ma64
			Mach 64 server

		  X33Ma32
			Mach 32 server

		  X33Ma8
			Mach 8 server

		  X33Mono
			Monochrome server

		  X33P9K
			P9000 server

		  X33S3
			S3 server








README for XFree86 3.3 on LynxOS



		  X33S3V
			S3 ViRGE server

		  X33SVGA
			SVGA server

		  X33VG16
			16 colour VGA server

		  X33W32
			ET4000W32, ET6000 server

      OPTIONAL:

		  X33f100
			100dpi fonts

		  X33fcyr
			Cyrillic fonts

		  X33fnon
			Other fonts (Chinese, Japanese, Korean, Hebrew)

		  X33fscl
			Scalable fonts (Speedo and Type1)

		  X33fsrv
			Font server and config files

		  X33prog
			X header files, config files and compile-time libs

		  X33man
			Manual pages

		  X33nest
			Nested X server

		  X33prt
			X Print server

		  X33vfb
			Virtual frame buffer X server

		  X33lkit
			The server LinkKit

		  X33ps
			PostScript version of the documentation

		  X33html
			HTML version of the documentation

If this is your first time, then you can safely install all of the packages.








README for XFree86 3.3 on LynxOS



As a minimal install, you'll need doc, bin, fonts lib, config, and one X
server.

If you plan to install XF86Setup you'll have to install X33prog as well since
XF86Setup checks for the existence of a certain file name pattern which is sat-
isfied only if you install the library files from X33prog. This restriction
will be fixed in future XFree86 releases for LynxOS.

It may be necessary to increase the process stack limit in order to run XFree86
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.

2.1  Full Install

  1.  You must be logged in as root to unpack the archives because several exe-
      cutables are set-user-id.  Otherwise the server may abort if you unpack
      it as an ordinary user.

  2.  If you have about 80Mb free in the /usr partition create a directory
      /usr/X11R6 and skip to no. 3.  Otherwise, create a directory on another
      partition and sym link it into /usr:


	    # cd /usr/local
	    # mkdir X11R6
	    # ln -s /usr/local/X11R6 /usr/X11R6



  3.  Unpack everything:

      If you are using bash:


	    # cd /usr/X11R6
	    # for i in X33*.tgz; do
	    #	gnutar -xzpPf $i
	    # done



      Else, if you are using csh:

	    % cd /usr/X11R6
	    % foreach i (X33*.tgz)
	    %	gnutar -xzpPf $i
	    % end



  4.  Create a symbolic link ``X'' that points to the server that matches your
      video card.  The XF86_* man pages list which vga chip sets are supported








README for XFree86 3.3 on LynxOS



      by each server.  For example, if you have an ET4000 based card you will
      use the XF86_SVGA server:


	    # cd /usr/X11R6/bin; rm -f X; ln -s XF86_SVGA X

2.2  Minimal Install

First do numbers 1 and 2 above. Then unpack the required archives:

      # cd /usr/X11R6
      # for i in bin fnts lib xicf; do
      #   gnutar -xzpPf  X33$i.tgz
      # done

Then unpack a server archive corresponding to your vga card.  The server man
pages, X11R6/man/man1/XF86_*, list the vga chip sets supported by each server.
For example, if you have an ET4000 based card you will use the XF86_SVGA
server:

      # gnutar -xzpPf X33SVGA.tgz
      # cd /usr/X11R6/bin; rm -f X; ln -s XF86_SVGA X

2.3  After either Full or Minimal Install above

Be sure to include /usr/X11R6/bin in your PATH environment variable. If you
plan to use clients of the MetroLink X package with the XFree86 X server make
sure to remove /usr/bin/X11/X file or put /usr/bin/X11 after /usr/X11R6/bin in
your PATH environment variable.

If you had already configured X11R6/lib/X11/xinit/xinitrc or
X11R6/lib/X11/xdm/* omit the xinit-config or xdm-config archive or unpack it
separately and merge in your customizations.

The fscl, fcyr and f100 font archives are optional and can be omitted if you
are short on space.  The optional lkit archive allows you to reconfigure and
customize a X server binary.

The optional prog archive is needed only for writing or compiling X applica-
tions. Before building programs check wether X11R6/lib/X11/config/lynx.cf has
correct settings for OSMajorVersion, OSMinorVersion and OSTeenyVersion for your
operating system version.

Refer to section Running XFree86 (section 4., page 9) for further information
on necessary configuration steps before running XFree86 on LynxOS.


3.  Compiling the XFree86 Distribution

3.1  Disk space requirements

Currently there is no support for shared libraries in the LynxOS XFree86 port.
A complete binary installation along with manual pages will require approxi-
mately 90-100 MBytes of disk space. To compile the system you will need at








README for XFree86 3.3 on LynxOS



least 230 MBytes of free disk space.

3.2  Changes to system environment (LynxOS AT)

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

      LynxOS AT 2.5

	       o Create a shell script named /lib/cpp as follows:

			  #!/bin/sh
			  /usr/lib/gcc-lib/i386-unknown-lynxos2.5/2.7-96q1/cpp \
				 -traditional "$@"



		 On other platforms than the AT the paths for the compiler sup-
		 port 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


	       o Modify /lib/liblynx.a. 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 fol-
		 lows:

			  # 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




      LynxOS AT 2.3 and 2.4

	       o Use the CYGNUS GNU-C Compiler to build XFree86. With LynxOS
		 2.3.0 and 2.4.0 you must execute the shell script /CYGNUS.bash
		 to apply the necessary changes to your environment.










README for XFree86 3.3 on LynxOS



	       o Create a shell script named /lib/cpp as follows:

			  #!/bin/sh
			  /cygnus/94q4-lynxos-x86/lib/gcc-lib/i386-lynx/2.6-94q4/cpp \
				 -traditional "$@"



		 It is possible that future releases use a different path for
		 the CYGNUS compiler support programs. 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


      LynxOS AT 2.2.1
	    This has actually never been tested, be prepared that the build
	    will fail somewhere!

	       o Create a shell script named /lib/cpp as follows:

			  #!/bin/sh
			  /usr/local/lib/gcc-cpp -traditional "$@"


	       o The loader /bin/ld of LynxOS 2.2.1 does not support the -L
		 option which is heavily used by X11R6 makefiles. To work
		 around this problem you must install a small wrapper program
		 which replaces the original /bin/ld program. Use the following
		 steps to install it:

			    # cd xc/programs/Xserver/hw/xfree/etc
			    # cc -o ld ld-wrapper.c
			    # mv /bin/ld /bin/ld.org
			    # mv ld /bin/ld
			    # chmod 511 /bin/ld
			    # chown root /bin/ld


	       o Modify system header files as follows:

		       /usr/include/uio.h
			     surrounded by












README for XFree86 3.3 on LynxOS



					    #ifndef _UIO_H
					    #define _UIO_H
					    ...
					    #endif


		       /usr/include/utmp.h
			     surrounded by

					    #ifndef _UTMP_H
					    #define _UTMP_H
					    ...
					    #endif


		       /usr/include/unistd.h
			     add

					    extern int read();


3.3  make World

Before you start compilation you must edit xc/config/cf/lynx.cf to match your
operating system version (defaults set up for 2.5.0). Change the definitions of
OSMajorVersion, OSMinorVersion and OSTeenyVersion accordingly.

You may now issue a

	  make World


to compile XFree86. After a few hours (and hopefully a successful build of the
XFree86 system) you can install the software using

	  make install


You must be logged in as super-user (root) when you invoke `make install'.  Be
sure to set your environment to use the same compiler (LynxOS 2.3.0/2.4.0,
CYGNUS GNU-C) as you did during the `make World'. To install the LinkKit use

	  make install.linkkit


With LynxOS 2.2.1 programs will not be stripped during installation. This is
due to a problem with the strip program which shows up when installing across
file system boundaries.

Refer to section Installing XFree86 manual pages (section 5., page 11) for man-
ual page installation.

On LynxOS AT 2.5.0 you may encounter problems with make in deeply nested subdi-
rectories (eg core dumps, hangups). In this case update to GNU make version








README for XFree86 3.3 on LynxOS



3.75 or higher.


4.  Running XFree86

4.1  System requirements

A minimum of 8MB of memory is required to run X. If you want to run real-world
applications you should think of upgrading to 16MB. If you plan to develop
software under X take 32MB into consideration.

4.2  System tuning

4.2.1  Tunable parameters

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

On LynxOS 2.5.0 include a line

       #define X_WINDOWS

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

For earlier versions you'll have to edit /usr/include/param.h:

       Tunable						 Old	 New
       USR_NFDS      number of open files per process	  20	  64
       NPROC	     number of tasks			  50	 150
       NFILES	     number of open files in system	 100	 250
       NINODES	     number of incore inodes		 (same value as NFILES)
       QUANTUM	     clock ticks until preemption	  64	  20
       CACHEBLKS     number of cache memory blocks	 202	  >= 4096

The new values are those suggested by the LynxOS documentation for their X Win-
dow package.

4.2.2  Increase number of ptys

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

4.2.3  Kernel build

If you plan to use PS/2 or Bus mice refer to the following section before
rebuilding the kernel, if not, you should rebuild the kernel now:

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












README for XFree86 3.3 on LynxOS



4.3  Bus mouse drivers

Starting with LynxOS AT 2.4.0 LynxOS includes a PS/2 mouse driver.  Currently
this driver is not fully supported by XFree86 (you'll probably have to specify
a mouse type which doesn't match the real mouse type and in some cases lose
mouse buttons).  /usr/X11R6/lib/X11/etc/BM-Lynx.shar contains a LynxOS port of
the Linux bus mouse drivers. To install the drivers unpack the shar archive

	 # cd /
	 # bash /usr/X11R6/lib/X11/etc/BM-Lynx.shar


and follow the notes in /BMOUSE.Readme for further installation and configura-
tion notes.

The XFree86 PS/2 mouse driver works also with MetroLink X 2.3.3.1 as shipped
with LynxOS AT 2.4.0 unless you have the LynxOS patch 000055-00 installed.

4.4  ATC console driver and VT switching

The XFree86 servers will only run with the default LynxOS console driver, sorry
for those of you who use the alternative vdt console driver. Currently there is
no support for virtual terminal switching once the server has started.

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
		      ^


4.5  X Server debug diagnostics output and other VT peculiarities

The XFree86 X servers will produce a lot of diagnostics output on stderr during
startup. This output will be lost after the server reached a certain point in
its console initialization process. You should redirect stdout and stderr if
you want to analyze the diagnostics produced by the server.

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












README for XFree86 3.3 on LynxOS



5.  Installing XFree86 manual pages

LynxOS uses cat-able manual pages, and because a doc preparation system is def-
initely not a vital component of a real-time operating system you must first
install groff-1.09 (or newer). Starting with LynxOS 2.3.0 it should compile
right out of the box (or better tar archive).

XFree86 manual pages may be installed using

	  make install.man


The index and whatis database for the XFree86 manual pages will be created
automatically. If you already have a whatis database or index file in the des-
tination directories you should perform a sort/uniq operation to remove dupli-
cate 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


With LynxOS 2.3.0 you should include /usr/X11R6/man in the MANPATH environment
variable.

     bash:   MANPATH=$MANPATH:/usr/X11R6/man

The man command of LynxOS 2.2.1 does not support the MANPATH environment vari-
able properly. The XFree86 manual pages must be copied (or linked) to the stan-
dard manual page locations (/usr/man/catx) in  order to be read the man com-
mand:

	   for i in 1 3 5
	   do
	     ln -s /usr/X11R6/man/cat$i/*.* /usr/man/cat$i
	     cat /usr/X11R6/man/cat$i/LIST$i >> /usr/man/cat$i/LIST$i
	     sort -o /usr/man/cat$i/LIST$i /usr/man/cat$i/LIST$i
	     cat /usr/X11R6/man/cat$i/whatis$i >> /usr/man/whatis
	   done



6.  Using XFree86 with Motif

The Motif libraries shipped with LynxOS AT 2.3.0 and 2.4.0 can be used with the
XFree86 libraries. Follow the steps outlined below after you have installed
XFree86 and LynxOS Motif on your system.










README for XFree86 3.3 on LynxOS



6.1  Copy Motif files

You must create symbolic links for the Motif libraries and utilities in the
/usr/X11R6 directory tree.

	   ln -s /usr/bin/X11/uil /usr/X11R6/bin
	   ln -s /usr/lib/libUil.a /usr/X11R6/lib
	   ln -s /usr/lib/libMrm.a /usr/X11R6/lib
	   ln -s /usr/lib/libXm.a /usr/X11R6/lib
	   ln -s /usr/lib/X11/uid /usr/X11R6/lib/X11
	   ln -s /usr/include/Xm /usr/X11R6/include
	   ln -s /usr/include/Mrm /usr/X11R6/include
	   ln -s /usr/include/uil /usr/X11R6/include


The Motif imake-configuration files are part of the LynxOS X Window package.
They must be copied to the /usr/X11R6 directory tree.

	   cp /usr/lib/X11/config/Motif.* /usr/X11R6/lib/X11/config


6.2  Motif library patch for LynxOS AT 2.3.0

The XFree86 libraries are compiled with the -mposix compiler option while the
Motif libraries shipped with LynxOS AT 2.3.0 are not. This incompatibility will
cause Motif XmFileSelection widgets to be linked with the wrong (i.e. POSIX)
directory routines. To circumvent this problem apply the following patch to the
library:

	   cp /usr/lib/libXm.a /usr/X11R6/lib
	   ar x /usr/X11R6/lib/libXm.a Xmos.o
	   ar x /lib/libc.a directory.s.o
	   ld -r -o x.o Xmos.o directory.s.o
	   mv x.o Xmos.o
	   ar r /usr/X11R6/lib/libXm.a Xmos.o


This patch is not necessary for LynxOS revisions after 2.3.0.

6.3  X11R6 config file patch

Edit /usr/X11R6/lib/X11/config/lynx.cf and change the definition of HasMotif
from

	    #define HasMotif	NO



to

	    #define HasMotif	YES











README for XFree86 3.3 on LynxOS



6.4  Motif config file patch

The file Motif.tmpl shipped with LynxOS Motif must be modified to work with
XFree86. In every reference to UnsharedLibReferences the first argument must be
changed from

	    UnsharedLibReferences(<Something>LIB, Arg2, Arg3)



to

	    UnsharedLibReferences(<Something>, Arg2, Arg3)



Be sure to apply the change to the file copied to /usr/X11R6/lib/X11/config.


7.  Building on microSPARC and PowerPC

XFree86 3.3 compiles on LynxOS microSPARC and on LynxOS PPC as well. On the
microSPARC there is X server support for the colour frame buffers CG3 and CG6
while on the PPC there is no X server available at this time. Before you start
the build (on versions earlier than 2.5.0) you must create a symbolic link from
the CYGNUS gcc to a file named cc somewhere in a directory included in your
PATH environment variable.

7.1  Console driver patch for microSPARC

Before building on the microSPARC you should install the patch for the console
driver supplied in xc/programs/Xserver/hw/sunLynx/patch.Console.  (xc/pro-
grams/Xserver/hw/sunLynx/patch.Console-2.4.0 for LynxOS revisions earlier than
2.5.0).  The patch fixes minor problems in the original LynxOS driver and adds
functionalities to detect the keyboard type and control the key click.	To cre-
ate a backup of the original driver and install the patch issue the commands

      # cd /
      # tar cf /sys/drivers/console.tar /sys/drivers/console
      # patch -p -E < xc/programs/Xserver/hw/sunLynx/patch.Console
      # cd /sys/drivers/console
      # make install
      # cd /sys/lynx.os
      # make install
      # reboot -a

If you opt not to install the patch you must edit xc/config/cf/lynx.cf and
change the definition of SparcConsoleDefines from

	    #define SparcConsoleDefines    -DPATCHED_CONSOLE



to








README for XFree86 3.3 on LynxOS



	    #define SparcConsoleDefines    /* -DPATCHED_CONSOLE */


7.2  Known Bug of the microSPARC server

On the first start of the X server on the microSPARC you will notice that the
pointer follows mouse movements with a certain delay (especially if you're mov-
ing the mouse real fast). You will also notice that moving windows with certain
window managers (eg mwm) is not working correctly.  These effects should go
away on the next server start.

The server for monochrome cards builds properly if you enable it in lynx.cf but
it has never been tested (reports are welcome).

     Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/LynxOS.sgml,v 3.14.2.2 1997/05/26 14:36:18 dawes Exp $





     $XConsortium: LynxOS.sgml /main/10 1996/10/28 05:13:07 kaleb $









































README for XFree86 3.3 on LynxOS





































































				   CONTENTS



1. What and Where is XFree86? ............................................... 1

2. Installing the Binaries .................................................. 1
   2.1 Full Install ......................................................... 4
   2.2 Minimal Install ...................................................... 5
   2.3 After either Full or Minimal Install above ........................... 5

3. Compiling the XFree86 Distribution ....................................... 5
   3.1 Disk space requirements .............................................. 5
   3.2 Changes to system environment (LynxOS AT) ............................ 6
   3.3 make World ........................................................... 8

4. Running XFree86 .......................................................... 9
   4.1 System requirements .................................................. 9
   4.2 System tuning ........................................................ 9
   4.3 Bus mouse drivers ................................................... 10
   4.4 ATC console driver and VT switching ................................. 10
   4.5 X Server debug diagnostics output and other VT peculiarities ........ 10

5. Installing XFree86 manual pages ......................................... 11

6. Using XFree86 with Motif ................................................ 11
   6.1 Copy Motif files .................................................... 12
   6.2 Motif library patch for LynxOS AT 2.3.0 ............................. 12
   6.3 X11R6 config file patch ............................................. 12
   6.4 Motif config file patch ............................................. 13

7. Building on microSPARC and PowerPC ...................................... 13
   7.1 Console driver patch for microSPARC ................................. 13
   7.2 Known Bug of the microSPARC server .................................. 14






















				       i


