summaryrefslogtreecommitdiffstats
path: root/lkm
diff options
context:
space:
mode:
Diffstat (limited to 'lkm')
-rw-r--r--lkm/Makefile11
-rw-r--r--lkm/Makefile.inc4
-rw-r--r--lkm/atapi/Makefile32
-rw-r--r--lkm/cd9660/Makefile11
-rw-r--r--lkm/coff/Makefile10
-rw-r--r--lkm/coff/coff.c62
-rw-r--r--lkm/fdesc/Makefile10
-rw-r--r--lkm/fpu/Makefile10
-rw-r--r--lkm/gnufpu/Makefile17
-rw-r--r--lkm/ibcs2/Makefile20
-rwxr-xr-xlkm/ibcs2/ibcs220
-rw-r--r--lkm/ibcs2/ibcs2.864
-rw-r--r--lkm/ibcs2/ibcs2.c59
-rw-r--r--lkm/if_disc/Makefile19
-rw-r--r--lkm/if_ppp/Makefile23
-rw-r--r--lkm/if_sl/Makefile23
-rw-r--r--lkm/if_tun/Makefile23
-rw-r--r--lkm/ip_mroute_mod/Makefile9
-rw-r--r--lkm/ipfw/Makefile13
-rw-r--r--lkm/joy/Makefile17
-rw-r--r--lkm/joy/joy4
-rw-r--r--lkm/joy/joy.846
-rw-r--r--lkm/kernfs/Makefile10
-rw-r--r--lkm/linux/Makefile36
-rw-r--r--lkm/linux/linux3
-rw-r--r--lkm/linux/linux.c68
-rw-r--r--lkm/mfs/Makefile10
-rw-r--r--lkm/msdos/Makefile11
-rw-r--r--lkm/nfs/Makefile11
-rw-r--r--lkm/nullfs/Makefile10
-rw-r--r--lkm/pcic/Makefile10
-rw-r--r--lkm/portal/Makefile10
-rw-r--r--lkm/procfs/Makefile11
-rw-r--r--lkm/syscons/Makefile5
-rw-r--r--lkm/syscons/blank/Makefile10
-rw-r--r--lkm/syscons/blank/blank_saver.c83
-rw-r--r--lkm/syscons/fade/Makefile10
-rw-r--r--lkm/syscons/fade/fade_saver.c98
-rw-r--r--lkm/syscons/green/Makefile10
-rw-r--r--lkm/syscons/green/green_saver.c87
-rw-r--r--lkm/syscons/saver.h17
-rw-r--r--lkm/syscons/snake/Makefile10
-rw-r--r--lkm/syscons/snake/snake_saver.c124
-rw-r--r--lkm/syscons/star/Makefile10
-rw-r--r--lkm/syscons/star/star_saver.c114
-rw-r--r--lkm/umapfs/Makefile10
-rw-r--r--lkm/union/Makefile10
-rw-r--r--lkm/wcd/Makefile28
48 files changed, 1323 insertions, 0 deletions
diff --git a/lkm/Makefile b/lkm/Makefile
new file mode 100644
index 0000000..5812071
--- /dev/null
+++ b/lkm/Makefile
@@ -0,0 +1,11 @@
+# $Id: Makefile,v 1.20 1996/01/06 23:15:40 peter Exp $
+
+# XXX present but broken: ip_mroute_mod mfs
+SUBDIR= atapi cd9660 coff fdesc ibcs2 if_disc if_ppp if_sl if_tun \
+ ipfw joy kernfs linux msdos nfs nullfs \
+ pcic portal procfs syscons umapfs union wcd
+
+# XXX builds, but not useable with present design
+# fpu gnufpu
+
+.include <bsd.subdir.mk>
diff --git a/lkm/Makefile.inc b/lkm/Makefile.inc
new file mode 100644
index 0000000..752e6b0
--- /dev/null
+++ b/lkm/Makefile.inc
@@ -0,0 +1,4 @@
+# $Id$
+
+BINDIR= /lkm
+
diff --git a/lkm/atapi/Makefile b/lkm/atapi/Makefile
new file mode 100644
index 0000000..b1d54ff
--- /dev/null
+++ b/lkm/atapi/Makefile
@@ -0,0 +1,32 @@
+.PATH: ${.CURDIR}/../../sys/i386/isa
+KMOD = atapi_mod
+SRCS = atapi.c wdc.h #wcd.h
+NOMAN =
+BINDIR = /lkm
+CFLAGS += -nostdinc -I. -I/sys -DATAPI -DATAPI_MODULE
+CLEANFILES += $(KMOD) machine wdc.h wcd.h *.b
+LN = ln -f -s
+EXPORT_SYMS = _atapi_mod _atapi_debug_ptr _atapi_intr_ptr \
+ _atapi_request_callback_ptr _atapi_request_immediate_ptr \
+ _atapi_request_wait_ptr _atapi_start_ptr
+
+load: ${PROG}
+ /sbin/modload -u -e atapi_mod $(PROG)
+
+unload: ${PROG}
+ /sbin/modunload -n atapi
+
+wdc.h:
+ echo "#define NWDC 2" > wdc.h
+
+# echo "#define NWD 4" >> wdc.h
+
+wcd.h:
+ echo "#define NWCD 1" > wcd.h
+
+.c.o:
+ -@$(LN) /sys/i386/include machine
+ $(CC) $(CFLAGS) -c $<
+ -@rm machine
+
+.include <bsd.kmod.mk>
diff --git a/lkm/cd9660/Makefile b/lkm/cd9660/Makefile
new file mode 100644
index 0000000..a7ee27b
--- /dev/null
+++ b/lkm/cd9660/Makefile
@@ -0,0 +1,11 @@
+# $Id: Makefile,v 1.1 1994/09/16 20:24:28 wollman Exp $
+
+.PATH: ${.CURDIR}/../../sys/isofs/cd9660
+KMOD= cd9660_mod
+SRCS= cd9660_bmap.c cd9660_lookup.c cd9660_node.c cd9660_rrip.c \
+ cd9660_util.c cd9660_vfsops.c cd9660_vnops.c
+NOMAN=
+VFS_LKM=
+CFLAGS+= -DCD9660
+
+.include <bsd.kmod.mk>
diff --git a/lkm/coff/Makefile b/lkm/coff/Makefile
new file mode 100644
index 0000000..3160c9e
--- /dev/null
+++ b/lkm/coff/Makefile
@@ -0,0 +1,10 @@
+# $Id: Makefile,v 1.1 1994/10/14 08:46:11 sos Exp $
+
+.PATH: ${.CURDIR}/../../sys/i386/ibcs2
+KMOD= ibcs2_coff_mod
+SRCS= coff.c imgact_coff.c vnode_if.h
+NOMAN=
+CLEANFILES+= vnode_if.h vnode_if.c
+CFLAGS+= -DLKM -I. -DCOMPAT_IBCS2
+
+.include <bsd.kmod.mk>
diff --git a/lkm/coff/coff.c b/lkm/coff/coff.c
new file mode 100644
index 0000000..8a74757
--- /dev/null
+++ b/lkm/coff/coff.c
@@ -0,0 +1,62 @@
+/*-
+ * Copyright (c) 1994 Søren Schmidt
+ * 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
+ * in this position and unchanged.
+ * 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 withough specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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: coff.c,v 1.4 1995/11/13 07:18:21 bde Exp $
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/exec.h>
+#include <sys/conf.h>
+#include <sys/sysent.h>
+#include <sys/lkm.h>
+#include <sys/errno.h>
+
+extern const struct execsw coff_execsw;
+
+MOD_EXEC(ibcs2_coff, -1, (struct execsw*)&coff_execsw);
+
+static int
+ibcs2_coff_load(struct lkm_table *lkmtp, int cmd)
+{
+ uprintf("coff loader installed\n");
+ return 0;
+}
+
+static int
+ibcs2_coff_unload(struct lkm_table *lkmtp, int cmd)
+{
+ uprintf("coff loader removed\n");
+ return 0;
+}
+
+int
+ibcs2_coff_mod(struct lkm_table *lkmtp, int cmd, int ver)
+{
+ DISPATCH(lkmtp, cmd, ver, ibcs2_coff_load, ibcs2_coff_unload,
+ lkm_nullcmd);
+}
diff --git a/lkm/fdesc/Makefile b/lkm/fdesc/Makefile
new file mode 100644
index 0000000..7aa2a7d
--- /dev/null
+++ b/lkm/fdesc/Makefile
@@ -0,0 +1,10 @@
+# $Id: Makefile,v 1.1 1994/09/16 20:24:28 wollman Exp $
+
+.PATH: ${.CURDIR}/../../sys/miscfs/fdesc
+KMOD= fdesc_mod
+SRCS= fdesc_vfsops.c fdesc_vnops.c
+NOMAN=
+VFS_LKM=
+CFLAGS+= -DFDESC
+
+.include <bsd.kmod.mk>
diff --git a/lkm/fpu/Makefile b/lkm/fpu/Makefile
new file mode 100644
index 0000000..8e3e940
--- /dev/null
+++ b/lkm/fpu/Makefile
@@ -0,0 +1,10 @@
+# $Id: Makefile,v 1.4 1995/10/15 17:00:49 phk Exp $
+
+.PATH: ${.CURDIR}/../../sys/i386/i386
+KMOD= fpu
+SRCS= math_emulate.c
+NOMAN=
+PSEUDO_LKM=
+CFLAGS+= -DLKM
+
+.include <bsd.kmod.mk>
diff --git a/lkm/gnufpu/Makefile b/lkm/gnufpu/Makefile
new file mode 100644
index 0000000..4d52fd0
--- /dev/null
+++ b/lkm/gnufpu/Makefile
@@ -0,0 +1,17 @@
+# $Id: Makefile,v 1.4 1995/10/15 17:00:49 phk Exp $
+
+.PATH: ${.CURDIR}/../../sys/gnu/i386/fpemul
+KMOD= gnufpu
+SRCS= div_small.s errors.c fpu_arith.c fpu_aux.c fpu_entry.c fpu_etc.c \
+ fpu_trig.c get_address.c load_store.c poly_2xm1.c poly_atan.c \
+ poly_div.s poly_l2.c poly_mul64.s poly_sin.c poly_tan.c \
+ polynomial.s reg_add_sub.c reg_compare.c reg_constant.c reg_div.s \
+ reg_ld_str.c reg_u_mul.s reg_u_sub.s wm_shrx.s wm_sqrt.s
+NOMAN=
+PSEUDO_LKM=
+CFLAGS+= -DLKM -I${.CURDIR}/../../sys/sys
+
+.s.o:
+ cpp -DLOCORE ${COPTS} $< | ${AS} ${ASFLAGS} -o $*.o
+
+.include <bsd.kmod.mk>
diff --git a/lkm/ibcs2/Makefile b/lkm/ibcs2/Makefile
new file mode 100644
index 0000000..819ee60
--- /dev/null
+++ b/lkm/ibcs2/Makefile
@@ -0,0 +1,20 @@
+# Makefile,v 1.5 1994/12/11 21:27:14 wollman Exp
+
+.PATH: ${.CURDIR}/../../sys/i386/ibcs2
+KMOD= ibcs2_mod
+SRCS= ibcs2.c ibcs2_errno.c ibcs2_ipc.c ibcs2_stat.c ibcs2_misc.c \
+ ibcs2_fcntl.c ibcs2_signal.c ibcs2_sysent.c ibcs2_ioctl.c \
+ ibcs2_socksys.c ibcs2_util.c ibcs2_xenix.c ibcs2_xenix_sysent.c \
+ ibcs2_isc.c ibcs2_isc_sysent.c \
+ ibcs2_msg.c ibcs2_other.c ibcs2_sysi86.c ibcs2_sysvec.c vnode_if.h
+MAN8= ibcs2.8
+
+CFLAGS+= -DLKM -I. -DCOMPAT_IBCS2
+CLEANFILES+= vnode_if.h vnode_if.c
+EXPORT_SYMS= _ibcs2_mod _ibcs2_emul_path _ibcs2_svr3_sysvec
+
+afterinstall:
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ ${.CURDIR}/ibcs2 ${DESTDIR}/usr/bin
+
+.include <bsd.kmod.mk>
diff --git a/lkm/ibcs2/ibcs2 b/lkm/ibcs2/ibcs2
new file mode 100755
index 0000000..21f591e
--- /dev/null
+++ b/lkm/ibcs2/ibcs2
@@ -0,0 +1,20 @@
+#!/bin/sh
+# $Id: ibcs2,v 1.3 1995/10/10 08:38:11 swallace Exp $
+if [ $# -le 1 ]; then
+ LOADERS="coff" # elf
+fi
+
+set -e
+
+kernelfile=`sysctl -n kern.bootfile`
+kernelfile=`basename $kernelfile`
+newkernelfile="/tmp/${kernelfile}+ibcs2"
+
+modload -e ibcs2_mod -o $newkernelfile -q /lkm/ibcs2_mod.o
+
+for loader in $LOADERS; do
+ modload -e ibcs2_${loader}_mod -o/tmp/ibcs2_${loader} -q -u \
+ -A${newkernelfile} /lkm/ibcs2_${loader}_mod.o
+done
+rm ${newkernelfile}
+set +e
diff --git a/lkm/ibcs2/ibcs2.8 b/lkm/ibcs2/ibcs2.8
new file mode 100644
index 0000000..eb43254
--- /dev/null
+++ b/lkm/ibcs2/ibcs2.8
@@ -0,0 +1,64 @@
+.\"
+.\" Copyright (c) 1995 Lyndon Nerenberg
+.\"
+.\" All rights reserved.
+.\"
+.\" This program is free software.
+.\"
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``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 THE DEVELOPERS 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: ibcs2.8,v 1.1 1995/11/28 21:12:06 joerg Exp $
+.\"
+.Dd November 27, 1995
+.Dt IBCS2 8
+.Os FreeBSD-Experimental
+.Sh NAME
+.Nm ibcs2
+.Nd load iBCS2 runtime support for SCO and ISC binaries
+.Sh SYNOPSIS
+.Nm ibcs2
+.Sh DESCRIPTION
+The
+.Nm
+utility loads kernel runtime support for iBCS2 compliant programs.
+This runtime support is limited to emulation of the iBCS2
+system call interface, and is far from complete. COFF binaries
+and shared libraries are supported, however no shared libraries
+are provided with the FreeBSD distribution.
+.Sh FILES
+.Bl -tag -width /usr/share/examples/ibcs2/* -compact
+.It Pa /lkm/ibcs2_mod.o
+.It Pa /lkm/ibcs2_coff_mod.o
+iBCS2 loadable kernel modules.
+.Pp
+.It Pa /usr/share/examples/ibcs2/*
+Sample object files with which to test the emulator.
+.Sh "SEE ALSO"
+.Pa /sys/i386/ibcs2/README.iBCS2 ,
+.Xr modload 8 ,
+.Xr lkm 4
+.Sh BUGS
+The emulation is very incomplete.
+.Pp
+Running dynamically linked binaries requires access to an existing
+SCO system from which you can grab the shared libraries.
+.Pp
+You can't really use this without reading the source code.
diff --git a/lkm/ibcs2/ibcs2.c b/lkm/ibcs2/ibcs2.c
new file mode 100644
index 0000000..f7f9ec1
--- /dev/null
+++ b/lkm/ibcs2/ibcs2.c
@@ -0,0 +1,59 @@
+/*-
+ * Copyright (c) 1994 Søren Schmidt
+ * 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
+ * in this position and unchanged.
+ * 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 withough specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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: ibcs2.c,v 1.6 1995/11/13 07:18:27 bde Exp $
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/sysproto.h>
+#include <sys/conf.h>
+#include <sys/exec.h>
+#include <sys/sysent.h>
+#include <sys/lkm.h>
+
+MOD_MISC(ibcs2);
+
+static int
+ibcs2_load(struct lkm_table *lkmtp, int cmd)
+{
+ uprintf("ibcs2 emulator installed\n");
+ return 0;
+}
+
+static int
+ibcs2_unload(struct lkm_table *lkmtp, int cmd)
+{
+ uprintf("ibcs2 emulator removed\n");
+ return 0;
+}
+
+int
+ibcs2_mod(struct lkm_table *lkmtp, int cmd, int ver)
+{
+ DISPATCH(lkmtp, cmd, ver, ibcs2_load, ibcs2_unload, lkm_nullcmd);
+}
diff --git a/lkm/if_disc/Makefile b/lkm/if_disc/Makefile
new file mode 100644
index 0000000..492de57
--- /dev/null
+++ b/lkm/if_disc/Makefile
@@ -0,0 +1,19 @@
+# $Id: Makefile,v 1.1 1994/09/22 22:12:59 wollman Exp $
+
+.PATH: ${.CURDIR}/../../sys/net
+KMOD= if_disc_mod
+SRCS= if_disc.c bpfilter.h
+NOMAN=
+PSEUDO_LKM=
+CFLAGS+= -I.
+
+NBPFILTER?= 0
+PROTOS?= -DINET
+
+CFLAGS+= ${PROTOS}
+CLEANFILES+= bpfilter.h
+
+bpfilter.h:
+ echo "#define NBPFILTER ${NBPFILTER}" > bpfilter.h
+
+.include <bsd.kmod.mk>
diff --git a/lkm/if_ppp/Makefile b/lkm/if_ppp/Makefile
new file mode 100644
index 0000000..3b2fc6e
--- /dev/null
+++ b/lkm/if_ppp/Makefile
@@ -0,0 +1,23 @@
+# $Id: Makefile,v 1.3 1995/04/15 17:36:53 ats Exp $
+
+.PATH: ${.CURDIR}/../../sys/net
+KMOD= if_ppp_mod
+SRCS= bsd_comp.c if_ppp.c ppp_tty.c slcompress.c bpfilter.h ppp.h
+NOMAN=
+PSEUDO_LKM=
+CFLAGS+= -I.
+
+NBPFILTER?= 0
+NPPP?= 2
+PROTOS?= -DINET
+
+CFLAGS+= ${PROTOS}
+CLEANFILES+= bpfilter.h ppp.h
+
+bpfilter.h:
+ echo "#define NBPFILTER ${NBPFILTER}" > bpfilter.h
+
+ppp.h:
+ echo "#define NPPP ${NPPP}" > ppp.h
+
+.include <bsd.kmod.mk>
diff --git a/lkm/if_sl/Makefile b/lkm/if_sl/Makefile
new file mode 100644
index 0000000..d2cdd81
--- /dev/null
+++ b/lkm/if_sl/Makefile
@@ -0,0 +1,23 @@
+# $Id: Makefile,v 1.1 1995/03/20 19:25:47 wollman Exp $
+
+.PATH: ${.CURDIR}/../../sys/net
+KMOD= if_sl_mod
+SRCS= if_sl.c slcompress.c bpfilter.h sl.h
+NOMAN=
+PSEUDO_LKM=
+CFLAGS+= -I.
+
+NBPFILTER?= 0
+NSL?= 2
+PROTOS?= -DINET
+
+CFLAGS+= ${PROTOS}
+CLEANFILES+= bpfilter.h sl.h
+
+bpfilter.h:
+ echo "#define NBPFILTER ${NBPFILTER}" > bpfilter.h
+
+sl.h:
+ echo "#define NSL ${NSL}" > sl.h
+
+.include <bsd.kmod.mk>
diff --git a/lkm/if_tun/Makefile b/lkm/if_tun/Makefile
new file mode 100644
index 0000000..49ca778
--- /dev/null
+++ b/lkm/if_tun/Makefile
@@ -0,0 +1,23 @@
+# $Id: Makefile,v 1.1 1994/09/22 22:12:59 wollman Exp $
+
+.PATH: ${.CURDIR}/../../sys/net
+KMOD= if_tun_mod
+SRCS= if_tun.c bpfilter.h tun.h
+NOMAN=
+PSEUDO_LKM=
+CFLAGS+= -I.
+
+NBPFILTER?= 0
+NTUN?= 2
+PROTOS?= -DINET
+
+CFLAGS+= ${PROTOS}
+CLEANFILES+= bpfilter.h tun.h
+
+bpfilter.h:
+ echo "#define NBPFILTER ${NBPFILTER}" > bpfilter.h
+
+tun.h:
+ echo "#define NTUN ${NTUN}" > tun.h
+
+.include <bsd.kmod.mk>
diff --git a/lkm/ip_mroute_mod/Makefile b/lkm/ip_mroute_mod/Makefile
new file mode 100644
index 0000000..d1f93c3
--- /dev/null
+++ b/lkm/ip_mroute_mod/Makefile
@@ -0,0 +1,9 @@
+# $Id: Makefile,v 1.1 1994/09/14 22:11:51 wollman Exp $
+
+.PATH: ${.CURDIR}/../../sys/netinet
+KMOD= ip_mroute_mod
+SRCS= ip_mroute.c
+NOMAN=
+CFLAGS+= -DMROUTE_LKM -DMROUTING
+
+.include <bsd.kmod.mk>
diff --git a/lkm/ipfw/Makefile b/lkm/ipfw/Makefile
new file mode 100644
index 0000000..da140b9
--- /dev/null
+++ b/lkm/ipfw/Makefile
@@ -0,0 +1,13 @@
+# $Id: Makefile,v 1.3 1995/05/30 06:06:07 rgrimes Exp $
+
+.PATH: ${.CURDIR}/../../sys/netinet
+KMOD= ipfw_mod
+SRCS= ip_fw.c
+NOMAN=
+CFLAGS+= -DIPFIREWALL
+#
+#If you want it verbose
+#CFLAGS+= -DIPFIREWALL_VERBOSE
+#
+
+.include <bsd.kmod.mk>
diff --git a/lkm/joy/Makefile b/lkm/joy/Makefile
new file mode 100644
index 0000000..77b969d
--- /dev/null
+++ b/lkm/joy/Makefile
@@ -0,0 +1,17 @@
+.PATH: ${.CURDIR}/../../sys/i386/isa
+KMOD = joy_mod
+SRCS = joy.c joy.h
+MAN8 = joy.8
+
+CFLAGS += -I. -I/sys -DJOY_MODULE -DACTUALLY_LKM_NOT_KERNEL
+CLEANFILES += joy.h
+
+joy.h:
+ echo "#define NJOY 1" > joy.h
+
+
+afterinstall:
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ ${.CURDIR}/joy ${DESTDIR}/usr/bin
+
+.include <bsd.kmod.mk>
diff --git a/lkm/joy/joy b/lkm/joy/joy
new file mode 100644
index 0000000..3f5bbb9
--- /dev/null
+++ b/lkm/joy/joy
@@ -0,0 +1,4 @@
+#!/bin/sh
+# $Id$
+
+modload -q -u -A `sysctl -n kern.bootfile` /lkm/joy_mod.o
diff --git a/lkm/joy/joy.8 b/lkm/joy/joy.8
new file mode 100644
index 0000000..795d586
--- /dev/null
+++ b/lkm/joy/joy.8
@@ -0,0 +1,46 @@
+.\"
+.\" Copyright (c) 1996 Jean-Marc Zucconi <jmz@cabri.obs-besancon.fr>
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``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 THE DEVELOPERS 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$
+.\"
+.Dd March 16, 1996
+.Dt JOY 8
+.Os FreeBSD
+.Sh NAME
+.Nm joy
+.Nd load the joystick driver kernel module
+.Sh SYNOPSIS
+.Nm joy
+.Sh DESCRIPTION
+The
+.Nm
+utility loads the joystick driver kernel module.
+.Sh FILES
+.Bl -tag -width /lkm/joy_mod.o
+.It Pa /lkm/joy_mod.o
+joystick loadable kernel module.
+.Sh "SEE ALSO"
+.Xr joy 4 ,
+.Xr modload 8 ,
+.Xr lkm 4
diff --git a/lkm/kernfs/Makefile b/lkm/kernfs/Makefile
new file mode 100644
index 0000000..1fbe7f7
--- /dev/null
+++ b/lkm/kernfs/Makefile
@@ -0,0 +1,10 @@
+# $Id: Makefile,v 1.1 1994/09/16 20:24:28 wollman Exp $
+
+.PATH: ${.CURDIR}/../../sys/miscfs/kernfs
+KMOD= kernfs_mod
+SRCS= kernfs_vfsops.c kernfs_vnops.c
+NOMAN=
+VFS_LKM=
+CFLAGS+= -DKERNFS
+
+.include <bsd.kmod.mk>
diff --git a/lkm/linux/Makefile b/lkm/linux/Makefile
new file mode 100644
index 0000000..e544b7f
--- /dev/null
+++ b/lkm/linux/Makefile
@@ -0,0 +1,36 @@
+# $Id: Makefile,v 1.6 1996/03/02 20:00:35 peter Exp $
+
+.PATH: ${.CURDIR}/../../sys/i386/linux
+KMOD= linux_mod
+SRCS= linux.c linux_file.c linux_ioctl.c linux_misc.c linux_signal.c \
+ linux_ipc.c linux_socket.c linux_stats.c \
+ linux_dummy.c linux_sysent.c linux_sysvec.c linux_util.c \
+ imgact_linux.c vnode_if.h
+OBJS= linux_locore.o
+NOMAN=
+
+CFLAGS+= -DLKM -I. -DCOMPAT_43 -DCOMPAT_LINUX #-DDEBUG
+CPPFLAGS= -I. -I${.CURDIR}/../../sys
+EXPORT_SYMS=_linux_mod
+CLEANFILES+= vnode_if.h vnode_if.c linux_genassym.o linux_genassym machine \
+ linux_assym.h
+
+linux_assym.h: linux_genassym
+ ./linux_genassym > linux_assym.h
+
+linux_locore.o: linux_locore.s linux_assym.h
+ @if [ ! -h machine ]; then ln -s ${.CURDIR}/../../i386/include machine \
+ ; fi
+ ${CPP} -DLOCORE -DKERNEL ${CPPFLAGS} ${.IMPSRC} | ${AS} ${ASFLAGS} -o ${.TARGET}
+
+linux_genassym.o: linux_genassym.c linux.h
+ ${CC} -c ${CFLAGS} -UKERNEL ${.IMPSRC}
+
+linux_genassym: linux_genassym.o
+ ${CC} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
+
+afterinstall:
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ ${.CURDIR}/linux ${DESTDIR}/usr/bin
+
+.include <bsd.kmod.mk>
diff --git a/lkm/linux/linux b/lkm/linux/linux
new file mode 100644
index 0000000..e4364a6
--- /dev/null
+++ b/lkm/linux/linux
@@ -0,0 +1,3 @@
+#!/bin/sh
+# $Id: linux,v 1.1 1995/06/25 17:29:48 sos Exp $
+modload -e linux_mod -u -q -o /tmp/linux_mod /lkm/linux_mod.o
diff --git a/lkm/linux/linux.c b/lkm/linux/linux.c
new file mode 100644
index 0000000..a0f27ea
--- /dev/null
+++ b/lkm/linux/linux.c
@@ -0,0 +1,68 @@
+/*-
+ * Copyright (c) 1994 Søren Schmidt
+ * 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
+ * in this position and unchanged.
+ * 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 withough specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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: linux.c,v 1.5 1996/03/10 08:42:32 sos Exp $
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/exec.h>
+#include <sys/conf.h>
+#include <sys/sysent.h>
+#include <sys/lkm.h>
+#include <sys/imgact_elf.h>
+#include "i386/linux/linux.h"
+
+extern const struct execsw linux_execsw;
+
+MOD_EXEC(linux, -1, (struct execsw*)&linux_execsw);
+
+extern Elf32_Interp_info linux_interp;
+
+static int
+linux_load(struct lkm_table *lkmtp, int cmd)
+{
+ if (elf_insert_interp(&linux_interp))
+ uprintf("Could not install ELF interpreter entry\n");
+ uprintf("Linux emulator installed\n");
+ return 0;
+}
+
+static int
+linux_unload(struct lkm_table *lkmtp, int cmd)
+{
+ if (elf_remove_interp(&linux_interp))
+ uprintf("Could not deinstall ELF interpreter entry\n");
+ uprintf("Linux emulator removed\n");
+ return 0;
+}
+
+int
+linux_mod(struct lkm_table *lkmtp, int cmd, int ver)
+{
+ DISPATCH(lkmtp, cmd, ver, linux_load, linux_unload, lkm_nullcmd);
+}
diff --git a/lkm/mfs/Makefile b/lkm/mfs/Makefile
new file mode 100644
index 0000000..b3aee05
--- /dev/null
+++ b/lkm/mfs/Makefile
@@ -0,0 +1,10 @@
+# $Id: Makefile,v 1.1 1994/09/16 20:24:28 wollman Exp $
+
+.PATH: ${.CURDIR}/../../sys/ufs/mfs
+KMOD= mfs_mod
+SRCS= mfs_vfsops.c mfs_vnops.c
+NOMAN=
+VFS_LKM=
+CFLAGS+= -DFFS -DMFS
+
+.include <bsd.kmod.mk>
diff --git a/lkm/msdos/Makefile b/lkm/msdos/Makefile
new file mode 100644
index 0000000..c849011
--- /dev/null
+++ b/lkm/msdos/Makefile
@@ -0,0 +1,11 @@
+# $Id: Makefile,v 1.1 1994/09/21 23:27:09 wollman Exp $
+
+.PATH: ${.CURDIR}/../../sys/msdosfs
+KMOD= msdos_mod
+SRCS= msdosfs_conv.c msdosfs_denode.c msdosfs_fat.c msdosfs_lookup.c \
+ msdosfs_vfsops.c msdosfs_vnops.c
+NOMAN=
+VFS_LKM=
+CFLAGS+= -DMSDOSFS
+
+.include <bsd.kmod.mk>
diff --git a/lkm/nfs/Makefile b/lkm/nfs/Makefile
new file mode 100644
index 0000000..e8e89e8
--- /dev/null
+++ b/lkm/nfs/Makefile
@@ -0,0 +1,11 @@
+# $Id: Makefile,v 1.1 1994/09/21 23:27:07 wollman Exp $
+
+.PATH: ${.CURDIR}/../../sys/nfs
+KMOD= nfs_mod
+SRCS= nfs_bio.c nfs_node.c nfs_nqlease.c nfs_serv.c nfs_socket.c \
+ nfs_srvcache.c nfs_subs.c nfs_syscalls.c nfs_vfsops.c nfs_vnops.c
+NOMAN=
+VFS_LKM=
+CFLAGS+= -DNFS -DINET
+
+.include <bsd.kmod.mk>
diff --git a/lkm/nullfs/Makefile b/lkm/nullfs/Makefile
new file mode 100644
index 0000000..fc71e6a
--- /dev/null
+++ b/lkm/nullfs/Makefile
@@ -0,0 +1,10 @@
+# $Id: Makefile,v 1.1 1994/09/16 20:24:28 wollman Exp $
+
+.PATH: ${.CURDIR}/../../sys/miscfs/nullfs
+KMOD= null_mod
+SRCS= null_subr.c null_vfsops.c null_vnops.c
+NOMAN=
+VFS_LKM=
+CFLAGS+= -DNULLFS
+
+.include <bsd.kmod.mk>
diff --git a/lkm/pcic/Makefile b/lkm/pcic/Makefile
new file mode 100644
index 0000000..2e1a706
--- /dev/null
+++ b/lkm/pcic/Makefile
@@ -0,0 +1,10 @@
+# $Id: Makefile,v 1.3 1995/10/15 14:33:17 phk Exp $
+
+.PATH: ${.CURDIR}/../../sys/pccard
+KMOD= pcic_mod
+SRCS= pcic.c
+NOMAN=
+PSEUDO_LKM=
+CFLAGS+= -DLKM
+
+.include <bsd.kmod.mk>
diff --git a/lkm/portal/Makefile b/lkm/portal/Makefile
new file mode 100644
index 0000000..529314d
--- /dev/null
+++ b/lkm/portal/Makefile
@@ -0,0 +1,10 @@
+# $Id: Makefile,v 1.1 1994/09/16 20:24:28 wollman Exp $
+
+.PATH: ${.CURDIR}/../../sys/miscfs/portal
+KMOD= portal_mod
+SRCS= portal_vfsops.c portal_vnops.c
+NOMAN=
+VFS_LKM=
+CFLAGS+= -DPORTAL
+
+.include <bsd.kmod.mk>
diff --git a/lkm/procfs/Makefile b/lkm/procfs/Makefile
new file mode 100644
index 0000000..61c046b
--- /dev/null
+++ b/lkm/procfs/Makefile
@@ -0,0 +1,11 @@
+# $Id: Makefile,v 1.1 1994/09/21 23:27:13 wollman Exp $
+
+.PATH: ${.CURDIR}/../../sys/miscfs/procfs
+KMOD= procfs_mod
+SRCS= procfs_ctl.c procfs_note.c procfs_status.c procfs_subr.c \
+ procfs_vfsops.c procfs_vnops.c
+NOMAN=
+VFS_LKM=
+CFLAGS+= -DPROCFS
+
+.include <bsd.kmod.mk>
diff --git a/lkm/syscons/Makefile b/lkm/syscons/Makefile
new file mode 100644
index 0000000..edd608e
--- /dev/null
+++ b/lkm/syscons/Makefile
@@ -0,0 +1,5 @@
+# $Id$
+
+SUBDIR= blank fade green snake star
+
+.include <bsd.subdir.mk>
diff --git a/lkm/syscons/blank/Makefile b/lkm/syscons/blank/Makefile
new file mode 100644
index 0000000..b94f1cf
--- /dev/null
+++ b/lkm/syscons/blank/Makefile
@@ -0,0 +1,10 @@
+# $Id: Makefile,v 1.1 1995/02/22 13:45:29 sos Exp $
+
+BINDIR= /lkm
+KMOD= blank_saver_mod
+SRCS= blank_saver.c
+
+NOMAN=
+CFLAGS+= -DLKM -I${.CURDIR}/.. -I${.CURDIR}/../../../sys
+
+.include <bsd.kmod.mk>
diff --git a/lkm/syscons/blank/blank_saver.c b/lkm/syscons/blank/blank_saver.c
new file mode 100644
index 0000000..6b68c1a5
--- /dev/null
+++ b/lkm/syscons/blank/blank_saver.c
@@ -0,0 +1,83 @@
+/*-
+ * Copyright (c) 1995 Søren Schmidt
+ * 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
+ * in this position and unchanged.
+ * 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 withough specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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: blank_saver.c,v 1.5 1995/11/14 07:34:34 bde Exp $
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/conf.h>
+#include <sys/exec.h>
+#include <sys/sysent.h>
+#include <sys/lkm.h>
+#include <sys/errno.h>
+#include <saver.h>
+
+MOD_MISC(blank_saver);
+
+void (*current_saver)(int blank);
+void (*old_saver)(int blank);
+
+static void
+blank_saver(int blank)
+{
+ u_char val;
+ if (blank) {
+ scrn_blanked = 1;
+ outb(TSIDX, 0x01); val = inb(TSREG);
+ outb(TSIDX, 0x01); outb(TSREG, val | 0x20);
+ }
+ else {
+ outb(TSIDX, 0x01); val = inb(TSREG);
+ outb(TSIDX, 0x01); outb(TSREG, val & 0xDF);
+ scrn_blanked = 0;
+ }
+}
+
+static int
+blank_saver_load(struct lkm_table *lkmtp, int cmd)
+{
+ (*current_saver)(0);
+ old_saver = current_saver;
+ current_saver = blank_saver;
+ return 0;
+}
+
+static int
+blank_saver_unload(struct lkm_table *lkmtp, int cmd)
+{
+ (*current_saver)(0);
+ current_saver = old_saver;
+ return 0;
+}
+
+int
+blank_saver_mod(struct lkm_table *lkmtp, int cmd, int ver)
+{
+ DISPATCH(lkmtp, cmd, ver, blank_saver_load, blank_saver_unload,
+ lkm_nullcmd);
+}
diff --git a/lkm/syscons/fade/Makefile b/lkm/syscons/fade/Makefile
new file mode 100644
index 0000000..998900d
--- /dev/null
+++ b/lkm/syscons/fade/Makefile
@@ -0,0 +1,10 @@
+# $Id: Makefile,v 1.1 1995/02/22 13:46:32 sos Exp $
+
+BINDIR= /lkm
+KMOD= fade_saver_mod
+SRCS= fade_saver.c
+
+NOMAN=
+CFLAGS+= -DLKM -I${.CURDIR}/.. -I${.CURDIR}/../../../sys
+
+.include <bsd.kmod.mk>
diff --git a/lkm/syscons/fade/fade_saver.c b/lkm/syscons/fade/fade_saver.c
new file mode 100644
index 0000000..21dfa82
--- /dev/null
+++ b/lkm/syscons/fade/fade_saver.c
@@ -0,0 +1,98 @@
+/*-
+ * Copyright (c) 1995 Søren Schmidt
+ * 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
+ * in this position and unchanged.
+ * 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 withough specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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: fade_saver.c,v 1.5 1995/11/14 07:34:42 bde Exp $
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/conf.h>
+#include <sys/exec.h>
+#include <sys/sysent.h>
+#include <sys/lkm.h>
+#include <sys/errno.h>
+#include <saver.h>
+
+MOD_MISC(fade_saver);
+
+void (*current_saver)(int blank);
+void (*old_saver)(int blank);
+
+static void
+fade_saver(int blank)
+{
+ static int count = 0;
+ int i;
+
+ if (blank) {
+ scrn_blanked = 1;
+ if (count < 64) {
+ outb(PIXMASK, 0xFF); /* no pixelmask */
+ outb(PALWADR, 0x00);
+ outb(PALDATA, 0);
+ outb(PALDATA, 0);
+ outb(PALDATA, 0);
+ for (i = 3; i < 768; i++) {
+ if (palette[i] - count > 15)
+ outb(PALDATA, palette[i]-count);
+ else
+ outb(PALDATA, 15);
+ }
+ inb(crtc_addr+6); /* reset flip/flop */
+ outb(ATC, 0x20); /* enable palette */
+ count++;
+ }
+ }
+ else {
+ load_palette();
+ count = scrn_blanked = 0;
+ }
+}
+
+static int
+fade_saver_load(struct lkm_table *lkmtp, int cmd)
+{
+ (*current_saver)(0);
+ old_saver = current_saver;
+ current_saver = fade_saver;
+ return 0;
+}
+
+static int
+fade_saver_unload(struct lkm_table *lkmtp, int cmd)
+{
+ (*current_saver)(0);
+ current_saver = old_saver;
+ return 0;
+}
+
+int
+fade_saver_mod(struct lkm_table *lkmtp, int cmd, int ver)
+{
+ DISPATCH(lkmtp, cmd, ver, fade_saver_load, fade_saver_unload,
+ lkm_nullcmd);
+}
diff --git a/lkm/syscons/green/Makefile b/lkm/syscons/green/Makefile
new file mode 100644
index 0000000..0aeccb2
--- /dev/null
+++ b/lkm/syscons/green/Makefile
@@ -0,0 +1,10 @@
+# $Id: Makefile,v 1.1 1995/02/22 13:47:10 sos Exp $
+
+BINDIR= /lkm
+KMOD= green_saver_mod
+SRCS= green_saver.c
+
+NOMAN=
+CFLAGS+= -DLKM -I${.CURDIR}/.. -I${.CURDIR}/../../../sys
+
+.include <bsd.kmod.mk>
diff --git a/lkm/syscons/green/green_saver.c b/lkm/syscons/green/green_saver.c
new file mode 100644
index 0000000..e431dd7
--- /dev/null
+++ b/lkm/syscons/green/green_saver.c
@@ -0,0 +1,87 @@
+/*-
+ * Copyright (c) 1995 Søren Schmidt
+ * 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
+ * in this position and unchanged.
+ * 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 withough specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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: green_saver.c,v 1.5 1995/11/14 07:34:50 bde Exp $
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/conf.h>
+#include <sys/exec.h>
+#include <sys/sysent.h>
+#include <sys/lkm.h>
+#include <sys/errno.h>
+#include <saver.h>
+
+MOD_MISC(green_saver);
+
+void (*current_saver)(int blank);
+void (*old_saver)(int blank);
+
+static void
+green_saver(int blank)
+{
+ u_char val;
+ if (blank) {
+ scrn_blanked = 1;
+ outb(TSIDX, 0x01); val = inb(TSREG);
+ outb(TSIDX, 0x01); outb(TSREG, val | 0x20);
+ outb(crtc_addr, 0x17); val = inb(crtc_addr + 1);
+ outb(crtc_addr + 1, val & ~0x80);
+ }
+ else {
+ outb(TSIDX, 0x01); val = inb(TSREG);
+ outb(TSIDX, 0x01); outb(TSREG, val & 0xDF);
+ outb(crtc_addr, 0x17); val = inb(crtc_addr + 1);
+ outb(crtc_addr + 1, val | 0x80);
+ scrn_blanked = 0;
+ }
+}
+
+static int
+green_saver_load(struct lkm_table *lkmtp, int cmd)
+{
+ (*current_saver)(0);
+ old_saver = current_saver;
+ current_saver = green_saver;
+ return 0;
+}
+
+static int
+green_saver_unload(struct lkm_table *lkmtp, int cmd)
+{
+ (*current_saver)(0);
+ current_saver = old_saver;
+ return 0;
+}
+
+int
+green_saver_mod(struct lkm_table *lkmtp, int cmd, int ver)
+{
+ DISPATCH(lkmtp, cmd, ver, green_saver_load, green_saver_unload,
+ lkm_nullcmd);
+}
diff --git a/lkm/syscons/saver.h b/lkm/syscons/saver.h
new file mode 100644
index 0000000..ecaee02
--- /dev/null
+++ b/lkm/syscons/saver.h
@@ -0,0 +1,17 @@
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/tty.h>
+#include <i386/include/pc/display.h>
+#include <i386/include/console.h>
+#include <i386/include/apm_bios.h>
+#include <i386/i386/cons.h>
+#include <i386/isa/isa.h>
+#include <i386/isa/isa_device.h>
+#include <i386/isa/syscons.h>
+
+extern scr_stat *cur_console;
+extern u_short *Crtat;
+extern u_int crtc_addr;
+extern char scr_map[];
+extern int scrn_blanked;
+extern char palette[];
diff --git a/lkm/syscons/snake/Makefile b/lkm/syscons/snake/Makefile
new file mode 100644
index 0000000..2d674e3
--- /dev/null
+++ b/lkm/syscons/snake/Makefile
@@ -0,0 +1,10 @@
+# $Id: Makefile,v 1.1 1995/02/22 13:48:06 sos Exp $
+
+BINDIR= /lkm
+KMOD= snake_saver_mod
+SRCS= snake_saver.c
+
+NOMAN=
+CFLAGS+= -DLKM -I${.CURDIR}/.. -I${.CURDIR}/../../../sys
+
+.include <bsd.kmod.mk>
diff --git a/lkm/syscons/snake/snake_saver.c b/lkm/syscons/snake/snake_saver.c
new file mode 100644
index 0000000..d23a6fe
--- /dev/null
+++ b/lkm/syscons/snake/snake_saver.c
@@ -0,0 +1,124 @@
+/*-
+ * Copyright (c) 1995 Søren Schmidt
+ * 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
+ * in this position and unchanged.
+ * 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 withough specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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: snake_saver.c,v 1.8 1995/11/14 07:34:58 bde Exp $
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/conf.h>
+#include <sys/exec.h>
+#include <sys/sysent.h>
+#include <sys/lkm.h>
+#include <sys/errno.h>
+#include <saver.h>
+
+MOD_MISC(snake_saver);
+
+void (*current_saver)(int blank);
+void (*old_saver)(int blank);
+
+static void
+snake_saver(int blank)
+{
+ const char saves[] = {"FreeBSD-2.2-CURRENT"};
+ static u_char *savs[sizeof(saves)-1];
+ static int dirx, diry;
+ int f;
+ scr_stat *scp = cur_console;
+
+ if (blank) {
+ if (!scrn_blanked) {
+ fillw((FG_LIGHTGREY|BG_BLACK)<<8 | scr_map[0x20],
+ Crtat, scp->xsize * scp->ysize);
+ set_border(0);
+ dirx = (scp->xpos ? 1 : -1);
+ diry = (scp->ypos ?
+ scp->xsize : -scp->xsize);
+ for (f=0; f< sizeof(saves)-1; f++)
+ savs[f] = (u_char *)Crtat + 2 *
+ (scp->xpos+scp->ypos*scp->xsize);
+ *(savs[0]) = scr_map[*saves];
+ f = scp->ysize * scp->xsize + 5;
+ outb(crtc_addr, 14);
+ outb(crtc_addr+1, f >> 8);
+ outb(crtc_addr, 15);
+ outb(crtc_addr+1, f & 0xff);
+ scrn_blanked = 1;
+ }
+ if (scrn_blanked++ < 4)
+ return;
+ scrn_blanked = 1;
+ *(savs[sizeof(saves)-2]) = scr_map[0x20];
+ for (f=sizeof(saves)-2; f > 0; f--)
+ savs[f] = savs[f-1];
+ f = (savs[0] - (u_char *)Crtat) / 2;
+ if ((f % scp->xsize) == 0 ||
+ (f % scp->xsize) == scp->xsize - 1 ||
+ (random() % 50) == 0)
+ dirx = -dirx;
+ if ((f / scp->xsize) == 0 ||
+ (f / scp->xsize) == scp->ysize - 1 ||
+ (random() % 20) == 0)
+ diry = -diry;
+ savs[0] += 2*dirx + 2*diry;
+ for (f=sizeof(saves)-2; f>=0; f--)
+ *(savs[f]) = scr_map[saves[f]];
+ }
+ else {
+ if (scrn_blanked) {
+ set_border(scp->border);
+ scrn_blanked = 0;
+ scp->start = 0;
+ scp->end = scp->xsize * scp->ysize;
+ }
+ }
+}
+
+static int
+snake_saver_load(struct lkm_table *lkmtp, int cmd)
+{
+ (*current_saver)(0);
+ old_saver = current_saver;
+ current_saver = snake_saver;
+ return 0;
+}
+
+static int
+snake_saver_unload(struct lkm_table *lkmtp, int cmd)
+{
+ (*current_saver)(0);
+ current_saver = old_saver;
+ return 0;
+}
+
+int
+snake_saver_mod(struct lkm_table *lkmtp, int cmd, int ver)
+{
+ DISPATCH(lkmtp, cmd, ver, snake_saver_load, snake_saver_unload,
+ lkm_nullcmd);
+}
diff --git a/lkm/syscons/star/Makefile b/lkm/syscons/star/Makefile
new file mode 100644
index 0000000..b22cfc6
--- /dev/null
+++ b/lkm/syscons/star/Makefile
@@ -0,0 +1,10 @@
+# $Id: Makefile,v 1.1 1995/02/22 13:47:35 sos Exp $
+
+BINDIR= /lkm
+KMOD= star_saver_mod
+SRCS= star_saver.c
+
+NOMAN=
+CFLAGS+= -DLKM -I${.CURDIR}/.. -I${.CURDIR}/../../../sys
+
+.include <bsd.kmod.mk>
diff --git a/lkm/syscons/star/star_saver.c b/lkm/syscons/star/star_saver.c
new file mode 100644
index 0000000..8f60573
--- /dev/null
+++ b/lkm/syscons/star/star_saver.c
@@ -0,0 +1,114 @@
+/*-
+ * Copyright (c) 1995 Søren Schmidt
+ * 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
+ * in this position and unchanged.
+ * 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 withough specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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: star_saver.c,v 1.6 1995/11/14 07:35:06 bde Exp $
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/conf.h>
+#include <sys/exec.h>
+#include <sys/sysent.h>
+#include <sys/lkm.h>
+#include <sys/errno.h>
+#include <saver.h>
+
+MOD_MISC(star_saver);
+
+void (*current_saver)(int blank);
+void (*old_saver)(int blank);
+
+#define NUM_STARS 50
+
+/*
+ * Alternate saver that got its inspiration from a well known utility
+ * package for an inferior^H^H^H^H^H^Hfamous OS.
+ */
+static void
+star_saver(int blank)
+{
+ scr_stat *scp = cur_console;
+ int cell, i;
+ char pattern[] = {"...........++++*** "};
+ char colors[] = {FG_DARKGREY, FG_LIGHTGREY,
+ FG_WHITE, FG_LIGHTCYAN};
+ static u_short stars[NUM_STARS][2];
+
+ if (blank) {
+ if (!scrn_blanked) {
+ scrn_blanked = 1;
+ fillw((FG_LIGHTGREY|BG_BLACK)<<8|scr_map[0x20], Crtat,
+ scp->xsize * scp->ysize);
+ set_border(0);
+ for(i=0; i<NUM_STARS; i++) {
+ stars[i][0] =
+ random() % (scp->xsize*scp->ysize);
+ stars[i][1] = 0;
+ }
+ }
+ cell = random() % NUM_STARS;
+ *((u_short*)(Crtat + stars[cell][0])) =
+ scr_map[pattern[stars[cell][1]]] |
+ colors[random()%sizeof(colors)] << 8;
+ if ((stars[cell][1]+=(random()%4)) >= sizeof(pattern)-1) {
+ stars[cell][0] = random() % (scp->xsize*scp->ysize);
+ stars[cell][1] = 0;
+ }
+ }
+ else {
+ if (scrn_blanked) {
+ set_border(scp->border);
+ scrn_blanked = 0;
+ scp->start = 0;
+ scp->end = scp->xsize * scp->ysize;
+ }
+ }
+}
+
+static int
+star_saver_load(struct lkm_table *lkmtp, int cmd)
+{
+ (*current_saver)(0);
+ old_saver = current_saver;
+ current_saver = star_saver;
+ return 0;
+}
+
+static int
+star_saver_unload(struct lkm_table *lkmtp, int cmd)
+{
+ (*current_saver)(0);
+ current_saver = old_saver;
+ return 0;
+}
+
+int
+star_saver_mod(struct lkm_table *lkmtp, int cmd, int ver)
+{
+ DISPATCH(lkmtp, cmd, ver, star_saver_load, star_saver_unload,
+ lkm_nullcmd);
+}
diff --git a/lkm/umapfs/Makefile b/lkm/umapfs/Makefile
new file mode 100644
index 0000000..c8c26c8
--- /dev/null
+++ b/lkm/umapfs/Makefile
@@ -0,0 +1,10 @@
+# $Id: Makefile,v 1.1 1994/09/16 20:24:28 wollman Exp $
+
+.PATH: ${.CURDIR}/../../sys/miscfs/umapfs
+KMOD= umap_mod
+SRCS= umap_subr.c umap_vfsops.c umap_vnops.c
+NOMAN=
+VFS_LKM= yes
+CFLAGS+= -DUMAPFS
+
+.include <bsd.kmod.mk>
diff --git a/lkm/union/Makefile b/lkm/union/Makefile
new file mode 100644
index 0000000..2a1cf7e
--- /dev/null
+++ b/lkm/union/Makefile
@@ -0,0 +1,10 @@
+# $Id: Makefile,v 1.1 1994/09/16 20:24:28 wollman Exp $
+
+.PATH: ${.CURDIR}/../../sys/miscfs/union
+KMOD= union_mod
+SRCS= union_subr.c union_vfsops.c union_vnops.c
+NOMAN=
+VFS_LKM=
+CFLAGS+= -DUNION
+
+.include <bsd.kmod.mk>
diff --git a/lkm/wcd/Makefile b/lkm/wcd/Makefile
new file mode 100644
index 0000000..162de4b
--- /dev/null
+++ b/lkm/wcd/Makefile
@@ -0,0 +1,28 @@
+.PATH: ${.CURDIR}/../../sys/i386/isa
+KMOD = wcd_mod
+SRCS = wcd.c wdc.h wcd.h
+NOMAN =
+BINDIR = /lkm
+CFLAGS += -nostdinc -I. -I/sys -DATAPI -DWCD_MODULE
+CLEANFILES += $(KMOD) machine wdc.h wcd.h *.b
+LN = ln -f -s
+
+load: ${PROG}
+ /sbin/modload -u -e wcd $(PROG)
+
+unload: ${PROG}
+ /sbin/modunload -n wcd
+
+wdc.h:
+ echo "#define NWDC 2" > wdc.h
+ echo "#define NWD 4" >> wdc.h
+
+wcd.h:
+ echo "#define NWCD 1" > wcd.h
+
+.c.o:
+ -@$(LN) /sys/i386/include machine
+ $(CC) $(CFLAGS) -c $<
+ -@rm machine
+
+.include <bsd.kmod.mk>
OpenPOWER on IntegriCloud