Section 5. (Kernel Replacements) 5.0 Introduction This section is supposed to document the unusual or optional kernel add-ons that are available from various places. As they are included in the mainstream of the various Berkeley Net Release systems, they will slowly come out of here. If you know of any replacement parts for the kernel, please send Dave Burgess (burgess@cynjut.infonet.net) a message detailing the package (possibly include a README), where it can be found, and what version of the OS (ie. NetBSD, 386bsd 0.1 + pk 0.2, FreeBSD) it was designed to run under. 5.1 Available Kernel Replacements 5.1.1 keycap/codrv These server as replacements for the generic pccons driver that comes (by default) with 386bsd 0.1. Holger Veit (author of these) writes: "The same type of driver, but keycap has the version number 0.1.1 and codrv has the version number 0.1.2. The latter is much improved and downward compatible. Codrv was developed to provide a universal way of mapping national keyboard layouts during runtime (ie, not by patching the kernel tables) and providing better X11 support. Codrv uses a superset of the pc3 terminal emulation, and a termcap-like database for keymaps (therefore "keycap"). X11 is supported by two dedicated console raw devices /dev/kbd and /dev/vga, which avoids all the existing problems pccons has with X11. The latest version has virtual consoles. Codrv will become part of patchkit 0.2.4" 5.1.2 pcvt A superset of pccons, this driver supports virtual consoles, and some form of database oriented keyboard mappings. It was also designed to emulate a vt220 terminal as best as possible. (This section originally identified Joerg Wuensch as the author. Hellmuth Michealis is the author of pcvt. Joerg was the author of the original post. This update is from Hellmuth himself. Apologies from the FAQ staff...) The last release of pcvt is version 3.00 and was done on March 1st 1994 to the newsgroup comp.sources.misc, Volume 41, Issue 140-152 (part 1-13). Future releases and upgrades will be done as patches or new releases to that newsgroup. pcvt was recently put into the kernel sourcetree of NetBSD-current (pre 1.0) into /sys/arch/i386/isa/pcvt. pcvt is also available in the FreeBSD contributed tree at location /usr/ports/util/pcvt. The pcvt package consists of: - the driver itself - complete documentation for installation and operation - termcap/terminfo, pcvt.el, rc.local, /etc/ttys, xmodmap examples - cursor, utility to set the cursor size and shape - fed, a curses-based EGA/VGA character set editor - fontedit, utility to edit the VT220 downloadable character set - ispcvt, utility to display the drivers compile time configuration - kcon, utility to setup national keyboard layouts and remap keys - keycap, keyboard mapping database library similar to termcap - loadfont, utility to load up to 4/8 fonts into an EGA/VGA board - mcon, utility to control/configure a keyboard based mouse emulator - scon, utility to runtime configure the video part of pcvt - userkeys, utility to set the VT220 user programmable function keys - vttest, VT100 compatibility torture test program - demo, color- characterset- and attribute demos and more .... See the README-file for the latest release (3.00) of pcvt for lots more information and a complete list of the contributors to this project. 5.1.3 syscons Another superset of pccons that was designed to emulate SCO as well as possible. Many of the ioctls from SysV have been implemented. XFree86 2.0 no longer requires special patches to be run with kernels using this console driver. 5.1.4 Fast Symbolic Links The following is taken from the README for the fast sym-links patch: "This cruddy but complete hack answers one of the objections to symlinks: that they are slow, and cost an entire frag. Symlinks of less than length 60 are stored in the inode itself. Symlinks longer than this are still in the inode. To make the illusion of normality complete, dump and fsck also need changing. Additionally, I made dumpfs verbose to excess." Fast Symbolic Links are supported natively in FreeBSD and NetBSD. 5.1.5 npx fixes There are problems with the floating point error handling routines, and there are fixes available for this problem provided by Bruce Evans (of Minix-386 fame) Note that most of the code is applicable to floating point hardware as opposed to emulation. The newest version (and now official) fixes to this are in patchkit-0.2.4. There are still some nits in the npx emulation code in both FreeBSD and NetBSD. They are being worked on. 5.1.6 CGD's COM drivers Chris G. Demetriou (cgd@blah blah blah) has written some COM drivers for 386bsd. These, among other things, support multi- port serial packages. This driver was the basis for the FreeBSD com subsystem. NetBSD does not use them. There are patch files around that added some of the missing functionality to NetBSD. Multiport comm support (the biggest and best feature of the CGD COM driver) is included in both FreeBSD and NetBSD as standard 'compile in' features. 5.1.7 The original 386bsd 0.1 wd.c driver doesn't work. [386bsd 0.1 only] If you are still using 386bsd 0.1 and are having trouble with the wd driver, Tom Helbekkno took the time to write a replacement wd driver specifically to fix the problems identified in the months after 0.1 was released. Much of this code was pulled into the patch-kit. The 'Barsoom' driver was used as the basis for the original NetBSD and FreeBSD drivers, and was the source for much of the work that has been done to date on this driver. Unfortunately, the 'barsoom' driver is no longer available, and E-Mail from Tom indicates that there is very little of the original 'barsoom' driver left in either FreeBSD or NetBSD. If you find yourself in this predicament, you REALLY need to upgrade to either FreeBSD or NetBSD. 5.1.8 Interruptless LPT Driver Kit [386bsd 0.1 only] This driver was designed with faster performance and lower system load in mind. See the INSTALL-NOTES that come with the package for more details and installation information. This is also included in NetBSD and FreeBSD. Note that with some printers, it may be prefereable to ignore the status port and rely on the data port. If you have tried everything else and the interruptless printer driver still does not work for you, you may need to play with this. It has also been determined that the interruptless driver may be (or already has been) removed from the system. A newer lpt driver has been developed that removes many of the overhead problems that the original 386bsd lpt driver had. 5.1.9 A replacement curses program/library. It is generally accepted that the NetBSD curses can be easily replaced by the ncurses package. It is more complete and offers much better support for shared libraries and other advanced features. The current (early 1995 version) is 1.8.5 and is available from ftp://netcom.com:/pub/zmbenhal/ncurses/1.8.5.tgz. 5.2 Floppy Disk problems. One of the most common problems in 386BSD involves working with new boot sector and/or reformatting a floppy. Dave Silvia provided this section on using floppy disks. 5.2.1 How do I get a bootable floppy? Several ways, ranging from brain-dead-but-works to simplest. Classification into categories is left to the reader (is there really a difference between 'brain-dead' and 'simple'?:') 1) rawrite (or dd) dist.fs (or fixit.fs) to a disk, mount it, cd to the mount point, and execute: rm -rf . you now have a bootable floppy!;^} 2) Take your existing dist.fs or fixit.fs boot disk and diskcopy it on a DOS machine. Mount and rm as in 1) above. Again, you have a bootable floppy!;^} 3) Run disklabel on the floppy, e.g.: disklabel -w -r fd0a floppy5 where 'floppy5' is a 'name' for an entry in the /etc/disktab file. You'll get a couple of ioctl errors because writing a label to a floppy isn't supported (yet?), but the boot blocks have indeed been written. 4) Write the boot blocks to the floppy: cat /usr/mdec/fdboot /usr/mdec/bootfd | dd of=/dev/rfd0a or, more simply: cat /usr/mdec/fdboot /usr/mdec/bootfd > /dev/rfd0a Methods 3) and 4) require you to run newfs on the floppy, e.g.: newfs /dev/rfd0a floppy5 If you have a floppy that was originally bootable, but the boot blocks were somehow damaged, you can use method 3) or 4) to restore boot-ability (do _NOT_ run newfs). You _could_, through the convolutions of copying a floppy whose boot blocks are damaged to a temporary location and then re-copying to a bootable floppy, use method 1) or 2) (if you really want to!;^}) 5) If the disk is already newfs'ed and is otherwise ready to use, disklabel will write the boot blocks on the disk. Read the man page for disklabel. 5.2.2 How do I maximize the space on a mountable floppy disk. As you all know, when you are working with a floppy, it is usually more important that the floppy have a lot of room, rather than a lot of other 'stuff'. Here is the magic incantation that will maximize the amount of free space on the disk. newfs -Tfloppy[35] -i[4096 | 8192] -c 80 /dev/fd[0|1]a This leaves the disk with fewer inodes and only one cylinder group. 5.3 Character Device Driver info These devices are also often referred to as character devices. 5.3.1 Printers Configuring a parallel printer for 386bsd requires a working printer driver to be installed in the kernel. 386bsd 0.1 does not include a printer driver in the stock distribution kernel. NetBSD and FreeBSD both include this driver in their stock manifestations. It is possible to connect a serial printer to either. This brief tutorial is provided by Daryl Berryhill (djberry2@b25info.b25.ingr.com) The way I got my printer to work. 1) connect a 25 pin to 9 pin null modem cable to printer and computer. 2) set printer to 9600 baud, 7 data bits, even parity. 3) configure /dev/com1 (DOS COM2) port the same way as the printer 4) add a line to /etc/printcap that says: lp|local line printer:\ :lp=/dev/com2:wq:sd=/var/spool/lpd:lf=/var/log/lpd-errs:\ :br#9600 5) type "lpr " 6) type "lpd" and it should start printing. An obvious point, but make sure that you do NOT start a getty on on the com port. Check the /