diff options
author | newton <newton@FreeBSD.org> | 1999-01-30 06:29:48 +0000 |
---|---|---|
committer | newton <newton@FreeBSD.org> | 1999-01-30 06:29:48 +0000 |
commit | 3997fb47add29faec9e3ac9c1925d021e723f6fb (patch) | |
tree | 3c76919da523b05b639dba820ce9b8ffd560037a /sys/modules | |
parent | 1be412c9d1b16dd39a049d5986d2729ab61295a5 (diff) | |
download | FreeBSD-src-3997fb47add29faec9e3ac9c1925d021e723f6fb.zip FreeBSD-src-3997fb47add29faec9e3ac9c1925d021e723f6fb.tar.gz |
Emulator KLD for SysVR4 executables grabbed from NetBSD.
See http://www.freebsd.org/~newton/freebsd-svr4 for limitations,
capabilities, history and TO-DO list.
Diffstat (limited to 'sys/modules')
-rw-r--r-- | sys/modules/svr4/Makefile | 51 | ||||
-rwxr-xr-x | sys/modules/svr4/hello | bin | 0 -> 15864 bytes | |||
-rw-r--r-- | sys/modules/svr4/svr4.sh | 12 |
3 files changed, 63 insertions, 0 deletions
diff --git a/sys/modules/svr4/Makefile b/sys/modules/svr4/Makefile new file mode 100644 index 0000000..9c12712 --- /dev/null +++ b/sys/modules/svr4/Makefile @@ -0,0 +1,51 @@ +# $Id$ + +.PATH: ${.CURDIR}/../../i386/svr4 ${.CURDIR}/../../svr4 +KMOD= svr4 +SRCS= svr4_sysent.c svr4_sysvec.c opt_compat.h opt_vmpage.h vnode_if.h \ + imgact_svr4.c svr4_signal.c svr4_fcntl.c svr4_misc.c svr4_ioctl.c \ + svr4_stat.c svr4_filio.c svr4_ttold.c svr4_termios.c svr4_stream.c \ + svr4_socket.c svr4_sockio.c svr4_machdep.c svr4_resource.c \ + svr4_ipc.c +OBJS= svr4_locore.o +NOMAN=1 +MAN8= svr4.8 +CFLAGS+= -DKERNEL + +CFLAGS+= -DCOMPAT_SVR4 +.if defined(DEBUG) +CFLAGS+= -DDEBUG_SVR4 +.endif + +EXPORT_SYMS=_svr4_mod +CLEANFILES+= vnode_if.h vnode_if.c svr4_genassym.o svr4_genassym \ + svr4_assym.h opt_compat.h opt_vmpage.h .depend + +build-tools: svr4_genassym + +svr4_assym.h: svr4_genassym + ./svr4_genassym > svr4_assym.h + +svr4_locore.o: svr4_locore.s svr4_assym.h + ${CC} -c -x assembler-with-cpp -DLOCORE -DKERNEL ${CFLAGS} \ + ${.IMPSRC} -o ${.TARGET} + +svr4_genassym.o: svr4_genassym.c svr4.h @ machine + ${CC} -c ${CFLAGS} -UKERNEL ${.IMPSRC} + +svr4_genassym: svr4_genassym.o + ${CC} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} + +svr4_sysvec.o: opt_vmpage.h opt_compat.h + +opt_compat.h: + echo "#define COMPAT_43 1" > opt_compat.h + +opt_vmpage.h: + touch opt_vmpage.h + +afterinstall: + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${.CURDIR}/svr4.sh ${DESTDIR}/usr/bin/svr4 + +.include <bsd.kmod.mk> diff --git a/sys/modules/svr4/hello b/sys/modules/svr4/hello Binary files differnew file mode 100755 index 0000000..923c45b --- /dev/null +++ b/sys/modules/svr4/hello diff --git a/sys/modules/svr4/svr4.sh b/sys/modules/svr4/svr4.sh new file mode 100644 index 0000000..1d8e694 --- /dev/null +++ b/sys/modules/svr4/svr4.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# $Id$ + +FOUND=`kldstat -v | egrep 'svr4elf'` + +if [ "x$FOUND" != x ] ; then + echo SysVR4 driver already loaded + exit 1 +else + kldload svr4 +fi |