From be97fc5a9595a2c318ce85c7ae16d4b5028754cd Mon Sep 17 00:00:00 2001 From: rittera Date: Tue, 18 Apr 2006 16:49:19 +0000 Subject: [PATCH] A number of minor changes for NDIS. (OK'd by phil) 1. Removed the makeoptions line from arch/i386/conf/GENERIC. Now ndis_driver_data.h is simply copied into the kernel build directory instead of editing the config file to specify its location. 2. Uncommented lines in files.i386 and files.pci related to NDIS. NDIS will not be compiled into the kernel unless the two lines are uncommented from GENERIC (I checked using nm), so there is no reason for this to be commented out. 3. Added ndiscvt to usr.sbin/Makefile. --- sys/arch/i386/conf/GENERIC | 7 +++---- sys/arch/i386/conf/files.i386 | 4 ++-- sys/dev/if_ndis/if_ndis.c | 4 ++-- sys/dev/if_ndis/if_ndis_pci.c | 2 +- sys/dev/pci/files.pci | 10 +++++----- usr.sbin/Makefile | 4 ++-- usr.sbin/ndiscvt/Makefile | 2 ++ usr.sbin/ndiscvt/inf-parse.y | 2 +- usr.sbin/ndiscvt/inf-token.l | 2 +- usr.sbin/ndiscvt/inf.c | 2 +- usr.sbin/ndiscvt/inf.h | 2 +- 11 files changed, 21 insertions(+), 20 deletions(-) diff --git a/sys/arch/i386/conf/GENERIC b/sys/arch/i386/conf/GENERIC index f5c58ce3eb21..45eb65eb2c8e 100644 --- a/sys/arch/i386/conf/GENERIC +++ b/sys/arch/i386/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.743 2006/04/15 17:48:23 jmmv Exp $ +# $NetBSD: GENERIC,v 1.744 2006/04/18 16:49:19 rittera Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/i386/conf/std.i386" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.743 $" +#ident "GENERIC-$Revision: 1.744 $" maxusers 32 # estimated number of users @@ -146,8 +146,7 @@ options COMPAT_FREEBSD # binary compatibility with FreeBSD #options COMPAT_MACH # binary compatibility with Mach binaries #options COMPAT_DARWIN # binary compatibility with Darwin binaries #options EXEC_MACHO # exec MACH-O binaries -#options COMPAT_NDIS # NDIS network driver -#makeoptions CFLAGS+="-DNDIS_DRV_DATA=\"ndis_data\"" +#options COMPAT_NDIS # NDIS network driver #options COMPAT_PECOFF # kernel support to run Win32 apps options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. diff --git a/sys/arch/i386/conf/files.i386 b/sys/arch/i386/conf/files.i386 index 0f4f47175e74..0c2bb32bba76 100644 --- a/sys/arch/i386/conf/files.i386 +++ b/sys/arch/i386/conf/files.i386 @@ -1,4 +1,4 @@ -# $NetBSD: files.i386,v 1.285 2006/04/04 03:13:12 gdamore Exp $ +# $NetBSD: files.i386,v 1.286 2006/04/18 16:49:19 rittera Exp $ # # new style config file for i386 architecture # @@ -384,7 +384,7 @@ file arch/i386/i386/freebsd_sigcode.S compat_freebsd file arch/i386/i386/freebsd_syscall.c compat_freebsd # NDIS compatibilty (COMPAT_NDIS) -# include "compat/ndis/files.ndis" +include "compat/ndis/files.ndis" # Win32 binary compatibility (COMPAT_PECOFF) include "compat/pecoff/files.pecoff" diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c index 37d3a4ab1d07..5cdbed1a7658 100644 --- a/sys/dev/if_ndis/if_ndis.c +++ b/sys/dev/if_ndis/if_ndis.c @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.69.2.6 2005/03/31 04:24:36 wpaul Exp $"); #endif #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: if_ndis.c,v 1.3 2006/03/31 03:20:20 rittera Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ndis.c,v 1.4 2006/04/18 16:49:19 rittera Exp $"); #endif #ifdef __FreeBSD__ @@ -123,7 +123,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ndis.c,v 1.3 2006/03/31 03:20:20 rittera Exp $"); #define NDIS_IMAGE #define NDIS_REGVALS -#include NDIS_DRV_DATA +#include "ndis_driver_data.h" #ifdef __FreeBSD__ int ndis_attach (device_t); diff --git a/sys/dev/if_ndis/if_ndis_pci.c b/sys/dev/if_ndis/if_ndis_pci.c index ed6eacc4641e..6e98eda9cdfb 100644 --- a/sys/dev/if_ndis/if_ndis_pci.c +++ b/sys/dev/if_ndis/if_ndis_pci.c @@ -75,7 +75,7 @@ __FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis_pci.c,v 1.8.2.3 2005/03/31 04:24 #include #include -#include NDIS_DRV_DATA +#include "ndis_driver_data.h" #ifdef __NetBSD__ #ifndef NDIS_LKM diff --git a/sys/dev/pci/files.pci b/sys/dev/pci/files.pci index 50f0d1cb16c8..5cbd0e39d832 100644 --- a/sys/dev/pci/files.pci +++ b/sys/dev/pci/files.pci @@ -1,4 +1,4 @@ -# $NetBSD: files.pci,v 1.249 2006/04/17 17:31:43 rpaulo Exp $ +# $NetBSD: files.pci,v 1.250 2006/04/18 16:49:19 rittera Exp $ # # Config file and device description for machine-independent PCI code. # Included by ports that need it. Requires that the SCSI files be @@ -767,10 +767,10 @@ attach re at pci with re_pci file dev/pci/if_re_pci.c re_pci # Windows NDIS drivers (Experimental) -#device ndis -#attach ndis at pci -#file dev/if_ndis/if_ndis.c -#file dev/if_ndis/if_ndis_pci.c +device ndis +attach ndis at pci +file dev/if_ndis/if_ndis.c ndis +file dev/if_ndis/if_ndis_pci.c ndis # Intel PRO/Wireless 2100 device ipw: ifnet, arp, wlan, firmload diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index cddbcf3804cc..18d39ac3443f 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.212 2006/03/02 17:34:17 christos Exp $ +# $NetBSD: Makefile,v 1.213 2006/04/18 16:49:19 rittera Exp $ # from: @(#)Makefile 5.20 (Berkeley) 6/12/93 .include @@ -12,7 +12,7 @@ SUBDIR= ac accton altq amd apm apmd arp bad144 bind bootp catman \ kgmon lastlogin link lmcconfig lpr mailwrapper makefs \ map-mbone mdconfig memswitch mlxctl mopd mountd moused \ mrinfo mrouted mscdlabel mtrace \ - mtree ndbootd netgroup_mkdb nfsd ntp pcictl pkg_install pppd \ + mtree ndbootd ndiscvt netgroup_mkdb nfsd ntp pcictl pkg_install pppd \ pstat pwd_mkdb postinstall powerd quot quotacheck quotaon \ rarpd rbootd rdate \ repquota rmt rpc.bootparamd rpc.lockd rpc.pcnfsd \ diff --git a/usr.sbin/ndiscvt/Makefile b/usr.sbin/ndiscvt/Makefile index ecef13afbe35..a90a8bd25ec1 100644 --- a/usr.sbin/ndiscvt/Makefile +++ b/usr.sbin/ndiscvt/Makefile @@ -2,7 +2,9 @@ .PATH: ${.CURDIR}/../../sys/compat/ndis +.if ${MACHINE} == "i386" PROG= ndiscvt +.endif SRCS= ndiscvt.c SRCS+= subr_pe.c SRCS+= inf.c inf-token.l inf-parse.y diff --git a/usr.sbin/ndiscvt/inf-parse.y b/usr.sbin/ndiscvt/inf-parse.y index a554fda6103d..449832e7a134 100644 --- a/usr.sbin/ndiscvt/inf-parse.y +++ b/usr.sbin/ndiscvt/inf-parse.y @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD: src/usr.sbin/ndiscvt/inf-parse.y,v 1.2 2004/01/02 04:31:06 wpaul Exp $"); #endif #ifdef __NetBSD__ -__RCSID("$NetBSD: inf-parse.y,v 1.2 2006/03/30 23:21:06 rittera Exp $"); +__RCSID("$NetBSD: inf-parse.y,v 1.3 2006/04/18 16:49:19 rittera Exp $"); #endif diff --git a/usr.sbin/ndiscvt/inf-token.l b/usr.sbin/ndiscvt/inf-token.l index 7faa4a959a6b..53c094c09ef7 100644 --- a/usr.sbin/ndiscvt/inf-token.l +++ b/usr.sbin/ndiscvt/inf-token.l @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD: src/usr.sbin/ndiscvt/inf-token.l,v 1.3 2004/01/11 21:10:35 mdodd Exp $"); #endif #ifdef __NetBSD__ -__RCSID("$NetBSD: inf-token.l,v 1.2 2006/03/30 23:21:06 rittera Exp $"); +__RCSID("$NetBSD: inf-token.l,v 1.3 2006/04/18 16:49:19 rittera Exp $"); #endif #include diff --git a/usr.sbin/ndiscvt/inf.c b/usr.sbin/ndiscvt/inf.c index c0779f926098..c2296d927994 100644 --- a/usr.sbin/ndiscvt/inf.c +++ b/usr.sbin/ndiscvt/inf.c @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD: src/usr.sbin/ndiscvt/inf.c,v 1.13.2.1 2005/02/18 16:30:10 wpaul Exp $"); #endif #ifdef __NetBSD__ -__RCSID("$NetBSD: inf.c,v 1.2 2006/03/30 23:21:06 rittera Exp $"); +__RCSID("$NetBSD: inf.c,v 1.3 2006/04/18 16:49:19 rittera Exp $"); #endif diff --git a/usr.sbin/ndiscvt/inf.h b/usr.sbin/ndiscvt/inf.h index ba3c661f63b2..17d8f376d981 100644 --- a/usr.sbin/ndiscvt/inf.h +++ b/usr.sbin/ndiscvt/inf.h @@ -1,5 +1,5 @@ /* - * $Id: inf.h,v 1.1 2006/03/30 23:00:02 rittera Exp $ + * $Id: inf.h,v 1.2 2006/04/18 16:49:19 rittera Exp $ * * $FreeBSD: src/usr.sbin/ndiscvt/inf.h,v 1.1 2003/12/11 22:38:14 wpaul Exp $ */