Add compat_linux and exec_linux_elf lkm support for amd64:

- Add needed COMPAT_OSSAUDIO to GENERIC.
- Add missing includes needed by linux_syscallargs.h.
- Add lkm building.
This commit is contained in:
njoly 2007-10-19 18:52:09 +00:00
parent 3e94d8f384
commit a478f23b9e
31 changed files with 136 additions and 63 deletions

View File

@ -1,10 +1,12 @@
# $NetBSD: md.amd64,v 1.13 2007/01/14 04:45:18 christos Exp $
# $NetBSD: md.amd64,v 1.14 2007/10/19 18:52:09 njoly Exp $
./dev/lms0 base-obsolete obsolete
./dev/mms0 base-obsolete obsolete
./usr/bin/fdformat base-util-bin
./usr/lib/libx86_64.so base-sys-shlib
./usr/lib/libx86_64.so.0 base-sys-shlib
./usr/lib/libx86_64.so.0.0 base-sys-shlib
./usr/lkm/compat_linux.o base-sys-lkm
./usr/lkm/exec_linux_elf.o base-sys-lkm
./usr/mdec/biosboot base-obsolete obsolete
./usr/mdec/biosboot.sym base-obsolete obsolete
./usr/mdec/biosboot_com0.sym base-obsolete obsolete

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.166 2007/10/17 19:53:02 garbled Exp $
# $NetBSD: GENERIC,v 1.167 2007/10/19 18:52:10 njoly Exp $
#
# GENERIC machine description file
#
@ -22,7 +22,7 @@ include "arch/amd64/conf/std.amd64"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERIC-$Revision: 1.166 $"
#ident "GENERIC-$Revision: 1.167 $"
maxusers 32 # estimated number of users
@ -110,6 +110,7 @@ options COMPAT_40 # NetBSD 4.0 compatibility.
options COMPAT_43 # and 4.3BSD
#options COMPAT_386BSD_MBRPART # recognize old partition ID
options COMPAT_OSSAUDIO
options COMPAT_NETBSD32
#options COMPAT_LINUX
#options COMPAT_LINUX32 # req. COMPAT_LINUX and COMPAT_NETBSD32

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_machdep.c,v 1.24 2007/10/03 10:54:16 ad Exp $ */
/* $NetBSD: linux_machdep.c,v 1.25 2007/10/19 18:52:10 njoly Exp $ */
/*-
* Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@ -33,7 +33,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.24 2007/10/03 10:54:16 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.25 2007/10/19 18:52:10 njoly Exp $");
#include <sys/param.h>
#include <sys/types.h>
@ -72,6 +72,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.24 2007/10/03 10:54:16 ad Exp $"
#include <compat/linux/common/linux_ioctl.h>
#include <compat/linux/common/linux_prctl.h>
#include <compat/linux/common/linux_machdep.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscall.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_blkio.c,v 1.14 2007/03/04 06:01:22 christos Exp $ */
/* $NetBSD: linux_blkio.c,v 1.15 2007/10/19 18:52:10 njoly Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_blkio.c,v 1.14 2007/03/04 06:01:22 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_blkio.c,v 1.15 2007/10/19 18:52:10 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -54,6 +54,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_blkio.c,v 1.14 2007/03/04 06:01:22 christos Ex
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_util.h>
#include <compat/linux/common/linux_blkio.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_cdrom.c,v 1.23 2007/06/30 22:18:17 dsl Exp $ */
/* $NetBSD: linux_cdrom.c,v 1.24 2007/10/19 18:52:10 njoly Exp $ */
/*
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_cdrom.c,v 1.23 2007/06/30 22:18:17 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_cdrom.c,v 1.24 2007/10/19 18:52:10 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -53,6 +53,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_cdrom.c,v 1.23 2007/06/30 22:18:17 dsl Exp $")
#include <compat/linux/common/linux_ioctl.h>
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_util.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/common/linux_cdrom.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_exec.c,v 1.96 2007/10/19 12:16:38 ad Exp $ */
/* $NetBSD: linux_exec.c,v 1.97 2007/10/19 18:52:10 njoly Exp $ */
/*-
* Copyright (c) 1994, 1995, 1998, 2000, 2007 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_exec.c,v 1.96 2007/10/19 12:16:38 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_exec.c,v 1.97 2007/10/19 18:52:10 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -68,6 +68,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_exec.c,v 1.96 2007/10/19 12:16:38 ad Exp $");
#include <compat/linux/common/linux_machdep.h>
#include <compat/linux/common/linux_exec.h>
#include <compat/linux/common/linux_futex.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>
#include <compat/linux/linux_syscall.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_fdio.c,v 1.10 2007/03/04 06:01:23 christos Exp $ */
/* $NetBSD: linux_fdio.c,v 1.11 2007/10/19 18:52:10 njoly Exp $ */
/*
* Copyright (c) 2000 Wasabi Systems, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_fdio.c,v 1.10 2007/03/04 06:01:23 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_fdio.c,v 1.11 2007/10/19 18:52:10 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -58,6 +58,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_fdio.c,v 1.10 2007/03/04 06:01:23 christos Exp
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_util.h>
#include <compat/linux/common/linux_fdio.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_file.c,v 1.83 2007/05/12 23:02:49 dsl Exp $ */
/* $NetBSD: linux_file.c,v 1.84 2007/10/19 18:52:10 njoly Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.83 2007/05/12 23:02:49 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.84 2007/10/19 18:52:10 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -70,6 +70,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.83 2007/05/12 23:02:49 dsl Exp $");
#include <compat/linux/common/linux_fcntl.h>
#include <compat/linux/common/linux_util.h>
#include <compat/linux/common/linux_machdep.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_file64.c,v 1.39 2007/05/12 23:02:49 dsl Exp $ */
/* $NetBSD: linux_file64.c,v 1.40 2007/10/19 18:52:11 njoly Exp $ */
/*-
* Copyright (c) 1995, 1998, 2000 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.39 2007/05/12 23:02:49 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.40 2007/10/19 18:52:11 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -69,6 +69,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.39 2007/05/12 23:02:49 dsl Exp $"
#include <compat/linux/common/linux_util.h>
#include <compat/linux/common/linux_machdep.h>
#include <compat/linux/common/linux_dirent.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_futex.c,v 1.7 2006/07/24 19:01:49 manu Exp $ */
/* $NetBSD: linux_futex.c,v 1.8 2007/10/19 18:52:11 njoly Exp $ */
/*-
* Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@ -32,9 +32,9 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(1, "$NetBSD: linux_futex.c,v 1.7 2006/07/24 19:01:49 manu Exp $");
__KERNEL_RCSID(1, "$NetBSD: linux_futex.c,v 1.8 2007/10/19 18:52:11 njoly Exp $");
#include <sys/types.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/systm.h>
#include <sys/proc.h>
@ -42,8 +42,13 @@ __KERNEL_RCSID(1, "$NetBSD: linux_futex.c,v 1.7 2006/07/24 19:01:49 manu Exp $")
#include <sys/queue.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/kernel.h>
#include <compat/linux/common/linux_types.h>
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_futex.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>
struct futex;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_hdio.c,v 1.13 2007/07/01 09:54:16 dsl Exp $ */
/* $NetBSD: linux_hdio.c,v 1.14 2007/10/19 18:52:11 njoly Exp $ */
/*
* Copyright (c) 2000 Wasabi Systems, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_hdio.c,v 1.13 2007/07/01 09:54:16 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_hdio.c,v 1.14 2007/10/19 18:52:11 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -58,6 +58,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_hdio.c,v 1.13 2007/07/01 09:54:16 dsl Exp $");
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_util.h>
#include <compat/linux/common/linux_hdio.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_ioctl.c,v 1.48 2007/06/16 19:54:02 dsl Exp $ */
/* $NetBSD: linux_ioctl.c,v 1.49 2007/10/19 18:52:11 njoly Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_ioctl.c,v 1.48 2007/06/16 19:54:02 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_ioctl.c,v 1.49 2007/10/19 18:52:11 njoly Exp $");
#if defined(_KERNEL_OPT)
#include "sequencer.h"
@ -62,6 +62,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_ioctl.c,v 1.48 2007/06/16 19:54:02 dsl Exp $")
#include <compat/linux/common/linux_types.h>
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_ioctl.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_misc.c,v 1.183 2007/07/17 17:42:08 joerg Exp $ */
/* $NetBSD: linux_misc.c,v 1.184 2007/10/19 18:52:11 njoly Exp $ */
/*-
* Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc.
@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.183 2007/07/17 17:42:08 joerg Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.184 2007/10/19 18:52:11 njoly Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ptrace.h"
@ -113,6 +113,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.183 2007/07/17 17:42:08 joerg Exp $
#include <compat/linux/common/linux_machdep.h>
#include <compat/linux/common/linux_types.h>
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_misc_notalpha.c,v 1.94 2007/07/09 21:10:46 ad Exp $ */
/* $NetBSD: linux_misc_notalpha.c,v 1.95 2007/10/19 18:52:11 njoly Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.94 2007/07/09 21:10:46 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.95 2007/10/19 18:52:11 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -66,6 +66,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.94 2007/07/09 21:10:46 ad
#include <compat/linux/common/linux_mmap.h>
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_util.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_mtio.c,v 1.4 2007/03/04 06:01:24 christos Exp $ */
/* $NetBSD: linux_mtio.c,v 1.5 2007/10/19 18:52:11 njoly Exp $ */
/*
* Copyright (c) 2005 Soren S. Jorvang. All rights reserved.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_mtio.c,v 1.4 2007/03/04 06:01:24 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_mtio.c,v 1.5 2007/10/19 18:52:11 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -44,6 +44,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_mtio.c,v 1.4 2007/03/04 06:01:24 christos Exp
#include <compat/linux/common/linux_ioctl.h>
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_mtio.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_pipe.c,v 1.58 2007/02/09 21:55:19 ad Exp $ */
/* $NetBSD: linux_pipe.c,v 1.59 2007/10/19 18:52:11 njoly Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_pipe.c,v 1.58 2007/02/09 21:55:19 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_pipe.c,v 1.59 2007/10/19 18:52:11 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -52,6 +52,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_pipe.c,v 1.58 2007/02/09 21:55:19 ad Exp $");
#include <compat/linux/common/linux_types.h>
#include <compat/linux/common/linux_mmap.h>
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_sched.c,v 1.43 2007/10/19 12:16:39 ad Exp $ */
/* $NetBSD: linux_sched.c,v 1.44 2007/10/19 18:52:11 njoly Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.43 2007/10/19 12:16:39 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.44 2007/10/19 18:52:11 njoly Exp $");
#include <sys/param.h>
#include <sys/mount.h>
@ -61,6 +61,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.43 2007/10/19 12:16:39 ad Exp $");
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_machdep.h> /* For LINUX_NPTL */
#include <compat/linux/common/linux_emuldata.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_sg.c,v 1.10 2007/03/04 06:01:24 christos Exp $ */
/* $NetBSD: linux_sg.c,v 1.11 2007/10/19 18:52:11 njoly Exp $ */
/*
* Copyright (c) 2004 Soren S. Jorvang. All rights reserved.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_sg.c,v 1.10 2007/03/04 06:01:24 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_sg.c,v 1.11 2007/10/19 18:52:11 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -47,6 +47,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sg.c,v 1.10 2007/03/04 06:01:24 christos Exp $
#include <compat/linux/common/linux_ioctl.h>
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_sg.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_sig_notalpha.c,v 1.33 2007/02/09 21:55:19 ad Exp $ */
/* $NetBSD: linux_sig_notalpha.c,v 1.34 2007/10/19 18:52:12 njoly Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_sig_notalpha.c,v 1.33 2007/02/09 21:55:19 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_sig_notalpha.c,v 1.34 2007/10/19 18:52:12 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -57,6 +57,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sig_notalpha.c,v 1.33 2007/02/09 21:55:19 ad E
#include <compat/linux/common/linux_types.h>
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_util.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_sigaction.c,v 1.30 2007/02/09 21:55:19 ad Exp $ */
/* $NetBSD: linux_sigaction.c,v 1.31 2007/10/19 18:52:12 njoly Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_sigaction.c,v 1.30 2007/02/09 21:55:19 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_sigaction.c,v 1.31 2007/10/19 18:52:12 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -57,6 +57,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sigaction.c,v 1.30 2007/02/09 21:55:19 ad Exp
#include <compat/linux/common/linux_types.h>
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_util.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_signal.c,v 1.54 2007/03/04 06:01:24 christos Exp $ */
/* $NetBSD: linux_signal.c,v 1.55 2007/10/19 18:52:12 njoly Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.54 2007/03/04 06:01:24 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.55 2007/10/19 18:52:12 njoly Exp $");
#define COMPAT_LINUX 1
@ -81,6 +81,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.54 2007/03/04 06:01:24 christos E
#include <compat/linux/common/linux_siginfo.h>
#include <compat/linux/common/linux_sigevent.h>
#include <compat/linux/common/linux_util.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_socket.c,v 1.79 2007/08/29 22:33:42 dyoung Exp $ */
/* $NetBSD: linux_socket.c,v 1.80 2007/10/19 18:52:12 njoly Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.79 2007/08/29 22:33:42 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.80 2007/10/19 18:52:12 njoly Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@ -98,6 +98,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.79 2007/08/29 22:33:42 dyoung Exp
#include <compat/linux/common/linux_socketcall.h>
#endif
#include <compat/linux/common/linux_sockio.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_sysctl.c,v 1.31 2007/08/15 12:07:30 ad Exp $ */
/* $NetBSD: linux_sysctl.c,v 1.32 2007/10/19 18:52:12 njoly Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.31 2007/08/15 12:07:30 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.32 2007/10/19 18:52:12 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -54,6 +54,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.31 2007/08/15 12:07:30 ad Exp $")
#include <compat/linux/common/linux_types.h>
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>
#include <compat/linux/common/linux_sysctl.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_termios.c,v 1.31 2007/05/13 16:04:00 dsl Exp $ */
/* $NetBSD: linux_termios.c,v 1.32 2007/10/19 18:52:12 njoly Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_termios.c,v 1.31 2007/05/13 16:04:00 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_termios.c,v 1.32 2007/10/19 18:52:12 njoly Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ptm.h"
@ -59,6 +59,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_termios.c,v 1.31 2007/05/13 16:04:00 dsl Exp $
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_util.h>
#include <compat/linux/common/linux_termios.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_time.c,v 1.18 2007/05/13 11:04:11 dsl Exp $ */
/* $NetBSD: linux_time.c,v 1.19 2007/10/19 18:52:12 njoly Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.18 2007/05/13 11:04:11 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.19 2007/10/19 18:52:12 njoly Exp $");
#include <sys/param.h>
#include <sys/ucred.h>
@ -56,6 +56,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.18 2007/05/13 11:04:11 dsl Exp $");
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_machdep.h>
#include <compat/linux/common/linux_sched.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#include <compat/linux/linux_syscallargs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_uselib.c,v 1.23 2007/10/19 12:16:39 ad Exp $ */
/* $NetBSD: linux_uselib.c,v 1.24 2007/10/19 18:52:12 njoly Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_uselib.c,v 1.23 2007/10/19 12:16:39 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_uselib.c,v 1.24 2007/10/19 18:52:12 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -61,6 +61,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_uselib.c,v 1.23 2007/10/19 12:16:39 ad Exp $")
#include <compat/linux/common/linux_util.h>
#include <compat/linux/common/linux_exec.h>
#include <compat/linux/common/linux_machdep.h>
#include <compat/linux/common/linux_ipc.h>
#include <compat/linux/common/linux_sem.h>
#ifndef EXEC_AOUT
/* define EXEC_AOUT to get prototype from linux_syscall.h */

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.22 2005/12/11 12:24:47 christos Exp $
# $NetBSD: Makefile,v 1.23 2007/10/19 18:52:12 njoly Exp $
.if (${MACHINE_ARCH} == "sparc64")
SUBDIR+= netbsd32 sunos32 svr4 svr4_32
@ -8,6 +8,10 @@ SUBDIR+= netbsd32 sunos32 svr4 svr4_32
SUBDIR+= freebsd linux svr4 pecoff
.endif
.if (${MACHINE} == "amd64")
SUBDIR+= linux
.endif
# These are untested, but do compile. Once they are tested,
# move them above.

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.32 2007/04/22 08:30:01 dsl Exp $
# $NetBSD: Makefile,v 1.33 2007/10/19 18:52:12 njoly Exp $
.include "../Makefile.inc"
@ -37,6 +37,15 @@ SRCS+= linux_syscall.c linux_trap.c
SRCS+= linux_sigcode.S
.endif
.if ${MACHINE} == "amd64"
.PATH: $S/compat/linux/arch/${MACHINE}
.PATH: $S/arch/${MACHINE}/${MACHINE}
.PATH: $S/arch/x86/x86
SRCS+= linux_file64.c linux_futex.c linux_misc_notalpha.c linux_sig_notalpha.c
SRCS+= linux_syscall.c linux_trap.c
SRCS+= linux_sigcode.S
.endif
.if ${MACHINE_ARCH} == "m68k"
SRCS+= linux_ipccall.c linux_llseek.c linux_misc_notalpha.c \
linux_oldselect.c linux_sig_notalpha.c \

