Release FreeBSD 1.1.5.1

This commit was manufactured to restore the state of the 1.1.5.1-RELEASE image.
Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs.
This commit is contained in:
svn2git 1994-07-01 00:00:00 -08:00
parent a16f65c7d1
commit 5e0e9b99dc
2554 changed files with 372282 additions and 68160 deletions

View file

@ -1,20 +1,24 @@
FreeBSD 1.1
Contributor List
FreeBSD 1.1.5
Contributor List
Derived Software Contributors:
This software was derived from William F. Jolitz's 386BSD release 0.1.
This software was originally derived from William F. Jolitz's 386BSD
release 0.1, though very little of the original 386BSD specific code
remains.
Please see the file CONTRIB.386BSD for the list of contributors from
386BSD.
Included in this release are the patches from the patch kit version
0.2.4. The names of contributors from the patch kit are listed below.
Included in this release are some of the patches from the old 386BSD
patch kit version 0.2.4, and therefore the names of contributors from the
patch kit are also listed below.
There are portions of NetBSD that has been intergraged into FreeBSD
as well. We would like to thank all the contributors to NetBSD for
their work.
Finally, there are portions of NetBSD that have been integrated into
FreeBSD as well, and we would therefore like to thank all the contributors
to NetBSD for their work.
Hardware Contributors:
@ -28,32 +32,35 @@ Dermot McDonnell for his donation of a Toshiba XM3401B CDROM
drive.
FreeBSD core:
The FreeBSD Core Team (in alphabetical order):
Andrew Moore <alm@netcom.com>
Andreas Schulz <ats@g386bsd.first.bmd.de>
Andrew A. Chernov <ache@astral.msk.su>
John Dyson <dyson@implode.rain.com>
Christoph Robitschko <chmr@edvz.tu-graz.ac.at>
David Greenman <davidg@Root.COM>
Jordan K. Hubbard <jkh@whisker.hubbard.ie>
Nate Williams <nate@bsd.coe.montana.edu>
Paul Richards <paul@isl.cf.ac.uk>
Rich Murphey <rich@lamprey.utmb.edu>
Rodney W. Grimes <rgrimes@cdrom.com>
Jordan K. Hubbard <jkh@freefall.cdrom.com>
Scott Mace <smace@neosoft.com>
Andrew Moore <alm@netcom.com>
Rich Murphey <rich@lamprey.utmb.edu>
Geoff Rehmet <csgr@cs.ru.ac.za>
Paul Richards <paul@isl.cf.ac.uk>
Andreas Schulz <ats@g386bsd.first.bmd.de>
Nate Williams <nate@bsd.coe.montana.edu>
Garrett A. Wollman <wollman@freefall.cdrom.com>
Additional FreeBSD Contributors:
Additional FreeBSD Contributors (no particular order):
Atsushi Murai <amurai@spec.co.jp>
Keith Moore <?>
Adam Glass <glass@postgres.berkeley.edu>
Andrew A. Chernov <ache@astral.msk.su>
Andrew Herbert <andrew@werple.apana.org.au>
Bob Wilcox <bob@obiwan.uucp>
Bruce Evans <bde@kralizec.zeta.org.au>
Charles Hannum <mycroft@ai.mit.edu>
Chris G. Demetriou <cgd@postgres.berkeley.edu>
Chris Torek <torek@ee.lbl.gov>
Christoph Robitschko <chmr@edvz.tu-graz.ac.at>
Curt Mayer <curt@toad.com>
Dave Burgess <burgess@hrd769.brooks.af.mil>
Dave Rivers <rivers@ponds.uucp>
@ -69,7 +76,7 @@ J.T. Conklin <jtc@winsey.com>
James Clark <jjc@jclark.com>
James da Silva <jds@cs.umd.edu> et al
Jim Wilson <wilson@moria.cygnus.com>
John Dyson - <formerly dyson@ref.tfs.com>
Joerg Wunsch <joerg_wunsch@uriah.sax.de>
Julian Elischer <julian@dialix.oz.au>
Julian Stacey <stacey@guug.de> <fallback: <julian@meepmeep.pcs.com>>
Keith Bostic <bostic@toe.CS.Berkeley.EDU>
@ -79,7 +86,7 @@ Martin Birgmeier
Paul Kranenburg <pk@cs.few.eur.nl>
Paul Mackerras <paulus@cs.anu.edu.au>
Poul-Henning Kamp <phk@login.dkuug.dk>
Rod Shady <rls@id.net>
Rob Shady <rls@id.net>
Sascha Wildner <swildner@channelz.GUN.de>
Sean Eric Fagan <sef@kithrup.com>
Serge V. Vakulenko <vak@zebub.msk.su>
@ -90,7 +97,7 @@ Theo Deraadt <deraadt@fsa.ca>
Yuval Yarom <yval@cs.huji.ac.il>
Patch kit patch contributors:
Patch kit patch contributors (no particular order):
Adam Glass <glass@postgres.berkeley.edu>
Adrian Hall <adrian@ibmpcug.co.uk>
@ -138,7 +145,7 @@ Joerg Lohse <lohse@tech7.informatik.uni-hamburg.de>
Joerg Wunsch <joerg_wunsch@uriah.sax.de>
John Dyson - <formerly dyson@ref.tfs.com>
John Woods <jfw@eddie.mit.edu>
Jordan K. Hubbard <jkh@whisker.lotus.ie>
Jordan K. Hubbard <jkh@whisker.hubbard.ie>
Julian Elischer <julian@dialix.oz.au>
Julian Stacey <stacey@guug.de> <fallback: <julian@meepmeep.pcs.com>>
Karl Lehenbauer <karl@NeoSoft.com> <karl@one.neosoft.com>
@ -165,11 +172,10 @@ Rich Murphey <rich@lamprey.utmb.edu>
Rick Macklem <root@snowhite.cis.uoguelph.ca>
Robert D. Thrush <rd@phoenix.aii.com>
Rodney W. Grimes <rgrimes@cdrom.com>
Rog Egge
Rog Egge <?>
Sascha Wildner <swildner@channelz.GUN.de>
Scott Burris <scott@pita.cns.ucla.edu>
Scott Reynolds <scott@clmqt.marquette.mi.us>
Scotty ?
Sean Eric Fagan <sef@kithrup.com>
Simon J Gerraty <sjg@melb.bull.oz.au> <sjg@zen.void.oz.au>
Stephen McKay <robert@psych.psy.uq.oz.au>
@ -182,4 +188,4 @@ Wolfgang Solfrank <ws@tools.de>
Wolfgang Stanglmeier <wolf@dentaro.GUN.de>
Yuval Yarom <yval@cs.huji.ac.il>
$Id: CONTRIB.FreeBSD,v 1.32.2.1 1994/03/07 01:29:59 rgrimes Exp $
$Id: CONTRIB.FreeBSD,v 1.36 1994/06/28 08:09:27 jkh Exp $

View file

@ -79,9 +79,10 @@ Copyright (C) 1992, 1993, Garrett A. Wollman
Copyright (C) 1992, 1993, HD Associates
Copyright (C) 1992, 1993, Holger Veit
Copyright (C) 1992, 1993, Jean-Loup Gailly
Copyright (C) 1992, 1993, Joerg Wunsch
Copyright (C) 1992, 1993, 1994 Joerg Wunsch
Copyright (C) 1992, 1993, John Brezak
Copyright (C) 1992, 1993, Motorola, Inc.
Copyright (C) 1993, 1994, Jordan Hubbard
Copyright (C) 1992, 1993, Soeren Schmidt
Copyright (C) 1992, 1993, Theo de Raadt
Copyright (C) 1992, 1993, University of Vermont and State Agricultural College
@ -114,5 +115,8 @@ Copyright (C) 1993, Thomas Koenig
Copyright (C) 1993, Winning Strategies, Inc.
Copyright (C) 1994, Christoph M. Robitschko
Copyright (C) 1994, University of Maryland
Copyright (C) 1993, 1994, jc@irbs.UUCP (John Capo),
vak@zebub.msk.su (Serge Vakulenko),
ache@astral.msk.su (Andrew A. Chernov)
$Id: COPYRIGHT.FreeBSD,v 1.2 1994/02/20 02:51:25 rgrimes Exp $
$Id: COPYRIGHT.FreeBSD,v 1.4 1994/06/28 08:09:29 jkh Exp $

View file

@ -2,7 +2,7 @@ Copyright (c) UNIX System Laboratories, Inc.
All or some portions of this software are derived from
material licensed to the University of California by
American Telephone and Telegraph Co. or UNIX System Laboratories, Inc.
and are reporduced herein with the permission of
and are reproduced herein with the permission of
UNIX System Laboratories, Inc.
Additionally, the following files contained herein constitute
@ -42,4 +42,4 @@ usr.bin/cpio/cpio.c [*]
copyright and/or trade secret.
$Id: COPYRIGHT.USL,v 1.1.2.1 1994/05/04 06:32:01 rgrimes Exp $
$Id: COPYRIGHT.USL,v 1.3 1994/05/18 22:53:56 rgrimes Exp $

View file

@ -11,9 +11,6 @@ installed on your hard-drive is to 'bounce' on a key like shift or
num-lock (which works well since you can see when the keyboard comes
back to life) until the boot sequence is finished. The keyboard will
work fine for installing FreeBSD onto the hard-drive.
Generally the problems go away at this point, but if it doesn't
you should install a SYSCONS kernel which doesn't experience these
keyboard problems.
/usr/bin/gdb:
The gdb in the release will not work on shared objects nor will it
@ -63,14 +60,14 @@ keyboard problems.
memory. If you find this to be the case, temporarily remove your
extra memory and contact Buslogic for an upgrade!
/usr/bin/find
find doesn't work on CDROM's. You need to call find with the
"fstype isofs" argument to get it working. The bug seems to be
in the "fts(3)" routines that find uses.
fsck:
fsck can go into an endless loop in the repair/fsck cycle on
a corrupted filesystem. The message "VALUES IN SUPER BLOCK
DISAGREE WITH THOSE IN FIRST ALTERNATE" is very misleading.
fsck compares the superblock with the alternate in the last
cylinder group? So if this block is corrupt, you have no chance
to get the filesystem repaired. You can answer on the question
"UPDATE STANDARD SUPERBLOCK" with yes and get always the same
error message on the next fsck.
/usr/bin/awk
awk dumps core for the following command line "awk '' blubber".
Problem is already known by the gawk maintainers and will be fixed
in the next release of gawk.
$Id: KNOWNBUGS,v 1.7.2.6 1994/05/01 20:58:17 rgrimes Exp $
$Id: KNOWNBUGS,v 1.16 1994/06/04 10:39:55 jkh Exp $

View file

@ -4,6 +4,15 @@ The FreeBSD software is being mirrored at the following locations:
Country Site/Directory/Maintainer
======= =========================================================
Australia minnie.cs.adfa.oz.au:/BSD/FreeBSD-1.1-RELEASE
<wkt@cs.adfa.oz.au>
Australia ftp.physics.su.oz.au:/FreeBSD
David Dawes <dawes@physics.su.oz.au>
Australia ftp.une.edu.au:/pub/FreeBSD
Gordon Smith <Gordon.Smith@une.edu.au>
Austria ftp.tu-graz.ac.at:/pub/FreeBSD
<ftp@ftp.tu-graz.ac.at>
@ -14,7 +23,7 @@ France ftp.ibp.fr:/pub/FreeBSD
<ftp@ftp.ibp.fr>
Germany ftp.informatik.tu-muenchen.de:/pub/comp/os/bsd/FreeBSD
<unknown>
<bsd@informatik.tu-muenchen.de>
Germany ftp.uni-duisburg.de:/pub/unix/FreeBSD
<ftp@ftp.uni-duisburg.de>
@ -25,6 +34,9 @@ Germany gil.physik.rwth-aachen.de:/pub/FreeBSD
Hong Kong ftp.cs.cuhk.hk:/pub/FreeBSD
<unknown>
Israel orgchem.weizmann.ac.il:/pub/FreeBSD
<serg@klara.weizmann.ac.il>
Netherlands ftp.nl.net:/pub/os/FreeBSD
<archive@nl.net>
@ -32,10 +44,16 @@ Russia ftp.kiae.su:/FreeBSD
<arcman@kiae.su>
UK src.doc.ic.ac.uk:/packages/FreeBSD
<unknown>
<wizards@doc.ic.ac.uk>
USA ftp.dsu.edu:/pub/FreeBSD
<ghelmer@alpha.dsu.edu>
USA gatekeeper.dec.com:/pub/BSD/FreeBSD
<hubbard@gatekeeper.dec.com>
USA freebsd.uml.edu:/FreeBSD
<oneill@cs.uml.edu>
USA wuarchive.wustl.edu:/systems/unix/FreeBSD
<archives@wugate.wustl.edu>
$Id: MIRROR.SITES,v 1.7.2.1 1994/04/18 04:41:53 rgrimes Exp $
$Id: MIRROR.SITES,v 1.16 1994/06/08 13:33:51 sean Exp $

View file

@ -1,6 +1,6 @@
# @(#)Makefile 5.1.1.2 (Berkeley) 5/9/91
#
# $Id: Makefile,v 1.40 1994/02/18 02:03:17 rgrimes Exp $
# $Id: Makefile,v 1.55 1994/06/15 21:30:28 adam Exp $
#
SUBDIR=
@ -22,6 +22,13 @@ SUBDIR+= include
.if exists(lib)
SUBDIR+= lib
.endif
# This contains both libraries and includes, which stuff below depends
# upon.
.if exists(kerberosIV) && !defined(NOCRYPT)
SUBDIR+= kerberosIV
.endif
.if exists(libexec)
SUBDIR+= libexec
.endif
@ -60,6 +67,11 @@ CLEANDIR=
CLEANDIR= cleandir
.endif
# Where is the c-compiler source. Change this, and gnu/usr.bin/Makefile if you
# want to use another cc (gcc-2.5.8 for instance)
CCDIR= ${.CURDIR}/gnu/usr.bin/cc
#CCDIR= ${.CURDIR}/gnu/usr.bin/cc25
world: directories cleandist mk includes libraries tools mdec
@echo "--------------------------------------------------------------"
@echo " Rebuilding ${DESTDIR} The whole thing"
@ -69,6 +81,9 @@ world: directories cleandist mk includes libraries tools mdec
cd ${.CURDIR}/share/man; make makedb
directories:
@echo "--------------------------------------------------------------"
@echo " Making directories"
@echo "--------------------------------------------------------------"
cd ${.CURDIR}/etc; make distrib-dirs
cleandist:
@ -107,7 +122,7 @@ mk:
# DONT DO THIS!! chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/share/mk
# DONT DO THIS!! chmod 755 ${DESTDIR}/usr/share/mk
.endif
cd ${.CURDIR}/share/mk; make install;
cd ${.CURDIR}/share/mk; make clean all install;
includes:
@echo "--------------------------------------------------------------"
@ -120,11 +135,15 @@ includes:
chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include
chmod 755 ${DESTDIR}/usr/include
.endif
cd ${.CURDIR}/include; make install
cd ${.CURDIR}/gnu/usr.bin/cc/libobjc; make beforeinstall
cd ${.CURDIR}/include; make clean all install
cd ${CCDIR}/libobjc; make beforeinstall
cd ${.CURDIR}/gnu/lib/libg++; make beforeinstall
cd ${.CURDIR}/gnu/lib/libreadline; make beforeinstall
cd ${.CURDIR}/lib/libcurses; make beforeinstall
cd ${.CURDIR}/lib/libc; make beforeinstall
.if !defined(NOCRYPT) && exists(${.CURDIR}/kerberosIV)
cd ${.CURDIR}/kerberosIV/include; make clean all install
.endif
# You MUST run this the first time you get the new sources to boot strap
# the shared library tools onto you system. This target should only
@ -142,12 +161,39 @@ bootstrapld: directories cleandist mk includes
cd ${.CURDIR}/usr.bin/strip; make -DNOPIC depend all install ${CLEANDIR} obj
cd ${.CURDIR}/gnu/usr.bin/ld; make -DNOPIC depend all install ${CLEANDIR} obj
cd ${.CURDIR}/gnu/usr.bin/as; make depend all install ${CLEANDIR} obj
cd ${.CURDIR}/gnu/usr.bin/cc; make -DNOPIC depend all install ${CLEANDIR} obj
cd ${.CURDIR}/gnu/usr.bin/cc/libgcc; make all install ${CLEANDIR} obj
cd ${CCDIR}; make -DNOPIC depend all install ${CLEANDIR} obj
cd ${CCDIR}/libgcc; make all install ${CLEANDIR} obj
cd ${.CURDIR}/lib/csu.i386; make depend all install ${CLEANDIR} obj
cd ${.CURDIR}/lib/libc; make depend all install ${CLEANDIR} obj
cd ${.CURDIR}/gnu/usr.bin/ld/rtld; make depend all install ${CLEANDIR} obj
# Standard database make routines are slow especially for big passwd files.
# Moreover, *pwd.db bases are too big and waste root space. You can have
# much faster routines with small *pwd.db, but loose binary compatibility
# with previous versions and with other BSD-like systems. If you want to
# setup much faster routines, define envirnoment variable (f.e. 'setenv
# PW_COMPACT' in csh) and use target into /usr/src/Makefile. If you will
# want to return this changes back, use the same target without defining
# PW_COMPACT.
bootstrappwd: #directories
-rm -f ${.CURDIR}/lib/libc/obj/getpwent.o ${.CURDIR}/lib/libc/getpwent.o
cd ${.CURDIR}/lib/libc; make all
-rm -f ${.CURDIR}/usr.sbin/pwd_mkdb/obj/pwd_mkdb.o ${.CURDIR}/usr.sbin/pwd_mkdb/pwd_mkdb.o
cd ${.CURDIR}/usr.sbin/pwd_mkdb; make all install ${CLEANDIR}
cp /etc/master.passwd /etc/mp.t; pwd_mkdb /etc/mp.t
SLIB=`basename ${.CURDIR}/lib/libc/obj/libc.so.*`; \
cp ${.CURDIR}/lib/libc/obj/$$SLIB /usr/lib/$$SLIB.tmp; \
mv /usr/lib/$$SLIB.tmp /usr/lib/$$SLIB
cd ${.CURDIR}/lib/libc; make install ${CLEANDIR}
cd ${.CURDIR}/usr.bin/passwd; make clean all install ${CLEANDIR}
cd ${.CURDIR}/usr.bin/chpass; make clean all install ${CLEANDIR}
cd ${.CURDIR}/bin; make clean all install ${CLEANDIR}
cd ${.CURDIR}/sbin; make clean all install ${CLEANDIR}
@echo "--------------------------------------------------------------"
@echo " Do a reboot now because all daemons need restarting"
@echo "--------------------------------------------------------------"
libraries:
# setenv NOPROFILE if you do not want profiled libraries
@echo "--------------------------------------------------------------"
@ -158,18 +204,24 @@ libraries:
find ${DESTDIR}/usr/lib \! -name '*.s[ao].*' -a \! -type d | xargs -n30 rm -rf
.endif
cd ${.CURDIR}/lib; make depend all install ${CLEANDIR} obj
cd ${.CURDIR}/gnu/usr.bin/cc/libgcc; make depend all install ${CLEANDIR} obj
cd ${CCDIR}/libgcc; make depend all install ${CLEANDIR} obj
cd ${.CURDIR}/gnu/lib/libg++; make depend all install ${CLEANDIR} obj
cd ${.CURDIR}/gnu/lib/libregex; make depend all install ${CLEANDIR} obj
cd ${.CURDIR}/gnu/lib/libmalloc; make depend all install ${CLEANDIR} obj
cd ${.CURDIR}/gnu/lib/libreadline; make depend all install ${CLEANDIR} obj
cd ${.CURDIR}/usr.bin/lex; make depend all install ${CLEANDIR} obj
.if exists(${.CURDIR}/kerberosIV) && !defined(NOCRYPT)
cd ${.CURDIR}/kerberosIV/des; make depend all install ${CLEANDIR} obj
cd ${.CURDIR}/kerberosIV/krb; make depend all install ${CLEANDIR} obj
cd ${.CURDIR}/kerberosIV/kdb; make depend all install ${CLEANDIR} obj
.endif
tools:
@echo "--------------------------------------------------------------"
@echo " Rebuilding ${DESTDIR} Compiler and Make"
@echo "--------------------------------------------------------------"
@echo
cd ${.CURDIR}/gnu/usr.bin/cc; make depend all install ${CLEANDIR} obj
cd ${CCDIR}; make depend all install ${CLEANDIR} obj
cd ${.CURDIR}/usr.bin/make; make depend all install ${CLEANDIR} obj
mdec:

86
REGISTER.FreeBSD Normal file
View file

@ -0,0 +1,86 @@
In the absence of any other mechanism for counting the number of users
of FreeBSD, we like to as kindly suggest that you take a few minutes
to please register with the counter set up by
<Harald.T.Alvestrand@uninett.no>.
The justification for such "registration" is twofold: First, we sincerely do
wish to know just what the size and demographics of our user-base are
in order to better support its needs. Second, it's a sad fact that many
people rely on counters and statistics (even when highly dubious) rather
than actual experience when chosing an operating system, and the best we
can hope to do in such circumstances is to at least try to provide some
indication of how popular we are (or are not). This is not how we recommend
that people go about chosing an operating system, but the necessity of
"marketing" remains an undeniable fact of life.
The FreeBSD team does not necessarily feel that Harald's counter represents
the best approach to such statistics gathering, and its accuracy will only
be as good as people's willingness to register with it (which may not reflect
the actual OS population at any single point in time), but in the total absence
of any other mechanism for providing such useful statistics, it's certainly a
start and we thank Harald for his efforts in providing this service.
It's a community service, and of potential benefit to everyone (all *BSD
users), so let's see if we can't make it work!
Included below is the standard blurb from the counter.
Thanks in advance,
The FreeBSD team.
How to get registered
=====================
In brief:
[To register a running installation of FreeBSD]
Send E-mail to bsd-counter@uninett.no with the SUBJECT line
"I use FreeBSD at <place>"
Introduction
============
The intention of this counting project is to count all users of UNIXes
that are:
- BSD-derived
- Freely available
The variants NetBSD, 386BSD and FreeBSD are currently distinguished.
(NOTE: Linux is NOT BSD-derived. If you use that, send mail to
linux-counter@uninett.no instead!!!)
The information is *not* used for any purpose but statistics, and unless
you request it, information about single persons are *never* made public.
(A list of users who have requested publication is available from the
FTP file ftp://aun.uninett.no/pub/misc/386bsd/persons)
How to register
===============
Send E-mail to bsd-counter@uninett.no
The subject should be
I use FreeBSD|NetBSD|386BSD at <place>
Where FreeBSD, NetBSD or 386BSD is the particular variant you're using
and "place" can be school, work or home, or a combination of these.
You will get back a letter with 3 things:
- An acknowledgement
- A form that you can fill out and send in with more information
about yourself, your machine, and your 386bsd-using friends
- A report giving the current status of the counter
You can update your "vote" at any time, by sending an E-mail message
from the same account. Duplicates will be weeded out.
The current report, available by anonymous FTP to aun.uninett.no,
directory pub/misc/386bsd-counter, file "short", is given below.
For all questions, contact Harald.T.Alvestrand@uninett.no!
$Id: REGISTER.FreeBSD,v 1.2 1994/06/04 10:39:57 jkh Exp $

View file

@ -1,29 +1,35 @@
RELEASE NOTES
FreeBSD
Release 1.1
Release 1.1.5
1. Technical overview
---------------------
FreeBSD is a freely available, full source 4.3 (+4.4 enhancements) BSD
release for Intel i386/i486 (or compatable) based PC's. It is based
heavily on Bill Jolitz's 386BSD 0.1, with additions from "the patchkit",
on Bill Jolitz's 386BSD 0.1, with additions from "the patchkit",
NetBSD, CSRG, and the Free Software Foundation.
Many hundreds of bugs from the 386BSD 0.1 distribution were fixed,
and many out-of-date pieces of software were upgraded to their current
releases in the GAMMA distribution. This 1.0 distribution fixes
many of the first-run problems our GAMMA and EPSILON users reported back
to us.
Since our first release of FreeBSD 1.0, many hundreds of bugs have been
fixed, features added, and the overall quality of the system improved
almost imeasurably. FreeBSD 1.1.5 represents the culmination of almost
18 months of work and many thousands of man hours put in by our all-volunteer
working group. We hope you enjoy it!
Additionally, many packages such as XFree86 2.1, xview 3.2, elm, nntp,
mh, InterViews and dozens of other miscellaneous utilities have been ported
and are now available as add-ons. See then next section of this document
for more details.
Many packages have also been upgraded or added, such as XFree86 2.1,
xview 3.2, elm, nntp, mh, InterViews and dozens of other miscellaneous
utilities have been ported and are now available as add-ons. See the next
section of this document for more details.
For a list of contributors, please see the files "CONTRIB.FreeBSD" and
"CONTRIB.386BSD", which should be bundled with your distribution.
Also see the new "REGISTER.FreeBSD" file for information on registering
with the "Free BSD user counter". We've also provided a list of who's
responsible for what (so that you may query them directly) in the
"ROSTER.FreeBSD" file; use of this file is encouraged to ensure faster
resolution of an problems you may have!
The core of FreeBSD does not contain DES code which would inhibit its
being exported outside the United States. There is an add-on package
to the core distribution, for use only in the United States, that
@ -36,8 +42,8 @@ and is described in the FreeBSD FAQ.
2. Supported Configurations
---------------------------
FreeBSD currently runs on a wide variety of ISA and EISA bus based
PC's, ranging from 386sx to 486 class machines (though the 386sx is
FreeBSD currently runs on a wide variety of ISA, EISA and PCI bus based
PC's, ranging from 386sx to Pentium class machines (though the 386sx is
not recommended). Support for generic IDE or ESDI drive configurations,
various SCSI controller, network and serial cards is also provided.
@ -61,18 +67,24 @@ Adaptec 174x series EISA SCSI controller in standard and enhanced mode.
Buslogic 545S.
Buslogic 445S VLB SCSI controller
Buslogic 742A and 747.
Buslogic 942A PCI
Please see special notes in /usr/src/KNOWNBUGS (filed under bt742a.c) for
details concerning possible buggy firmware and undocumented switch settings
that may be necessary for proper operation of your controller.
that may be necessary for proper operation of your Bt445S controller.
DTC 3290 EISA SCSI controller in 1542 emulation mode.
Ultra Store 14F and 34F.
Seagate ST01/02 SCSI controllers.
Future Domain 8xx/950 series SCSI controllers.
With all supported SCSI controllers, full support is provided for
SCSI-I & SCSI-II peripherals, including Disks, tape drives (including
DAT) and CD ROM drives. Note: This and the mcd driver (Mitsumi CDROM
inteface card) is the only way a CD ROM drive may be currently
interface card) is the only way a CD ROM drive may be currently
attached to a FreeBSD system; we do not support SoundBlaster CDROM
interface, or other "mini SCSI" adapters.
@ -84,7 +96,9 @@ EISA controllers (which are normally 32 bit) when they're configured to
emulate an ISA card, which they then do in *all* respects. This problem
is avoided entirely by IDE controllers (which do not use DMA), true EISA
controllers (like the UltraStor or Adaptec 1742A) and most VLB (local bus)
controllers.
controllers. In the cases where it's necessary, the system will use
"bounce buffers" to to talk to the controller so that you can still use
more than 16Mb of memory without difficulty.
2.2. Ethernet cards
@ -110,9 +124,9 @@ SMC Elite Ultra
2.3. Misc
Various 2 and 4 port serial/parallel cards.
AST 4 port serial card using shared IRQ.
Simple (AST-like) multiport serial cards.
ARNET 8 port serial card using shared IRQ.
BOCA ATIO66 6 port serial card using shared IRQ.
@ -125,7 +139,7 @@ and Roland MPU-401 sound cards.
FreeBSD currently does NOT support IBM's microchannel (MCA) bus, but
support is apparently close to materializing. Details will be posted
as they develop.
as the situation develops.
3. Obtaining FreeBSD.
@ -153,7 +167,7 @@ resort!
2. CDROM
FreeBSD may be ordered on CDROM from:
FreeBSD 1.1 may be ordered on CDROM from:
Walnut Creek CDROM
4041 Pike Lane, Suite D
@ -245,21 +259,21 @@ The Computer Systems Research Group (CSRG), U.C. Berkeley.
Bill Jolitz, for his extensive work with 386BSD.
The FreeBSD "core" group:
The FreeBSD "core" team:
Andrew A. Chernov
John Dyson
David Greenman
Rodney W. Grimes
Jordan K. Hubbard
Scott Mace
Andrew Moore
Rich Murphey
Paul Richards
Christoph Robitschko
Andreas Schulz
Nate Williams
Garrett A. Wollman
Andrew A. Chernov
John Dyson
David Greenman
Rodney W. Grimes
Jordan K. Hubbard
Scott Mace
Andrew Moore
Rich Murphey
Geoff Rehmet
Paul Richards
Andreas Schulz
Nate Williams
Garrett A. Wollman
Special mention to:
@ -285,6 +299,7 @@ Special mention to:
Chris Provenzano Dave Rivers
Guido van Rooij Steven Wallace
Rick Weldon Terry Williams
Atsushi Murai
And everyone at Montana State University for their initial support.
@ -293,6 +308,6 @@ Thanks to everyone, especially those not mentioned, and we sincerely
hope you enjoy this release of FreeBSD!
The FreeBSD Core Group
The FreeBSD Core Team
$Id: RELNOTES.FreeBSD,v 1.23.2.4 1994/05/02 02:23:48 rgrimes Exp $
$Id: RELNOTES.FreeBSD,v 1.34 1994/06/28 08:09:31 jkh Exp $

127
ROSTER.FreeBSD Normal file
View file

