LKM module for the iBCS2 emulator
This commit is contained in:
parent
cc33ccc9bc
commit
8ddee77e1b
@ -1,14 +1,15 @@
|
||||
# $Id: Makefile,v 1.1 1994/09/21 23:27:03 wollman Exp $
|
||||
# $Id$
|
||||
|
||||
.PATH: ${.CURDIR}/../../sys/i386/ibcs2
|
||||
KMOD= ibcs2_mod
|
||||
SRCS= ibcs2.c ibcs2_dummy.c ibcs2_file.c ibcs2_ioctl.c ibcs2_ipc.c \
|
||||
ibcs2_isc.c ibcs2_misc.c ibcs2_signal.c ibcs2_stats.c \
|
||||
ibcs2_sysent.c ibcs2_sysi86.c ibcs2_xenix.c \
|
||||
imgact_coff.c #imgact_elf.c imgact_linux.c imgact_xout.c
|
||||
|
||||
ibcs2_sysent.c ibcs2_sysi86.c ibcs2_xenix.c
|
||||
NOMAN=
|
||||
VFS_LKM=
|
||||
CFLAGS+= -DLKM -I. -DIBCS2
|
||||
CFLAGS+= -DLKM -I. -DCOMPAT_IBCS2
|
||||
|
||||
.afterinstall:
|
||||
${INSTALL} -c -o bin -g bin -m 755 ibcs2 /usr/bin
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
|
18
lkm/ibcs2/ibcs2
Executable file
18
lkm/ibcs2/ibcs2
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
# $Id$
|
||||
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_init -o $newkernelfile -q /lkm/ibcs2_mod.o
|
||||
for loader in $LOADERS; do
|
||||
modload -e${loader}_init -o/tmp/ibcs2_${loader}.o -qu \
|
||||
-A${newkernelfile} /lkm/ibcs2_${loader}_mod.o
|
||||
done
|
||||
set +e
|
@ -30,15 +30,13 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/sysent.h>
|
||||
#include <sys/lkm.h>
|
||||
#include <sys/errno.h>
|
||||
|
||||
extern const struct execsw coff_execsw;
|
||||
|
||||
MOD_EXEC("ibcs2_mod", -1, (struct execsw*)&coff_execsw)
|
||||
MOD_MISC("ibcs2_mod")
|
||||
|
||||
ibcs2_load(struct lkm_table *lkmtp, int cmd)
|
||||
{
|
||||
|
@ -1,14 +1,15 @@
|
||||
# $Id: Makefile,v 1.1 1994/09/21 23:27:03 wollman Exp $
|
||||
# $Id$
|
||||
|
||||
.PATH: ${.CURDIR}/../../sys/i386/ibcs2
|
||||
KMOD= ibcs2_mod
|
||||
SRCS= ibcs2.c ibcs2_dummy.c ibcs2_file.c ibcs2_ioctl.c ibcs2_ipc.c \
|
||||
ibcs2_isc.c ibcs2_misc.c ibcs2_signal.c ibcs2_stats.c \
|
||||
ibcs2_sysent.c ibcs2_sysi86.c ibcs2_xenix.c \
|
||||
imgact_coff.c #imgact_elf.c imgact_linux.c imgact_xout.c
|
||||
|
||||
ibcs2_sysent.c ibcs2_sysi86.c ibcs2_xenix.c
|
||||
NOMAN=
|
||||
VFS_LKM=
|
||||
CFLAGS+= -DLKM -I. -DIBCS2
|
||||
CFLAGS+= -DLKM -I. -DCOMPAT_IBCS2
|
||||
|
||||
.afterinstall:
|
||||
${INSTALL} -c -o bin -g bin -m 755 ibcs2 /usr/bin
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
|
18
sys/modules/ibcs2/ibcs2
Executable file
18
sys/modules/ibcs2/ibcs2
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
# $Id$
|
||||
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_init -o $newkernelfile -q /lkm/ibcs2_mod.o
|
||||
for loader in $LOADERS; do
|
||||
modload -e${loader}_init -o/tmp/ibcs2_${loader}.o -qu \
|
||||
-A${newkernelfile} /lkm/ibcs2_${loader}_mod.o
|
||||
done
|
||||
set +e
|
@ -30,15 +30,13 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/sysent.h>
|
||||
#include <sys/lkm.h>
|
||||
#include <sys/errno.h>
|
||||
|
||||
extern const struct execsw coff_execsw;
|
||||
|
||||
MOD_EXEC("ibcs2_mod", -1, (struct execsw*)&coff_execsw)
|
||||
MOD_MISC("ibcs2_mod")
|
||||
|
||||
ibcs2_load(struct lkm_table *lkmtp, int cmd)
|
||||
{
|
||||
|
18
sys/modules/ibcs2/ibcs2.sh
Normal file
18
sys/modules/ibcs2/ibcs2.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
# $Id$
|
||||
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_init -o $newkernelfile -q /lkm/ibcs2_mod.o
|
||||
for loader in $LOADERS; do
|
||||
modload -e${loader}_init -o/tmp/ibcs2_${loader}.o -qu \
|
||||
-A${newkernelfile} /lkm/ibcs2_${loader}_mod.o
|
||||
done
|
||||
set +e
|
Loading…
Reference in New Issue
Block a user