home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 August - Disc 2 / chip_20018102_hu.iso / linux / X-4.1.0 / doc / README.NetBSD < prev    next >
Text File  |  2001-06-27  |  13KB  |  375 lines

  1.                      README for XFree86 4.1.0 on NetBSD
  2.  
  3. Rich  Murphey, David Dawes, Marc  Wandschneider, Mark  Weaver, Matthieu Herrb
  4.  
  5.                        Last modified on: 3 March 2001
  6.  
  7. 1.  What and Where is XFree86?
  8.  
  9. XFree86 is the Open Source port of X.Org's X11R6.5.1 release that supports
  10. several UNIX(R) and UNIX-like (such as Linux, the BSDs and Solaris x86) oper-
  11. ating systems on Intel and other platforms.
  12.  
  13. See the Copyright Notice.
  14.  
  15. The sources for XFree86 are available by anonymous ftp from:
  16.  
  17. ftp://ftp.XFree86.org/pub/XFree86/4.1.0
  18.  
  19. Binaries for NetBSD 1.4 and later are available from:
  20. ftp://ftp.XFree86.org/pub/XFree86/4.1.0/binaries/NetBSD
  21.  
  22. A list of mirror sites is provided by http://www.xfree86.org/MIRRORS.shtml
  23.  
  24. XFree86 also builds on other NetBSD architectures. See section Building on
  25. other architectures (section 8.4, page 1) for details.
  26.  
  27. XFree86 also supports NetBSD on PC98 machines.
  28.  
  29. 2.  Bug Reports for This Document
  30.  
  31. Send email to <herrb@XFree86.Org> (Matthieu Herrb) or <XFree86@XFree86.org>
  32. if you have comments or suggestions about this file and we'll revise it.
  33.  
  34. 3.  New OS dependent features
  35.  
  36. See the Release Notes for non-OS dependent new features in XFree86 4.1.0.
  37.  
  38. 3.1  New OS dependent features in 4.0.2
  39.  
  40.    o A fix for libXmu OS detection which was broken since unix isn't defined
  41.      anymore by the C preprocessor.
  42.  
  43.    o (limited) native wscons support. This is not activated by default.
  44.  
  45.    o Updates to the aperture driver
  46.  
  47.    o Support for multithread libraries with GNU pth
  48.  
  49.    o Add /usr/pkg/bin to the default user path.
  50.  
  51. 3.2  New OS dependent features in 4.0.1
  52.  
  53.    o Support for NetBSD 1.5_ALPHA
  54.  
  55.    o The Xsun server can be built on NetBSD/sparc
  56.  
  57. 3.3  New OS dependent features in 4.0
  58.  
  59.    o Preliminary APM support.
  60.  
  61. 3.4  New OS dependent features in 3.9.18
  62.  
  63.    o Soft-booting secondary cards through the int10 BIOS interface is now
  64.      possible using the x86emu real mode emulator.
  65.  
  66. 3.5  New OS dependent features in 3.9.17
  67.  
  68.    o Support for silken mouse with the wsmouse protocol has been added.
  69.  
  70.    o A new version of the XFree86 Aperture driver which provides MTRR support
  71.      is included.
  72.  
  73. 4.  Installing the Binaries
  74.  
  75. Refer to the Installation Document for detailed installation instructions.
  76.  
  77. 5.  Configuring X for Your Hardware
  78.  
  79. The /etc/X11/XF86Config file tells the X server what kind of monitor, video
  80. card and mouse you have.  You must create it to tell the server what specific
  81. hardware you have.
  82.  
  83. You'll need info on your hardware:
  84.  
  85.    o Your mouse type, baud rate and its /dev entry.
  86.  
  87.    o The video card's chipset (e.g. ET4000, S3, etc).
  88.  
  89.    o Your monitor's sync frequencies.
  90.  
  91. The recommended way to generate an XF86Config file is to use the xf86cfg
  92. utility.  The xf86config text utility is still there for the (few) cases
  93. where xf86cfg can't be used. Also, there is a sample file installed as
  94. /usr/X11R6/lib/X11/XF86Config.eg, which can be used as a starting point.
  95.  
  96. For details about the XF86Config file format, refer to the XF86Config(5) man-
  97. ual page.
  98.  
  99. Once you've set up a XF86Config file, you can fine tune the video modes with
  100. the xvidtune utility.
  101.  
  102. 5.1  About mouse configuration
  103.  
  104. XFree86 4.1.0 has support for the mouse driver included in the wscons console
  105. driver introduced by NetBSD 1.4. Specify ``wsmouse'' as the protocol and
  106. ``/dev/wsmouse0'' as the device in /etc/X11/XF86Config if you're using NetBSD
  107. 1.4 or later with a PS/2 mouse.
  108.  
  109. For older releases, the NetBSD pms mouse driver handles PS/2 style mice as
  110. Busmouse. Specify the protocol as ``busmouse'' in the mouse section of your
  111. XF86Config file if you're using a PS/2 mouse with NetBSD 1.3 or former
  112. releases.
  113.  
  114. Only standard PS/2 mice are supported by this driver. Newest PS/2 mice that
  115. send more than three bytes at a time (especially Intellimouse, or MouseMan+
  116. with a wheel) are not supported by NetBSD 1.3 and former releases.
  117.  
  118. See README.mouse  for general instruction on mouse configuration in XFree86.
  119.  
  120. 6.  Running X
  121.  
  122. The easiest way for new users to start X windows is to type:
  123.  
  124.      startx >& startx.log
  125.  
  126. Error messages are lost unless you redirect them because the server takes
  127. over the screen.
  128.  
  129. To get out of X windows, type: ``exit'' in the console xterm.  You can cus-
  130. tomize your X by creating .xinitrc, .xserverrc, and .twmrc files in your home
  131. directory as described in the xinit and startx man pages.
  132.  
  133. 6.1  Starting Xdm, the display manager
  134.  
  135. To start the display manager, log in as root on the console and type: ``xdm
  136. -nodaemon''.
  137.  
  138. You can start xdm automatically on bootup by changing the line
  139.  
  140.      xdm=NO              xdm_flags=""            # x11 display manager
  141.  
  142. to:
  143.  
  144.      xdm=YES             xdm_flags=""            # x11 display manager
  145.  
  146. in /etc/rc.conf.
  147.  
  148. Under NetBSD 1.4 and later with the wscons console driver, you must enable a
  149. virtual console for the X server first. To do this follow these steps:
  150.  
  151.    o Make sure the device file exists. If not, ``cd /dev ; ./MAKEDEV
  152.      wscons''.
  153.  
  154.    o Next, make sure your kernel wants to do wscons. (see below (section 7.1,
  155.      page 1)).
  156.  
  157.    o Next, make sure ``wscons=YES'' in /etc/rc.conf.
  158.  
  159.    o Next, make sure /etc/wscons.conf exists. The relevant bits:
  160.  
  161.           #screen   0    -    vt100
  162.           screen    1    -    vt100
  163.           screen    2    -    vt100
  164.           screen    3    -    vt100
  165.           screen    4    -    -
  166.           screen    5    -    vt100
  167.  
  168. (Thanks to Mason Loring Bliss <mason@acheron.middleboro.ma.us> for this
  169. explanation)
  170.  
  171. Note that the binary distributions of XFree86 for NetBSD don't include sup-
  172. port for the XDM-AUTHORIZATION-1 protocol.
  173.  
  174. 7.  Kernel Support for X
  175.  
  176. To make sure X support is enabled under NetBSD, the following line must be in
  177. your config file in /sys/arch/i386/conf:
  178.  
  179.      options XSERVER, UCONSOLE
  180.  
  181. 7.1  Console drivers
  182.  
  183. The server supports the standard NetBSD/i386 console drivers: pccons, pcvt
  184. and wscons (in pcvt compatibility mode). They are detected at runtime and no
  185. configuration of the server itself is required.
  186.  
  187. The pccons driver is the most widely tested and is the console driver con-
  188. tained in the NetBSD binary distribution's kernels.
  189.  
  190. The pcvt console driver was bundled with NetBSD until 1.4. The pcvt X mode is
  191. compatible with the pccons driver X mode. It offers several virtual consoles
  192. and international keyboard support. In order to use this driver, change the
  193. line:
  194.  
  195.      device          pc0     at isa? port "IO_KBD" irq 1
  196.  
  197. to
  198.  
  199.      device         vt0     at isa? port "IO_KBD" irq 1
  200.  
  201. in your kernel config file, and rebuild and install your kernel.
  202.  
  203. Wscons is the current console driver, included in NetBSD 1.4 and later. For
  204. now, XFree86 supports wscons using the pcvt compatibility mode, so be sure to
  205. have the lines:
  206.  
  207.      options         WSDISPLAY_COMPAT_PCVT           # emulate some ioctls
  208.      options         WSDISPLAY_COMPAT_SYSCONS        # emulate some ioctls
  209.      options         WSDISPLAY_COMPAT_USL         # VT handling
  210.      options         WSDISPLAY_COMPAT_RAWKBD         # can get raw scancodes
  211.  
  212. in your kernel configuration file if you're using wscons. Refer to the
  213. wscons(4) and wsmouse(4) manual pages for informations on how to configure
  214. wscons into the kernel.
  215.  
  216. 7.2  Aperture Driver
  217.  
  218. By default NetBSD include the BSD 4.4 kernel security feature that disable
  219. access to the /dev/mem device when in multi-users mode. But XFree86 servers
  220. can take advantage (or require) linear access to the display memory.
  221.  
  222. Most XFree86 4.1.0 card drivers require linear memory access.  There are two
  223. ways to allow XFree86 to access linear memory:
  224.  
  225. The first way is to disable the kernel security feature by adding ``option
  226. INSECURE'' in the kernel configuration file and build a new kernel.
  227.  
  228. The second way is to install the aperture driver, included in source form in
  229. xc/programs/Xserver/hw/xfree86/etc/apNetBSD.shar in the XFree86 4.1.0 source
  230. distribution. Unpack it in a new directory of your choice by running:
  231.  
  232.        sh apNetBSD.shar
  233.  
  234. By default the aperture driver will be installed in /usr/local/aperture. You
  235. can change this default directory by editing Makefile.inc before building it.
  236.  
  237. Then run ``make build'' as root to install it. To enable it, add the follow-
  238. ing line to  /etc/lkm.conf:
  239.  
  240.      /usr/local/aperture/lkm/xf86.o  -  - /usr/local/aperture/lkm/xf86_mod_install - -
  241.  
  242. and set ``lkm=YES'' in /etc/rc.conf
  243.  
  244. Reboot your system. XFree86 will auto-detect the aperture driver if avail-
  245. able.
  246.  
  247. Warning 1: if you boot another kernel than /netbsd, loadable kernel modules
  248. can crash your system. Always boot in single user mode when you want to run
  249. another kernel.
  250.  
  251. Warning 2: the  aperture driver only allows one access at a time (so that the
  252. system is in the same security state once X is launched). This means that if
  253. you run multiple servers on multiples VT, only the first one will have linear
  254. memory access.  Use ``option INSECURE'' if you need more that one X server at
  255. a time.
  256.  
  257. Starting with XFree86 3.9.17, the XFree86 aperture driver also supports MTRR
  258. write combining on Pentiums II and AMD K6 class processors.
  259.  
  260. 7.3  MIT-SHM
  261.  
  262. NetBSD 1.0 and later supports System V shared memory. If XFree86 detects this
  263. support in your kernel, it will support the MIT-SHM extension.
  264.  
  265. To add support for system V shared memory to your kernel add the lines:
  266.  
  267.       # System V-like IPC
  268.       options         SYSVMSG
  269.       options         SYSVSEM
  270.       options         SYSVSHM
  271.  
  272. to your kernel config file.
  273.  
  274. 8.  Rebuilding the XFree86 Distribution
  275.  
  276. You should configure the distribution by editing xc/config/cf/host.def
  277. before compiling.  To compile the sources, invoke ``make World'' in the xc
  278. directory.
  279.  
  280. 8.1  Perl support
  281.  
  282. Starting with XFree86 4.0.2, perl is needed to build the fonts in XFree86.
  283. Since perl is not included with standard NetBSD installation, fonts that need
  284. perl are not built by default.
  285.  
  286. If you have installed perl (from the NetBSD packages, for instance), add the
  287. line
  288.  
  289.      #define HasPerl YES
  290.  
  291. in xc/config/cf/host.def before rebuilding XFree86.
  292.  
  293. 8.2  Aperture driver
  294.  
  295. To build the XFree86 server with the Aperture driver enabled, you should
  296. unpack apNetBSD.shar and install it first.
  297.  
  298. Then edit xc/config/cf/host.def and add the line
  299.  
  300.      #define HasNetBSDApertureDriver    YES
  301.  
  302. to it before rebuilding XFree86.
  303.  
  304. 8.3  Console drivers
  305.  
  306. XFree86 has a configuration option to select the console drivers to use in
  307. host.def:
  308.  
  309.    o  if you're using pccons put:
  310.  
  311.            #define XFree86ConsoleDefines -DPCCONS_SUPPORT
  312.  
  313.    o if you're using pcvt put:
  314.  
  315.            #define XFree86ConsoleDefines -DPCVT_SUPPORT
  316.  
  317. If you don't define XFree86ConsoleDefines in host.def the pccons and pcvt
  318. drivers will be supported by default.
  319.  
  320. Experimental native support for the wscons console driver can be built by
  321. adding:
  322.  
  323.       #define XFree86ConsoleDefines -DWSCONS_SUPPORT
  324.  
  325. to xc/config/host.def before rebuilding the server.  This has not been thor-
  326. oughly tested, except on the macppc.
  327.  
  328. For the i386, you should include both pcvt and wscons support in order to use
  329. the pcvt compatibility mode of wscons:
  330.  
  331.       #define XFree86ConsoleDefines -DPCVT_SUPPORT -DWSCONS_SUPPORT
  332.  
  333. 8.4  Building on other architectures
  334.  
  335. Note that the NetBSD project has now its own source tree, based on the
  336. XFree86 source tree, with some local modifications. You may want to start
  337. with this tree to rebuild from sources.  The NetBSD xsrc source tree is
  338. available at: ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-current/xsrc/
  339.  
  340. There's an experimental patch by Tsubai Masanari to make XFree86 4.0.1 work
  341. on NetBSD/macppc at: ftp://nandra.iri.co.jp/pub/NetBSD/macppc/XFree86/README.
  342.  
  343. 9.  Building New X Clients
  344.  
  345. The easiest way to build a new client (X application) is to use xmkmf if an
  346. Imakefile is included in the sources.  Type ``xmkmf -a'' to create the Make-
  347. files, check the configuration if necessary and type ``make''.  Whenever you
  348. install additional man pages you should update whatis.db by running ``make-
  349. whatis /usr/X11R6/man''.
  350.  
  351. When porting clients to *BSD systems, make use of the symbol BSD for code
  352. which is truly BSD-specific.  The value of the symbol can be used to distin-
  353. guish different BSD releases.  For example, code specific to the Net-2 and
  354. later releases can use:
  355.  
  356.      #if (BSD >= 199103)
  357.  
  358. To ensure that this symbol is correctly defined, include <sys/param.h> in the
  359. source that requires it.  Note that the symbol CSRG_BASED is defined for *BSD
  360. systems in XFree86 3.1.1 and later.  This should be used to protect the
  361. inclusion of <sys/param.h>.
  362.  
  363. For code that really is specific to a particular i386 BSD port, use
  364. __FreeBSD__ for FreeBSD, __NetBSD__ for NetBSD, __OpenBSD__ for OpenBSD, and
  365. __bsdi__ for BSD/386.
  366.  
  367. 10.  Thanks
  368.  
  369. Many thanks to all people who contributed to make XFree86 work on *BSD, in
  370. particular, David Dawes, Pace Willison, Amancio Hasty, Christoph Robitschko,
  371. Nate Williams, Rod Grimes, Jack Velte and Michael Smith.
  372.  
  373.      Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/NetBSD.sgml,v 3.60.2.2 2001/06/05 20:11:08 dawes Exp $
  374.  
  375.