@ -0,0 +1,127 @@
This file attempts to document just who is `responsible' for what in
the FreeBSD world. Since we're an all-volunteer group, the whole
concept of `responsibility' must, of course, be taken with a grain of
salt since the folks here may not always have time to deal with your
problem right away. With that in mind, you are encouraged to contact
these folks directly when your problem or suggestion clearly falls
into their area of responsibility. If your queries don't net any
positive results in, say, 48 hours, THEN you should try and contact
the group at large. In most cases, however, using these folks as
first-contacts will both cut down on our mail-overload and give you
faster service.
Thank you!
The FreeBSD Team
freebsd-hackers@freefall.cdrom.com
---
Legend:
-------
contrib = Contributed
doc = Documentation
lib = User-land library
misc = Misc user-land utility (contrib, other)
ports = Ported software in /usr/ports
prog = User-land program
share = Support data files
sys = Kernel and system code
tools = DOS support utilities
Category Person Email address
===============================================================================
contrib/xntpd Garrett Wollman wollman@lcs.mit.edu
doc/FAQ FAQ Team freebsd-faq@freefall.cdrom.com
lib/libF77 L. Jonas Olsson ljo@po.cwru.edu
lib/libc Garrett Wollman wollman@lcs.mit.edu
lib/libcrypt (non-US) Geoff Rehmet csgr@cs.ru.ac.za
lib/libcurses Andrew Chernov ache@astral.msk.su
lib/libkrb Garrett Wollman wollman@lcs.mit.edu
lib/libm Andrew Moore alm@netcom.com
lib/libpthread Chris Provenzano proven@mit.edu
lib/libskey Guido van Rooij guido@gvr.win.tue.nl
lib/libtelnet Garrett Wollman wollman@lcs.mit.edu
misc/addit Gary Clark II gclarkii@freefall.cdrom.com
misc/configit Gary Clark II gclarkii@freefall.cdrom.com
misc/gnats Andrew Moore alm@netcom.com
misc/manctl Geoff Rehmet csgr@cs.ru.ac.za
ports/{not below} Andrew Moore alm@freefall.cdrom.com
ports/aXe Jordan Hubbard jkh@freefall.cdrom.com
ports/archivers Scott Mace smace@freefall.cdrom.com
ports/bash Jordan Hubbard jkh@freefall.cdrom.com
ports/blt Jordan Hubbard jkh@freefall.cdrom.com
ports/cpm Joerg Wunsch joerg_wunsch@uriah.sax.de
ports/dgd Adam David adam@veda.is
ports/elm Scott Mace smace@freefall.cdrom.com
ports/emacs Jordan Hubbard jkh@freefall.cdrom.com
ports/exmh Jordan Hubbard jkh@freefall.cdrom.com
ports/ezd Jeffrey Hsu hsu@freefall.cdrom.com
ports/franz Jordan Hubbard jkh@freefall.cdrom.com
ports/fvwm Geoff Rehmet csgr@cs.ru.ac.za
ports/golddig Jeffrey Hsu hsu@freefall.cdrom.com
ports/ile Jordan Hubbard jkh@freefall.cdrom.com
ports/ispell Piero Serini piero@strider.st.dsi.unimi.it
ports/jpeg Scott Mace smace@freefall.cdrom.com
ports/kermit Scott Mace smace@freefall.cdrom.com
ports/ksh Sean Vickery seanv@cs.uq.edu.au
ports/kterm Satoshi Asami asami@cs.berkeley.edu
ports/lynx Serge V.Vakulenko vak@cronyx.msk.su
ports/mprof Jeffrey Hsu hsu@freefall.cdrom.com
ports/mtools Steven Wallace swallace@freefall.cdrom.com
ports/netaudio Jeffrey Hsu hsu@freefall.cdrom.com
ports/nethack Sean Vickery seanv@cs.uq.edu.au
ports/pcvt J"org Wunsch joerg_wunsch@uriah.sax.de
ports/piewm Satoshi Asami asami@cs.berkeley.edu
ports/pkg_install Jordan Hubbard jkh@freefall.cdrom.com
ports/popper Andreas Schulz ats@g386bsd.first.gmd.de
ports/point Jordan Hubbard jkh@freefall.cdrom.com
ports/sather Jeffrey Hsu hsu@freefall.cdrom.com
ports/schemetoc Jeffrey Hsu hsu@freefall.cdrom.com
ports/scm Jeffrey Hsu hsu@freefall.cdrom.com
ports/seahaven Jeffrey Hsu hsu@freefall.cdrom.com
ports/sml Jeffrey Hsu hsu@freefall.cdrom.com
ports/sup Jordan Hubbard jkh@freefall.cdrom.com
ports/tcl Jordan Hubbard jkh@freefall.cdrom.com
ports/tcl-dp Jordan Hubbard jkh@freefall.cdrom.com
ports/tclX Jordan Hubbard jkh@freefall.cdrom.com
ports/tcsh Scott Mace smace@freefall.cdrom.com
ports/tk Jordan Hubbard jkh@freefall.cdrom.com
ports/vile Jordan Hubbard jkh@freefall.cdrom.com
ports/vim Jordan Hubbard jkh@freefall.cdrom.com
ports/wine Jeffrey Hsu hsu@freefall.cdrom.com
ports/wu-ftpd Justin T. Gibbs gibbs@freefall.cdrom.com
ports/xcdplayer Steven Wallace swallace@freefall.cdrom.com
ports/xjewel Jeffrey Hsu hsu@freefall.cdrom.com
ports/xlock Scott Mace smace@freefall.cdrom.com
ports/xmine J"org Wunsch joerg_wunsch@uriah.sax.de
ports/xphoon Satoshi Asami asami@cs.berkeley.edu
ports/xv Scott Mace smace@freefall.cdrom.com
ports/ytalk Geoff Rehmet csgr@cs.ru.ac.za
ports/zircon Jordan Hubbard jkh@freefall.cdrom.com
ports/zsh Scott Mace smace@freefall.cdrom.com
prog/cc Poul-Henning Kamp phk@freefall.cdrom.com
prog/cc25 Poul-Henning Kamp phk@freefall.cdrom.com
prog/gdb Gary Jennejohn gj@pcs.dec.com
prog/man Jordan Hubbard jkh@freefall.cdrom.com
prog/telnet Garrett Wollman wollman@lcs.mit.edu
sys/fd J"org Wunsch joerg_wunsch@uriah.sax.de
sys/fd Serge V.Vakulenko vak@cronyx.msk.su
sys/i386 David Greenman davidg@root.com
sys/i386/isa/seagate Sean Vickery seanv@cs.uq.edu.au
sys/i386/isa/sound Steven Wallace swallace@freefall.cdrom.com
sys/i386/isa/bt742*.c Atsushi Murai amurai@spec.co.jp
sys/kern David Greenman davidg@root.com
sys/kern/ntp Garrett Wollman wollman@lcs.mit.edu
sys/lpt Geoff Rehmet csgr@cs.ru.ac.za
sys/net* David Greenman davidg@root.com
sys/netboot Martin Renters martin@innovus.com
sys/netinet Garrett Wollman wollman@lcs.mit.edu
sys/pcmcia Poul-Henning Kamp phk@freefall.cdrom.com
sys/scheduler John Dyson dyson@freefall.cdrom.com
sys/syscons So/ren Schmidt sos@freefall.cdrom.com
sys/vm David Greenman davidg@root.com
sys/vm John Dyson dyson@freefall.cdrom.com
sys/wt Serge V.Vakulenko vak@cronyx.msk.su
tools/booteasy Serge V.Vakulenko vak@cronyx.msk.su

View file