View File

@ -1,4 +1,8 @@
# $NetBSD: Makefile,v 1.14 2002/03/24 15:01:57 kent Exp $
# $NetBSD: Makefile,v 1.15 2007/10/19 18:52:12 njoly Exp $
.if ${MACHINE} == "amd64"
SUBDIR+= linux_elf
.endif
.if ${MACHINE} == "i386"
SUBDIR+= freebsd_aout freebsd_elf linux_elf svr4_elf pecoff

View File

@ -1,8 +1,9 @@
# $NetBSD: Makefile,v 1.9 2007/05/12 10:45:01 dsl Exp $
# $NetBSD: Makefile,v 1.10 2007/10/19 18:52:13 njoly Exp $
.include "../Makefile.inc"
.PATH: $S/compat/linux/common
.PATH: $S/compat/linux/arch/${MACHINE}
.PATH: $S/compat/linux/arch/${MACHINE_ARCH}
CPPFLAGS+= -nostdinc -D_KERNEL -DEXEC_ELF32 -DEXEC_ELF64
@ -11,13 +12,15 @@ KMOD= exec_linux_elf
SRCS= lkminit_exec.c
.if ${MACHINE} == "i386"
.if ${MACHINE} == "amd64" || ${MACHINE} == "i386"
SRCS+= linux_exec_machdep.c
.endif
.if ${MACHINE} == "alpha" || ${MACHINE} == "sparc64"
.if ${MACHINE} == "alpha" || ${MACHINE} == "amd64" || ${MACHINE} == "sparc64"
CPPFLAGS+= -DELFSIZE=64
SRCS+= linux_exec_elf64.c
.else
CPPFLAGS+= -DELFSIZE=32
SRCS+= linux_exec_elf32.c
.endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: lkminit_exec.c,v 1.10 2005/12/11 12:24:48 christos Exp $ */
/* $NetBSD: lkminit_exec.c,v 1.11 2007/10/19 18:52:13 njoly Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.10 2005/12/11 12:24:48 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.11 2007/10/19 18:52:13 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -48,7 +48,6 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.10 2005/12/11 12:24:48 christos E
#include <sys/signalvar.h>
#include <machine/elf_machdep.h>
#define ELFSIZE 32
#include <sys/exec_elf.h>
#include <compat/linux/common/linux_exec.h>
@ -56,7 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.10 2005/12/11 12:24:48 christos E
int exec_linux_elf_lkmentry __P((struct lkm_table *, int, int));
static struct execsw exec_linux_elf =
/* Linux Elf32 */
/* Linux Elf */
{ sizeof (Elf_Ehdr),
ELFNAME2(exec,makecmds),
{ ELFNAME2(linux,probe) },
@ -65,7 +64,7 @@ static struct execsw exec_linux_elf =
LINUX_ELF_AUX_ARGSIZ,
ELFNAME2(linux,copyargs),
NULL,
coredump_elf32, /* XXX ELF64? */
ELFNAMEEND(coredump),
linux_exec_setup_stack };
/*