README for XFree86 on NetBSD : Rebuilding the XFree86 Distribution
Previous: Kernel Support for X
Next: Building New X Clients

8. Rebuilding the XFree86 Distribution

The server link kit allow you to rebuild just the X server with a minimum amount of disk space. Just unpack it, make the appropriate changes to the xf86site.def, type ``./mkmf'' and ``make'' to link the server. See /usr/X11R6/lib/Server/README for more info.

See INSTALL for instructions on unbundling and building the source distribution.

You should configure the distribution by editing xc/config/cf/host.def before compiling. To compile the sources, invoke ``make World'' in the xc directory.

8.1. Console drivers

XFree86 has a configuration option to select the console drivers to use in xf86site.def:

If you don't define XFree86ConsoleDefines in xf86site.def the pccons and pcvt drivers will be supported by default.

Syscons and codrv are not bundled with NetBSD. They are available by anonymous FTP from a number of sites. They are not supported by the XFree86 binary distribution anymore.

8.2. pcvt_ioctl.h file:

XFree86's default configuration includes support for the PCVT console driver. Unfortunately, NetBSD versions before 19980413 don't install the pcvt_ioctl.h file in /usr/include/machine. If you want to build XFree86 with PCVT support, execute the following command as root before starting make World:

cp /usr/src/sys/arch/i386/isa/pcvt/pcvt_ioctl.h /usr/include/machine

If you don't have kernel sources, you can grab this file from ftp.netbsd.org or one of its mirrors. If you're not running PCVT, you can remove -DPCVT_SUPPORT from XFree86ConsoleDefines in xf86site.def too.

8.3. console.h and ioctl_pc.h files:

If you want to build a server supporting codrv and you don't already have the corresponding header file ioctl_pc.h installed in /usr/include/machine, then install the copy that is supplied in xc/programs/Xserver/hw/xfree86/etc. If you run NetBSD-current you probably want to install it in /usr/src/sys/arch/i386/include too, so that it get reinstalled each time you run make includes.

If you have installed the codrv console driver, this file should be taken from your installed version of the driver.

The console.h file for syscons isn't distributed with XFree86 anymore. You should get it from the syscons distribution.

8.4. Support for shared libs under NetBSD 1.0 and later

By default XFree86 builds for NetBSD with shared libraries support. If you're building on 0.9 or don't want shared libraries add the following line to host.def:

#define BuildBsdSharedLibs NO

8.5. Building on other architectures

XFree86 also compiles on NetBSD/sparc. The Sun server patches from Dennis Ferguson and Matthew Green have been integrated in xc/programs/Xserver/hw/sun. Small modifications to xf86site.def are needed:

Problems with this port should be reported to the port-sparc@NetBSD.Org mailing list or directly to me matthieu@laas.fr rather than to the xfree86 mailing list.

Note that the NetBSD project has now its own source tree, based on the XFree86 source tree, with some local modifications. You may want to start with this tree to rebuild from sources. The NetBSD xsrc source tree is available at: ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-current/xsrc/


README for XFree86 on NetBSD : Rebuilding the XFree86 Distribution
Previous: Kernel Support for X
Next: Building New X Clients