@ -44,65 +44,46 @@ floppies and tape cartridges available. System software development
including drivers for non-standard equipment.
Guy Helmer <ghelmer@alpha.dsu.edu>
519 West Ave. South
Madison, SD 57042
Home: 605-256-2788
Expires on 1995/06/30
Interests: supporting FreeBSD & XFree86 installation, configuration,
operation; Internet connection support; training. Prefer short-term
part-time projects in the northern midwest United States. I reserve the
right to refuse work. Rates negotiable.
Degree: SDSM&T BS CS, 1989
Jordan Hubbard
Timberline Associates (est 1978)
Dublin, Ireland
Dublin, Ireland [And soon Boston / San Francisco]
Support hours: 1000 - 2300 GMT
Tel #: 00353-1-332796
Email: jkh@al.org
Telephone and on-site consulting for FreeBSD for Ireland, the United
Kingdom and most parts of Europe. Services include installation,
system configuration and custom software projects, graphical user
interfaces a specialty (actively involved with The X Window System
since Version 9). Reasonable and flexible rates comeasurate with
location and duration of assignment.
Telephone (or Internet) and on-site consulting for FreeBSD in Ireland,
the United States, United Kingdom and most parts of Europe. Services include
installation, system configuration, networking and custom software
projects, graphical user interfaces a specialty (actively involved with
The X Window System since Version 9 and contributor to the X Consortium).
Reasonable and flexible rates comensurate with location and duration of
assignment. Internet assignments are welcomed, and generally billed at
lower rates.
Vector Systems Ltd, Julian H. Stacey.
Post: Holz Strasse 27d, D 80469, Munich (Muenchen), Germany (Deutschland).
Tel.: +49 89 268616 09:00-22:00 TZ=GMT+1
Email: stacey@freefall.cdrom.com
Vector Systems Ltd,
Julian H. Stacey, Holz Strasse 27d, 80469, Munich (Muenchen), Germany.
Tel. +49 89 268616 09:00-19:00 Timezone=GMT+01:00
email: <stacey@guug.de> (later changing to <stacey@vector.guug.de>)
COMMERCIAL Independent Consultancy:
Custom Project Designs, provision, & support, targeting all modern
Unix like platforms. Prefered development & target platform: FreeBSD.
Expertise in C, FSF/GNU tools, X Windows, multi lingual systems
(inc. Cyrillic), systems engineering, hardware interfacing,
communications & scientific & industrial programming.
Generally avoiding: cobol, basic, payroll applications.
Support & Provision available for combinations of
FreeBSD, X-Windows, FSF/GNU & range of own C tools for
all Unix + MSDOS.
Rate: ~125 DM/hour, (~2.5DM=#1UK, ~1.5DM=$1USA @ Nov. 93).
On Request:
Personal Resume, Company Profile, Index of own purchasable tools,
Index of public domain tools.
Deutsch + Francais:
Man kann mir in Deutsch schreiben, (oder mich anrufen).
Je comprend Francais, mais je n'ecris pas des responses en Francais.
(Contact me in English, German, or French.
Public Domain Copies:
Selections of FreeBSD, X-Windows, FSF/GNU Sources & Binaries available.
525, 150, & 60 Mbyte QIC Cartridge, TEAC 60M Cassette, 1.2&4M Floppies.
From about 100DM per Cartridge for labour, media, postage.
Custom designs & support using FreeBSD + X-Windows + FSF/GNU, + own Unix & DOS
C tools. Systems engineering, hardware interfacing, multi lingual systems
(European, Cyrillic, Chinese), communications, scientific, industrial real
time programming. Source Tapes: QIC 525M, 150M, 60M.
Deutsch: Man kann mir in Deutsch schreiben, (oder mich anrufen).
Francais: Je comprend Francais, mais je n'ecris pas des responses en Francais.
Sean Vickery
2/449 Milton Road
Auchenflower Qld 4066
Australia
Telephone: +61 (0)7 870 5241
Email: seanv@cs.uq.edu.au
$Id: SUPPORT.TXT,v 1.1.2.1 1994/04/21 19:06:31 rgrimes Exp $
Sean offers support in most FreeBSD matters, including installation
and configuration. His rates are reasonable. As well as on-site
help, support is available over the phone and the net.
$Id: SUPPORT.TXT,v 1.5 1994/06/09 03:46:15 jkh Exp $

38
TODO-1.1.5 Normal file
View file

@ -0,0 +1,38 @@
This is my current TODO list for 1.1.5. Please feel free to add to
it, assuming that you've actually got some confidence that you or
someone else will be able to actually get to whatever it is (or it's
so critical that you don't think 1.1.5 could/should be released
without it).
Also, please bear in mind the following milestones we have to hit:
June 5th Feature Freeze (bug fixes and cleanup work only).
June 16th Code Freeze
June 20th Roll binaries - begin initial testing
June 23rd Announce availability of 1.1.5.
(*) = Task is completed
(@) = Task is abandoned
Task Urgency Who
-------------------------------------------------------------------------------
Floppy driver fixes Low * Joerg Wunsch
Sound driver (GUS/Multicast/cleanup) Medium Steven W/Andrew C.
Curses library problems Medium * Steven W.
SIO driver - reported problems High * Andrew C/Bruce E/???
Syscons integration / new features High * Soren Schmidt/Jordan
Update FT driver Medium * Javier R/Steven G.
Update gdb High * Paul
Make pcfs less dangerous Low @ ???
Bruce's disklabel and bad144 fixes Medium * Andrew C.
Misc NetBSD drivers for weird devices Low @ Geoff
Multicast Support Medium * Jordan
Bounce Buffer fixes High * John/David
VM panics and assorted lossage High * John/David
Secure Key support Low * Guido
Install script enhancements Medium * Andrew M/Jordan
Fsck/umount cooperation with dirty bit Low @ Paul R.
PCFS data corruption with cp Medium * Steven W./ATS
PCFS extended DOS partition support Low @ ???
ISOFS over NSF fix Medium/High * ???
Libcompat Low * Joerg Wunsch

View file

@ -299,7 +299,7 @@ copy_file(fs, dne)
struct stat *fs;
int dne;
{
static char buf[MAXBSIZE];
static char buf[MAXBSIZE * 4];
register int from_fd, to_fd, rcount, wcount;
struct stat to_stat;
char *p;
@ -358,7 +358,7 @@ copy_file(fs, dne)
if (munmap((caddr_t) p, fs->st_size) < 0)
err("%s: %s", from.p_path, strerror(errno));
} else {
while ((rcount = read(from_fd, buf, MAXBSIZE)) > 0) {
while ((rcount = read(from_fd, buf, sizeof(buf))) > 0) {
wcount = write(to_fd, buf, rcount);
if (rcount != wcount || wcount == -1) {
err("%s: %s", to.p_path, strerror(errno));

View file

@ -50,7 +50,7 @@ static char sccsid[] = "@(#)path.c 5.2 (Berkeley) 10/27/91";
*/
#define STRIP_TRAILING_SLASH(p) { \
while ((p)->p_end > (p)->p_path && (p)->p_end[-1] == '/') \
while ((p)->p_end > ((p)->p_path + 1) && (p)->p_end[-1] == '/') \
*--(p)->p_end = 0; \
}

View file

@ -63,10 +63,10 @@ unsigned short _cmap[256] = {
_CTR, _CTR, _CTR, _CTR,
/* sp ! " # */
_SP|_META, 0, _Q, _META,
_SP|_META, 0, _Q2, _META,
/* $ % & ' */
_DOL, 0, _META|_CMD, _Q,
_DOL, 0, _META|_CMD, _Q2,
/* ( ) * + */
_META|_CMD, _META, _GLOB, 0,

View file

@ -42,7 +42,7 @@ extern unsigned char _cmap_lower[], _cmap_upper[];
#endif
#define _Q 0x0001 /* '" */
#define _Q2 0x0001 /* '" */
#define _Q1 0x0002 /* ` */
#define _SP 0x0004 /* space and tab */
#define _NL 0x0008 /* \n */

View file

@ -66,7 +66,7 @@ static Char *Dcp, **Dvp; /* Input vector for Dreadc */
#define unDgetC(c) Dpeekc = c
#define QUOTES (_Q|_Q1|_ESC) /* \ ' " ` */
#define QUOTES (_Q2|_Q1|_ESC) /* \ ' " ` */
/*
* The following variables give the information about the current
@ -192,7 +192,7 @@ Dpack(wbuf, wp)
Gcat(STRNULL, wbuf);
return (NULL);
}
if (cmap(c, _SP | _NL | _Q | _Q1)) { /* sp \t\n'"` */
if (cmap(c, _SP | _NL | _Q2 | _Q1)) { /* sp \t\n'"` */
unDgetC(c);
if (cmap(c, QUOTES))
return (wp);

View file

@ -315,7 +315,7 @@ loop:
break;
}
}
else if (cmap(c, _META | _Q | _Q1 | _ESC)) {
else if (cmap(c, _META | _Q2 | _Q1 | _ESC)) {
if (c == '\\') {
c = getC(0);
if (c == '\n') {
@ -327,7 +327,7 @@ loop:
*wp++ = '\\', --i;
c |= QUOTE;
}
else if (cmap(c, _Q | _Q1)) { /* '"` */
else if (cmap(c, _Q2 | _Q1)) { /* '"` */
c1 = c;
dolflg = c == '"' ? DOALL : DOEXCL;
}
@ -366,7 +366,7 @@ getC1(flag)
if ((c = *lap++) == 0)
lap = 0;
else {
if (cmap(c, _META | _Q | _Q1))
if (cmap(c, _META | _Q2 | _Q1))
c |= QUOTE;
return (c);
}

View file

@ -5,7 +5,7 @@
* or UNIX System Laboratories, Inc. and are reproduced herein with
* the permission of UNIX System Laboratories, Inc.
*
* $Id: df.c,v 1.3.2.2 1994/05/04 07:35:01 rgrimes Exp $
* $Id: df.c,v 1.5 1994/05/04 08:04:22 rgrimes Exp $
*/
/*
* Copyright (c) 1980, 1990 The Regents of the University of California.

View file

@ -1,5 +1,5 @@
PROG= ed
SRCS= buf.c cbc.c glob.c io.c main.c re.c sub.c undo.c
SRCS= buf.c cbc.c glbl.c io.c main.c re.c sub.c undo.c
LINKS= ${BINDIR}/ed ${BINDIR}/red
MLINKS= ed.1 red.1

View file

@ -26,10 +26,11 @@
* SUCH DAMAGE.
*/
#ifndef lint
static char *rcsid = "@(#)$Id: buf.c,v 1.4 1994/02/01 00:34:35 alm Exp $";
static char *rcsid = "@(#)buf.c,v 1.4 1994/02/01 00:34:35 alm Exp";
#endif /* not lint */
#include <sys/file.h>
#include <sys/stat.h>
#include "ed.h"
@ -131,7 +132,7 @@ add_line_node(lp)
line_t *cp;
cp = get_addressed_line_node(current_addr); /* this get_addressed_line_node last! */
insque(lp, cp);
INSQUE(lp, cp);
addr_last++;
current_addr++;
}
@ -195,13 +196,18 @@ char sfn[15] = ""; /* scratch file name */
int
open_sbuf()
{
int u;
isbinary = newline_added = 0;
u = umask(077);
strcpy(sfn, "/tmp/ed.XXXXXX");
if (mktemp(sfn) == NULL || (sfp = fopen(sfn, "w+")) == NULL) {
fprintf(stderr, "%s: %s\n", sfn, strerror(errno));
sprintf(errmsg, "cannot open temp file");
umask(u);
return ERR;
}
umask(u);
return 0;
}

View file

@ -38,7 +38,7 @@
*/
#ifndef lint
static char *rcsid = "@(#)$Id: cbc.c,v 1.2 1994/02/01 00:34:36 alm Exp $";
static char *rcsid = "@(#)cbc.c,v 1.2 1994/02/01 00:34:36 alm Exp";
#endif /* not lint */
#include <sys/types.h>

View file

@ -24,14 +24,15 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)$Id: ed.h,v 1.5 1994/02/01 00:34:39 alm Exp $
* @(#)ed.h,v 1.5 1994/02/01 00:34:39 alm Exp
*/
#include <sys/types.h>
#if defined(BSD) && BSD >= 199103 || defined(__386BSD__)
# include <sys/param.h> /* for MAXPATHLEN */
#endif
#include <errno.h>
#ifdef sun
#if defined(sun) || defined(__NetBSD__)
# include <limits.h>
#endif
#include <regex.h>
@ -166,17 +167,15 @@ if ((i) > (n)) { \
/* REQUE: link pred before succ */
#define REQUE(pred, succ) (pred)->q_forw = (succ), (succ)->q_back = (pred)
#ifdef NEED_INSQUE
/* insque: insert elem in circular queue after pred */
#define insque(elem, pred) \
/* INSQUE: insert elem in circular queue after pred */
#define INSQUE(elem, pred) \
{ \
REQUE((elem), (pred)->q_forw); \
REQUE((pred), elem); \
}
/* remque: remove_lines elem from circular queue */
#define remque(elem) REQUE((elem)->q_back, (elem)->q_forw);
#endif /* NEED_INSQUE */
/* REMQUE: remove_lines elem from circular queue */
#define REMQUE(elem) REQUE((elem)->q_back, (elem)->q_forw);
/* NUL_TO_NEWLINE: overwrite ASCII NULs with newlines */
#define NUL_TO_NEWLINE(s, l) translit_text(s, l, '\0', '\n')
@ -184,7 +183,7 @@ if ((i) > (n)) { \
/* NEWLINE_TO_NUL: overwrite newlines with ASCII NULs */
#define NEWLINE_TO_NUL(s, l) translit_text(s, l, '\n', '\0')
#ifndef strerror
#ifdef sun
# define strerror(n) sys_errlist[n]
#endif

View file

@ -27,7 +27,7 @@
*/
#ifndef lint
static char *rcsid = "@(#)$Id: glob.c,v 1.1 1994/02/01 00:34:40 alm Exp $";
static char *rcsid = "@(#)glob.c,v 1.1 1994/02/01 00:34:40 alm Exp";
#endif /* not lint */
#include <sys/ioctl.h>

View file

@ -26,7 +26,7 @@
*/
#ifndef lint
static char *rcsid = "@(#)$Id: io.c,v 1.1 1994/02/01 00:34:41 alm Exp $";
static char *rcsid = "@(#)io.c,v 1.1 1994/02/01 00:34:41 alm Exp";
#endif /* not lint */
#include "ed.h"

View file

@ -33,7 +33,7 @@ char *copyright =
#endif /* not lint */
#ifndef lint
static char *rcsid = "@(#)$Id: main.c,v 1.1 1994/02/01 00:34:42 alm Exp $";
static char *rcsid = "@(#)main.c,v 1.1 1994/02/01 00:34:42 alm Exp";
#endif /* not lint */
/*

View file

@ -27,7 +27,7 @@
*/
#ifndef lint
static char *rcsid = "@(#)$Id: re.c,v 1.6 1994/02/01 00:34:43 alm Exp $";
static char *rcsid = "@(#)re.c,v 1.6 1994/02/01 00:34:43 alm Exp";
#endif /* not lint */
#include "ed.h"

View file

@ -27,7 +27,7 @@
*/
#ifndef lint
static char *rcsid = "@(#)$Id: sub.c,v 1.1 1994/02/01 00:34:44 alm Exp $";
static char *rcsid = "@(#)sub.c,v 1.1 1994/02/01 00:34:44 alm Exp";
#endif /* not lint */
#include "ed.h"

View file

@ -26,7 +26,7 @@
*/
#ifndef lint
static char *rcsid = "@(#)$Id: undo.c,v 1.1 1994/02/01 00:34:44 alm Exp $";
static char *rcsid = "@(#)undo.c,v 1.1 1994/02/01 00:34:44 alm Exp";
#endif /* not lint */
#include "ed.h"

View file

@ -28,7 +28,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $Id: expr.1,v 1.2.2.1 1994/05/01 15:59:55 jkh Exp $
.\" $Id: expr.1,v 1.3 1994/04/24 01:18:46 jkh Exp $
.\"
.Dd July 3, 1993
.Dt EXPR 1

View file

@ -34,7 +34,7 @@
.\"
.\" @(#)ls.1 6.18 (Berkeley) 6/27/91
.\"
.\" $Header: /home/cvs/386BSD/src/bin/ls/ls.1,v 1.2.2.1 1994/05/01 16:00:04 jkh Exp $
.\" $Header: /home/cvs/386BSD/src/bin/ls/ls.1,v 1.3 1994/04/24 01:18:52 jkh Exp $
.\"
.Dd June 27, 1991
.Dt LS 1

View file

@ -34,7 +34,7 @@
.\"
.\" @(#)mkdir.1 6.9 (Berkeley) 6/27/91
.\"
.\" $Header: /home/cvs/386BSD/src/bin/mkdir/mkdir.1,v 1.2.2.1 1994/05/01 16:00:13 jkh Exp $
.\" $Header: /home/cvs/386BSD/src/bin/mkdir/mkdir.1,v 1.2 1993/07/21 22:54:08 conklin Exp $
.\"
.Dd June 27, 1991
.Dt MKDIR 1

View file

@ -39,7 +39,7 @@ char copyright[] =
#ifndef lint
static char sccsid[] = "@(#)mkdir.c 5.7 (Berkeley) 5/31/90";
static char rcsid[] = "$Header: /home/cvs/386BSD/src/bin/mkdir/mkdir.c,v 1.2 1993/07/21 22:54:09 conklin Exp $";
static char rcsid[] = "$Header: /home/cvs/386BSD/src/bin/mkdir/mkdir.c,v 1.3 1994/05/23 01:15:19 ache Exp $";
#endif /* not lint */
#include <sys/types.h>
@ -118,7 +118,7 @@ build(path, mode, dir_mode)
int ch;
for (p = path;; ++p) {
if (!*p || *p == '/') {
if (!*p || *p == '/' && p != path) {
ch = *p;
*p = '\0';
if (stat(path, &sb)) {

View file

@ -42,7 +42,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)mv.c 5.11 (Berkeley) 4/3/91";*/
static char rcsid[] = "$Id: mv.c,v 1.2 1993/11/22 23:54:24 jtc Exp $";
static char rcsid[] = "$Id: mv.c,v 1.3 1994/04/16 00:51:13 davidg Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -229,7 +229,7 @@ fastcopy(from, to, sbp)
(void)close(from_fd);
return(1);
}
if (!blen && !(bp = malloc(blen = sbp->st_blksize))) {
if (!blen && !(bp = malloc(blen = sbp->st_blksize * 4))) {
error(NULL);
return(1);
}

View file

@ -1,15 +1,15 @@
# @(#)Makefile 5.4 (Berkeley) 10/21/90
PROG= rcp
SRCS= rcp.c
SRCS= rcp.c krcmd.c kcmd.c
BINOWN= root
BINMODE=4555
.PATH: ${.CURDIR}/../../usr.bin/rlogin
.if exists(/usr/lib/libcrypt.a)
#CFLAGS+=-DCRYPT -DKERBEROS
#DPADD+= ${LIBCRYPT} ${LIBKRB}
#LDADD+= -lcrypt -lkrb
.if exists(${DESTDIR}/usr/lib/libkrb.a)
CFLAGS+=-DCRYPT -DKERBEROS
DPADD+= ${LIBKRB} ${LIBDES}
LDADD+= -lkrb -ldes
.endif
.include <bsd.prog.mk>

View file

@ -39,7 +39,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)rm.c 4.26 (Berkeley) 3/10/91";*/
static char rcsid[] = "$Id: rm.c,v 1.6.2.1 1994/03/07 02:25:28 rgrimes Exp $";
static char rcsid[] = "$Id: rm.c,v 1.7 1994/03/05 16:12:06 ats Exp $";
#endif /* not lint */
#include <stdio.h>

View file

@ -163,7 +163,6 @@ main(argc, argv)
i = 0;
args[i++] = _PATH_SENDMAIL;
args[i++] = "-oee"; /* no errors, just status */
args[i++] = "-odq"; /* queue it, don't try to deliver */
args[i++] = "-oi"; /* ignore '.' on a line by itself */
if (fsys[0] != '\0') { /* set sender's host name */
static char junk2[512];

View file

@ -39,7 +39,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)rmdir.c 5.3 (Berkeley) 5/31/90";*/
static char rcsid[] = "$Id: rmdir.c,v 1.3 1993/11/23 00:13:55 jtc Exp $";
static char rcsid[] = "$Id: rmdir.c,v 1.4 1994/05/23 01:41:06 ache Exp $";
#endif /* not lint */
/*
@ -117,6 +117,8 @@ rmdirp (path)
/* skip trailing slash characters */
while (slash > path && *slash == '/')
slash--;
if (*slash == '/') /* don't attempt to remove root */
return 0;
*++slash = '\0';
if (rmdir (path)) {

View file

@ -50,7 +50,7 @@
# This file is part of ash, which is distributed under the terms specified
# by the Ash General Public License. See the file named LICENSE.
bltincmd command
bltincmd bltin
#alloccmd alloc
bgcmd -j bg
breakcmd break continue

View file

@ -217,7 +217,7 @@ top:
STPUTC('\0', p);
p = grabstackstr(p);
INTOFF;
if (chdir(p) < 0) {
if (chdir(*p ? p : ".") < 0) {
INTON;
return -1;
}

View file

@ -403,7 +403,7 @@ again: /* jump here after setting a variable with ${var=text} */
if ((c = *p++) == CTLESC)
p++;
else if (c == CTLBACKQ || c == (CTLBACKQ|CTLQUOTE)) {
if (set)
if (set && argbackq)
argbackq = argbackq->next;
} else if (c == CTLVAR) {
if ((*p++ & VSTYPE) != VSNORMAL)
@ -664,10 +664,10 @@ expandmeta(str)
savelastp = exparg.lastp;
INTOFF;
if (expdir == NULL)
expdir = ckmalloc(8192); /* I hope this is big enough */
expdir = ckmalloc(16384); /* I hope this is big enough */
expmeta(expdir, str->text);
if(strlen(expdir) >= 8192)
error("malloc overflow in sh:expand.c in ckmalloc(8192)\n");
if(strlen(expdir) >= 16384)
error("malloc overflow in sh:expand.c in ckmalloc(16384)\n");
ckfree(expdir);
expdir = NULL;
INTON;

View file

@ -89,8 +89,8 @@ readcmd(argc, argv) char **argv; {
out2str(prompt);
flushall();
}
if ((ap = argptr) == NULL)
error("arg count");
if (*(ap = argptr) == NULL)
error("bad argument/arg count");
if ((ifs = bltinlookup("IFS", 1)) == NULL)
ifs = nullstr;
status = 0;

View file

@ -60,12 +60,14 @@ struct cchar cchars1[] = {
"intr", VINTR, CINTR,
"kill", VKILL, CKILL,
"lnext", VLNEXT, CLNEXT,
"min", VMIN, CMIN,
"quit", VQUIT, CQUIT,
"reprint", VREPRINT, CREPRINT,
"start", VSTART, CSTART,
"status", VSTATUS, CSTATUS,
"stop", VSTOP, CSTOP,
"susp", VSUSP, CSUSP,
"time", VTIME, CTIME,
"werase", VWERASE, CWERASE,
NULL,
};
@ -95,8 +97,8 @@ csearch(argvp, ip)
tmp.name = name;
if (!(cp = (struct cchar *)bsearch(&tmp, cchars1,
sizeof(cchars1)/sizeof(struct cchar) - 1, sizeof(struct cchar),
c_cchar)) && !(cp = (struct cchar *)bsearch(&tmp, cchars1,
sizeof(cchars1)/sizeof(struct cchar) - 1, sizeof(struct cchar),
c_cchar)) && !(cp = (struct cchar *)bsearch(&tmp, cchars2,
sizeof(cchars2)/sizeof(struct cchar) - 1, sizeof(struct cchar),
c_cchar)))
return(0);
@ -109,10 +111,6 @@ csearch(argvp, ip)
ip->t.c_cc[cp->sub] = _POSIX_VDISABLE;
else if (cp->sub == VMIN || cp->sub == VTIME) {
val = strtol(arg, &ep, 10);
if (val == _POSIX_VDISABLE) {
warnx("value of %ld would disable the option -- %s",
val, name);
}
if (val > UCHAR_MAX) {
warnx("maximum option value is %d -- %s",
UCHAR_MAX, name);

View file

@ -163,12 +163,12 @@ gread(tp, s)
tp->c_cc[VSUSP] = tmp;
continue;
}
if (CHK("vmin")) {
if (CHK("min")) {
(void)sscanf(ep, "%ld", &tmp);
tp->c_cc[VMIN] = tmp;
continue;
}
if (CHK("vtime")) {
if (CHK("time")) {
(void)sscanf(ep, "%ld", &tmp);
tp->c_cc[VTIME] = tmp;
continue;

View file

@ -276,6 +276,6 @@ f_tty(ip)
int tmp;
tmp = TTYDISC;
if (ioctl(0, TIOCSETD, &tmp) < 0)
if (ioctl(ip->fd, TIOCSETD, &tmp) < 0)
err("TIOCSETD: %s", strerror(errno));
}

View file

@ -74,6 +74,9 @@ print(tp, wp, ldisc, fmt)
case NTTYDISC:
cnt += printf("new tty disc; ");
break;
case PPPDISC:
cnt += printf("ppp disc; ");
break;
default:
cnt += printf("#%d disc; ", ldisc);
break;
@ -250,13 +253,14 @@ ccval(p, c)
static char buf[5];
char *bp;
if (c == _POSIX_VDISABLE)
return("<undef>");
if (p->sub == VMIN || p->sub == VTIME) {
(void)snprintf(buf, sizeof(buf), "%d", c);
return (buf);
}
if (c == _POSIX_VDISABLE)
return("<undef>");
bp = buf;
if (c & 0200) {
*bp++ = 'M';

954
contrib/FAQ/FreeBSD.FAQ Normal file
View file

@ -0,0 +1,954 @@
FreeBSD
Frequently Asked Questions
For Versions 1.1 and above
Please mail all suggestions and additions to <FreeBSD-FAQ@freefall.cdrom.com>
Revision: $Id: FreeBSD.FAQ,v 1.36 1994/06/28 15:33:58 jkh Exp $
All entries are assumed to be relevant to both FreeBSD 1.1 and FreeBSD 1.1.5,
unless otherwise noted.
Table of Contents
-----------------
0 Preface
1 Installation
2 Hardware Compatibility
3 Commercial applications
4 User Applications
5 Miscellaneous Questions
6 Kernel Configuration
7 System Administration
8 Networking
9 Serial Communications
0 Preface
---------
Welcome to the FreeBSD 1.1 FAQ! This document tries to answer some of
the most frequently asked questions about FreeBSD 1.1 (or later,
unless specifically indicated). If there's something you're having
trouble with and you just don't see it here, then please send mail to:
<FreeBSD-questions@freefall.cdrom.com>
Some of the instructions here will also refer to auxiliary utilities
in the /usr/src/contrib/FAQ directory. CDROM purchasers and net folks
who've grabbed the FreeBSD 1.1 `srcdist' will have these files. If
you don't have the source distribution, then you can either grab the
whole thing from:
FreeBSD.cdrom.com:pub/FreeBSD/FreeBSD-1.1
Or you can grab only those files you're interested in straight out of
the FreeBSD-current distribution in:
FreeBSD.cdrom.com:pub/FreeBSD/FreeBSD-current/src
0.1: What is FreeBSD?
FreeBSD is a UN*X type operating system based on William Jolitz's port
of U.C. Berkeley's Networking Release 2 to the i386, 386BSD. It is no
longer correct to say that FreeBSD is only 386BSD with the patchkit
applied! There have been many additions and bug fixes made throughout
the entire system, some of the highlights of which are:
More robust and extensive PC device support
System V-style IPC, messaging and semaphores
Shared Libraries
Much improved virtual memory code
Better console driver support
Network booting (diskless) support
/proc filesystem
Yellow Pages support
`LDT' support for WINE (primitive but developing Windows emulation)
Too many additional utilities and applications to mention
0.2: My friends told me that FreeBSD was illegal and I shouldn't use it.
Is this really true?
FreeBSD versions up to and including 1.1 have included code from
Berkeley's Net/2 distribution. UNIX Systems Laboratories (now Novell)
sued Berkeley claiming that Net/2 included some code that belonged to
USL. In February of 1994, USL and Berkeley announced a settlement in
which neither side admitted to doing anything wrong, but UCB agreed to
stop distributing the disputed software.
Since Berkeley will no longer defend this code, we have been requested
to stop distributing it, and will be integrating all the improvements
we have made in the VM system and i386-specific code into Berkeley's
4.4-Lite distribution; the result will form the basis of FreeBSD 2.0.
We expect the integration to take place over a period of three to six
months, during which time we will have to stop work on 1.1 and
concentrate all our efforts on the merge, and we expect to make more
information available on the status of the merge effort as the situation
progresses.
However, to answer the question, "No. FreeBSD is not illegal." We
have been allowed by USL to distribute 1.1 as the last Net/2 derived
version, after which we have committed to move to 4.4 as previously
stated.
We expect to make more information available on the status of the
merge effort as the situation progresses.
0.3: What are the FreeBSD mailing lists, and how can I get on them?
The following mailing lists are provided for FreeBSD users and
developers. For more information, send to
<majordomo@freefall.cdrom.com> and include a single line saying
``help'' in the body of your message.
FreeBSD-announce: For announcements about or on FreeBSD.
FreeBSD-hackers: Useful for persons wishing to work on the internals.
FreeBSD-questions: General questions on FreeBSD.
FreeBSD-bugs: Where bugs should be sent.
FreeBSD-commit: This list carries the commit messages for freefall. Useful
for tracking ongoing work.
FreeBSD-SCSI: Mailing list for SCSI developers.
FreeBSD-current: This list is for persons wishing to run FreeBSD-current
and carries announcements and discussions on current.
Please see also the FreeBSD mailing list FAQ in:
/usr/src/contrib/FAQ/OTHER-FAQS/FreeBSD.mailing-list.FAQ
0.4: What are the various FreeBSD news groups?
While there are no groups currently dedicated to FreeBSD, you may find
the following groups useful.
comp.os.386bsd.announce: For announcements
comp.os.386bsd.apps: For applications
comp.os.386bsd.questions: For questions
comp.os.386bsd.development: For working on the internals
comp.os.386bsd.bugs: About bugs
comp.os.386bsd.misc: For items that don't fit anywhere else
NOTE: These groups cover all the *BSDs (FreeBSD, NetBSD, 386BSD).
1 Installation
--------------
1.1: I just installed my system and rebooted. Now I can't find the
extract or configure programs, where did they go?
These two commands are just shell functions defined in /.profile. To
get these back, boot FreeBSD with a `-s' at the boot prompt.
1.2: I want to install FreeBSD onto a SCSI disk that has more than
1024 cylinders. How do I do it?
This depends. If you don't have DOS (or another operating system) on
the system, you can just keep the drive in native mode and simply make
sure that your root partition is below 1024 so the BIOS can boot the
kernel from it. It you also have DOS/some other OS on the drive then
your best bet is to find out what parameters that it thinks you have
before installing FreeBSD. When FreeBSD's installation procedure
prompts you for these values, you should then enter them rather than
simply going with the defaults.
There is a freely available utility distributed with FreeBSD called
`pfdisk' (located in the tools/ subdirectory) which can be used for
this purpose.
1.3: When I boot FreeBSD it says ``Missing Operating System''.
See question 1.2. This is classically a case of FreeBSD and DOS or
some other OS conflicting over their ideas of disk geometry. You will
have to reinstall FreeBSD, but obeying the instructions given above
will almost always get you going.
1.4: I have an IDE drive with lots of bad blocks on it and FreeBSD doesn't
seem to install properly.
FreeBSD's bad block (bad144) handling is still not 100% (to put it
charitably) and it must unfortunately be said that if you've got an
IDE or ESDI drive with lots of bad blocks, then FreeBSD is probably
not for you! That said, it does work on thousands of IDE based
systems, so you'd do well to try it first before simply giving up.
IDE drives are *supposed* to come with built-in bad-block remapping;
if you have documentation for your drive, you may want to see if this
feature has been disabled on your drive. However, ESDI, RLL, and
ST-506 drives normally do not do this.
<1.1.5>
FreeBSD-current has better bad block handling due to improvments made
to the wd driver.
1.5: I have 32MB of memory, should I expect any special problems?
If you have an IDE controller, no. Likewise, if you have a full EISA
system with EISA disk controller or a working local bus controller
(read further) you'll have no problems. If you have an ISA system, or
an EISA system with an ISA disk controller then you will most
certainly have problems with the upper 16MB of memory due to the ISA
24 bit DMA limitation (which ISA cards in EISA systems will also
exhibit). If you have a local bus disk controller, then you should be
OK, UNLESS it's a Buslogic Bt445S with a revision less than `D' (BIOS
3.36 or earlier).
<1.1.5>
1.1.5 has bounce-buffer support that make all of the above scenarios work
with a full 32MB of memory or more. You are therefore advised to simply pull
16MB of memory out, install, and then see about upgrading to FreeBSD 1.1.5
so that you can put it back.
1.6: Do I need to install the complete sources?
In general, no. However, we would strongly recommend that you
install, at a minimum, the `base' source kit, which includes several
of the files mentioned here, and the `sys' (kernel) source kit, which
includes sources for the kernel. There is nothing in the system which
requires the presence of the sources to operate, however, except for
the kernel-configuration program config(8). With the exception of the
kernel sources, our build structure is set up so that you can
read-only mount the sources from elsewhere via NFS and still be able
to make new binaries. (Because of the kernel-source restriction, we
recommend that you not mount this on /usr/src directly, but rather in
some other location with appropriate symbolic links to duplicate the
top-level structure of the source tree.)
Having the sources on-line and knowing how to build a system with them
will make it much easier for you to upgrade to future releases of
FreeBSD.
1.7: DES encryption software can not be exported from the United
States. If I live outside the US, how can I encrypt passwords?
Since the DES encryption algorithm, which is used by passwd(1) and
friends to encrypt passwords cannot legally be exported from the US,
non-US users should not download this software from US FTP sites.
There is however a replacement libcrypt available, based on sources
written in Australia by David Burren. This code is now available on
some non-US FreeBSD mirror sites. Sources for the unencumbered
libcrypt, and binaries of the programs which use it, can be obtained
from the following FTP sites:
South Africa: braae.ru.ac.za:/pub/FreeBSD/securedist/
owl.und.ac.za (currently uncertain)
Iceland: ftp.veda.is:/pub/crypt/FreeBSD/
The non-US securedist can be used as a direct replacement for the
encumbered US securedist. This securedist package is installed the
same way as the US package (see installation notes for details). If
you are going to install DES encryption, you should do so as soon as
possible, before installing other software.
Non-US users should please not download any encryption software from
the USA. This can get the maintainers of the sites from which the
software is downloaded into severe legal difficulties.
A non-US distribution of Kerberos is also being developed, and current
versions can generally be obtained by anonymous FTP from
braae.ru.ac.za.
There is also a mailing list for the discussion of non-US encryption
software. For more information, send an email message with a single
line saying ``help'' in the body of your message to
<majordomo@braae.ru.ac.za>.
1.8 HELP! My keyboard locked up during the install!
Some keyboard controllers are not a friend to FreeBSD. Among these are
those on certain models of Gateway, IBM and AST machines. The most frequent
symptom encountered in such cases is that the keyboard refuses to respond
to input when at the `kcopy>' prompt in the second phase of bootstrapping
FreeBSD. Fortunately, there is a work-around that may get you all the
way home. Reset the machine and boot the kcopy floppy again, but this
time, as the kernel is booting, tap periodically on the num-lock key
until the kcopy prompt appears. Your keyboard should respond properly.
Once your system is on the hard disk the problem generally goes away.
Some folks for whom the problem persists even after this stage find
relief in switching to the SYSCONS console driver (see /sys/i386/conf/SYSCONS),
which is in any case far more featureful than pccons and a recommended
upgrade.
2 Hardware compatibility
------------------------
2.1: What kind of hard drives does FreeBSD run on?
FreeBSD supports ST-506 (sometimes called ``MFM''), RLL, and ESDI
drives, which are usually connected to WD-1002, WD-1003, or WD-1006
controllers (although clones should also work). FreeBSD also supports
IDE and SCSI hard drives.
2.2: What SCSI controllers are supported?
FreeBSD supports the following SCSI controllers:
Adaptec AH-1542 Series <ISA>
AH-1742 Series <EISA>
Buslogic BT-445 Series <VLB> (but see section 1.5)
BT-545 Series <ISA>
BT-742 Series <EISA>
BT-747 Series <EISA>
Future Domain TMC-8XX/950 Series <ISA> (1.1.5 ONLY)
Seagate ST-01/02 Series <ISA> (1.1.5 ONLY)
UltraStor UH-14f Series <ISA>
UH-34f Series <EISA/VLB>
There is supposed to be a UltraStor 24f driver floating around, but
we're not sure where (could someone please point us at it?).
2.3: What CD-ROM drives are supported by FreeBSD?
Any SCSI drive connected to a supported controller. Mitsumi
LU002(8bit), LU005(16bit) and FX001D(16bit 2x Speed).
FreeBSD does NOT support drives connected to a Sound Blaster or
non-SCSI SONY or Panasonic drives. A general rule of thumb when
selecting a CDROM drive for FreeBSD use is to buy a very standard SCSI
model; they cost more, but deliver very solid performance in return.
Do not be fooled by very cheap drives that, in turn, deliver VERY LOW
performance! As always, you get what you pay for.
The Mitsumi driver is known to be extremely slow compared to SCSI
drives.
2.4: What multi-port serial cards are supported by FreeBSD?
AST/4 and BOCA 4/8/16 port cards. Some unnamed clone cards have also
been known to work, especially those that claim to be AST compatible.
Check the sio(4) man page to get more information on configuring such
cards.
2.5: Does FreeBSD support the AHA-2742 SCSI adapter from Adaptec?
No, FreeBSD does not. This is due to Adaptec's unwillingness to
supply programming information under other than non-disclosure. This
is unfortunate, but there's nothing we can do about it.
2.6: I have a Mumbleco bus mouse. Is it supported and if so, how do I set
it up for XFree86?
FreeBSD supports the Logitech and ATI Inport bus mice. You need to
add the following line to the kernel config file and recompile for the
Logitech and ATI mice:
device mse0 at isa? port 0x23c tty irq6 vector mseintr
2.7: I have a PS/2 mouse (`keyboard' mouse) [Alternatively: I have a
laptop with a track-ball mouse]. How do I use it?
<1.1>: For the PS/2 mouse you need to look in
/usr/src/contrib/FAQ/programs/psm, which is John Solhed's port of the
Linux PS/2 mouse driver.
Follow the directions in the package. You will also need to change
your Xconfig file to point to the mouse.
<1.1.5>: The PS/2 mouse is part of the system. See the psm0 driver
description in /sys/doc/options.doc.
2.8: What types of tape drives are supported under FreeBSD?
FreeBSD supports SCSI, QIC-02 and QIC-40/80 (Floppy based) tape
drives. This includes 8-mm (aka Exabyte) and DAT drives.
2.9: What sound cards are supported by FreeBSD?
FreeBSD supports the SoundBlaster, SoundBlaster Pro, Pro Audio
Spectrum 16, AdLib and Gravis UltraSound sound cards. There is also
limited support for MPU-401 and compatible MIDI cards. The
SoundBlaster 16 and SoundBlaster 16 ASP cards are not yet supported.
NOTE: This is only for sound! This driver does not support CD-ROMs,
SCSI or joysticks on these cards.
2.10: What network cards does FreeBSD support?
There is support for the following cards:
`ed' driver:
NE2000 and 1000
WD/SMC 8003, 8013 and Elite Ultra (8216)
3Com 3c503
And clones of the above
`ie' driver:
AT&T EN100/StarLAN 10
`is' driver:
Isolan AT 4141-0
Isolink 4110
`ep' driver:
3com 3c509 (*)
(*)The `ep' driver is known to have some problems; see the
/usr/src/KNOWNBUGS file for more details.
2.11: I have a 386/486sx/486SLC machine without a math co-processor.
Will this cause me any problems?
Generally no, but there are circumstances where you will take a hit,
either in performance or accuracy of the math emulation code (see
section 4.1). In particular, drawing arcs in X will be VERY slow. It
is highly recommended that you lay out the $50 or so for a math
co-processor; it's well worth it. NOTE: Some math co-processors are
better than others. It pains us to say it, but nobody ever got fired
for buying Intel. Unless you're sure it works with FreeBSD, beware of
clones.
2.12: I am about to buy a new machine to run FreeBSD on and
want an idea of what other people are running. Is there list
of other systems anywhere?
Yes. Please look at the file FAQ/OTHER-FAQS/Systems.FAQ. This file
is a listing of hardware that people are running in their machines.
Please note, this is a raw listing of equipment that other users
have sent in.
3 Commercial Applications
-------------------------
Note: This section is still very sparse, though we're hoping, of
course, that companies will add to it! :) The FreeBSD group has no
financial interest in any of the companies listed here but simply
lists them as a public service (and feels that commercial interest in
FreeBSD can have very positive effects on FreeBSD's long-term
viability). We encourage commercial software vendors to send their
entries here for inclusion.
3.1: Where can I get Motif for FreeBSD?
Sequoia International provides commercial quality Motif 1.2.3
development kits for FreeBSD 1.1 (with full shared library support)
under the product name of `SWiM'. Due to licensing restrictions from
the OSF, and the fact that Sequoia needs to make a living, these are
NOT FREE, but nonetheless quite reasonably priced in comparison to
many other commercial Motif distributions. Send electronic mail to
<info@seq.com> for further information.
3.2: What about other commercial quality development systems for FreeBSD?
ParcPlace Systems, Inc., who currently provides their excellent
`Object Interface & Object Builder' GUI development environment free
of charge to Linux users, is considering the the FreeBSD platform and
will make their intentions known fairly shortly.
4 User Applications
-------------------
4.1: I want to run X, how do I go about it?
First, get the XFree86 distribution of X11R5 from XFree86.cdrom.com.
The version you want for FreeBSD 1.1 and later is XFree86 2.1. Follow
the instructions for installation carefully. You may then wish to read
the documentation for the ConfigXF86 tool, which assists you in
configuring XFree86 for your particular graphics card/mouse/etc.
4.1: I've been trying to run ghostscript on a 386 (or 486sx) with no
math co-processor and I keep getting errors. What's up?
<1.1>: The problem here is due to the current FreeBSD math-emulator. You
need to pick up the sources to an alternate emulation package, which
you may find in:
/usr/src/contrib/FAQ/programs/fpu-emu
Follow the instructions supplied.
This is a port of an older Linux math-emulator. At some point,
FreeBSD's default math emulator will be good enough that you can
forget about having to do this.
<1.1.5>: For 1.1.5 you may add the following to your kernel config file and
it will be compiled in.
options GPL_MATH_EMULATE
NOTE: You will need to remove the MATH_EMULATE option when you do this.
4.2: If I want something like seyon, term, Kermit, emacs or any one of
hundreds of popular freeware utilities, is there a good place to
search through first?
Yes, the FreeBSD `ports collection' was put together for just that
purpose. It contains some of the most often requested languages,
editors, mail and news reading programs, network software and many
many megabytes of other types of useful goodies. CDROM people will
probably have the ports collection already in /usr/ports, other folks
can get at the latest snapshot of the entire collection in:
FreeBSD.cdrom.com:pub/FreeBSD/FreeBSD-current/ports
Note that this FTP server permits getting entire directories as one
(optionally gzipped or compressed) tar file. Read the FTP welcome
banner carefully for details.
4.3: I want all this neat software, but I haven't got the space or
CPU power to compile it all myself. Is there any way of getting
binaries?
Yes. We support the concept of a `package', which is essentially a
gzipped binary distribution with a little extra intelligence embedded
in it for doing any custom installation work required. Packages can
also be installed or deinstalled again easily without having to know
the gory details. CDROM people will have a packages/ directory on
their CD, others can get the currently available packages from:
FreeBSD.cdrom.com:pub/FreeBSD/packages-1.1
Note that all ports may not be available as packages, and that new
packages are constantly being added. It is always a good idea to
check periodically to see which packages are available. A README file
in the packages directory provides more details on the care and
feeding of the package software, so no explicit details will be given
here.
4.4: I'm trying to get Perl to work properly, but I keep getting
errors about dbm failures when I test it. How can I fix this?
The problem here is that the tests are written for an older version of
the dbm code. There is nothing wrong with perl and the errors can
be ignored.
5 Miscellaneous Questions
----------------
5.1: I've heard of something called FreeBSD-current. How do I run it, and
where can I get more information?
Read the file /usr/src/contrib/FAQ/OTHER-FAQS/FreeBSD.current.policy,
it will tell you all you need to know.
5.2: What is this thing called `sup', and how do I use it?
SUP stands for Software Update Protocol, and was developed by CMU for
keeping their development trees in sync. We use it to keep remote
sites in sync with our central development sources.
To use it, you need to have direct internet connectivity (not just
mail or news). First, pick up the sup_bin.tgz package from:
FreeBSD.cdrom.com:pub/FreeBSD/packages
Second, read the file /usr/src/contrib/FAQ/OTHER-FAQS/FreeBSD.sup.faq.
This file describes how to setup sup on your machine. You may also
want to look at /usr/src/contrib/FAQ/OTHER-FAQS/FreeBSD.*.supfile,
which are a set of supfiles for supping from freefall.cdrom.com
5.3: How do I create customized installation disks that I can give
out to other people at my site?
The entire process of creating installation disks and source and
binary archives is automated by various targets in
/usr/src/etc/Makefile. The information there should be enough to get
you started.
5.4: How do I re-build my system without clobbering the existing
installed binaries?
If you define the environment variable DESTDIR while running `make
world' or `make install', the newly-created binaries will be deposited
in a directory tree identical to the installed one, rooted at
${DESTDIR}. Some random combination of shared libraries modifications
and program rebuilds can cause this to fail in `make world', however.
5.5: When my system booted, it told me that ``(bus speed defaulted)''.
What does that mean?
The Adaptec 1542 SCSI host adapters allow the user to configure their
bus access speed in software. Previous versions of the 1542 driver tried
to determine the fastest usable speed and set the adapter to that. We
found that this breaks some users' systems, so you now have to define
the ``TUNE_1542''' kernel configuration option in order to have this
take place. Using it on those systems where it works may make your
disks run faster, but on those systems where it doesn't, your data could
be corrupted.
5.6: I would like to track changes to current and do not have net access.
Is there any way besides downloading the whole tree?
Yes, Poul-Henning has set up a source tracking list. Please email
majordomo@ref.tfs.com with a body of "get ctm-src-cur README" for
futher information.
5.7: How do I split up large binary files into smaller 240k files
like the distribution does?
Newer BSD based systems have a "-b" option to split that allows them to
split files on arbitary byte bondaries.
Here is an example from /usr/src/Makefile.
bin-tarball:
(cd ${DISTDIR}; \
tar cf - . \
gzip --no-name -9 -c | \
split -b 240640 - \
${RELEASEDIR}/tarballs/bindist/bin_tgz.)
5.8: I'm running Syscons and every morning my console locks up. What
is going on here?
This sounds like the "kill -1 syslogd" problem. Make sure that the
following is correct on your system.
1. The attributes of the following nodes are correct.
/dev/console
crw------- 1 root 0, 0 May 23 15:32 /dev/console
/dev/ttyv0
crw------- 1 root 12, 0 May 23 15:32 /dev/ttyv0
The part you are concerned with are the major and minor device numbers.
2. Make sure that getty is running on ttyv0 and NOT console.
3. If /dev/vga exists that it is a symlink to /dev/ttyv0.
5.9: I've had a couple of system panics and would like to be able
browse the system dumps. The normal kernel is stripped and
I don't want to run a bloated kernel. What can I do?
Please retrieve the file FAQ/OTHER-FAQS/FreeBSD.kdebug.FAQ. This
file covers the instructions for looking at system dumps.
6 Kernel Configuration
----------------------
6.1: When I compile a kernel with multi-port serial code, it tells me
that only the first port is probed and the rest skipped due to
interrupt conflicts. How do I fix this?
The problem here is that FreeBSD has code built-in to keep the kernel
from getting trashed due to hardware or software conflicts. The way
to fix this is to leave out the IRQ settings on other ports besides
the first. Here is a example:
#
# Multiport high-speed serial line - 16550 UARTS
#
device sio2 at isa? port 0x2a0 tty irq 5 flags 0x501 vector siointr
device sio3 at isa? port 0x2a8 tty flags 0x501 vector siointr
device sio4 at isa? port 0x2b0 tty flags 0x501 vector siointr
device sio5 at isa? port 0x2b8 tty flags 0x501 vector siointr
6.2: FreeBSD is supposed to come with support for QIC-40/80 drives but
when I look, I can't find it.
You need to uncomment the following line in the generic config file
(or add it to your config file) and recompile.
controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
disk fd0 at fdc0 drive 0
disk fd1 at fdc0 drive 1
#tape ft0 at fdc0 drive 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You will have a device called /dev/ft0, which you can write to through
a special program to manage it called `ft' - see the man page on ft for
further details. Versions previous to -current also had some trouble dealing
wiht bad tape media; if you have trouble where ft seems to go back and forth
over the same spot, try grabbing the latest version of ft from /usr/src/sbin/ft
in current and try that.
6.3: Does FreeBSD support IPC primitives like those in System V?
Yes, FreeBSD supports System V-style IPC. This includes shared
memory, messages and semaphores. You need to add the following lines
to your kernel config to enable them.
options SYSVSHM
options "SHMMAXPGS=64" # 256Kb of sharable memory
options SYSVSEM # enable for semaphores
options SYSVMSG # enable for messaging
Recompile and install.
6.4: Are there any utilities that make configuring a kernel easier?
Well, yes and no. Look in /sys/i386/doc/options.doc (/sys/doc on post
1.1 systems) for a list of kernel options you can set, and what they
do. For a friendlier front-end to the process, see
/usr/src/contrib/configit
6.5: Will FreeBSD ever support other architectures?
Several different groups have expressed interest in working on
multi-architecture support for FreeBSD. If you are interested in
doing so, please contact the developers at
<FreeBSD-hackers@freefall.cdrom.com> for more information on our
strategy for porting.
6.6: I just wrote a device driver for a Foobar Systems, Inc.
Integrated Adaptive Gronkulator card. How do I get the
appropriate major numbers assigned?
This depends on whether or not you plan on making the driver publicly
available. If you do, then please send us a copy of the driver source
code, plus the appropriate modifications to files.i386, a sample
configuration file entry, and the appropriate MAKEDEV code to create
any special files your device uses. If you do not, or are unable to
because of licensing restrictions, then character major number 32 and
block major number 8 have been reserved specifically for this purpose;
please use them. In any case, we'd appreciate hearing about your
driver on <FreeBSD-hackers@freefall.cdrom.com>.
6.7: I'm wanting to switch console drivers to Syscons. I changed my
kernel config file to run Syscons, but when I reboot the system
locks up! How do I fix it?
There are four things that need to be done to properly install syscons
on a system.
1. Add the following line to your kernel config file while deleting the
line for pccons.
device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr
(Note the changed vector 'scintr'. It is a common error to change the
device name but NOT the vector.
2. Add the following option to your config file.
options "NCONS=6" # Change to reflect the number of consoles
3. Modify /etc/ttys to enable gettys on ttyv0 - ttyv??. Here is an
example line.
ttyv0 "/usr/libexec/getty Pc" Pc3 on secure
Please make sure that you have disabled the getty on /dev/console.
4. Create the device nodes in /dev. This is done useing the MAKEDEV
script located in that directory. Here is a command line that will create
6 virtual consoles.
MAKEDEV vty6
If /dev/vga exists, it should now be a symlink to /dev/ttyv0.
NOTE: If you are going to be running X, you will need an unused vty that
has no getty running on it.
7 System Administration
-----------------------
7.1: How do I add a user easily? I read the man page and am more confused
than ever! [Alternatively: I didn't read the man page, I never read
man pages! :-) ]
Look at Gary Clark's Perl package ``AddIt'', which may be found in
/usr/src/contrib/adduser. This is a first attempt at solving the
problem and may be replaced with a more complex but capable solution
later.
7.2: I'm trying to use my printer and keep running into problems. I tried
looking at /etc/printcap, but it's close to useless. Any ideas?
Yes, you can pick up Andreas Klemm's apsfilter package from:
ftp.germany.eu.net:pub/comp/i386/Linux/Local.EUnet/People/akl/apsfilter-1.11.gz
This is a complete package for printing text, PS and DVI files. It
requires ghostscript and dvips.
If you are looking for a simple printcap just for PS and text files,
try picking up the printcap01 sources in:
/usr/src/contrib/FAQ/code/printcap01
NOTE: We're looking for printcap entries for all printers. If you
have one, or a filter for one, please send it or mail us a pointer to
<FreeBSD-FAQ@freefall.cdrom.com>. Thanks!
8 Networking
------------
8.1: Where can I get information booting FreeBSD `diskless', that is
booting and running a FreeBSD box from a server rather than having
a local disk?
Please read /sys/i386/netboot/netboot.doc.
8.2: I've heard that you can use a FreeBSD box as a dedicated network
router - is there any easy support for this?
Internet standards and good engineering practice prohibit us from
providing packet forwarding by default in FreeBSD. You can enable
this support by adding `options GATEWAY' to your kernel configuration
file and recompiling. In most cases, you will also need to run a
routing process to tell other systems on your network about your
router; FreeBSD comes with the standard BSD routing daemon routed(8),
or for more complex situations you may want to try GateD (available by
FTP from gated.Cornell.edu).
It is our duty to warn you that, even when FreeBSD is configured in
this way, it does not completely comply with the Internet standard
requirements for routers; however, it comes close enough for ordinary
usage.
There is a standard `router floppy' that you can boot on a FreeBSD
machine to configure it as a network router. Please look in:
freefall.cdrom.com:pub/incoming/freertr
and follow the instructions.
8.3: Does FreeBSD support SLIP and PPP?
Yes. See the man pages for slattach(8) and/or pppd(8) if you're using
FreeBSD to connect to another site. If you're using FreeBSD as a
server for other machines, look at the man page for sliplogin(8).
You may also want to take a look at the slip FAQ in:
FAQ/OTHER-FAQS/FreeBSD.slip.dialup.faq
8.4: How do I set up NTP?
NTP configuration is so complex and widely variable from site to site
that it would be impossible to make a blanket statement here. Your
best bet is to ask whoever's in charge of NTP at your site or network
provider; chances are that they are running a similar version of NTP
to the one that we provide, and they can probably provide you with the
right configuration files to get things going.
If you can't find anyone in charge, you should examine the files in
/usr/src/contrib/xntpd/doc and see if they help any. If not, you
could ask on the comp.protocols.time.ntp newsgroup, or the
<ntp@ni.umd.edu> mailing-list.
8.5: How do I get my network set up? I don't see how to make my
/dev/ed0 device!
In the Berkeley networking framework, network interfaces are only
directly accessible by kernel code. Please see the /etc/netstart file
and the manual pages for the various network programs mentioned there
for more information. If this leaves you totally confused, then you
should pick up a book describing network administration on another
BSD-related operating system; with few significant exceptions,
administering networking on FreeBSD is basically the same as on SunOS
4.0 or Ultrix.
8.6: How do I get my 3C503 to use the other network port?
Use `ifconfig ed0' to see whether the ALTPHYS flag is set, and then
use either `ifconfig ed0 altphys' if it was off, or `ifconfig ed0
-altphys' if it was on.
8.7: I'm having problems with NFS to/from FreeBSD and my Wuffotronics
Workstation / generic NFS appliance, where should I look first?
Certain PC network cards are better than others (to put it mildly) and
can sometimes cause problems with network intensive applications like
NFS. See /usr/src/contrib/FAQ/OTHER-FAQS/NFS for more information on this
topic.
8.8: I want to enable IP multicast support on my FreeBSD box, how do I do it?
[Alternatively: What the heck IS multicasting and what applications
make use of it?]
First off, to you'll need to rebuild a kernel with multicast support in it.
This requires that you have the sources to at least the kernel and the config
utility. See /usr/src/sys/i386/conf/LINT for its comments on multicast; you'll
need to set the MROUTING and MULTICAST options as shown there.
Further reading/exploration for those interested in multicast:
Product Description Where
--------------- ----------------------- ---------------------------------------
faq.txt Mbone FAQ ftp.isi.edu:/mbone/faq.txt
imm/immserv IMage Multicast ftp.hawaii.edu:/paccom/imm.src.tar.Z
for jpg/gif images.
nv Network Video. ftp.parc.xerox.com:
/pub/net-reseach/exp/nv3.3alpha.tar.Z
vat LBL Visual Audio Tool. ftp.ee.lbl.gov:
/conferencing/vat/i386-vat.tar.Z
wb LBL White Board. ftp.ee.lbl.gov:
/conferencing/wb/i386-wb.tar.Z
mmcc MultiMedia Conference ftp.isi.edu:
Control program /confctrl/mmcc/mmcc-intel.tar.Z
rtpqual Tools for testing the ftp.psc.edu:/pub/net_tools/rtpqual.c
quality of RTP packets.
vat_nv_record Recording tools for vat ftp.sics.se:archive/vat_nv_record.tar.Z
and nv.
[Many thanks to Jim Lowe for providing multicast support for FreeBSD, and this
information]
9 Serial Communications
-----------------------
9.1: When I do a set line in Kermit it locks up, what's the problem?
The problem here is that FreeBSD thinks it's talking to a incoming
modem connection, and is waiting for carrier to come up on it before
completing the open. To disable modem control, do an:
stty -f /dev/ttyXX clocal
(Where `ttyXX' is the tty port you're using). If you use a given port
only for outgoing connections, you may wish to put this command in
your /etc/rc.local to avoid having to do it every time you reboot your
system.
NOTE: Anyone wishing to submit a FAQ entry on how to get tip and cu working
would have it much appreciated! We all use Kermit over here! :-)
-----------------------------------------------------------------------------
If you see a problem with this FAQ, or wish to submit an entry, please
mail us at <FreeBSD-FAQ@freefall.cdrom.com>. We appreciate your
feedback, and cannot make this a better FAQ without your help!
FreeBSD Core Team
-----------------------------------------------------------------------------
ACKNOWLEDGMENTS:
Gary Clark II - Our head FreeBSD FAQ maintenance man
Jordan Hubbard - Janitorial services (I don't do windows)
Garrett Wollman - Networking and formatting
Robert Oliver, Jr. - Ideas and dumb questions (That made me think)
Ollivier Robert - Invaluable feedback and contributions
The FreeBSD Team - Kvetching, moaning, submitting data
And to any others we've forgotten, apologies and heartfelt thanks!

View file

@ -0,0 +1,162 @@
THE FREEBSD CURRENT POLICY
Last updated: $Date: 1994/05/07 11:39:26 $
This document attempts to explain the rationale behind FreeBSD-current,
what you should expect should you decide to run it, and states some
prerequisites for making sure the process goes as smoothly as possible.
1. What is FreeBSD-current?
FreeBSD-current is, quite literally, nothing more than a daily snapshot of
the working sources for FreeBSD. These include work in progress, experimental
changes, and transitional mechanisms that may or may not be present in
the next official release of the software. While many of us compile
almost daily from FreeBSD-current sources, there are periods of time when
the sources are literally uncompilable. These problems are generally resolved
as expeditiously as possible, but whether or not FreeBSD-current sources bring
disaster or greatly desired functionality can literally be a matter of which
part of any given 24 hour period you grabbed them in! Please read on..
Under certain circumstances we will sometimes make binaries for parts of
FreeBSD-current available, but only because we're interested in getting
something tested, not because we're in the business of providing binary
releases of current. If we don't offer, please don't ask! It takes far
too much time to do this as a general task.
2. Who needs FreeBSD-current?
FreeBSD-current is made generally available for 3 primary interest groups:
1. Members of the FreeBSD group who are actively working on one
part or another of the source tree and for whom keeping `current'
is an absolute requirement.
2. Members of the FreeBSD group who are active ALPHA/BETA testers
and willing to spend time working through problems in order to
ensure that FreeBSD-current remains as sane as possible. These
are also people who wish to make topical suggestions on changes
and the general direction of FreeBSD.
3. Peripheral members of the FreeBSD (or some other) group who merely
wish to keep an eye on things and use the current sources for
reference purposes (e.g. for *reading*, not running). These
people also make the occasional comment or contribute code.
3. What is FreeBSD-current _NOT_?
1. A fast-track to getting pre-release bits because there's something
you heard was pretty cool in there and you want to be the first on
your block to have it.
2. A quick way of getting bug fixes.
3. In any way "officially supported" by us.
We do our best to help people genuinely in one of the 3
"legitimate" FreeBSD-current catagories, but we simply DO NOT
HAVE THE TIME to help every person who jumps into FreeBSD-current
with more enthusiasm than knowledge of how to deal with
experimental system software. This is not because we're mean and
nasty people who don't like helping people out (we wouldn't even be
doing FreeBSD if we were), it's literally because we can't answer
400 messages a day AND actually work on FreeBSD! I'm sure if
given the choice between having us answer lots of questions or
continue to improve FreeBSD, most of you would vote for us
improving it (and so would we! :-).
4. Ok. I still think I "qualify" for FreeBSD-current, so what do I do?
1. Join the freebsd-hackers and freebsd-commit mailing lists.
This is not just a good idea, it's ESSENTIAL. If you aren't on
freebsd-hackers, you won't read the comments that people are
making about the current state of the system and thus will end
up stumbling over a lot of problems that others have already
found and solved. Even more importantly, you will miss out on
potentially critical information (e.g. "Yo, Everybody! Before you
rebuild /usr/src, you MUST rebuild the kernel or your system
will crash horribly!").
The freebsd-commit list will allow you to see the commit log
entry for each change as its made. This can also contain
important information, and will let you know what parts of the
system are being actively changed.
To join these lists, send mail to `majordomo@freefall.cdrom.com'
and say:
subscribe freebsd-hackers
subscribe freebsd-commit
In the body of your message. Optionally, you can also say `help'
and MajorDomo will send you full help on how to subscribe and
unsubscribe to the various other mailing lists we support.
2. Grab the sources from freebsd.cdrom.com. You can do this in
two ways:
1. Use the CMU `sup' program (Software Update Protocol).
This is the most recommended method, since it allows you
to grab the entire collection once and then only what's
changed from then on. Many people run sup from cron
and keep their sources up-to-date automatically.
To get a binary of the sup program for FreeBSD, as well
as the documentation and some sample configuration files,
look in:
freefall.cdrom.com:~ftp/pub/sup
2. Use ftp. The source tree for FreeBSD-current is always
"exported" on:
freebsd.cdrom.com:~ftp/pub/FreeBSD/FreeBSD-current
We use `wu-ftpd' which allows compressed/tar'd grabbing
of whole trees. e.g. you see:
usr.bin/lex
You can do:
ftp> cd usr.bin
ftp> get lex.tar.Z
And it will get the whole directory for you as a compressed
tar file.
3. If you're grabbing the sources to run, and not just look at,
then grab ALL of current, not just selected portions. The
reason for this is that various parts of the source depend on
updates elsewhere and trying to compile just a subset is almost
guaranteed to get you into trouble.
4. Before compiling current, read the Makefile in /usr/src
carefully. You'll see one-time targets like `bootstrapld'
which *MUST* be run as part of the upgrading process. Reading
freebsd-hackers will keep you up-to-date on other bootstrapping
procedures that sometimes become necessary as we move towards
the next release.
5. Be active! If you're running FreeBSD-current, we want to know
what you have to say about it, especially if you have suggestions
for enhancements or bug fixes. Suggestions with accompanying code
are received most enthusiastically! :-)
Thank you for taking the time to read this all the way through. We're
always very keen to remain "open" and share the fruits of our labor
with the widest possible audience, but sharing development sources has
always had certain pitfalls associated with it (which is why most
commercial organizations won't even consider it) and I want to make
sure that people at least come into this with their eyes open, and
don't make the leap unless they're good at working without a net!
Jordan

View file

@ -0,0 +1,33 @@
Kernel debugging FAQ
FreeBSD
Last modified: $Id: FreeBSD.kdebug.FAQ,v 1.1 1994/06/12 15:12:21 gclarkii Exp $
Here are some instructions for getting kernel debugging working on
a crash dump, it assumes that you have enough swap space for a crash
dump.
*** Start ***
Config you're kernel using config -g
Remove ${STRIP} -x $@; from the Makefile for the kernel so it doesn't
get stripped.
When the kernel's been built make a copy of it, say 386BSD.debug, and
then run strip -x on the original. Install the original as normal.
Now, after a crash dump, go to /sys/compile/WHATEVER and run kgdb. From kgdb
do:
symbol-file 386BSD.debug
exec-file /var/crash/system.0
core-file /var/crash/ram.0
and viola, you can debug the crash dump using the kernel sources just like
you can for any other program.
Paul Richards, FreeBSD core team member.

View file

@ -0,0 +1,77 @@
THE FREEBSD MAILING LIST FAQ
Last updated: $Date: 1994/05/07 11:42:03 $
Though many of the FreeBSD development members read USENET, we cannot
always guarantee that we'll get to your questions in a timely fashion
(or at all) if you post them only to one of the comp.os.386bsd.*
groups. By addressing your questions to the appropriate mailing list
you will reach both us and a concentrated FreeBSD audience, invariably
assuring a better (or at least faster) response.
The following is a summary of the mailing lists:
List Purpose
-----------------------------------------------------------------------------
freebsd-admim Administrative issues (limited)
freebsd-arch Architecture and design discussions (limited)
freebsd-scsi Discussions concerning the SCSI system
freebsd-bugs Bug reports
freebsd-tz Discussions of proper timezone handling
freebsd-hackers Technical discussions and suggestions
freebsd-questions User questions
freebsd-announce Important events / milestones
freebsd-current Discussions about the use of FreeBSD-current
-----------------------------------------------------------------------------
Of all the lists, freebsd-arch and freebsd-admin have closed memberships
limited to a small subset of core team members and developers, though anyone
is free to send suggestions and commentary to them. The other lists may
be freely joined by anyone.
All mailing lists live on `freefall.cdrom.com', so to post to a list you
simply mail to `<listname>@freefall.cdrom.com'. It will then be redistributed
to mailing list members throughout the world.
To subscribe to a list, send mail to:
majordomo@freefall.cdrom.com
And include the keyword
subscribe <listname> [<optional address>]
In the body of your message. For example, to subscribe yourself to
freebsd-hackers, you'd do:
% mail majordomo@freefall.cdrom.com
subscribe freebsd-hackers
^D
If you want to subscribe yourself under a different name, or submit a
subscription request for a local mailing list (note: this is more efficient
if you have several interested parties at one site, and highly appreciated by
us!), you would do something like:
% mail majordomo@freefall.cdrom.com
subscribe freebsd-hackers local-hackers@somesite.com
^D
Finally, it is also possible to unsubscribe yourself from a list, get a
list of other list members or see the list of mailing lists again by
sending other types of control messages to majordomo. For a complete
list of available commands, do this:
% mail majordomo@freefall.cdrom.com
help
^D
Finally, it is suggested that you only join the freebsd-hackers or
freebsd-questions mailing lists if you're also willing to see upwards
of 100 messages a day (peak)! If you're only interested in the "high points",
then it's suggested that you join freebsd-announce, which will contain
only infrequent traffic.
Thank you!

View file

@ -0,0 +1,18 @@
ports-audio release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/ports delete compress
ports-base release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/ports delete compress
ports-comm release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/ports delete compress
ports-db release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/ports delete compress
ports-devel release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/ports delete compress
ports-editor release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/ports delete compress
ports-game release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/ports delete compress
ports-lang release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/ports delete compress
ports-mail release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/ports delete compress
ports-math release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/ports delete compress
ports-net release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/ports delete compress
ports-news release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/ports delete compress
ports-print release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/ports delete compress
ports-shell release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/ports delete compress
ports-util release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/ports delete compress
ports-x11 release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/ports delete compress

View file

@ -0,0 +1,172 @@
***********************************************************************
*** How to Set Up SLIP on FreeBSD ***
***********************************************************************
Last updated: $Date: 1994/06/01 09:03:08 $
$Id: FreeBSD.slip.dialup.faq,v 1.1 1994/06/01 09:03:08 asami Exp $
The following is I (asami) set up my FreeBSD machine for SLIP on a
static host network. For dynamic hostname assignments (i.e., your
address changes each time you dial up), you probably need to do
something much fancier.
This is just "what I did, and it worked for me". I'm sharing this
just for your reference, I'm no expert in SLIP nor networking so your
mileage may vary.
First, make sure you have
pseudo-device sl 2
in your kernel's config file. It is included in the GENERICAH and
GENERICBT kernels, so this won't be a problem unless you deleted it.
Things you have to do only once:
(1) Add your home machine, the gateway and nameservers to your
/etc/hosts file. Mine looks like this:
127.0.0.1 localhost loghost
136.152.64.181 silvia.HIP.Berkeley.EDU silvia.HIP silvia
136.152.64.1 inr-3.Berkeley.EDU inr-3 slip-gateway
128.32.136.9 ns1.Berkeley.edu ns1
128.32.136.12 ns2.Berkeley.edu ns2
By the way, silvia is the name of the car that I had when I was
back in Japan (it's called 2?0SX here in U.S.).
(2) Make sure you have "hosts" before "bind" in your /etc/host.conf.
Otherwise, funny things may happen.
(3) Edit the /etc/netstart and add this to the end of the file:
# set up slip
gateway=slip-gateway
ifconfig sl0 inet $hostname $gateway netmask 0xffffff00
route add default $gateway
Note that because of the "slip-gateway" entry in /etc/hosts, there
is no local dependency in the netstart file. Also, you might want
to un-comment the "route add $hostname localhost" line.
(3') Make a file /etc/resolv.conf which contains:
domain HIP.Berkeley.EDU
nameserver 128.32.136.9
nameserver 128.32.136.12
As you can see, these set up the nameserver hosts. Of course, the
actual addresses depend on your environment.
(4) Set the password for root and toor (and any other accounts that
doesn't have a password). Use passwd, don't edit the passwd or
passwd.master files!
(5) Edit /etc/myname and reboot the machine.
How to set up the connection:
(6) Dial up, type "slip" at the prompt, enter your machine name and
password. The things you need to enter depends on your
environment. I use kermit, with a script like this:
# kermit setup
set modem hayes
set line /dev/tty01
set speed 57600
set parity none
set flow rts/cts
set terminal bytesize 8
set file type binary
# The next macro will dial up and login
define slip dial 643-9600, input 10 =>, if failure stop, -
output slip\x0d, input 10 Username:, if failure stop, -
output silvia\x0d, input 10 Password:, if failure stop, -
output ***\x0d, echo \x0aCONNECTED\x0a
(of course, you have to change the hostname and password to fit
yours). Then you can just type "slip" from the kermit prompt to
get connected.
Note: leaving your password in plain text anywhere in the
filesystem is generally a BAD idea. Do it at your own risk. I'm
just too lazy.
If kermit doesn't give you a prompt, try "stty -f /dev/tty01
clocal". I put this in /etc/rc.local so that it works the first
time I boot the machine.
(7) Leave the kermit there (you can suspend it by "z") and as root,
type
slattach -h -c -s 57600 /dev/tty01
if you are able to "ping" hosts on campus, you are connected!
If it doesn't work, you might want to try "-a" instead of "-c".
(8) Happy slipping!
How to shutdown the connection:
(9) Type "ps gx" (as root) to find out the PID of slattach, and use
"kill -INT" to kill it.
Then go back to kermit ("fg" if you suspended it) and exit from it
("q").
The slattach man page says you have to use "ifconfig sl0 down" to
mark the interface down, but this doesn't seem to make any
difference for me. ("ifconfig sl0" reports the same thing.)
Some times, your modem might refuse to drop the carrier (mine
often does). In that case, simply start kermit and quit it again.
It usually goes out on the second try.
When you want to connect again, go back to (6). You may have to
watch out for clocal mode. If "stty -f /dev/tty01" doesn't tell
you it's clocal, you need to re-set it before kermitting.
TROUBLESHOOTING:
If it doesn't work, feel free to ask me. The things that people
tripped over so far:
* Not using "-c" or "-a" in slattach (I have no idea why this can be
fatal, but adding this flag solved the problem for at least one
person)
* Using "s10" instead of "sl0" (might be hard to see the difference on
some fonts :)
Try "ifconfig sl0" to see your interface status. I get:
silvia# ifconfig sl0
sl0: flags=10<POINTOPOINT>
inet 136.152.64.181 --> 136.152.64.1 netmask ffffff00
Also, "netstat -r" will give the routing table, in case you get the
"no route to host" messages from ping. Mine looks like:
silvia# netstat -r
Routing tables
Destination Gateway Flags Refs Use IfaceMTU Rtt
Netmasks:
(root node)
(root node)
Route Tree for Protocol Family inet:
(root node) =>
default inr-3.Berkeley.EDU UG 8 224515 sl0 - -
localhost.Berkel localhost.Berkeley UH 5 42127 lo0 - 0.438
inr-3.Berkeley.E silvia.HIP.Berkele UH 1 0 sl0 - -
silvia.HIP.Berke localhost.Berkeley UGH 34 47641234 lo0 - 0.438
(root node)
(this is after transferring a bunch of files, your numbers should be
smaller).
---
Satoshi Asami
asami@cs.berkeley.edu

View file

@ -0,0 +1,16 @@
base release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/src delete old compress
bin release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/src delete old compress
contrib release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/src delete old compress
crypt release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/src delete old compress
etc release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/src delete old compress
games release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/src delete old compress
gnu release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/src delete old compress
include release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/src delete old compress
ksrc release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/src delete old compress
lib release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/src delete old compress
libexec release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/src delete old compress
sbin release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/src delete old compress
share release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/src delete old compress
usrbin release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/src delete old compress
usrsbin release=current host=freefall.cdrom.com hostbase=/home base=/usr prefix=/usr/src delete old compress

View file

@ -0,0 +1,98 @@
FreeBSD
Sup FAQ
Last updated: $Date: 1994/05/11 22:40:48 $
SUP is a network based software update tool developed at CMU. The
purpose of this document is get the beginner up and running with sup.
First off you will need to pick up the sup binaries. The easiest
way of doing this is to grab the sup_bin.tgz package from:
freebsd.cdrom.com:~ftp/pub/FreeBSD/packages
(FreeBSD 1.1 or later)
freebsd.cdrom.com:~ftp/pub/FreeBSD/packages-1.0
(FreeBSD 1.0.2 or earlier)
Install the sup package using pkg_add and add the following line to your
/etc/services file:
sup 871/tcp #sup
SUP gets the information it needs to run from a configuration file
called a supfile. This file tells sup what collections it will be updating
and/or installing and where they go. There are already two files that
have been created for supping FreeBSD, both of which may be gotten from:
freebsd.cdrom.com:~ftp/pub/FreeBSD/FAQ/OTHER-FAQS
The file `FreeBSD.standard.supfile' is used for supping from the
/usr/src tree, the file `FreeBSD.ports.supfile' for the /usr/ports tree.
These two files can be installed whereever it is convient to do so.
Next you will have to comment out whichever distributions you do
not wish to receive with a # at the begining of the distribution line.
You will find a list of distributions and a description for each at the
end of this file.
Once this is setup, you're ready to go.
To start sup type:
sup supfile
If you wish to see what sup is doing "verbosely", give it the -v option,
like so:
sup -v supfile
Thats all there is to it! Remember that if you're running current,
which is what you will have if you sup, please join the freebsd-current
mailing list. For more information on current please see the file:
freefall.cdrom.com:~ftp/pub/FreeBSD/FAQ/OTHER-FAQS/FreeBSD.current.policy
Gary Clark II
FreeBSD maintainance person
----
FreeBSD SUP distributions
From FreeBSD.standard.supfile:
base: Just those files at the top of /usr/src.
bin: /bin
contrib: Sources to programs located in /usr/src/contrib, including the FAQ.
crypt: Sources to libcrypt. NOTE: This is for use by US and Canadians only!!
etc: /etc
games: /usr/games
gnu: Software that is under the GPL, like gcc, groff and uucp.
include: /usr/include
ksrc: The kernel sources
lib: /usr/lib
libexec: /usr/libexec
sbin: /sbin
usrbin: /usr/bin
usrsbin: /usr/sbin
From FreeBSD.ports.supfile
ports-audio: Audio applications
ports-base: Just those files at the top of /usr/ports.
ports-comm: Communications software
ports-db: Database software
ports-devel: Development software
ports-editor: Editing software
ports-game: Game software
ports-lang: Programming Languages
ports-mail: Mail software
ports-math: Math software
ports-net: Network software
ports-news: USENET news software
ports-print: Printing software
ports-shell: User shell software
ports-util: Utility software
ports-x11: X11 software

View file

@ -0,0 +1,70 @@
[ Note: You could very well simply substitute the word "NetBSD" for Linux
in the argument that follows ]
From time to time, a thread in both the comp.os.386bsd.misc and
comp.os.linux.misc groups flares up regarding which operating system is
"better", FreeBSD or Linux. This generally provokes controversy from
users on both sides, with one group claiming that their OS is "better"
for some reason and the other group claiming that the first group
doesn't know what the heck it's talking about.
Both arguments are a waste of time.
Rather than trying to win a rather questionable debate on relative
(and constantly changing) technical merits, we should be asking ourselves
what both groups are REALLY about and what they represent. This is
naturally going to be a matter of personal opinion, but I believe even the
most seriously at-odds members would agree that both operating systems
represent a unique and long-awaited opportunity: The ability to run a
fully featured operating system on popular, easily affordable hardware
and for which all source code is freely available.
Those who have been in computing for awhile will remember when the term
`operating system' referred almost exclusively to something provided solely
by the hardware vendor, with very little in the way of alternative options.
It was never EVER given out with source code, and true "wizard" status could
only be achieved by exerting mind-numbing amounts of effort and patience in
digging through forbidden bits of binary data. By comparison, the situation
today seems almost too good to be true! Certainly, the feeling of achievement
that came from finally ferreting out some esoteric bit of information from
a 4MB printed system dump was high, but I don't think that anyone would argue
that it was hardly the most optimal way of truly getting to know your
operating system! :-)
So now, within a very short space of time, we're almost spoiled for choice in
having machines several times more powerful than the first multi-user VAX
machines and available for under $2000, and we've got not one but SEVERAL
perfectly reasonable free operating systems to chose from. We are in a
comparative paradise, and what are some of us doing? *Complaining* about it!
I suppose too much is never enough, eh? :-)
So, my essential point is simply this: For the first time ever we
have what previous computing generations could only dream about;
powerful computers at a reasonable prices and a wonderful selection of
things to run on them. Be happy, read the source code you're so
privileged to now have available (*believe* me! What I wouldn't have
given, even 5 years ago!) and spend your energy in making constructive
use of it, not in arguing with the guys on the other side of the
fence!
Additionally, it should be said that none of the FreeBSD team has
anything but the highest degree of respect for Linus Torvalds and his
"team" of dedicated volunteers (and we occasional exchange gripe mail
about the huge volume of messages each of us gets as a direct result
of being insane enough to volunteer to do something like this :-).
Our common commitment to the Intel platform also gives us more common
ground (and interests) than one might think and, if anything, it's a pity
that we do not endevor to share more code and effort - ideologically,
at least, I'd say we share pretty similar goals.
As to which is "best", I have only one standard reply: Try them both,
see for yourself, think for yourself. Both groups have given you
something for free, at considerable personal effort, and the least you
can do is give them the benefit of exerting enough effort to try what
they're offering out before passing judgment (or worse, blindly
accepting someone else's!).
Whichever you run, you're getting a great deal - enjoy!
Jordan Hubbard

View file

@ -0,0 +1,77 @@
FreeBSD and NFS [for a FAQ]
Certain Ethernet adapters for ISA PC systems have limitations which
can lead to serious network problems, particularly with NFS. This
difficulty is not specific to FreeBSD, but FreeBSD systems are affected
by it.
The problem nearly always occurs when (FreeBSD) PC systems are networked
with high-performance workstations, such as those made by Silicon Graphics,
Inc., and Sun Microsystems, Inc. The NFS mount will work fine, and some
operations may succeed, but suddenly the server will seem to become
unresponsive to the client, even though requests to and from other systems
continue to be processed. This happens to the client system, whether the
client is the FreeBSD system or the workstation. On many systems, there is
no way to shut down the client gracefully once this problem has manifested
itself. The only solution is often to reset the client, because the NFS
situation cannot be resolved.
Though the "correct" solution is to get a higher performance and capacity
Ethernet adapter for the FreeBSD system, there is a simple workaround that
will allow satisfactory operation. If the FreeBSD system is the SERVER,
include the option "wsize=1024" on the mount from the client. If the
FreeBSD system is the CLIENT, then mount the NFS file system with the
option "rsize=1024". These options may be specified using the fourth
field of the fstab entry on the client for automatic mounts, or by using
the "-o" parameter of the mount command for manual mounts.
In the following examples, "fastws" is the host (interface) name of a
high-performance workstation, and "freebox" is the host (interface) name of
a FreeBSD system with a lower-performance Ethernet adapter. Also,
"/sharedfs" will be the exported NFS filesystem (see "man exports"), and
"/project" will be the mount point on the client for the exported file
system. In all cases, note that additional options, such as "hard" or
"soft" and "bg" may be desireable in your application.
Examples for the FreeBSD system ("freebox") as the client:
in /etc/fstab on freebox:
fastws:/sharedfs /project nfs rw,rsize=1024 0 0
as a manual mount command on freebox:
mount -t nfs -o rsize=1024 fastws:/sharedfs /project
Examples for the FreeBSD system as the server:
in /etc/fstab on fastws:
freebox:/sharedfs /project nfs rw,wsize=1024 0 0
as a manual mount command on fastws:
mount -t nfs -o wsize=1024 freebox:/sharedfs /project
Nearly any 16-bit Ethernet adapter will allow operation without the above
restrictions on the read or write size.
For anyone who cares, here is what happens when the failure occurs, which
also explains why it is unrecoverable. NFS typically works with a "block"
size of 8k (though it may do fragments of smaller sizes). Since the maximum
Ethernet packet is around 1500 bytes, the NFS "block" gets split into
multiple Ethernet packets, even though it is still a single unit to the
upper-level code, and must be received, assembled, and ACKNOWLEDGED as a
unit. The high-performance workstations can pump out the packets which
comprise the NFS unit one right after the other, just as close together as
the standard allows. On the smaller, lower capacity cards, the later
packets overrun the earlier packets of the same unit before they can be
transferred to the host and the unit as a whole cannot be reconstructed or
acknowledged. As a result, the workstation will time out and try again,
but it will try again with the entire 8K unit, and the process will be
repeated, ad infinitum.
By keeping the unit size below the Ethernet packet size limitation, we
ensure that any complete Ethernet packet received can be acknowledged
individually, avoiding the deadlock situation.
Overruns may still occur when a high-performance workstations is slamming
data out to a PC system, but with the better cards, such overruns are
not guarranteed on NFS "units". When an overrun occurs, the units affected
will be retransmitted, and there will be a fair chance that they will be
received, assembled, and acknowledged.
--
John Lind, Starfire Consulting Services
E-mail: john@starfire.MN.ORG USnail: PO Box 17247, Mpls MN 55417

View file

@ -0,0 +1,266 @@
Systems FAQ
For FreeBSD
Last Modified: $Id: Systems.FAQ,v 1.1 1994/06/11 17:59:19 gclarkii Exp $
This FAQ is a list of systems that people have sent to the FAQ maintnance
person for inclusion. If you have a system you would like to be included
please send it to FreeBSD-FAQ@freefall.cdrom.com.
Disclaimer: This document is composed of systems that people have sent to
the FAQ maintnance person. It is the not to be taken as an endorsement
for any system or manufacture.
1.
386DX/20 real AMI, ISA
Oak SVGA (no X)
8MB
Adaptec 1542B, WD1007V ESDI
Wren VI and Miniscribe 660MB 20Mbit/sec ESDI
WD 8013EBT
2.
486DX/25 clone, AMI BIOS, ISA
Orchid PCIII gas plasma (yes, VGA16)
8MB
Adaptec 1542B
Micropolis 1684 SCSI
SMC 8013EEWC
3.
??? OPTI chipset AMI BIOS 486/50 ISA
ISA ET4000 w/ X11 (not so slow)
16 Mb - 48 Mb swap
ISA aha1542 B
ISA no-name IDE w/ floppies
FUJITSU M2623S-512 405MB set to SCSI2
SEAGATE ST3283N 237MB SCSI2
SANYO CRD-400I SCSI2 cdromcdrom
4.
Lipizzan LDO-1 486DX-33 motherboard
Orchid ProIIs (1M) video
8 MB memory
Generic 2S/1P/2FD/IDE controller:
Maxtor 7213 AT
WDC AC2420H
PAS-16 + Sony CDU31A CD drive (Fusion 16 package).
*** The CD drive does not currently work with FreeBSD.
5.
Asus VL/ISA-486SV2 (ISA-VLB as you can see)
Orchid Fahrenheit 1280+ VLB (yes)
20MB
Some no-name IDE VLB controller
Conner CP30504 (I think....the 540MB IDE one)
Zoltrix 14.4/14.4 Fax/Modem on tty01
Intel 486DX2/66 CPU + fan
Conner CP30104 (120MB....for DOS)
6.
AIR 486El (running with AMD486/40)
ATI Graphics Ultra Pro running XFree862.1
16M
Adaptec 1742
Micropolis 2217
Wangtec 6130FS DAT drive (Some problems)
7.
Compudyne 486 DX2/66
ATI Local Bus GUP w/ 2megs
16 Megs Memory
504 IDE Hard Drive
Colorado 250 meg QIC-80 tape drive
8.
American Megatrends Enterprise III, 486DX2-66
ATI VLB Mach 32 (with X)
16 meg
Adaptec 1742 EISA SCSI with floppy
Toshiba 5030 SCSI-II
Toshiba 5157 SCSI-II
SMC Elite16T ISA Ethernet (ISA)
9.
American Megatrends Enterprise III, 486DX
ATI VLB Mach 32 (with X)
32 meg
Adaptec 1742 EISA SCSI with floppy
Maxtor P0-12S SCSI
Digital DSP5200S SCSI-II
Pro Audio Spectrum 16
Wonder Board, 4 serial (16550), 3 parallel, each on a different interrupt
10.
NoName 486DX/33, Intel Chipset, EISA-Bus
ATI Graphics Ultra Pro EISA,
17" Nanao (Eizo) F550-i Monitor
Running the Mach32 X-Server XFree86-2.1.1 with fonts created from source.
16 MB RAM (planning to add another 8 MB).
AHA1742A
Conner CP3100
Fujitsu 520 MB
Archive 525MB streamer tape.
Gravis UltraSound - works for mod-files.
11.
ASUS SP3 PCI Board with i486 DX/2 66 MHz
ISA ET4000 (I already tested a S3 805 PCI card successfully)
Adaptec 1542B
Toshiba XM3301TA CD-Rom
CDC Harddisk, 572 MB (I don't know the exact specs)
12.
Mylex MAE486/33 EISA Motherboard
16MB memory
Actix GE32+ S3 801 gfx
Adaptec 1742A controller
Seagate ST3160 drive
Seagate ST5120 drive
Archive Viper 150MB tape
Roland SCC-1 sound card
Gravis Ultrasound card
Longshine SMC/Novell compatable ethernet card
13.
Model: DECpc LPv 466d2
Config: Local (Motherboard) S3 801 gfx, IDE controller, PS/2 mouse, 12MB memory
14.
??? 486/DX266 EISA/VLB Motherboard
16MB memory
#9 GXE L12 VLB 3MB graphics card
Bt445S VLB disk controller
DEC DSP3105S drive
MAXSTOR P-17S drive
Tandberg 525MB tape drive
Toshiba XM3301 CDROM
Soundblaster 2.0
Longshine SMC/Novell compatable ethernet card
15.
M407 PC chips with 33Mhz 486.
Had to disable external cache due to DMA problems. Board uses write-through
cache unless a second chip is added to allow write-back.write-back.
Orchid ProDesigner II (yes)
16Mb
IDE
Maxtor 7213 AT and Maxtor 7120 AT
2 BICC Isolans (Lance based cards)
16.
Gigabyte EISA/VLB motherboard with SIS chipset, AMI bios, 32 MB ram
Adaptec 1742 SCSI 2 controller with floppy controller enabled
Spea/V7 Mirage - S3/805 based localbus graphics card with 1 MB d-ram
no name wd8013 compatible ethernet card
Gravis Ultrasound card with 1 MB ram
2 Fujitsu 400 MB and 1 Seagate 500 MB SCSI 2 harddisks
5 1/4 + 3 1/2 inch floppy drives
Tandberg TDC3600 60 MB + Tandberg TDC3800 525 MB Streamer (these don't work
quite properly yet)
17.
i486DX33, 16 Mb RAM, 256 Kb external cache, VLB board
no-name IDE/floppy controller
Western Digital Caviar 2340 (325 Mb)
Kalok KL-343 (40 Mb)
Chips & Technologies 451 SuperVGA card (800x600, 16 colours, 256Kb)
18.
no name EISA i486DX/33 board, 16 MB RAM
Adaptec AHA-1540*A* (not knowing if the current -current might cause
problems, my kernel is from end of march)
Maxtor MXT-1240S, 1.2Gig very fast SCSI disk
Seagate ST-1144A, just to boot off the beast (also has a messdos partition yet)
Archive Viper 150 tape; has a firmware braindeadness when appending files,
works very well otherwise
ELSA Winner 1000 ISA/EISA, 1MB VRAM, S3 86C928 (unfortunately, D-step chip)
Nokia 447-B 17in monitor, running ~ 1100x800 resolution, very nice
true `Mouse Systems' optical mouse, fine thing!
sometimes a Toshiba XM-3301 CDROM, rather old, but solid & reliable
19.
older south-east Asia made notebook, i386SX/16, 5 MB RAM (where the 384 k hole
can be re-mapped, so all the 5 MB are useable)
Seagate ST-9145AG, 120 MB 2.5in IDE disk, very low power consumption, but
rather slow transfer rate, only about 350 K/s, so paging is a mess
640x480 LCD, ~ 16 gray tones distinguishable, Cirrus Logic CL-GD610/620
chipset; runs generic VGA-Mono and VGA-16 XFree86[tm] servers; needs
some hacks in rc.local to give full contrast when running with the
pcvt display driver (due to their different default attribute handling)
20.
Data General Dasher 386sx/16, 8 MB RAM
Adaptec AHA-1542B
Seagate ST-3655N, 525 MB SCSI disk
Conner CP-3044, 40 MB IDE disk
has been working with a Western Digital WD-1007V ESDI controller (on
secondary wdc address), and a Micropolis 1664-7 330 MB ESDI disk -
but this beast was terribly slow, loud (& unreliable) and therefore
had to go
ET-3000 based 512 K VGA, slow (wrt. XFree86), but reliable
3Com 3C503 Ethernet adaptor, suffers from the `do not nfs mount with
too large packets' problem, but works well otherwise
`Mouse Systems' optical mouse
Toshiba XM-3301 CDROM
already ran with a Micropolis 1664-3 330 MB SCSI disk (same drive as
above, but different interface)
already ran with an IBM 2Gig SCSI disk (don't remember the type)
21.
Mylex MNA 486/33 EISA Motherboard
16Mb of Memory
1.2 GB Toshiba 538 SCSI disk
400Mb IBM SCSI disk
150/250Mb Tandberg SCSI tape drive
Toshiba 3401 SCSI CD-ROM
Tseng 4000 Video Controller
Logitech Bus Mouse
Mediavision Pro Audio Stereo Sound Card
Adaptech 1742A SCSI controller
WD8013EBT Ethernet Card
22.
386DX-40 w/Cyrix math co-processor
ET-4000 running X
16MB
IDE
540MB Western Digital
WD8003EP

View file

@ -0,0 +1,22 @@
#
# Makefile for the FAQ/printcap
#
PROG = hpf
SRCS = hpf.c
install:
if test -d /usr/libexec/lpr; \
then \
true; \
else \
mkdir /usr/libexec/lpr;
fi;
install -c -o bin -g bin -m 555 hpf /usr/libexec/lpr
install -c -o bin -g bin -m 555 ps2lj3 /usr/libexec/lpr
install -c -o bin -g bin -m 555 printcap.sample /etc/printcap
.include <bsd.prog.mk>

View file

@ -0,0 +1,14 @@
This print cap package was created by Curt Mayer. Please contact hime for more
information.
Curt Mayer
curt@toad.com
415-387-0217 home
To install this package, type make then make install. This will copy the
printcap.sample to /etc/printcap and create the directory /usr/libexec/lpr
and copy the hpf filter to there.
Thanks
Gary Clark II
FreeBSD FAQ Person

View file

@ -0,0 +1,38 @@
/*
source to my hp filter, installed as /usr/libexec/lpr/hpf:
*/
#include "stdio.h"
#include <signal.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sgtty.h>
main(ac, av)
int ac;
char **av;
{
int c;
struct sgttyb nbuf;
unsigned long lbits;
setbuf(stdout, NULL);
lbits = LDECCTQ | LPASS8 | LLITOUT;
ioctl(fileno(stdout), TIOCLSET, &lbits);
ioctl(fileno(stdout), TIOCGETP, &nbuf);
nbuf.sg_flags &= ~(ECHO | XTABS | CRMOD);
ioctl(fileno(stdout), TIOCSETP, &nbuf);
fputs("\033E\033&k2G", stdout);
while (1) {
if ((c = getchar()) != EOF) {
putchar(c);
} else {
break;
}
}
fputs("\033&l0H", stdout);
exit(0);
}

View file

@ -0,0 +1,9 @@
ps|postscript emulation:\
:lp=/dev/lpa0:sd=/var/spool/lpd:lf=/var/log/lpd-errs:\
:if=/usr/libexec/lpr/ps2lj3:sh:mx#0:sf:
lp|epson|lj|local line printer:\
:lp=/dev/lpa0:sd=/var/spool/lpd:lf=/var/log/lpd-errs:\
:if=/usr/libexec/lpr/hpf:\
:sh:mx#0:pw#80:

View file

@ -0,0 +1,4 @@
#!/bin/sh
/usr/gnu/bin/gs -dNOPAUSE -r300 -q -sDEVICE=ljet3 -sOutputFile=- -f -

View file

@ -1,6 +1,6 @@
# $Id: Makefile,v 1.3 1993/12/21 21:18:14 wollman Exp $
# $Id: Makefile,v 1.5 1994/06/15 21:08:47 jkh Exp $
SUBDIR= tcpdump xntpd
SUBDIR= crunch manctl tcpdump xntpd
# Not ported: isode

249
contrib/adduser/AddIt Executable file
View file

@ -0,0 +1,249 @@
#!/usr/local/bin/perl
# Copyright (c) 1994 GB Data Consulting
# All rights reserved.
# VERSION 0.8 BETA
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of the Author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
# 4. This license extends only to beta and network distributed versions.
# All even number versions are non-network.
# THIS SOFTWARE IS PROVIDED BY GB DATA AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL GB DATA OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
# You will need to define these if you wish to have defaults or use
# that function.
$defgroupid = 30; # Default ID
$defusrdir = "\/usr\/u"; # Default User Dir
$usequota = ""; # Use quotas
$usemail = ""; # Use mailings
$mailfile = ""; # File to use with mailings
$userdefshell = "\/bin\/csh"; # Default user shell
$useforward = ""; # Use a forward file
$protouser= ""; # Prototypical user for quotas
# Start getting information and print a banner
print " AddIt\n";
print " A system utility for adding users with defaults\n";
print " Copyright 1994 GB Data Consulting\n";
print "\n\n";
#
# User ID
#
print "Please enter the login name of the user: ";
chop ($userlogin = <STDIN>);
print "Please enter the user id or hit enter for the next id: ";
chop ($userid = <STDIN>);
if (!$userid) {
open (USERID, "+<userids");
chop ($xxuserid = <USERID>);
$userid = $xxuserid + 1;
close USERID;
open (USERID, "+>userids");
print (USERID "$userid\n");
close USERID;
}
#
# Group ID
#
print "Please enter the group id or hit enter for the default id: ";
chop ($groupid = <STDIN>);
if (!$groupid) {
$groupid = "$defgroupid";
}
#
# User name
#
print "Please enter the user's name: ";
chop ($username = <STDIN>);
#
# Home directory
#
print "Please enter the users home directory or hit enter for default: ";
chop ($userdir = <STDIN>);
if (!$userdir) {
$userdir = "$defusrdir\/$userlogin";
print "$userdir\n";
}
#
# Login Shell
#
print "Please enter the users login shell or hit enter for default: ";
chop ($usershell = <STDIN>);
if (!$usershell) {
$usershell = "$userdefshell";
print "$usershell\n";
}
#
# Create password file entry
#
print "Opening and locking passwd file in blocking mode.\n";
open (PASS, '>>/etc/master.passwd');
flock (PASS, 2) || die "Can't lock passwd file, must be in use!!\n";
print (PASS "$userlogin::$userid:$groupid::0:0:$username,,,:$userdir:$usershell\n");
print "Unlocking and closing password file\n";
flock (PASS,8);
close PASS;
print "Re-indexing password databases\n";
system 'pwd_mkdb -p /etc/master.passwd';
system "passwd $userlogin";
#
# Create user directory
#
print "Creating user directory\n";
if (! -e $defusrdir)
{
print "$defusrdir does not exist, exiting!\n";
exit;
}
system "mkdir $userdir";
if (! -e $userdir)
{
print "$userdir does not exist!!\n";
print "This may be due to a parent dir not being there...\n";
exit;
}
print "Copying user shell files\n";
system "cp dot.login $userdir\/\.login";
system "cp dot.profile $userdir\/\.profile";
if ($usershell eq "\/bin\/csh" || $usershell eq "\/usr\/local\/bin\/tcsh")
{
system "cp dot.cshrc $userdir\/.cshrc";
}
system "chmod -R 654 $userdir";
system "chown -R $userid.$groupid $userdir";
#
# Mailings
#
if ($usemail)
{
print "Mailing new user notice\n";
system "elm \-s \"New User Mailing\" $userid $mailfile";
}
#
# Quotas
#
if ($usequota)
{
print "Editing quotas for user $userlogin\n";
if ($protouser) {
system "edquota -u -p $protouser $userlogin";
} else {
system "edquota -u $userlogin";
}
}
#
# Forward files
#
if ($useforward)
{
print "Please enter the name of the account to forward to:";
chop ($account = <STDIN>);
if (!$account)
{
$acc = $defaccount;
}
else
{
$acc = $account;
}
print "Please enter the name of the system to forward to:";
chop ($system = <STDIN>);
if (!$system)
{
$sys = $defsystem;
}
else
{
$sys = $system;
}
print "Creating \.forward file for user $userlogin\n";
open (FORWARD, ">$userdir\/\.forward");
print (FORWARD "$acc@$sys\n");
close FORWARD;
system "chown $userid\.$groupid $userdir\/\.forward";
}
#
# Print out information used in creation of this account
#
print "\n\n";
print "Information used to create this account follows.\n";
print "\n";
print "Login Name: $userlogin\n";
print "UserId: $userid\n";
print "GroupId: $groupid\n";
print "UserName: $username\n";
print "HomeDir: $userdir\n";
print "Shell: $usershell\n";
if ($usemail)
{
$mailyn = "Using mailing";
}
else
{
$mailyn = "Not using mailing";
}
print "Mailing: $mailyn\n";
if ($usequota)
{
$quotayn = "Using quotas";
}
else
{
$quotayn = "Not using quotas";
}
print "Quotas: $quotayn\n";
if ($useforward)
{
$forwardyn = "forwarded to $acc@$sys";
}
else
{
$forwardyn = "Not using forward file";
}
print "ForwardFile: $forwardyn\n";
print "\nDONE\n\n";

40
contrib/adduser/README Normal file
View file

@ -0,0 +1,40 @@
AddIt
Version 0.8-Beta
This is the README file for AddIt version 0.8Beta. AddIt is a
perl script that is intended to make adding a user to the system simple
and easy. Installation and use are very easy and directions follow.
1. Un-tar the distribution on your system. It must have its own directory
due to other files it uses.
2. Use vi to edit the userids file if your planning on using the auto id
option of the system. Make the userid one lower than what you want
to start at.
3. Edit AddIt itself to configure the following options for use with the
system.
A. $defgroupid: This is the default group id the system will use.
B. $defusrdir: This is the default place for the system to create
user directories and copy needed files.
C. $usequota: Define this variable if you wish to use quotas on your
system. Make sure that you have a kernel that has this defined.
D. $usemail: Define this variable if you wish to have a flyer
mailed to the user after account creation.
E. $usedefshell: Define this to be the default shell on your system.
F. $useforward: Define this variable if you wish to have .forward
files created for use on the system.
G. $protouser: Define this variable to be the proto user for use with
quotas.
H. $mailfile: This is the file to mail to a new user when $usemail is
defined.
5. Make sure that the default user directory ($defusrdir) exists.
6. Run AddIt. The program will ask you questions about the user and
automaticly create their directory, copy startup files and then
do other things depending on how you have the system configured.
As normal sugestions and bug reports to bugs@radon.gbdata.com.

27
contrib/adduser/dot.cshrc Normal file
View file

@ -0,0 +1,27 @@
# .cshrc initialization
alias df df -k
alias du du -k
alias f finger
alias h 'history -r | more'
alias j jobs -l
alias la ls -a
alias lf ls -FA
alias ll ls -lgsA
alias su su -m
alias tset 'set noglob histchars=""; eval `\tset -s \!*`; unset noglob histchars'
alias x exit
alias z suspend
set path = (~/bin /bin /usr/{bin,new,games,local,old} .)
if ($?prompt) then
# An interactive shell -- set some stuff up
set filec
set history = 1000
set ignoreeof
set mail = (/var/mail/$USER)
set mch = `hostname -s`
set prompt = "$mch:q:$cwd:t {\!} "
umask 2
endif

15
contrib/adduser/dot.login Normal file
View file

@ -0,0 +1,15 @@
#csh login file
if ( ! $?TERMCAP ) then
tset -Q '-mdialup:?vt100' $TERM
endif
stty newcrt crterase
set savehist=100
set ignoreeof
setenv EXINIT 'set ai sm noeb'
setenv HOSTALIASES $HOME/.hostaliases
/usr/games/fortune

View file

@ -0,0 +1,2 @@
PATH=/bin:/usr/bin:/usr/new:/usr/local:/usr/games:/usr/old:.
export PATH HOME TERM

1
contrib/adduser/userids Normal file
View file

@ -0,0 +1 @@
510

761
contrib/configit/ConfigIt Executable file
View file

@ -0,0 +1,761 @@
#!/usr/bin/perl
#
# Copyright (c) 1994 GB Data Consulting
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of the Author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
# 4. This license extends only to network distributed versions.
# All even number versions are non-network.
# THIS SOFTWARE IS PROVIDED BY GB DATA AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL GB DATA OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
#
#
#
# $Id: ConfigIt,v 1.2 1994/05/02 06:57:47 gclarkii Exp $
#
&config;
&standard_devices;
&menu;
sub menu {
system "clear";
print " ConfigIt!\n";
print " A auto-configuration system\n";
print "\n\n\n";
print " 1 Disk devices\n";
print " 2 Serial devices\n";
print " 3 Network devices\n";
print " 4 Console devices\n";
print " 5 Tape devices\n";
print " 6 Misc devices and options\n";
print " 7 Parallel devices\n";
print "\n\n";
print "Please enter you choice or q to quit: ";
chop ($choice = <STDIN>);
if ($choice eq ('q' || 'Q'))
{
print (CONFIG "\n\n\n");
close CONFIG;
exit; }
elsif ($choice == 1)
{ &disk_devices; }
elsif ($choice == 2 && !$serdevsflag)
{ &serial_devices; }
elsif ($choice == 3 && !$netdevsflag)
{ &network_devices; }
elsif ($choice == 4)
{ &console_devices; }
elsif ($choice == 5)
{ &tape_devices; }
elsif ($choice == 6)
{ &misc_dev_option; }
elsif ($choice == 7)
{ &parallel_ports; }
else
{ &menu; }
&menu;
}
sub config {
system "clear";
print " ConfigIt!\n";
print " A Auto-configuration System\n\n";
print "Please enter the name of your system: ";
chop ($systemname = <STDIN>);
$systemname =~ tr/a-z/A-Z/;
open (CONFIG, ">>$systemname");
}
sub config_serial_devices {
print (CONFIG "\n#Multi-port Config\n");
print "Multi-port Comm-Cards are not supported at this time....\n\n";
sleep 3;
}
sub console_devices {
system "clear";
print " Console Devices\n\n";
print " 1 Syscons\n";
print " 2 Pccons\n";
print "\n\n\n";
print "Please enter your choice (q or Q to quit): ";
chop ($cdevs = <STDIN>);
if ($cdevs == 1 && !$condevsflag)
{ &syscons; }
elsif ($cdevs == 2 && !$condevsflag)
{ &pccons; }
elsif ($cdevs eq 'q')
{ return; }
elsif ($cdevs eq 'Q')
{ return; }
else {
&console_devices; }
}
sub disk_devices {
system "clear";
local ($choice);
print " Disk Device Sub-section\n\n";
print " 1 WD drives\n";
print " 2 SCSI drives\n";
print " 3 Floppy & QIC-40/80 Drives\n";
print " 4 Mitsumi CD-ROM Drive\n";
print "\n\n";
print "Please enter your choice: ";
chop ($choice = <STDIN>);
if ($choice eq ('q' || 'Q'))
{ return; }
elsif ($choice == 1 && !$wdflag)
{ &wd_drives; }
elsif ($choice == 2 && !$scsidevflag)
{ &scsi_drives; }
elsif ($choice == 3 && !$floppyflag)
{ &floppy_drives; }
elsif ($choice == 4 && !$mitsumiflag)
{ &mitsumi_drive; }
else
{ &disk_devices; }
}
sub doonecard {
$cardnum = @_[0];
system "clear";
print " 1 AT&T EN100/STARLAN 10\n";
print " 2 ISOLAN AT 4141-0\n or ISOLINK 4110\n";
print " 3 WD/SMC 8003 & 8013\n";
print " 4 SMC Ultra Elite 16\n";
print " 5 3com 3c503\n";
print " 6 NE1000/NE2000\n";
print "\n\nPlease enter the type of network card number $cardnum : ";
chop ($netcardchoice = <STDIN>);
print "Please enter the port (in hex) address of the card: ";
chop ($netcardadd = <STDIN>);
print "Please enter the irq of the card: ";
chop ($netcardirq = <STDIN>);
if ($netcardchoice != 2)
{ print "Please enter the I/O mem of the card: ";
chop ($netcardiomem = <STDIN>);
}
if ($netcardchoice != (2 || 1))
{
if ($ednum < 1) {
$cardty = 'ed0';
$ednum++;
} else {
$cardty = "ed$ednum";
$ednum++;
}
$interp = 'edintr';
}
if ($netcardchoice == 2)
{
if ($isnum < 1) {
$cardty = 'is0';
$isnum++;
} else {
$cardty = "is$isnum";
$isnum++;
}
$interp = 'isintr';
}
if ($netcardchoice == 1)
{
if ($ienum < 1) {
$cardty = 'ie0';
$ienum++;
} else {
$cardty = "ie$ienum";
$ienum++
}
$interp = 'ieintr';
}
print (CONFIG "device $cardty at isa? port $netcardadd net irq $netcardirq iomem $netcardiomem vector $interp\n");
}
sub floppy_drives
{
$floppyflag = 1;
system "clear";
print (CONFIG "\n#Disk devices\n\n");
print "How many floppys do you have?: ";
chop ($flch = <STDIN>);
if ($flch > 0)
{
print (CONFIG "controller fdc0 at isa? port \"IO_FD1\" bio irq 6 drq 2 vector fdintr\n");
print (CONFIG "disk fd0 at fdc0 drive 0\n");
print (CONFIG "disk fd1 at fdc0 drive 1\n");
}
if ($flch > 0)
{
print "Do you have a QIC-40/80 drive?: ";
chop ($qic40 = <STDIN>);
if ($qic40 eq 'y' || $qic40 eq 'Y')
{
print (CONFIG "tape ft0 at fdc0 drive 2\n");
}
}
}
sub misc_dev_option {
system "clear";
$miscdevflag = 1;
print (CONFIG "\n# Misc Devices\n");
print "Do you want kernel tracing?: ";
chop ($ktrace = <STDIN>);
if ($ktrace eq ('y' || 'Y'))
{
print (CONFIG "options KTRACE\n");
}
print "Do you want kernel debugging?: ";
chop ($kddb = <STDIN>);
if ($kddb eq ('y' || 'Y'))
{
print (CONFIG "pseudo-device ddb\n");
}
print "Do you want fast symlinks?: ";
chop ($fastlinks = <STDIN>);
if ($fastlinks eq ('y' || 'Y'))
{
print (CONFIG "options FASTLINKS\n");
}
print "Do you want PC file system support?: ";
chop ($pcfs = <STDIN>);
if ($pcfs eq ('y' || 'Y'))
{
print (CONFIG "options PCFS\n");
}
print "Do you want Memory File System support?: ";
chop ($mfs = <STDIN>);
if ($mfs eq ('y' || 'Y'))
{
print (CONFIG "options MFS\n");
}
print "Do you want QUOTA support?: ";
chop ($quota = <STDIN>);
if ($quota eq ('y' || 'Y'))
{
print (CONFIG "options QUOTA\n");
}
print "Do you want FIFO support?: ";
chop ($fifo = <STDIN>);
if ($fifo eq ('y' || 'Y'))
{
print (CONFIG "options FIFO\n");
}
print "Do you want ISO File System support?: ";
chop ($isofs = <STDIN>);
if ($isofs eq ('y' || 'Y'))
{
print (CONFIG "options ISOFS\n");
}
}
sub mitsumi_drive {
system "clear";
$mitsumiflag = 1;
print (CONFIG "\n#Disk devices\n\n");
print "What address (hex) is the mitsumi controller at?: ";
chop ($mitadd = <STDIN>);
print "What interupt is the mitsumi controller at?: ";
chop ($mitint = <STDIN>);
print (CONFIG "device mcd at isa? port $mitadd bio irq $mitint vector mcdint\n");
}
#
# Multi-port support for serial_devices.pl
#
# $Id: ConfigIt,v 1.2 1994/05/02 06:57:47 gclarkii Exp $
#
sub multiport {
$numstandm = @_[0];
system "clear";
print "NOTE: Only 1 multiport card is supported by ConfigIt.\n";
print "Please enter the number of ports on the card: ";
chop ($multinum = <STDIN>);
print "Please enter the starting port of the card: ";
chop ($startm = <STDIN>);
print "Please enter the port number of the master port or 0 if none: ";
chop ($multimaster = <STDIN>);
print "Please enter the intrupt of the card: ";
chop ($multiint = <STDIN>);
print (CONFIG "\n#Multi-port serial devices\n\n");
print (CONFIG "options \"COM_MULTIPORT\"\n");
$portm = $startm;
$startm =~ tr/a-z/A-Z/;
for ($i = 1; $i < $multinum + 1; $i++) {
$siom = $i + $numstandm;
$siom = $siom - 1;
if ($siom < 10) { $sio = "sio0"; } else { $sio = "sio"; }
if ($multimaster != $i) {
print (CONFIG "device $sio$siom at isa? port $portm flags 0x501 vector siointr\n");
} else {
print (CONFIG "device $sio$siom at isa? port $portm tty irq $multiint flags 0x501 vector siointr\n");
}
$portm =~ tr/A-Z/a-z/;
$numorig = hex ("$portm");
$numadd = hex ("0x08");
$numend = $numadd + $numorig;
$endm = sprintf ("%lx", $numend);
$end1m = $endm;
$portm = "0x$end1m";
$portm =~ tr/a-z/A-Z/;
}
if ($numstandm > 0) { &standard_serial; }
}
sub network_devices {
system "clear";
$netdevsflag = 1;
print (CONFIG "\n# Network devices\n");
print "How many networking cards do you have: ";
chop ($numnet = <STDIN>);
if ($numnet != 0) {
for ($i = 1; $i <= $numnet ; $i++)
{
&doonecard($i);
}
}
print "Do you need the SLIP device in the kernel?: ";
chop ($slipch = <STDIN>);
if ($slipch eq ('y' || 'Y'))
{
print "How many slip devices do you need: ";
chop ($slipno = <STDIN>);
print (CONFIG "pseudo-device slip $slipno\n");
}
print "Do you need the PPP device in the kernel?: ";
chop ($pppch = <STDIN>);
if ($pppch eq ('y' || 'Y'))
{
print "How many PPP devices do you need: ";
chop ($pppno = <STDIN>);
print (CONFIG "pseudo-device ppp $pppno\n");
}
print "Do you want Berkeley Packet Filter support?: ";
chop ($bpf = <STDIN>);
if ($bpf eq ('y' || 'Y'))
{
print (CONFIG "pseudo-device bpf\n");
}
print "Do you want Internetwork Gateway support?: ";
chop ($gateway = <STDIN>);
if ($gateway eq ('y' || 'Y'))
{
print (CONFIG "option GATEWAY\n");
}
print "Do you want NFS support?: ";
chop ($nfs = <STDIN>);
if ($nfs eq ('y' || 'Y'))
{
print (CONFIG "option NFS\n");
}
print "How many pty's do you want?: ";
chop ($ptyno = <STDIN>);
if ($ptyno eq ('y' || 'Y'))
{
print (CONFIG "pseudo-device pty $ptyno\n");
}
}
#
#
#
sub parallel_ports {
print "How many parallel ports do you have: ";
chop ($paranum = <STDIN>);
if ($paranum) {
print (CONFIG "\n#Parallel devices\n\n");
for ($i = 1; $i <= $paranum; $i++) {
$lpanum = $i - 1;
print "Please enter the address for parallel port number $i : ";
chop ($paraport = <STDIN>);
print "If you are running with out interupts on this port please\n";
print "anwser 0 to the following question.\n";
print "Please enter the interupt for parallel port number $i : ";
chop ($paraint = <STDIN>);
if ($paraint) {
print (CONFIG "device lpa$lpanum at isa? port $paraport tty irq $paraint vector lptintr\n");
} else {
print (CONFIG "device lpa$lpanum at isa? port $paraport tty vector lptintr\n");
}
}
}
}
sub pccons {
$condevsflag = 1;
print (CONFIG "\n# Console devices\n\n");
print (CONFIG "device pc0 at isa? port \"IO_KBD\" tty irq 1 vector pcrint\n");
}
sub scsi_drives {
$scsidevsflag = 1;
system "clear";
print (CONFIG "\n# SCSI Devices\n\n");
print " 1 Adaptec 1542/Bustec 542\n";
print " 2 Adaptec 1742\n";
print " 3 Bustec 742\n";
print " 4 Ultrastore 14F/34F\n";
print "\n\n";
print "Enter your choice or q to quit: ";
chop ($scsicho = <STDIN>);
if ($scsicho eq 'q' || $scsicho eq 'Q')
{
return;
}
elsif ($scsicho == 1)
{
$scsicard = "aha0";
$scsiio = "\"IO_AHA0\"";
$scsiint = "ahaintr";
}
elsif ($scsicho == 2)
{
$scsicard = "ahb0";
$scsiint = "ahbintr";
}
elsif ($scsicho == 3)
{
$scsicard = "bt0";
$scsiio = "\"IO_BT0\"";
$scsiint = "btintr";
}
elsif ($scsicho == 4)
{
$scsicard = "uha0";
$scsiio = "\"IO_UHA0\"";
$scsiio = "uhaintr";
}
else { &scsi_drives; }
if ($scsicho == 2)
{
print "Please enter the interupt the AHA-1742 is on: ";
chop ($scsiirq = <STDIN>);
print (CONFIG "contoller ahb0 at isa? bio irq $scsiirq vector $scsiint\n");
}
elsif ($scsicho == 1 || $scsicho == 4)
{
print "Please enter the interupt the SCSI controller is on: ";
chop ($scsiirq = <STDIN>);
print "Please enter the dma channel the SCSI controller is on: ";
chop ($scsidrq = <STDIN>);
print (CONFIG "controller $scsicard at isa? port $scsiio bio irq $scsiirq drq $scsidrq vector $scsiint\n");
}
else
{
print "Please enter the interupt the SCSI controller is on: ";
chop ($scsiirq = <STDIN>);
print (CONFIG "controller $scsicard at isa? port $scsiio bio irq $scsiirq vector $scsiint\n");
}
print (CONFIG "device sd0\n");
print (CONFIG "device sd1\n");
print (CONFIG "device sd2\n");
print (CONFIG "device sd3\n");
print (CONFIG "device st1\n");
print (CONFIG "device st2\n");
print (CONFIG "device cd0\n");
}
#
# Do serial ports, only standard ones are here
#
#
sub serial_devices {
system "clear";
$serdevsflag = 1;
print "Do you have a multi-port card (Non-standard serial card): ";
chop ($multicard = <STDIN>);
print "Please enter the number of standard serial ports you have: ";
chop ($numstand = <STDIN>);
if ($multicard eq ( 'y' || 'Y')) {
print "Please enter the number of standard serial ports you also have: ";
&multiport($numstand);
} else {
&standard_serial($numstand);
}
print "Do you wish to have bidirectionl serial ports: ";
chop ($bidir = <STDIN>);
if ($bidir eq ('y' || 'Y')) {
print (CONFIG "options \"COM_BIDIR\"\n");
}
}
sub standard_devices {
system "clear";
print "What timezone are you in? (cst = 6): ";
chop ($time = <STDIN>);
print "What type of cpu do you have? ( 386 or 486 ): ";
chop ($cputype = <STDIN>);
if ($cputype == 386)
{
print "Do you have a 387?: ";
chop ($mathco = <STDIN>);
}
if ($cputype == 486)
{
print "Is it a DX or SX?: ";
chop ($dxsx = <STDIN>);
if ($dxsz eq 'SX' || $dxsx eq 'sx')
{
$mathco = 'n';
}
}
chop ($date = `date`);
chop ($whoami = `whoami`);
print (CONFIG "\n#\n#Config file for $systemname\n");
print (CONFIG "#Generated by ConfigIt!\n");
print (CONFIG "#Generated at $date by $whoami\n#\n#\n\n");
print (CONFIG "#Generic Items\n\n");
print (CONFIG "machine \"i386\"\n");
print (CONFIG "cpu \"I","$cputype","_CPU\"\n");
if ($mathco eq 'n' || $mathco eq 'N')
{
print "Do you wish to use the new math emulator (its better): ";
chop ($choicesti = <STDIN>);
if ($choicesti eq ('y' || 'Y')) {
print (CONFIG "options GPL_MATH_EMULATE\n");
} else {
print (CONFIG "options MATH_EMULATE\n");
}
}
print "The following is used to set certain parameters.\n";
print "Please enter the number of users you expect: ";
chop ($maxusers = <STDIN>);
if ($maxusers <= 10) { $maxusers = 10; }
print (CONFIG "ident $systemname\n");
print (CONFIG "maxusers $maxusers\n");
print (CONFIG "maxfdescs 2000\n");
print (CONFIG "timezone $time dst\n");
print (CONFIG "options \"COMPAT_43\"\n");
print (CONFIG "options UCONSOLE\n");
print (CONFIG "options XSERVER\n");
print (CONFIG "options INET\n");
print "What device is root on? (e.g. \"wd0\"): ";
chop ($root = <STDIN>);
if ($root) {
$roots = "root on $root";
} else { print "ABORTING you must have a root!\n"; exit; }
print "What device is swap on? (e.g. \"wd0\" or \"wd0 and wd1\"): ";
chop ($swap = <STDIN>);
if ($swap) {
$swaps = "swap on $swap";
}
print "What device is dump on? (e.g. \"wd0\"): ";
chop ($dump = <STDIN>);
if ($dumps) {
$dumps = "dumps on $dump";
}
print (CONFIG "config \"386bsd\" $roots $swaps $dumps \n");
print (CONFIG "pseudo-device vnodepager\n");
print (CONFIG "pseudo-device swappager\n");
print (CONFIG "pseudo-device devpager\n");
print (CONFIG "pseudo-device ether\n");
print (CONFIG "pseudo-device loop\n");
print (CONFIG "pseudo-device log\n");
print (CONFIG "pseudo-device speaker\n");
print (CONFIG "device isa0\n");
}
#
# Do standard serial ports
#
sub standard_serial {
$sernumss = @_[0];
print "Are the $sernumss standard ports at the standard location and interup: ";
chop ($standss = <STDIN>);
if ($standss eq ('y' || 'Y')) {
if ($sernumss == 0 || $sernumss > 4)
{ print "invalid number of serial ports!!\n\n";
print "Please hit any key to continue.";
while (!($kbhit = <STDIN>)) {}
&serial_devices;}
if ($sernumss < 3) {
print (CONFIG "\n#Standard serial devices\n\n");
print (CONFIG "device sio00 at isa? port \"IO_COM1\" tty irq 4 vector siointr\n");
print (CONFIG "device sio01 at isa? port \"IO_COM2\" tty irq 3 vector siointr\n");
} else {
print (CONFIG "\n#Standard serial devices\n\n");
print (CONFIG "device sio00 at isa? port \"IO_COM1\" tty irq 4 vector siointr\n");
print (CONFIG "device sio01 at isa? port \"IO_COM2\" tty irq 3 vector siointr\n");
print (CONFIG "device sio02 at isa? port \"IO_COM3\" tty irq 5 vector siointr\n");
print (CONFIG "device sio03 at isa? port \"IO_COM4\" tty irq 9 vector siointr\n"); }
} else {
print (CONFIG "\n#Standard serial devices\n\n");
for ($i = 1;$i <= $sernum;$i++) {
print "Please enter the intrupt for serial port number $i: ";
chop ($intt = <STDIN>);
print "Please enter the address for serial port number $i: ";
chop ($portk = <STDIN>);
$iik = $i - 1;
print (CONFIG "device sio0$iik at isa port $portk tty irq $intt vector siointr\n");
}
}
}
sub syscons {
print (CONFIG "\n#Console device\n");
$condevsflag = 1;
system "clear";
print (CONFIG "device sc0 at isa? port \"IO_KBD\" tty irq 1 vector scintr\n");
print "How many virtual terminals do you want? (max 8): ";
chop ($numvty = <STDIN>);
if ($numvty == 0 || $numvty > 8)
{ $numvty = 1; }
print (CONFIG "options \"NCONS=$numvty\"\n");
print (CONFIG "options \"STAR_SAVER\"\n");
print (CONFIG "options \"FADE_SAVER\"\n");
print (CONFIG "options \"SNAKE_SAVER\"\n");
print (CONFIG "options \"BLANK_SAVER\"\n");
}
sub tape_devices
{
system "clear";
print (CONFIG "\n# QIC-02 Tape devices\n\n");
$tapdevsflag = 1;
print "Do you have a QIC-02 tape drive?: ";
chop ($qic02 = <STDIN>);
if ($qic02 eq ('y' || 'Y'))
{
print "What address is it at? (Hex): ";
chop ($qic02add = <STDIN>);
print "What interupt is it at?: ";
chop ($qic02int = <STDIN>);
print (CONFIG "device wt0 at isa? port $qic02add bio irq $qic02int drq 1 vector wtintr\n");
}
}
sub wd_drives {
$wdflag = 1;
local ($choice);
system "clear";
print (CONFIG "\n#Disk devices\n\n");
print " WD Drive Configuration\n\n";
print "How many WD drives do you have (Max of 4): ";
chop ($choice = <STDIN>);
if ($choice >= 3 ) {
print "\n";
print (CONFIG "controller wdc0 at isa? port \"IO_WD1\" bio irq 14 vector wdintr\n");
print "\n";
print (CONFIG "disk wd0 at wdc0 drive 0\n");
print (CONFIG "disk wd1 at wdc1 drive 1\n");
print (CONFIG "controller wdc1 at isa? port \"IO_WD2\" bio irq 15 vector wdintr\n");
print (CONFIG "disk wd2 at wdc1 drive 0\n");
print (CONFIG "disk wd3 at wdc1 drive 1\n");
print "\n";
} else {
print "\n";
print (CONFIG "controller wdc0 at isa? port \"IO_WD1\" bio irq 14 vector wdintr\n");
print "\n";
print (CONFIG "disk wd0 at wdc0 drive 0\n");
print (CONFIG "disk wd1 at wdc0 drive 1\n");
print "\n";
}
}

32
contrib/configit/README Normal file
View file

@ -0,0 +1,32 @@
This is the README file for ConfigIt!, a kernel configuration file generator
for FreeBSD 1.1Beta and above. ConfigIt! is a menu driven program that
askes what options and devices you want in your kernel. For more information
on what the various options and devices are please see the file options.texi
in /sys/i386/doc.
To run ConfigIt! you must have Perl 4.036 (It has not been tested with Perl 5).
Steps needed to run ConfigIt!:
1. Make sure that you have Perl installed on your system.
2. Untar the archive in the directory where you wish to run it.
3. Run the program.
4. Copy the resulting config file to /sys/i386/conf.
5. Run config SYSTEM_NAME.
6. Change directory to /sys/compile/SYSTEM_NAME.
7. Run make depend and then make in /sys/compile/SYSTEM_NAME.
And thats it!
If you have any questions, suggestions or whatever you can reach me
at gclarkii@freefall.cdrom.com. Please DO NOT send questions about ConfigIt!
to the mailing lists.
Enjoy,
Gary Clark II
gclarkii@freefall.cdrom.com

9
contrib/configit/TODO Normal file
View file

@ -0,0 +1,9 @@
TODO list for ConfigIt!
Version 0.1 BETA
1. Make the system more robust in taking anwsers to questions.
2. Better SCSI support.
3. Make it faster.
4. Add more options that it will configure.
5. Clean up code so that columns are lined up.

25
contrib/crunch/COPYRIGHT Normal file
View file

@ -0,0 +1,25 @@
/*
* Copyright (c) 1994 University of Maryland
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of U.M. not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. U.M. makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
* U.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL U.M.
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: James da Silva, Systems Design and Analysis Group
* Computer Science Department
* University of Maryland at College Park
*/

4
contrib/crunch/Makefile Normal file
View file

@ -0,0 +1,4 @@
SUBDIR=crunchgen crunchide
.include <bsd.subdir.mk>

View file

@ -0,0 +1,2 @@
# modify to taste
BINDIR?= /usr/bin

88
contrib/crunch/README Normal file
View file

@ -0,0 +1,88 @@
CRUNCH 0.2 README 6/14/94
Crunch is available via anonymous ftp to ftp.cs.umd.edu in
pub/bsd/crunch-0.2.tar.gz
WHAT'S NEW IN 0.2
* The prototype awk script has been replaced by a more capable and
hopefully more robust C program.
* No fragile template makefiles or dependencies on the details of the
bsd build environment.
* You can build crunched binaries even with no sources on-line, you
just need the .o files. Crunchgen still will try to figure out as
much as possible on its own, but you can override its guessing by
specifying the list of .o files explicitly.
* Crunch itself has been bmake'd and some man pages written, so it
should be ready to install.
INTRODUCTION
Crunch is a little package that helps create "crunched" binaries for use
on boot, install, and fixit floppies. A crunched binary in this case is
one where many programs have been linked together into one a.out file.
The different programs are run depending on the value of argv[0], so
hard links to the crunched binary suffice to simulate a perfectly normal
system.
As an example, I have created an 980K crunched "fixit" binary containing
the following programs in their entirety:
cat chmod cp date dd df echo ed expr hostname kill ln ls mkdir
mt mv pwd rcp rm rmdir sh sleep stty sync test [ badsect chown
clri disklabel dump rdump dmesg fdisk fsck halt ifconfig init
mknod mount newfs ping reboot restore rrestore swapon umount
ftp rsh sed telnet rlogin vi cpio gzip gunzip gzcat
Note carefully: vi, cpio, gzip, ed, sed, dump/restore, some networking
utilities, and the disk management utilities, all in a binary small
enough to fit on a 1.2 MB root filesystem floppy (albeit with the kernel
on its own boot floppy). A more reasonable subset can be made to fit
easily with a kernel for a decent one-disk fixit filesystem.
The linking together of different programs by hand is an old
space-saving technique. Crunch automates the process by building the
necessary stub files and makefile for you (via the crunchgen program),
and by doctoring the symbol tables of the component .o files to allow
them to link without "symbol multiply defined" conflicts (via the
crunchide program).
BUILDING CRUNCH
Just type make, then make install.
Crunch was written and tested under NetBSD/i386, but should work under
other PC BSD systems that use GNU ld.
The crunchgen(1) and crunchide(1) man pages have more details on using
crunch, and the examples subdirectory contains some working .conf files
and a sample Makefile.
CREDITS
Thanks to the NetBSD team for a consistently high quality effort in
bringing together a solid, state of the art development environment.
Thanks to the FreeBSD guys; Rod Grimes, Nate Williams and Jordan
Hubbard; and to Bruce Evans, for immediate and detailed feedback on
crunch 0.1, and for pressing me to make the prototype more useable.
Crunch was written for the Maruti Hard Real-Time Operating System
project at the University of Maryland, to help make for better install
and recovery procedures for our NetBSD-based development environment. It
is copyright (c) 1994 by the University of Maryland under a UCB-style
freely- redistributable notice. See the file COPYRIGHT for details.
Please let me know of any problems or of enhancements you make to this
package. I'm particularly interested in the details of what you found
was good to put on your fixit or install disks. Thanks!
Share and Enjoy,
Jaime
............................................................................
: Stand on my shoulders, : jds@cs.umd.edu : James da Silva
: not on my toes. : uunet!mimsy!jds : http://www.cs.umd.edu/users/jds

View file

@ -0,0 +1,9 @@
PROG=crunchgen
SRCS=crunchgen.c crunched_skel.c
CFLAGS+=-g -Wall
crunched_skel.c: crunched_main.c
${.CURDIR}/mkskel.sh ${.CURDIR}/crunched_main.c >crunched_skel.c
.include <bsd.prog.mk>

View file

@ -0,0 +1,102 @@
/*
* Copyright (c) 1994 University of Maryland
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of U.M. not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. U.M. makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
* U.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL U.M.
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: James da Silva, Systems Design and Analysis Group
* Computer Science Department
* University of Maryland at College Park
*/
/*
* crunched_main.c - main program for crunched binaries, it branches to a
* particular subprogram based on the value of argv[0]. Also included
* is a little program invoked when the crunched binary is called via
* its EXECNAME. This one prints out the list of compiled-in binaries,
* or calls one of them based on argv[1]. This allows the testing of
* the crunched binary without creating all the links.
*/
#include <stdio.h>
#include <string.h>
struct stub {
char *name;
int (*f)();
};
extern struct stub entry_points[];
int main(int argc, char **argv)
{
char *slash, *basename;
struct stub *ep;
if(argv[0] == NULL || *argv[0] == '\0')
crunched_usage();
slash = strrchr(argv[0], '/');
basename = slash? slash+1 : argv[0];
for(ep=entry_points; ep->name != NULL; ep++)
if(!strcmp(basename, ep->name)) break;
if(ep->name)
return ep->f(argc, argv);
else {
fprintf(stderr, "%s: %s not compiled in\n", EXECNAME, basename);
crunched_usage();
}
}
int crunched_main(int argc, char **argv)
{
struct stub *ep;
int columns, len;
if(argc <= 1)
crunched_usage();
return main(--argc, ++argv);
}
int crunched_usage()
{
int columns, len;
struct stub *ep;
fprintf(stderr, "Usage: %s <prog> <args> ..., where <prog> is one of:\n",
EXECNAME);
columns = 0;
for(ep=entry_points; ep->name != NULL; ep++) {
len = strlen(ep->name) + 1;
if(columns+len < 80)
columns += len;
else {
fprintf(stderr, "\n");
columns = len;
}
fprintf(stderr, " %s", ep->name);
}
fprintf(stderr, "\n");
exit(1);
}
/* end of crunched_main.c */

View file

@ -0,0 +1,266 @@
.\"
.\" Copyright (c) 1994 University of Maryland
.\" All Rights Reserved.
.\"
.\" Permission to use, copy, modify, distribute, and sell this software and its
.\" documentation for any purpose is hereby granted without fee, provided that
.\" the above copyright notice appear in all copies and that both that
.\" copyright notice and this permission notice appear in supporting
.\" documentation, and that the name of U.M. not be used in advertising or
.\" publicity pertaining to distribution of the software without specific,
.\" written prior permission. U.M. makes no representations about the
.\" suitability of this software for any purpose. It is provided "as is"
.\" without express or implied warranty.
.\"
.\" U.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL U.M.
.\" BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
.\" IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" Author: James da Silva, Systems Design and Analysis Group
.\" Computer Science Department
.\" University of Maryland at College Park
.\"
.Dd June 14, 1994
.Dt CRUNCHGEN 1
.Os BSD 4
.Sh NAME
.Nm \&crunchgen
.Nd generates build environment for a crunched binary
.Sh SYNOPSIS
.Nm \&crunchgen
.Op Fl fq
.Op Fl m Ar makefile-name
.Op Fl c Ar c-file-name
.Op Fl e Ar exec-file-name
.Op Ar conf-file
.Sh DESCRIPTION
A crunched binary is a program made up of many other programs linked
together into a single executable. The crunched binary main()
function determines which component program to run by the contents of
argv[0]. The main reason to crunch programs together is for fitting
as many programs as possible onto an installation or system recovery
floppy.
.Pp
.Nm Crunchgen
reads in the specifications in
.Ar conf-file
for a crunched binary, and generates a Makefile and accompanying
top-level C source file that when built create the crunched executable
file from the component programs. For each component program,
.Nm crunchgen
can optionally attempt to determine the object (.o) files that make up
the program from its source directory Makefile. This information is
cached between runs.
.Nm Crunchgen
uses the companion program
.Nm crunchide
to eliminate link-time conflicts between the component programs by
hiding all unnecessary symbols.
.Pp
After
.Nm crunchgen
is run, the crunched binary can be built by running ``make -f
<conf-name>.mk''. The component programs' object files must already
be built. A ``objs'' target, included in the output makefile, will
run make in each component program's source dir to build the object
files for the user. This is not done automatically since in release
engineering circumstances it is generally not desireable to be
modifying objects in other directories.
.Pp
The options are as follows:
.Bl -tag -width indent
.It Fl c Ar c-file-name
Set output C file name to
.Ar c-file-name .
The default name is ``<conf-name>.c''.
.It Fl e Ar exec-file-name
Set crunched binary executable file name to
.Ar exec-file-name .
The default name is ``<conf-name>''.
.It Fl f
Flush cache. Forces the recalculation of cached parameters.
.It Fl m Ar makefile-name
Set output Makefile name to
.Ar makefile-name .
The default name is ``<conf-name>.mk''.
.It Fl q
Quiet operation. Status messages are suppressed.
.El
.Sh CRUNCHGEN CONFIGURATION FILE COMMANDS
.Nm Crunchgen
reads specifications from the
.Ar conf-file
that describe the components of the crunched binary. In its simplest
use, the component program names are merely listed along with the
top-level source directories in which their sources can be found.
.Nm Crunchgen
then calculates (via the source makefiles) and caches the
list of object files and their locations. For more specialized
situations, the user can specify by hand all the parameters that
.Nm crunchgen
needs.
.Pp
The
.Ar conf-file
commands are as follows:
.Bl -tag -width indent
.It Nm srcdirs Ar dirname ...
A list of source trees in which the source directories of the
component programs can be found. These dirs are searched using the
BSD ``<source-dir>/<progname>/'' convention. Multiple
.Nm srcdirs
lines can be specified. The directories are searched in the order
they are given.
.It Nm progs Ar progname ...
A list of programs that make up the crunched binary. Multiple
.Nm progs
lines can be specified.
.It Nm libs Ar libspec ...
A list of library specifications to be included in the crunched binary link.
Multiple
.Nm libs
lines can be specified.
.It Nm ln Ar progname linkname
Causes the crunched binary to invoke
.Ar progname
whenever
.Ar linkname
appears in argv[0]. This allows programs that change their behavior when
run under different names to operate correctly.
.El
To handle specialized situations, such as when the source is not
available or not built via a conventional Makefile, the following
.Nm special
commands can be used to set
.Nm crunchgen
parameters for a component program.
.Bl -tag -width indent
.It Nm special Ar progname Nm srcdir Ar pathname
Set the source directory for
.Ar progname .
This is normally calculated by searching the specified
.Nm srcdirs
for a directory named
.Ar progname .
.It Nm special Ar progname Nm objdir Ar pathname
Set the obj directory for
.Ar progname .
This is normally calculated by looking for a directory named
.Dq Pa obj
under the
.Ar srcdir ,
and if that is not found, the
.Ar srcdir
itself becomes the
.Ar objdir .
.It Nm special Ar progname Nm objs Ar object-file-name ...
Set the list of object files for program
.Ar progname .
This is normally calculated by constructing a temporary makefile that includes
.Dq Nm srcdir / Pa Makefile
and outputs the value of $(OBJS).
.It Nm special Ar progname Nm objpaths Ar full-pathname-to-object-file ...
Sets the pathnames of the object files for program
.Ar progname .
This is normally calculated by prepending the
.Nm objdir
pathname to each file in the
.Nm objs
list.
.El
.Pp
Only the
.Nm objpaths
parameter is actually needed by
.Nm crunchgen ,
but it is calculated from
.Nm objdir
and
.Nm objs ,
which are in turn calculated from
.Nm srcdir ,
so is sometimes convenient to specify the earlier parameters and let
.Nm crunchgen
calculate forward from there if it can.
.Pp
The makefile produced by
.Nm crunchgen
contains an optional
.Ar objs
target that will build the object files for each component program by
running make inside that program's source directory. For this to work the
.Nm srcdir
and
.Nm objs
parameters must also be valid. If they are not valid for a particular program, that
program is skipped in the
.Ar objs
target.
.Sh EXAMPLE
Here is an example
.Nm crunchgen
input conf file, named
.Dq Pa kcopy.conf :
.Pp
.nf
srcdirs /usr/src/bin /usr/src/sbin
progs test cp echo sh fsck halt init mount umount myinstall
ln test [ # test can be invoked via [
ln sh -sh # init invokes the shell with "-sh" in argv[0]
special myprog objpaths /homes/leroy/src/myinstall.o # no sources
libs -lutil -lcrypt
.fi
.Pp
This conf file specifies a small crunched binary consisting of some
basic system utilities plus a homegrown install program ``myinstall'',
for which no source directory is specified, but its object file is
specified directly with the
.Nm special
line.
.Pp
The crunched binary ``kcopy'' can be built as follows:
.Pp
.nf
% crunchgen -m Makefile kcopy.conf # gen Makefile and kcopy.c
% make objs # build the component progams' .o files
% make # build the crunched binary kcopy
% kcopy sh # test that this invokes a sh shell
$ # it works!
.fi
.Pp
At this point the binary ``kcopy'' can be copied onto an install floppy
and hard-linked to the names of the component programs.
.Sh SEE ALSO
.Xr crunchide 1
.Sh CAVEATS
While
.Nm crunch
takes care to eliminate link conflicts between the component programs
of a crunched binary, conflicts are still possible between the
libraries that are linked in. Some shuffling in the order of
libraries may be required, and in some rare cases two libraries may
have an unresolveable conflict and thus cannot be crunched together.
.Pp
Some versions of the BSD build environment do not by default build the
intermediate object file for single-source file programs. The ``make
objs'' target must then be used to get those object files built, or
some other arrangements made.
.Sh AUTHOR
.Nm Crunch
was written by James da Silva <jds@cs.umd.edu>.
.sp 0
Copyright (c) 1994 University of Maryland. All Rights Reserved.

View file

@ -0,0 +1,856 @@
/*
* Copyright (c) 1994 University of Maryland
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of U.M. not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. U.M. makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
* U.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL U.M.
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: James da Silva, Systems Design and Analysis Group
* Computer Science Department
* University of Maryland at College Park
*/
/*
* ========================================================================
* crunchgen.c
*
* Generates a Makefile and main C file for a crunched executable,
* from specs given in a .conf file.
*/
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h>
#define CRUNCH_VERSION "0.2"
#define MAXLINELEN 16384
#define MAXFIELDS 2048
/* internal representation of conf file: */
/* simple lists of strings suffice for most parms */
typedef struct strlst {
struct strlst *next;
char *str;
} strlst_t;
/* progs have structure, each field can be set with "special" or calculated */
typedef struct prog {
struct prog *next;
char *name, *ident;
char *srcdir, *objdir;
strlst_t *objs, *objpaths;
strlst_t *links;
int goterror;
} prog_t;
/* global state */
strlst_t *srcdirs = NULL;
strlst_t *libs = NULL;
prog_t *progs = NULL;
char line[MAXLINELEN];
char confname[MAXPATHLEN], infilename[MAXPATHLEN];
char outmkname[MAXPATHLEN], outcfname[MAXPATHLEN], execfname[MAXPATHLEN];
char tempfname[MAXPATHLEN], cachename[MAXPATHLEN], curfilename[MAXPATHLEN];
int linenum = -1;
int goterror = 0;
char *pname = "crunchgen";
int verbose, readcache; /* options */
int reading_cache;
/* general library routines */
void status(char *str);
void out_of_memory(void);
void add_string(strlst_t **listp, char *str);
int is_dir(char *pathname);
int is_nonempty_file(char *pathname);
/* helper routines for main() */
void usage(void);
void parse_conf_file(void);
void gen_outputs(void);
int main(int argc, char **argv)
{
char *p;
int optc;
extern int optind;
extern char *optarg;
verbose = 1;
readcache = 1;
*outmkname = *outcfname = *execfname = '\0';
if(argc > 0) pname = argv[0];
while((optc = getopt(argc, argv, "m:c:e:fq")) != -1) {
switch(optc) {
case 'f': readcache = 0; break;
case 'q': verbose = 0; break;
case 'm': strcpy(outmkname, optarg); break;
case 'c': strcpy(outcfname, optarg); break;
case 'e': strcpy(execfname, optarg); break;
case '?':
default: usage();
}
}
argc -= optind;
argv += optind;
if(argc != 1) usage();
/*
* generate filenames
*/
strcpy(infilename, argv[0]);
/* confname = `basename infilename .conf` */
if((p=strrchr(infilename, '/')) != NULL) strcpy(confname, p+1);
else strcpy(confname, infilename);
if((p=strrchr(confname, '.')) != NULL && !strcmp(p, ".conf")) *p = '\0';
if(!*outmkname) sprintf(outmkname, "%s.mk", confname);
if(!*outcfname) sprintf(outcfname, "%s.c", confname);
if(!*execfname) sprintf(execfname, "%s", confname);
sprintf(cachename, "%s.cache", confname);
sprintf(tempfname, ".tmp_%sXXXXXX", confname);
if(mktemp(tempfname) == NULL) {
perror(tempfname);
exit(1);
}
parse_conf_file();
gen_outputs();
exit(goterror);
}
void usage(void)
{
fprintf(stderr,
"%s [-fq] [-m <makefile>] [-c <c file>] [-e <exec file>] <conffile>\n",
pname);
exit(1);
}
/*
* ========================================================================
* parse_conf_file subsystem
*
*/
/* helper routines for parse_conf_file */
void parse_one_file(char *filename);
void parse_line(char *line, int *fc, char **fv, int nf);
void add_srcdirs(int argc, char **argv);
void add_progs(int argc, char **argv);
void add_link(int argc, char **argv);
void add_libs(int argc, char **argv);
void add_special(int argc, char **argv);
prog_t *find_prog(char *str);
void add_prog(char *progname);
void parse_conf_file(void)
{
if(!is_nonempty_file(infilename)) {
fprintf(stderr, "%s: fatal: input file \"%s\" not found.\n",
pname, infilename);
exit(1);
}
parse_one_file(infilename);
if(readcache && is_nonempty_file(cachename)) {
reading_cache = 1;
parse_one_file(cachename);
}
}
void parse_one_file(char *filename)
{
char *fieldv[MAXFIELDS];
int fieldc;
void (*f)(int c, char **v);
FILE *cf;
sprintf(line, "reading %s", filename);
status(line);
strcpy(curfilename, filename);
if((cf = fopen(curfilename, "r")) == NULL) {
perror(curfilename);
goterror = 1;
return;
}
linenum = 0;
while(fgets(line, MAXLINELEN, cf) != NULL) {
linenum++;
parse_line(line, &fieldc, fieldv, MAXFIELDS);
if(fieldc < 1) continue;
if(!strcmp(fieldv[0], "srcdirs")) f = add_srcdirs;
else if(!strcmp(fieldv[0], "progs")) f = add_progs;
else if(!strcmp(fieldv[0], "ln")) f = add_link;
else if(!strcmp(fieldv[0], "libs")) f = add_libs;
else if(!strcmp(fieldv[0], "special")) f = add_special;
else {
fprintf(stderr, "%s:%d: skipping unknown command `%s'.\n",
curfilename, linenum, fieldv[0]);
goterror = 1;
continue;
}
if(fieldc < 2) {
fprintf(stderr,
"%s:%d: %s command needs at least 1 argument, skipping.\n",
curfilename, linenum, fieldv[0]);
goterror = 1;
continue;
}
f(fieldc, fieldv);
}
if(ferror(cf)) {
perror(curfilename);
goterror = 1;
}
fclose(cf);
}
void parse_line(char *line, int *fc, char **fv, int nf)
{
char *p;
p = line;
*fc = 0;
while(1) {
while(isspace(*p)) p++;
if(*p == '\0' || *p == '#') break;
if(*fc < nf) fv[(*fc)++] = p;
while(*p && !isspace(*p) && *p != '#') p++;
if(*p == '\0' || *p == '#') break;
*p++ = '\0';
}
if(*p) *p = '\0'; /* needed for '#' case */
}
void add_srcdirs(int argc, char **argv)
{
int i;
for(i=1;i<argc;i++) {
if(is_dir(argv[i]))
add_string(&srcdirs, argv[i]);
else {
fprintf(stderr, "%s:%d: `%s' is not a directory, skipping it.\n",
curfilename, linenum, argv[i]);
goterror = 1;
}
}
}
void add_progs(int argc, char **argv)
{
int i;
for(i=1;i<argc;i++)
add_prog(argv[i]);
}
void add_prog(char *progname)
{
prog_t *p1, *p2;
/* add to end, but be smart about dups */
for(p1 = NULL, p2 = progs; p2 != NULL; p1 = p2, p2 = p2->next)
if(!strcmp(p2->name, progname)) return;
p2 = malloc(sizeof(prog_t));
if(p2) p2->name = strdup(progname);
if(!p2 || !p2->name)
out_of_memory();
p2->next = NULL;
if(p1 == NULL) progs = p2;
else p1->next = p2;
p2->ident = p2->srcdir = p2->objdir = NULL;
p2->links = p2->objs = NULL;
p2->goterror = 0;
}
void add_link(int argc, char **argv)
{
int i;
prog_t *p = find_prog(argv[1]);
if(p == NULL) {
fprintf(stderr,
"%s:%d: no prog %s previously declared, skipping link.\n",
curfilename, linenum, argv[1]);
goterror = 1;
return;
}
for(i=2;i<argc;i++)
add_string(&p->links, argv[i]);
}
void add_libs(int argc, char **argv)
{
int i;
for(i=1;i<argc;i++)
add_string(&libs, argv[i]);
}
void add_special(int argc, char **argv)
{
int i;
prog_t *p = find_prog(argv[1]);
if(p == NULL) {
if(reading_cache) return;
fprintf(stderr,
"%s:%d: no prog %s previously declared, skipping special.\n",
curfilename, linenum, argv[1]);
goterror = 1;
return;
}
if(!strcmp(argv[2], "ident")) {
if(argc != 4) goto argcount;
if((p->ident = strdup(argv[3])) == NULL)
out_of_memory();
}
else if(!strcmp(argv[2], "srcdir")) {
if(argc != 4) goto argcount;
if((p->srcdir = strdup(argv[3])) == NULL)
out_of_memory();
}
else if(!strcmp(argv[2], "objdir")) {
if(argc != 4) goto argcount;
if((p->objdir = strdup(argv[3])) == NULL)
out_of_memory();
}
else if(!strcmp(argv[2], "objs")) {
p->objs = NULL;
for(i=3;i<argc;i++)
add_string(&p->objs, argv[i]);
}
else if(!strcmp(argv[2], "objpaths")) {
p->objpaths = NULL;
for(i=3;i<argc;i++)
add_string(&p->objpaths, argv[i]);
}
else {
fprintf(stderr, "%s:%d: bad parameter name `%s', skipping line.\n",
curfilename, linenum, argv[2]);
goterror = 1;
}
return;
argcount:
fprintf(stderr,
"%s:%d: too %s arguments, expected \"special %s %s <string>\".\n",
curfilename, linenum, argc < 4? "few" : "many", argv[1], argv[2]);
goterror = 1;
}
prog_t *find_prog(char *str)
{
prog_t *p;
for(p = progs; p != NULL; p = p->next)
if(!strcmp(p->name, str)) return p;
return NULL;
}
/*
* ========================================================================
* gen_outputs subsystem
*
*/
/* helper subroutines */
void remove_error_progs(void);
void fillin_program(prog_t *p);
void gen_specials_cache(void);
void gen_output_makefile(void);
void gen_output_cfile(void);
void fillin_program_objs(prog_t *p, char *path);
void top_makefile_rules(FILE *outmk);
void prog_makefile_rules(FILE *outmk, prog_t *p);
void output_strlst(FILE *outf, strlst_t *lst);
char *genident(char *str);
char *dir_search(char *progname);
void gen_outputs(void)
{
prog_t *p;
for(p = progs; p != NULL; p = p->next)
fillin_program(p);
remove_error_progs();
gen_specials_cache();
gen_output_cfile();
gen_output_makefile();
status("");
fprintf(stderr,
"Run \"make -f %s objs exe\" to build crunched binary.\n",
outmkname);
}
void fillin_program(prog_t *p)
{
char path[MAXPATHLEN];
char *srcparent;
strlst_t *s;
sprintf(line, "filling in parms for %s", p->name);
status(line);
if(!p->ident)
p->ident = genident(p->name);
if(!p->srcdir) {
srcparent = dir_search(p->name);
if(srcparent)
sprintf(path, "%s/%s", srcparent, p->name);
if(is_dir(path))
p->srcdir = strdup(path);
}
if(!p->objdir && p->srcdir) {
sprintf(path, "%s/obj", p->srcdir);
if(is_dir(path))
p->objdir = strdup(path);
else
p->objdir = p->srcdir;
}
if(p->srcdir) sprintf(path, "%s/Makefile", p->srcdir);
if(!p->objs && p->srcdir && is_nonempty_file(path))
fillin_program_objs(p, path);
if(!p->objpaths && p->objdir && p->objs)
for(s = p->objs; s != NULL; s = s->next) {
sprintf(line, "%s/%s", p->objdir, s->str);
add_string(&p->objpaths, line);
}
if(!p->srcdir && verbose)
fprintf(stderr, "%s: %s: warning: could not find source directory.\n",
infilename, p->name);
if(!p->objs && verbose)
fprintf(stderr, "%s: %s: warning: could not find any .o files.\n",
infilename, p->name);
if(!p->objpaths) {
fprintf(stderr,
"%s: %s: error: no objpaths specified or calculated.\n",
infilename, p->name);
p->goterror = goterror = 1;
}
}
void fillin_program_objs(prog_t *p, char *path)
{
char *obj, *cp;
int rc;
FILE *f;
/* discover the objs from the srcdir Makefile */
if((f = fopen(tempfname, "w")) == NULL) {
perror(tempfname);
goterror = 1;
return;
}
fprintf(f, ".include \"%s\"\n", path);
fprintf(f, ".if defined(PROG) && !defined(OBJS)\n");
fprintf(f, "OBJS=${PROG}.o\n");
fprintf(f, ".endif\n");
fprintf(f, "crunchgen_objs:\n\t@echo 'OBJS= '${OBJS}\n");
fclose(f);
sprintf(line, "make -f %s crunchgen_objs 2>&1", tempfname);
if((f = popen(line, "r")) == NULL) {
perror("submake pipe");
goterror = 1;
return;
}
while(fgets(line, MAXLINELEN, f)) {
if(strncmp(line, "OBJS= ", 6)) {
fprintf(stderr, "make error: %s", line);
goterror = 1;
continue;
}
cp = line + 6;
while(isspace(*cp)) cp++;
while(*cp) {
obj = cp;
while(*cp && !isspace(*cp)) cp++;
if(*cp) *cp++ = '\0';
add_string(&p->objs, obj);
while(isspace(*cp)) cp++;
}
}
if((rc=pclose(f)) != 0) {
fprintf(stderr, "make error: make returned %d\n", rc);
goterror = 1;
}
unlink(tempfname);
}
void remove_error_progs(void)
{
prog_t *p1, *p2;
p1 = NULL; p2 = progs;
while(p2 != NULL) {
if(!p2->goterror)
p1 = p2, p2 = p2->next;
else {
/* delete it from linked list */
fprintf(stderr, "%s: %s: ignoring program because of errors.\n",
infilename, p2->name);
if(p1) p1->next = p2->next;
else progs = p2->next;
p2 = p2->next;
}
}
}
void gen_specials_cache(void)
{
FILE *cachef;
prog_t *p;
sprintf(line, "generating %s", cachename);
status(line);
if((cachef = fopen(cachename, "w")) == NULL) {
perror(cachename);
goterror = 1;
return;
}
fprintf(cachef, "# %s - parm cache generated from %s by crunchgen %s\n\n",
cachename, infilename, CRUNCH_VERSION);
for(p = progs; p != NULL; p = p->next) {
fprintf(cachef, "\n");
if(p->srcdir)
fprintf(cachef, "special %s srcdir %s\n", p->name, p->srcdir);
if(p->objdir)
fprintf(cachef, "special %s objdir %s\n", p->name, p->objdir);
if(p->objs) {
fprintf(cachef, "special %s objs", p->name);
output_strlst(cachef, p->objs);
}
fprintf(cachef, "special %s objpaths", p->name);
output_strlst(cachef, p->objpaths);
}
fclose(cachef);
}
void gen_output_makefile(void)
{
prog_t *p;
FILE *outmk;
sprintf(line, "generating %s", outmkname);
status(line);
if((outmk = fopen(outmkname, "w")) == NULL) {
perror(outmkname);
goterror = 1;
return;
}
fprintf(outmk, "# %s - generated from %s by crunchgen %s\n\n",
outmkname, infilename, CRUNCH_VERSION);
top_makefile_rules(outmk);
for(p = progs; p != NULL; p = p->next)
prog_makefile_rules(outmk, p);
fprintf(outmk, "\n# ========\n");
fclose(outmk);
}
void gen_output_cfile(void)
{
extern char *crunched_skel[];
char **cp;
FILE *outcf;
prog_t *p;
strlst_t *s;
sprintf(line, "generating %s", outcfname);
status(line);
if((outcf = fopen(outcfname, "w")) == NULL) {
perror(outcfname);
goterror = 1;
return;
}
fprintf(outcf,
"/* %s - generated from %s by crunchgen %s */\n",
outcfname, infilename, CRUNCH_VERSION);
fprintf(outcf, "#define EXECNAME \"%s\"\n", execfname);
for(cp = crunched_skel; *cp != NULL; cp++)
fprintf(outcf, "%s\n", *cp);
for(p = progs; p != NULL; p = p->next)
fprintf(outcf, "extern int _crunched_%s_stub();\n", p->ident);
fprintf(outcf, "\nstruct stub entry_points[] = {\n");
for(p = progs; p != NULL; p = p->next) {
fprintf(outcf, "\t{ \"%s\", _crunched_%s_stub },\n",
p->name, p->ident);
for(s = p->links; s != NULL; s = s->next)
fprintf(outcf, "\t{ \"%s\", _crunched_%s_stub },\n",
s->str, p->ident);
}
fprintf(outcf, "\t{ EXECNAME, crunched_main },\n");
fprintf(outcf, "\t{ NULL, NULL }\n};\n");
fclose(outcf);
}
char *genident(char *str)
{
char *n,*s,*d;
/*
* generates a Makefile/C identifier from a program name, mapping '-' to
* '_' and ignoring all other non-identifier characters. This leads to
* programs named "foo.bar" and "foobar" to map to the same identifier.
*/
if((n = strdup(str)) == NULL)
return NULL;
for(d = s = n; *s != '\0'; s++) {
if(*s == '-') *d++ = '_';
else if(*s == '_' || isalnum(*s)) *d++ = *s;
}
*d = '\0';
return n;
}
char *dir_search(char *progname)
{
char path[MAXPATHLEN];
strlst_t *dir;
for(dir=srcdirs; dir != NULL; dir=dir->next) {
sprintf(path, "%s/%s", dir->str, progname);
if(is_dir(path)) return dir->str;
}
return NULL;
}
void top_makefile_rules(FILE *outmk)
{
prog_t *p;
fprintf(outmk, "LIBS=");
output_strlst(outmk, libs);
fprintf(outmk, "CRUNCHED_OBJS=");
for(p = progs; p != NULL; p = p->next)
fprintf(outmk, " %s.lo", p->name);
fprintf(outmk, "\n");
fprintf(outmk, "SUBMAKE_TARGETS=");
for(p = progs; p != NULL; p = p->next)
fprintf(outmk, " %s_make", p->ident);
fprintf(outmk, "\n\n");
fprintf(outmk, "%s: %s.o $(CRUNCHED_OBJS)\n",
execfname, execfname);
fprintf(outmk, "\t$(CC) -static -o %s %s.o $(CRUNCHED_OBJS) $(LIBS)\n",
execfname, execfname);
fprintf(outmk, "\tstrip %s\n", execfname);
fprintf(outmk, "all: objs exe\nobjs: $(SUBMAKE_TARGETS)\n");
fprintf(outmk, "exe: %s\n", execfname);
fprintf(outmk, "clean:\n\trm -f %s *.lo *.o *_stub.c\n",
execfname);
}
void prog_makefile_rules(FILE *outmk, prog_t *p)
{
fprintf(outmk, "\n# -------- %s\n\n", p->name);
if(p->srcdir && p->objs) {
fprintf(outmk, "%s_SRCDIR=%s\n", p->ident, p->srcdir);
fprintf(outmk, "%s_OBJS=", p->ident);
output_strlst(outmk, p->objs);
fprintf(outmk, "%s_make:\n", p->ident);
fprintf(outmk, "\t(cd $(%s_SRCDIR); make $(%s_OBJS))\n\n",
p->ident, p->ident);
}
else
fprintf(outmk, "%s_make:\n\t@echo \"** cannot make objs for %s\"\n\n",
p->ident, p->name);
fprintf(outmk, "%s_OBJPATHS=", p->ident);
output_strlst(outmk, p->objpaths);
fprintf(outmk, "%s_stub.c:\n", p->name);
fprintf(outmk, "\techo \""
"int _crunched_%s_stub(int argc, char **argv, char **envp)"
"{return main(argc,argv,envp);}\" >%s_stub.c\n",
p->ident, p->name);
fprintf(outmk, "%s.lo: %s_stub.o $(%s_OBJPATHS)\n",
p->name, p->name, p->ident);
fprintf(outmk, "\tld -dc -r -o %s.lo %s_stub.o $(%s_OBJPATHS)\n",
p->name, p->name, p->ident);
fprintf(outmk, "\tcrunchide -k __crunched_%s_stub %s.lo\n",
p->ident, p->name);
}
void output_strlst(FILE *outf, strlst_t *lst)
{
for(; lst != NULL; lst = lst->next)
fprintf(outf, " %s", lst->str);
fprintf(outf, "\n");
}
/*
* ========================================================================
* general library routines
*
*/
void status(char *str)
{
static int lastlen = 0;
int len, spaces;
if(!verbose) return;
len = strlen(str);
spaces = lastlen - len;
if(spaces < 1) spaces = 1;
fprintf(stderr, " [%s]%*.*s\r", str, spaces, spaces, " ");
fflush(stderr);
lastlen = len;
}
void out_of_memory(void)
{
fprintf(stderr, "%s: %d: out of memory, stopping.\n", infilename, linenum);
exit(1);
}
void add_string(strlst_t **listp, char *str)
{
strlst_t *p1, *p2;
/* add to end, but be smart about dups */
for(p1 = NULL, p2 = *listp; p2 != NULL; p1 = p2, p2 = p2->next)
if(!strcmp(p2->str, str)) return;
p2 = malloc(sizeof(strlst_t));
if(p2) p2->str = strdup(str);
if(!p2 || !p2->str)
out_of_memory();
p2->next = NULL;
if(p1 == NULL) *listp = p2;
else p1->next = p2;
}
int is_dir(char *pathname)
{
struct stat buf;
if(stat(pathname, &buf) == -1)
return 0;
return S_ISDIR(buf.st_mode);
}
int is_nonempty_file(char *pathname)
{
struct stat buf;
if(stat(pathname, &buf) == -1)
return 0;
return S_ISREG(buf.st_mode) && buf.st_size > 0;
}

View file

@ -0,0 +1,15 @@
#! /bin/sh
# idea and sed lines taken straight from flex
cat <<!EOF
/* File created via mkskel.sh */
char *crunched_skel[] = {
!EOF
sed 's/\\/&&/g' $* | sed 's/"/\\"/g' | sed 's/.*/ "&",/'
cat <<!EOF
0
};
!EOF

View file

@ -0,0 +1,4 @@
PROG= crunchide
.include <bsd.prog.mk>

View file

@ -0,0 +1,68 @@
.\"
.\" Copyright (c) 1994 University of Maryland
.\" All Rights Reserved.
.\"
.\" Permission to use, copy, modify, distribute, and sell this software and its
.\" documentation for any purpose is hereby granted without fee, provided that
.\" the above copyright notice appear in all copies and that both that
.\" copyright notice and this permission notice appear in supporting
.\" documentation, and that the name of U.M. not be used in advertising or
.\" publicity pertaining to distribution of the software without specific,
.\" written prior permission. U.M. makes no representations about the
.\" suitability of this software for any purpose. It is provided "as is"
.\" without express or implied warranty.
.\"
.\" U.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL U.M.
.\" BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
.\" IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" Author: James da Silva, Systems Design and Analysis Group
.\" Computer Science Department
.\" University of Maryland at College Park
.\"
.Dd June 14, 1994
.Dt CRUNCHIDE 1
.Os BSD 4
.Sh NAME
.Nm crunchide
.Nd hides symbol names from ld, for crunching programs together
.Sh SYNOPSIS
.Nm crunchide
.Op Fl f Ar keep-list-file
.Op Fl k Ar keep-symbol
.Op Ar object-file ...
.Sh DESCRIPTION
.Nm Crunchide
hides the global symbols of
.Ar object-file
such that they are ignored by subsequent runs of the linker,
.Xr ld 1 .
Some symbols may be left visible via the
.Fl k Ar keep-symbol
and
.Fl f Ar keep-list-file
options. The
.Ar keep-list-file
must contain a list of symbols to keep visible, one symbol per line.
Note that the C compiler prepends an underscore in front of
symbols, so to keep the C function ``foo'' visible, the option
\&``-k _foo'' must be used.
.Pp
.Nm Crunchide
is designed as a companion program for
.Xr crunchgen 1 ,
which automates the process of creating crunched binaries from
multiple component programs.
.Sh SEE ALSO
.Xr crunchgen 1 ,
.Xr ld 1
.Sh AUTHOR
.Nm Crunch
was written by James da Silva <jds@cs.umd.edu>.
.sp 0
Copyright (c) 1994 University of Maryland. All Rights Reserved.

View file

@ -0,0 +1,321 @@
/*
* Copyright (c) 1994 University of Maryland
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of U.M. not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. U.M. makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
* U.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL U.M.
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: James da Silva, Systems Design and Analysis Group
* Computer Science Department
* University of Maryland at College Park
*/
/*
* crunchide.c - tiptoes through an a.out symbol table, hiding all defined
* global symbols. Allows the user to supply a "keep list" of symbols
* that are not to be hidden. This program relies on the use of the
* linker's -dc flag to actually put global bss data into the file's
* bss segment (rather than leaving it as undefined "common" data).
*
* The point of all this is to allow multiple programs to be linked
* together without getting multiple-defined errors.
*
* For example, consider a program "foo.c". It can be linked with a
* small stub routine, called "foostub.c", eg:
* int foo_main(int argc, char **argv){ return main(argc, argv); }
* like so:
* cc -c foo.c foostub.c
* ld -dc -r foo.o foostub.o -o foo.combined.o
* crunchide -k _foo_main foo.combined.o
* at this point, foo.combined.o can be linked with another program
* and invoked with "foo_main(argc, argv)". foo's main() and any
* other globals are hidden and will not conflict with other symbols.
*
* TODO:
* - resolve the theoretical hanging reloc problem (see check_reloc()
* below). I have yet to see this problem actually occur in any real
* program. In what cases will gcc/gas generate code that needs a
* relative reloc from a global symbol, other than PIC? The
* solution is to not hide the symbol from the linker in this case,
* but to generate some random name for it so that it doesn't link
* with anything but holds the place for the reloc.
* - arrange that all the BSS segments start at the same address, so
* that the final crunched binary BSS size is the max of all the
* component programs' BSS sizes, rather than their sum.
*/
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <a.out.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/errno.h>
char *pname = "crunchide";
void usage(void);
void add_to_keep_list(char *symbol);
void add_file_to_keep_list(char *filename);
void hide_syms(char *filename);
int main(argc, argv)
int argc;
char **argv;
{
int ch;
if(argc > 0) pname = argv[0];
while ((ch = getopt(argc, argv, "k:f:")) != EOF)
switch(ch) {
case 'k':
add_to_keep_list(optarg);
break;
case 'f':
add_file_to_keep_list(optarg);
break;
default:
usage();
}
argc -= optind;
argv += optind;
if(argc == 0) usage();
while(argc) {
hide_syms(*argv);
argc--, argv++;
}
return 0;
}
void usage(void)
{
fprintf(stderr,
"Usage: %s [-k <symbol-name>] [-f <keep-list-file>] <files> ...\n",
pname);
exit(1);
}
/* ---------------------------- */
struct keep {
struct keep *next;
char *sym;
} *keep_list;
void add_to_keep_list(char *symbol)
{
struct keep *newp, *prevp, *curp;
int cmp;
for(curp = keep_list, prevp = NULL; curp; prevp = curp, curp = curp->next)
if((cmp = strcmp(symbol, curp->sym)) <= 0) break;
if(curp && cmp == 0)
return; /* already in table */
newp = (struct keep *) malloc(sizeof(struct keep));
if(newp) newp->sym = strdup(symbol);
if(newp == NULL || newp->sym == NULL) {
fprintf(stderr, "%s: out of memory for keep list\n", pname);
exit(1);
}
newp->next = curp;
if(prevp) prevp->next = newp;
else keep_list = newp;
}
int in_keep_list(char *symbol)
{
struct keep *curp;
int cmp;
for(curp = keep_list; curp; curp = curp->next)
if((cmp = strcmp(symbol, curp->sym)) <= 0) break;
return curp && cmp == 0;
}
void add_file_to_keep_list(char *filename)
{
FILE *keepf;
char symbol[1024];
int len;
if((keepf = fopen(filename, "r")) == NULL) {
perror(filename);
usage();
}
while(fgets(symbol, 1024, keepf)) {
len = strlen(symbol);
if(len && symbol[len-1] == '\n')
symbol[len-1] = '\0';
add_to_keep_list(symbol);
}
fclose(keepf);
}
/* ---------------------- */
int nsyms, ntextrel, ndatarel;
struct exec *hdrp;
char *aoutdata, *strbase;
struct relocation_info *textrel, *datarel;
struct nlist *symbase;
#define SYMSTR(sp) &strbase[(sp)->n_un.n_strx]
/* is the symbol a global symbol defined in the current file? */
#define IS_GLOBAL_DEFINED(sp) \
(((sp)->n_type & N_EXT) && ((sp)->n_type & N_TYPE) != N_UNDF)
/* is the relocation entry dependent on a symbol? */
#define IS_SYMBOL_RELOC(rp) \
((rp)->r_extern||(rp)->r_baserel||(rp)->r_jmptable)
void check_reloc(char *filename, struct relocation_info *relp);
void hide_syms(char *filename)
{
int inf, outf, rc;
struct stat infstat;
struct relocation_info *relp;
struct nlist *symp;
/*
* Open the file and do some error checking.
*/
if((inf = open(filename, O_RDWR)) == -1) {
perror(filename);
return;
}
if(fstat(inf, &infstat) == -1) {
perror(filename);
close(inf);
return;
}
if(infstat.st_size < sizeof(struct exec)) {
fprintf(stderr, "%s: short file\n", filename);
close(inf);
return;
}
/*
* Read the entire file into memory. XXX - Really, we only need to
* read the header and from TRELOFF to the end of the file.
*/
if((aoutdata = (char *) malloc(infstat.st_size)) == NULL) {
fprintf(stderr, "%s: too big to read into memory\n", filename);
close(inf);
return;
}
if((rc = read(inf, aoutdata, infstat.st_size)) < infstat.st_size) {
fprintf(stderr, "%s: read error: %s\n", filename,
rc == -1? strerror(errno) : "short read");
close(inf);
return;
}
/*
* Check the header and calculate offsets and sizes from it.
*/
hdrp = (struct exec *) aoutdata;
if(N_BADMAG(*hdrp)) {
fprintf(stderr, "%s: bad magic: not an a.out file\n", filename);
close(inf);
return;
}
#ifdef __FreeBSD__
textrel = (struct relocation_info *) (aoutdata + N_RELOFF(*hdrp));
datarel = (struct relocation_info *) (aoutdata + N_RELOFF(*hdrp) +
hdrp->a_trsize);
#else
textrel = (struct relocation_info *) (aoutdata + N_TRELOFF(*hdrp));
datarel = (struct relocation_info *) (aoutdata + N_DRELOFF(*hdrp));
#endif
symbase = (struct nlist *) (aoutdata + N_SYMOFF(*hdrp));
strbase = (char *) (aoutdata + N_STROFF(*hdrp));
ntextrel = hdrp->a_trsize / sizeof(struct relocation_info);
ndatarel = hdrp->a_drsize / sizeof(struct relocation_info);
nsyms = hdrp->a_syms / sizeof(struct nlist);
/*
* Zap the type field of all globally-defined symbols. The linker will
* subsequently ignore these entries. Don't zap any symbols in the
* keep list.
*/
for(symp = symbase; symp < symbase + nsyms; symp++)
if(IS_GLOBAL_DEFINED(symp) && !in_keep_list(SYMSTR(symp)))
symp->n_type = 0;
/*
* Check whether the relocation entries reference any symbols that we
* just zapped. I don't know whether ld can handle this case, but I
* haven't encountered it yet. These checks are here so that the program
* doesn't fail silently should such symbols be encountered.
*/
for(relp = textrel; relp < textrel + ntextrel; relp++)
check_reloc(filename, relp);
for(relp = datarel; relp < datarel + ndatarel; relp++)
check_reloc(filename, relp);
/*
* Write the .o file back out to disk. XXX - Really, we only need to
* write the symbol table entries back out.
*/
lseek(inf, 0, SEEK_SET);
if((rc = write(inf, aoutdata, infstat.st_size)) < infstat.st_size) {
fprintf(stderr, "%s: write error: %s\n", filename,
rc == -1? strerror(errno) : "short write");
}
close(inf);
}
void check_reloc(char *filename, struct relocation_info *relp)
{
/* bail out if we zapped a symbol that is needed */
if(IS_SYMBOL_RELOC(relp) && symbase[relp->r_symbolnum].n_type == 0) {
fprintf(stderr,
"%s: oops, have hanging relocation for %s: bailing out!\n",
filename, SYMSTR(&symbase[relp->r_symbolnum]));
exit(1);
}
}

View file

@ -0,0 +1,32 @@
CRUNCHED= fixit
# below is boiler-plate to make $(CRUNCHED) from $(CRUNCHED).conf
# I'd use PROG instead of CRUNCHED, but the system makefiles REALLY want
# to build things in the normal way if you use PROG.
CONF= $(CRUNCHED).conf
OUTMK= $(CRUNCHED).mk
OUTPUTS= $(OUTMK) $(CRUNCHED).c $(CRUNCHED).cache
NOMAN=
CLEANFILES+=$(CRUNCHED) *.o *.lo *.c *.mk *.cache
CLEANDIRFILES+=$(OUTPUTS)
all: $(CRUNCHED)
exe: $(CRUNCHED)
$(OUTPUTS): $(CONF)
crunchgen ${.CURDIR}/$(CONF)
$(CRUNCHED): $(OUTPUTS) submake
submake:
make -f $(OUTMK)
objs:
make -f $(OUTMK) objs
cleandir:
rm -f $(CLEANDIRFILES)
.include <bsd.prog.mk>

View file

@ -0,0 +1,26 @@
# $Id: filesystem.conf,v 1.2 1994/06/24 16:39:29 jkh Exp $
srcdirs /usr/src/bin /usr/src/sbin /usr/src/gnu/usr.bin /usr/src/usr.sbin
# /bin
progs sh expr ls mkdir rm sync test
ln test [
# These are needed because of UN*X's idiotic way of indicating that something
# is a login shell.
ln sh -
ln sh -sh
# /sbin
progs disklabel fdisk halt init mount mount_pcfs newfs umount
# /usr/bin
progs cpio gzip
ln gzip gunzip
ln gzip gzcat
ln gzip zcat
# /usr/sbin
progs bad144
libs -lutil

View file

@ -0,0 +1,41 @@
# fixit.conf - put in anything we think we might want on a fixit floppy
# first, we list the source dirs that our programs reside in. These are
# searched in order listed to find the dir containing each program.
srcdirs /usr/src/bin /usr/src/sbin /usr/src/usr.bin /usr/src/usr.sbin
srcdirs /usr/src/gnu/usr.bin
# second, we list all the programs we want to include in our crunched binary.
# The order doesn't matter. Any program that needs hard links to it gets an
# `ln' directive.
# /bin stuff
progs cat chmod cp date dd df echo ed expr hostname kill ln ls mkdir
progs mt mv pwd rcp rm rmdir sh sleep stty sync test
ln test [
ln sh -sh # init invokes the shell this way
# /sbin stuff
progs badsect chown clri disklabel dump dmesg fdisk fsck halt ifconfig init
progs mknod mount newfs ping reboot restore swapon umount
ln dump rdump
ln restore rrestore
# /usr/bin stuff
progs ftp rsh sed telnet rlogin vi
# gnu stuff
progs cpio gzip
ln gzip gunzip
ln gzip gzcat
# finally, we specify the libraries to link in with our binary
libs -lcrypt -ltelnet -lutil -ll
libs -lcurses -ltermcap

View file

@ -0,0 +1,18 @@
# $Id: kcopy.conf,v 1.3 1994/06/24 16:39:30 jkh Exp $
srcdirs /usr/src/bin /usr/src/sbin
# Programs from bin/
progs sh cp echo test
ln test [
# These are needed because of UN*X's idiotic way of indicating that something
# is a login shell.
ln sh -
ln sh -sh
#
# Programs from sbin/
progs mount mount_isofs mount_pcfs fsck halt init umount
libs -lutil

View file

@ -0,0 +1,146 @@
# really-big.conf - just about everything, just for testing.
# This ends up having some good examples of the use of specials for
# those hard-to-reach programs. I stopped when I got tired, but we
# could probably get even more stuff (like libexec stuff) in here.
#
# This produces a 4608000 byte binary. Pretty sick and twisted, eh?
# =========================================================================
srcdirs /usr/src/bin
progs cat chmod cp csh date dd df domainname echo ed expr hostname kill
progs ln ls mkdir mt mv ps pwd rcp rm rmail rmdir sh sleep stty sync test
ln test [
ln sh -sh
# =========================================================================
srcdirs /usr/src/sbin
progs badsect bim clri disklabel dmesg dump dumpfs fdisk fsck halt
progs ifconfig init mknod modload modunload mount mount_fdesc mount_isofs
progs mount_kernfs mount_lofs mount_msdos mount_portal mount_procfs mountd
progs newfs nfsd nfsiod ping quotacheck reboot restore route routed savecore
progs shutdown slattach swapon ttyflags tunefs umount
# shell scripts: fastboot
ln dump rdump
ln restore rrestore
# =========================================================================
srcdirs /usr/src/usr.bin
progs apropos ar asa at basename biff cal calendar cap_mkdb checknr chpass
progs cksum cmp col colcrt colrm column comm compress crontab ctags cut
progs dirname du env error expand false file find finger fmt fold fpr from
progs fsplit fstat ftp getconf getopt gprof head hexdump id indent ipcrm
progs ipcs join kdump ktrace last lastcomm leave lex lock logger locate
progs login logname look m4 machine mail make man mesg mkfifo
progs mkstr modstat more msgs netstat newsyslog nfsstat nice nm nohup
progs pagesize passwd paste patch pr printenv printf quota ranlib
progs renice rev rlogin rpcgen rpcinfo rsh rup ruptime rusers rwall rwho
progs script sed showmount size soelim split strings strip su tail talk
progs tcopy tee telnet tftp time tip tn3270 touch tput tr true tset tsort
progs tty ul uname unexpand unifdef uniq units unvis users uudecode uuencode
progs vacation vgrind vi vis vmstat w wall wc what whatis whereis who
progs whois window write xargs xinstall xstr yacc yes ypcat ypmatch ypwhich
# shell scripts: lorder mkdep shar which
# problems: rdist uses libcompat.a(regex.o), which conflicts with
# libedit(readline.o) over regerror().
# special requirements
special locate srcdir /usr/src/usr.bin/locate/locate
special tn3270 srcdir /usr/src/usr.bin/tn3270/tn3270
# =========================================================================
srcdirs /usr/src/usr.sbin
progs ac accton amd arp bad144 catman chown chroot config config.new cron
progs dev_mkdb diskpart edquota flcopy gettable grfinfo hilinfo htable inetd
progs iostat iteconfig kvm_mkdb mrouted mtree named portmap pppd
progs pstat pwd_mkdb quot quotaon rarpd rbootd repquota rmt rpc.bootparamd
progs rwhod sa sliplogin slstats spray sysctl syslogd tcpdump
progs traceroute trpt trsp update vipw vnconfig ypbind yppoll ypset
special amd srcdir /usr/src/usr.sbin/amd/amd
special amd objs vers.amd.o afs_ops.o am_ops.o clock.o util.o xutil.o efs_ops.o mapc.o info_file.o info_hes.o info_ndbm.o info_passwd.o info_nis.o info_union.o map.o srvr_afs.o srvr_nfs.o mntfs.o misc_rpc.o mount_fs.o mtab.o mtab_bsd.o nfs_ops.o nfs_prot_svc.o nfs_start.o nfs_subr.o opts.o pfs_ops.o rpc_fwd.o sched.o sfs_ops.o amq_svc.o amq_subr.o umount_fs.o host_ops.o nfsx_ops.o ufs_ops.o ifs_ops.o amd.o get_args.o restart.o wire.o
srcdirs /usr/src/usr.sbin/lpr # lpr subsystem
progs lpr lpc lpq lprm pac lptest
special lpr srcdir /usr/src/usr.sbin/lpr/lpr
srcdirs /usr/src/usr.sbin/sendmail # sendmail subsystem
progs mailstats makemap praliases sendmail
special sendmail srcdir /usr/src/usr.sbin/sendmail/src
ln sendmail newaliases
ln sendmail mailq
srcdirs /usr/src/usr.sbin/timed # timed & timedc
progs timed timedc
special timed srcdir /usr/src/usr.sbin/timed/timed
srcdirs /usr/src/usr.sbin/yp # yp subsystem
progs ypbind ypwhich ypcat ypmatch ypset yppoll
# =========================================================================
srcdirs /usr/src/gnu/usr.bin
progs bc cpio diff diff3 gas gawk grep gzip sdiff sort tar
# shell scripts: send-pr
srcdirs /usr/src/gnu/usr.bin/ld # ldd and ldconfig
progs ld ldd ldconfig
# rcs stuff loses because there are cross dependencies between librcs.a and
# the individual programs. The solution would be to specify the objpaths
# directly for each one, and include the full path to librcs.a each the
# objpaths.
# srcdirs /usr/src/gnu/usr.bin/rcs # rcs subsystem
# progs ci co ident merge rcs rcsclean rcsdiff rcsmerge rlog
# # shell script: rcsfreeze
# special rcs srcdir /usr/src/gnu/usr.bin/rcs/rcs
# libs /usr/src/gnu/usr.bin/rcs/lib/obj/librcs.a
# gdb loses too
# progs gdb
# special gdb srcdir /usr/src/gnu/usr.bin/gdb/gdb
# libs /usr/src/gnu/usr.bin/gdb/bfd/obj/libbfd.a
# libs /usr/src/gnu/usr.bin/gdb/readline/obj/libreadline.a
# libs /usr/src/gnu/usr.bin/gdb/libiberty/obj/libiberty.a
# groff has the same problem as rcs
# srcdirs /usr/src/gnu/usr.bin/groff # groff subsystem
# progs groff troff tbl pic eqn grops grotty grodvi refer lookbib
# progs indxbib lkbib tfmtodit addftinfo pfbtops psbb
# shell script: nroff
# special groff srcdir /usr/src/gnu/usr.bin/groff/groff
# libs /usr/src/gnu/usr.bin/groff/libgroff/obj/libgroff.a
# libs /usr/src/gnu/usr.bin/groff/libbib/obj/libbib.a
# libs /usr/src/gnu/usr.bin/groff/libdriver/obj/libdriver.a
srcdirs /usr/src/gnu/usr.bin/gcc2 # gcc & friends
progs cc cpp cc1
# cc1 has the same problem as rcs and groff, but since there's only one program
# I'll go ahead and solve it as an example.
special cc1 objpaths /usr/src/gnu/usr.bin/gcc2/cc1/obj/c-parse.o /usr/src/gnu/usr.bin/gcc2/cc1/obj/c-lang.o /usr/src/gnu/usr.bin/gcc2/cc1/obj/c-lex.o /usr/src/gnu/usr.bin/gcc2/cc1/obj/c-pragma.o /usr/src/gnu/usr.bin/gcc2/cc1/obj/c-decl.o /usr/src/gnu/usr.bin/gcc2/cc1/obj/c-typeck.o /usr/src/gnu/usr.bin/gcc2/cc1/obj/c-convert.o /usr/src/gnu/usr.bin/gcc2/cc1/obj/c-aux-info.o /usr/src/gnu/usr.bin/gcc2/cc1/obj/c-iterate.o /usr/src/gnu/usr.bin/gcc2/common/obj/libcc1.a
ln gzip gunzip
ln gzip gzcat
libs -ledit -lgnumalloc -lc -lcrypt -ltermcap -lcurses -ltelnet -lutil -lkvm
libs -ll -ly -lm -lresolv -lrpcsvc -lcompat

11
contrib/manctl/Makefile Normal file
View file

@ -0,0 +1,11 @@
# Makefile
# $Id: Makefile,v 1.4 1994/05/26 20:16:49 csgr Exp $
all:
@echo -n
install: all
install -c -o ${BINOWN} -g ${BINGRP} -m 555 ${.CURDIR}/manctl.sh \
${DESTDIR}/usr/sbin/manctl
.include <bsd.prog.mk>

376
contrib/manctl/manctl.sh Normal file
View file

@ -0,0 +1,376 @@
#!/bin/sh
#
# Copyright (c) 1994 Geoffrey M. Rehmet, Rhodes University
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by Geoffrey M. Rehmet
# 4. Neither the name of Geoffrey M. Rehmet nor that of Rhodes University
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL GEOFFREY M. REHMET OR RHODES UNIVERSITY BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $Id: manctl.sh,v 1.4 1994/04/18 18:46:50 csgr Exp $
#
# manctl:
# a utility for manipulating manual pages
# functions:
# compress uncompressed man pages (elliminating .so's)
# this is now two-pass. If possible, .so's
# are replaced with hard links
# uncompress compressed man pages
# purge old formatted man pages (not implemented yet)
# Things to watch out for:
# Hard links - careful with g(un)zipping!
# .so's - throw everything through soelim before gzip!
# symlinks - ignore these - eg: expn is its own man page:
# don't want to compress this!
#
PATH=/bin:/sbin:/usr/bin:/usr/sbin
#
# purge cat? directories
#
do_purge()
{
echo "purge $@" 2>&1
echo "not implemented yet\n" 2>&1
}
#
# Uncompress one page
#
uncompress_page()
{
local pname
local fname
local sect
local ext
# break up file name
pname=$1
IFS='.' ; set $pname
# less than 3 fields - don't know what to do with this
if [ $# -lt 3 ] ; then
IFS=" " ; echo ignoring $pname 1>&2 ; return 0 ;
fi
# construct name and section
fname=$1 ; shift
while [ $# -gt 2 ] ; do
fname=$fname.$1
shift
done
sect=$1
ext=$2
IFS=" "
case "$ext" in
gz|Z) {
IFS=" " ; set `file $pname`
if [ $2 != "gzip" ] ; then
echo moving hard link $pname 1>&2
mv $pname $fname.$ext # link
else
if [ $2 != "symbolic" ] ; then
echo gunzipping page $pname 1>&2
gunzip -c $pname > /tmp/manager.$$
chmod u+w $pname
cp /tmp/manager.$$ $pname
chmod 444 $pname
mv $pname $fname.$sect
rm /tmp/manager.$$
else
# skip symlinks - this can be
# a program like expn, which is
# its own man page !
echo skipping symlink $pname 1>&2
fi
fi };;
*) {
IFS=" "
echo skipping file $pname 1>&2
} ;;
esac
# reset IFS - this is important!
IFS=" "
}
#
# Uncompress manpages in paths
#
do_uncompress()
{
local i
local dir
local workdir
workdir=`pwd`
while [ $# != 0 ] ; do
if [ -d $1 ] ; then
dir=$1
cd $dir
for i in * ; do
case $i in
*cat?) ;; # ignore cat directories
*) {
if [ -d $i ] ; then
do_uncompress $i
else
if [ -e $i ] ; then
uncompress_page $i
fi
fi } ;;
esac
done
cd $workdir
else
echo "directory $1 not found" 1>&2
fi
shift
done
}
#
# Remove .so's from one file
#
so_purge_page()
{
local so_entries
local lines
local fname
so_entries=`grep "^\.so" $1 | wc -l`
if [ $so_entries -eq 0 ] ; then ; return 0 ; fi
# we have a page with a .so in it
echo $1 contains a .so entry 2>&1
# now check how many lines in the file
lines=`wc -l < $1`
# if the file is only one line long, we can replace it
# with a hard link!
if [ $lines -eq 1 ] ; then
fname=$1;
echo replacing $fname with a hard link
set `cat $fname`;
rm -f $fname
ln ../$2 $fname
else
echo inlining page $fname 1>&2
cat $fname | \
(cd .. ; soelim ) > /tmp/manager.$$
chmod u+w $fname
cp /tmp/manager.$$ $fname
chmod 444 $fname
fi
}
#
# Remove .so entries from man pages
# If a page consists of just one line with a .so,
# replace it with a hard link
#
remove_so()
{
local pname
local fname
local sect
# break up file name
pname=$1
IFS='.' ; set $pname
if [ $# -lt 2 ] ; then
IFS=" " ; echo ignoring $pname 1>&2 ; return 0 ;
fi
# construct name and section
fname=$1 ; shift
while [ $# -gt 1 ] ; do
fname=$fname.$1
shift
done
sect=$1
IFS=" "
case "$sect" in
gz) { echo file $pname already gzipped 1>&2 ; } ;;
Z) { echo file $pname already compressed 1>&2 ; } ;;
[12345678ln]*){
IFS=" " ; set `file $pname`
if [ $2 = "gzip" ] ; then
echo moving hard link $pname 1>&2
mv $pname $pname.gz # link
else
if [ $2 != "symbolic" ] ; then
echo "removing .so's in page $pname" 1>&2
so_purge_page $pname
else
# skip symlink - this can be
# a program like expn, which is
# its own man page !
echo skipping symlink $pname 1>&2
fi
fi };;
*) {
IFS=" "
echo skipping file $pname 1>&2
} ;;
esac
# reset IFS - this is important!
IFS=" "
}
#
# compress one page
# We need to watch out for hard links here.
#
compress_page()
{
local pname
local fname
local sect
# break up file name
pname=$1
IFS='.' ; set $pname
if [ $# -lt 2 ] ; then
IFS=" " ; echo ignoring $pname 1>&2 ; return 0 ;
fi
# construct name and section
fname=$1 ; shift
while [ $# -gt 1 ] ; do
fname=$fname.$1
shift
done
sect=$1
IFS=" "
case "$sect" in
gz) { echo file $pname already gzipped 1>&2 ; } ;;
Z) { echo file $pname already compressed 1>&2 ; } ;;
[12345678ln]*){
IFS=" " ; set `file $pname`
if [ $2 = "gzip" ] ; then
echo moving hard link $pname 1>&2
mv $pname $pname.gz # link
else
if [ $2 != "symbolic" ] ; then
echo gzipping page $pname 1>&2
cat $pname | \
(cd .. ; soelim )| gzip -c -- > /tmp/manager.$$
chmod u+w $pname
cp /tmp/manager.$$ $pname
chmod 444 $pname
mv $pname $pname.gz
rm /tmp/manager.$$
else
# skip symlink - this can be
# a program like expn, which is
# its own man page !
echo skipping symlink $pname 1>&2
fi
fi };;
*) {
IFS=" "
echo skipping file $pname 1>&2
} ;;
esac
# reset IFS - this is important!
IFS=" "
}
#
# Compress man pages in paths
#
do_compress_so()
{
local i
local dir
local workdir
local what
what=$1
shift
workdir=`pwd`
while [ $# != 0 ] ; do
if [ -d $1 ] ; then
dir=$1
cd $dir
for i in * ; do
case $i in
*cat?) ;; # ignore cat directories
*) {
if [ -d $i ] ; then
do_compress_so $what $i
else
if [ -e $i ] ; then
$what $i
fi
fi } ;;
esac
done
cd $workdir
else
echo "directory $1 not found" 1>&2
fi
shift
done
}
#
# Display a usage message
#
ctl_usage()
{
echo "usage : $1 -compress <path> ... " 1>&2
echo " $1 -uncompress <path> ... " 1>&2
echo " $1 -purge <days> <path> ... " 1>&2
echo " $1 -purge expire <path> ... " 1>&2
exit 1
}
#
# remove .so's and do compress
#
do_compress()
{
# First remove all so's from the pages to be compressed
do_compress_so remove_so "$@"
# now do ahead and compress the pages
do_compress_so compress_page "$@"
}
#
# dispatch options
#
if [ $# = 0 ] ; then ; ctl_usage $0 ; fi ;
case "$1" in
-compress) shift ; do_compress "$@" ;;
-uncompress) shift ; do_uncompress "$@" ;;
-purge) shift ; do_purge "$@" ;;
*) ctl_usage $0 ;;
esac

View file

@ -1,4 +1,4 @@
.\" @(#) $Header: /home/cvs/386BSD/src/contrib/tcpdump/tcpdump/tcpdump.1,v 1.1.1.1.2.1 1994/05/01 16:00:56 jkh Exp $ (LBL)
.\" @(#) $Header: /home/cvs/386BSD/src/contrib/tcpdump/tcpdump/tcpdump.1,v 1.2 1994/04/24 01:19:05 jkh Exp $ (LBL)
.\"
.\" Copyright (c) 1988, 1989, 1990, 1991, 1992
.\" The Regents of the University of California.

View file

@ -1,4 +1,4 @@
.\" @(#) $Header: /home/cvs/386BSD/src/contrib/tcpdump/tcpslice/tcpslice.1,v 1.1.1.1.2.1 1994/05/01 16:01:05 jkh Exp $ (LBL)
.\" @(#) $Header: /home/cvs/386BSD/src/contrib/tcpdump/tcpslice/tcpslice.1,v 1.1.1.1 1993/06/12 14:42:16 rgrimes Exp $ (LBL)
.\"
.\" Copyright (c) 1988-1990 The Regents of the University of California.
.\" All rights reserved.

View file

@ -1,6 +1,6 @@
/******************************************************************************
* *
* Copyright (c) David L. Mills 1992, 1993, 1994 *
* Copyright (c) David L. Mills 1992, 1993, 1994 *
* *
* Permission to use, copy, modify, and distribute this software and its *
* documentation for any purpose and without fee is hereby granted, provided *
@ -55,4 +55,6 @@
* Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de> (Linux Port)
* Paul A Vixie <vixie@vix.com> (TrueTime GPS driver)
* Jim Jagielski <jim@jagubox.gsfc.nasa.gov> (A/UX port)
*/
* Ray Schnitzler <schnitz@unipress.com> (First pass at a Unixware1 port.)
* Ajit Thyagarajan <ajit@ee.udel.edu> (IP multicast support)
*/

View file

@ -1,7 +1,7 @@
DEFS_LOCAL=-DREFCLOCK -DPARSE
NTPDEFS= -DSYS_FREEBSD -DSYS_386BSD -DHAVE_TERMIOS
NTPDEFS= -DSYS_FREEBSD -DSYS_386BSD
AUTHDEFS= -DMD5
CLOCKDEFS= -DLOCAL_CLOCK -DPST -DWWVB -DAS2201 -DGOES -DGPSTM -DOMEGA \
-DLEITCH
-DLEITCH -DTRAK
CFLAGS+= ${NTPDEFS} ${DEFS_LOCAL} ${AUTHDEFS} ${CLOCKDEFS} ${COPTS}
BINDIR?= /usr/sbin

View file

@ -1,6 +1,8 @@
$Id: README.FreeBSD,v 1.7 1994/04/21 21:10:20 wollman Exp $
This version of NTP was converted to the BSD-style Makefile system by
Garrett Wollman (wollman@freefall.cdrom.com); it is based on version
3.3z (late beta) from the University of Delaware.
3.3s (late beta) from the University of Delaware.
Besides the Makefile changes, the DES code has been completely removed
in order to make this code exportable. If you have a legal copy of
@ -8,3 +10,75 @@ in order to make this code exportable. If you have a legal copy of
to the AUTHDEFS in Makefile.inc.
You can change CLOCKDEFS in the same file to add other reference clocks.
This version of xntpd knows how to talk to the kernelized NTP PLL which is
present in versions of FreeBSD-current after 21 April 1994. When this code
is more widely released, I'll provide the patches to Mills.
----------------------------------------------------
Support for Conrad electronic's "DCF-77 Uhr, Mobil".
----------------------------------------------------
Conrad electronic in Germany,, Phone (+49) 962230111 (?), sells a gadget
called "DCF77 Uhr, mobil", which is a DCF77 timecode receiver with a
rs-232 interface. The price is around DM130.
9-pin interface is Order# 97 94 57 66
25-pin interface is Order# 97 94 81 66
You must define
-DDCF77 -DPPS -DFREEBSD_CONRAD -DDEBUG
when you compile xntpd. You can later remove -DDEBUG, if you feel like it.
You must also have
options COM_BIDIR
defined in your kernel, and finally the ttyport you intend to use must
have special interrupt vector:
device sio1 at isa? port "IO_COM2" tty irq 3 vector siointrts
^^^^^^^^^^^^
connect the radio-clock to the tty port and link it to /dev/refclock-0:
cd /dev
sh MAKEDEV cua1
ln -s /dev/cua01 /dev/refclock-0
make a directory to gather statistics in:
mkdir /var/tmp/ntp
Create a /etc/ntp.conf along these lines:
# DCF77 without PPS
server 127.127.8.20
# DCF77 with PPS
#server 127.127.8.148 prefer
driftfile /var/tmp/ntp/ntp.drift
statsdir /var/tmp/ntp
statistics loopstats
statistics peerstats
statistics clockstats
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable
Try to start it:
comcontrol ttyd1 bidir
tickadj -A
xntpd -d -d -d
You should see the red LED flash on the receiver every second now. You
may have to experiment a bit with the location, and possibly adjust the
minute variable resistor inside to get a good signal. Be aware, that just
because you see the light flash, is not the same as the signal being
received by the computer. The chip doing the work in the reciver uses
less than 1 micro-ampere, so even if RTS isn't pulled low, it will happily
receive, but be unable to buffer the signal to the rs-232 levels needed.
You can see what's going on in /var/log/messages, and query the
daemon using xntpdc and ntpq, in particular the "clockvar" command
of ntpq will tell about the clocks healt.
I live in Slagelse, Denmark, which is ~1000 Km from Mainflingen, yet
I have +/- 2 ms precision from this cheap gadget. If you have a very
stable signal, you can use the 'pps' address instead to improve your
timing.
Have fun... Poul-Henning Kamp <phk@login.dkuug.dk>

View file

@ -31,6 +31,10 @@ this distribution. To make these programs:
For custom tailored configuration copying Config.local.dist to Config.local
and editing Config.local to suit the local needs is neccessary (at most
3 lines to change), or use one of the make's above and then tweak it.
Config.local can also be used to override common settings from the
machines/* files like the AUTHDEFS= to select very specific configurations.
Please use this feature with care and don't be disappointed if it doesn't
work the way you expect.
(2) Type "make" to compile everything of general interest. Expect few or
no warnings using cc and a moderate level of warnings using gcc.
@ -140,6 +144,7 @@ the meal. The converse is not always true.
PC BSD/386 1.0 gcc LOCAL_CLOCK possibly see "build problems"
PC Linux (pl14) gcc LOCAL_CLOCK (dw 93/10/30)
PC Dell SVR4 v2.2 gcc ? (tl 93/12/30)
PC Unixware1/SVR4 cc no tickadj, ? (ras 93/04/11)
NCR3445 NCR SVR4 cc LOCAL_CLOCK (tm 93/11/29)
pb: Piete Brooks
@ -149,6 +154,7 @@ the meal. The converse is not always true.
tl: Tony Lill <ajlill@tlill.hookup.net>
tm: Tom Moore <Tom.Moore@DaytonOH.NCR.COM>
jmj: Jim Jagielski <jim@jagubox.gsfc.nasa.gov>
ras: Ray Schnitzler <schnitz@unipress.com>
Build Problems (and workaround):

View file

@ -1 +1 @@
version=3.3c (beta)
version=3.3s (beta multicast)

View file

@ -2,7 +2,7 @@
* authspeed - figure out how LONG it takes to do an NTP encryption
*/
#if defined(SYS_HPUX) || defined(SYS_AUX3) || defined(SYS_AUX2) || defined(SOLARIS) || defined(SYS_SVR4) || defined(SYS_PTX)
#if defined(SYS_HPUX) || defined(SYS_AUX3) || defined(SYS_AUX2) || defined(SOLARIS) || defined(SYS_SVR4) || defined(SYS_PTX) || defined(SYS_UNIXWARE1)
#define FAKE_RUSAGE
#endif

View file

@ -78,7 +78,7 @@ DEFS_OPT=-DDEBUG
# special distribution.
#
# Note: following line must always start with DEFS_LOCAL= $(DEFS_OPT)
DEFS_LOCAL= $(DEFS_OPT) -DREFCLOCK -DPPSPPS -DKERNEL_PLL
DEFS_LOCAL= $(DEFS_OPT) -DREFCLOCK -DKERNEL_PLL -DMCAST
#
# Radio clock support definitions (these only make sense if -DREFCLOCK
@ -182,7 +182,7 @@ DEFS_LOCAL= $(DEFS_OPT) -DREFCLOCK -DPPSPPS -DKERNEL_PLL
# under Ultrix 4.2a/3. If the MX4200 is removed, all the rest compile on a DEC
# OSF/1 Alpha.
#
CLOCKDEFS= -DLOCAL_CLOCK -DAS2201PPS -DCHUPPS -DGOES -DIRIG -DMX4200PPS -DOMEGA -DPSTCLK -DTPRO -DWWVBCLK -DMSFEESPPS -DLEITCH
CLOCKDEFS= -DLOCAL_CLOCK -DAS2201PPS -DCHUPPS -DGOES -DIRIG -DMX4200PPS -DOMEGA -DPSTCLK -DTPRO -DWWVBCLK -DLEITCH
#
# Directory into which binaries should be installed (default /usr/local)

View file

@ -0,0 +1,190 @@
# This is the local configure file (distribution version).
# You must modify it to fit your particular configuration
# and name it Config.local
# The following configuratiions can be auto-generated:
#
# make Config.local.green
# make a Config.local that supports a local clock
# (i.e. allow fallback to use of the CPU's own clock)
# make Config.local.NO.clock
# make a Config.local that supports no clocks
#
#
# NOTE TO GREENHORNS
#
# For plug-'n-play and no radios or other complicated gadgetry,
# use "make Config.local.green" as above.
#
# Following defines can be set in the DEFS_OPT= define:
#
# The flag -DDEBUG includes some debugging code. To use this, include
# the define and start the daemon with one or more -d flags, depending
# on your calibration of pearannoya. The daemon will not detach your
# terminal in this case. Judicious use of grep will reduce the speaker
# volume to bearable levels.
#
# To change the location of the configuration file, use a
# -DCONFIG_FILE=\\"/local/etc/ntp.conf\\" or something similar.
#
# The -DSYSLOG_FILE defines allows logging messages that are normally
# reported via syslof() in a file. The file name can be configured using
# the configuration line "logfile <filename>" in CONFIG_FILE.
#
# There are three serial port system software interfaces, each of
# which is peculiar to one or more Unix versions. Define
# -DHAVE_SYSV_TTYS for basic System V compatibility; define -DSTREAM
# for POSIX compatibility including System V Streams, and
# HAVE_BSD_TTYS for 4.3bsd compatibility. Only one of these three
# should be defined. If none are defined, HAVE_BSD_TTYS is assumed.
# Usually these defines are already set correctly.
#
DEFS_OPT=-DDEBUG
#
# The DEFS_LOCAL define picks up all flags from DEFS_OPT (do not delete that)
# and one of the following:
#
# The flag -DREFCLOCK causes the basic reference clock support to be
# compiled into the daemon. If you set this you may also want to
# configure the particular clock drivers you want in the CLOCKDEFS= line
# below. This flag affects xntpd only. This define is included by
# default when using the "make makeconfig" script.
#
# The next two sets of defines are meaningful only when radio clock
# drivers or special 1-pps signals are to be used. For systems without
# these features, these delicious complexities can be avoided. Ordinarily,
# the "make makeconfig" script figures out which ones to use, but your
# mileage may vary.
#
# There are three ways to utilize external 1-pps signals. Define
# -DPPS to include just the pps routine, such as used by the DCF77(PARSE)
# clock driver. Define -DPPSCLK to include a serial device driver
# which avoids much of the jitter due to upper level port
# processing. This requires a dedicated serial port and either the
# tty_clock line discipline or tty_clk_streams module, both of
# which are in the ./kernel directory. Define -DPPSCD to include a
# special driver which intercepts carrier-detect transitions
# generated by the pps signal. This requires a nondedicated serial
# port and the ppsclock streams module in the ./kernel directory.
# Only one of these three flags should be defined.
#
# The flag KERNEL_PLL causes code to be compiled for a special feature of
# the kernel that (a) implements the phase-lock loop and (b) provides
# a user interface to learn time, maximum error and estimated error.
# See the file README.kern in the doc directory for further info.
# This code is activated only if the relevant kernel features have
# been configured; it does not affect operation of unmodified kernels.
# To compile it, however, requires a few header files from the
# special distribution.
#
# Note: following line must always start with DEFS_LOCAL= $(DEFS_OPT)
DEFS_LOCAL= $(DEFS_OPT) -DREFCLOCK -DKERNEL_PLL -DMCAST
#
# Radio clock support definitions (these only make sense if -DREFCLOCK
# used), which is normally the case. Note that a configuration can include
# no clocks, more than one type of clock and even multiple clocks of the
# same type.
#
# For most radio clocks operating with serial ports, accuracy can
# be considerably improved through use of the tty_clk line
# discipline or tty_clk_STREAMS streams module found in the
# ./kernel directory. These gizmos capture a timestamp upon
# occurrence of an intercept character and stuff it in the data
# stream for the clock driver to munch. To select this mode,
# postfix the driver name with the string CLK; that is, WWVB
# becomes WWVBCLK. If more than one clock is in use, the CLK
# postfix can be used with any or all of them.
#
# Alternatively, for the best accuracy, use the ppsclock streams
# module in the ./ppsclock directory to steal the carrier-detect
# transition and capture a precision timestamp. At present this
# works only with SunOS 4.1.1 or later. To select this mode,
# postfix the driver name with the string PPS; that is, AS2201
# becomes AS2201PPS. If more than one clock is in use, the PPS
# postfix should be used with only one of them. If any PPS
# postfix is defined, the -DPPSPPS define should be used on the
# DEFS above.
#
# Define -DLOCAL_CLOCK for a local pseudo-clock to masquerade as a
# reference clock for those subnets without access to the real thing.
# Works in all systems and requires no hardware support. This is defined
# by default when using the "make makeconfig" script and greenhorn
# configuraiton.
#
# Define -DPST for a PST/Traconex 1020 WWV/H receiver. The driver
# supports both the CLK and PPS modes. It should work in all systems
# with a serial port.
#
# Define -DWWVB for a Spectracom 8170 or Netclock/2 WWVB receiver. It
# should work in all systems with a serial port. The driver supports
# both the CLK and PPS modes if the requisite kernel support is installed.
#
# Define -DCHU for a special CHU receiver using an ordinary shortwave
# radio. This requires the chu_clk line discipline or chu_clk_STREAMS
# module in the ./kernel directory. At present, this driver works only
# on SunOS4.1.x; operation in other systems has not been confirmed.
# Construction details for a suitable modem can be found in the ./gadget
# directory. The driver supports # neither the CLK nor PPS modes.
#
# Define -DPARSE for a DCF77/GPS(GENERIC) receiver. For best performance
# this requires a special parsestreams STREAMS (SunOS 4.x) module in the
# ./parse directory. Define -DPARSEPPS for PPS support via the
# DCF77/GPS (GENERIC) receiver; also, define -DPPS in the DEFS above.
# Define: -DCLOCK_MEINBERG for Meinberg clocks
# -DCLOCK_SCHMID for Schmid receivers
# -DCLOCK_DCF7000 for ELV DCF7000
# -DCLOCK_RAWDCF for simple receivers (100/200ms pulses on Rx)
# -DCLOCK_TRIMSV6 for Trimble SV6 GPS receiver
#
# Define -DMX4200PPS for a Magnavox 4200 GPS receiver. At present, this
# driver works only on SunOS4.1.x with CPU serial ports only. The PPS
# mode is required.
#
# Define -DAS2201 for an Austron 2200A or 2201A GPS receiver. It should
# work in all systems with a serial port. The driver does not support the
# CLK mode, but does support the PPS mode. If the radio is connected to
# more than one machine, the PPS mode is required.
#
# Define -DGOES for a Kinemetrics/TrueTime 468-DC GOES receiver. This
# driver is known to work with some other TrueTime products as well,
# including the GPS-DC GPS receiver. It should work in all systems with
# a serial port. The driver does not support the CLK mode, but does
# support the PPS mode.
#
# Define -DOMEGA for a Kinemetrics/TrueTime OM-DC OMEGA receiver. It
# should work in all systems with a serial port. The driver does not
# support the CLK mode, but does support the PPS mode.
#
# Define -DTPRO for a KSI/Odetics TPRO-S IRIG-B timecode reader. This
# requires the SunOS interface driver available from KSI. The driver
# supports neither the CLK nor PPS modes.
#
# Define -DLEITCH for a Leitch CSD 5300 Master Clock System Driver for
# the HP 5061B Cesium Clock. It should work in all systems with a serial
# port. The driver does not support the CLK mode, but does support the
# PPS mode.
#
# Define -DMSFEESPPS for an EES M201 MSF receiver. It currently only works
# under SunOS 4.x with the PPSCD (ppsclock) STREAMS module, but the RCS
# files on cl.cam.ac.uk still has support for CLK and CBREAK modes.
#
# Define -DIRIG for a IRIG-B timecode timecode using the audio codec of
# the Sun SPARCstations. This requires a modified BSD audio driver and
# exclusive access to the audio port. A memo describing how it works and
# how to install the driver is in the README.irig file in the ./doc
# directory.
#
# Note: The following defines result in compilation of all the above radio
# clocks. This works on a Sun 4.1.x system which has tty_clk, chu_clk and
# ppsclock STREAMS modules installed. If the trailing CLK and PPS suffixes
# are removed and the IRIG, PARSE* and CLOCK* deleted, all of the rest compile
# under Ultrix 4.2a/3. If the MX4200 is removed, all the rest compile on a DEC
# OSF/1 Alpha.
#
CLOCKDEFS= -DLOCAL_CLOCK -DCHU -DGOES -DOMEGA -DPST -DWWVB -DLEITCH
#
# Directory into which binaries should be installed (default /usr/local)
#
BINDIR= /usr/local/bin

Some files were not shown because too many files have changed in this diff Show more