From owner-freebsd-current@FreeBSD.ORG Wed Apr 20 04:52:08 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2550616A4CE; Wed, 20 Apr 2005 04:52:08 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id A74DD43D41; Wed, 20 Apr 2005 04:52:07 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior-wifi.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.1/8.13.1) with ESMTP id j3K4s86u085661; Tue, 19 Apr 2005 22:54:08 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4265DF30.8010001@samsco.org> Date: Tue, 19 Apr 2005 22:48:48 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050218 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Daniel O'Connor" References: <20050419225640.7B92816A4CF@hub.freebsd.org> <200504201221.39355.doconnor@gsoft.com.au> In-Reply-To: <200504201221.39355.doconnor@gsoft.com.au> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org cc: Bill Paul cc: freebsd-current@freebsd.org cc: current@freebsd.org Subject: Re: New driver loading scheme for Project Evil, need input X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2005 04:52:08 -0000 Daniel O'Connor wrote: > On Wed, 20 Apr 2005 08:26, Bill Paul wrote: > >>The objcopy(1) trick basically produces an ELF file that has the >>Windows .SYS file encapsulated with in it. Two symbols are created >>to denote the start end end of the image so that it can be loaded later. >>The windrv_stub.o module linked with the Windows image provides a >>small FreeBSD modevent handler that hooks the driver into Project >>Evil and eventually causes a bus-reprobe. This means that all you >>have to do is kldload this one module into the kernel, and presto! >>a new ndisX networking interface appears. > > > What about if you want to use >1 NDIS driver? How will it avoid symbol name > collisions? > > >>The end result is that installing a Windows driver should be as simple >>as: >> >>- run the script >>- give it your foo.inf and foo.sys files when it asks you >>- it spits out a foo_sys.ko module and you kldload it >>- the end > > > Sounds much nicer :) > > >>You still end up needing the C compiler, objcopy, ndiscvt and (optionally) >>iconv, but the script automates the use of all these tooks and explains >>to the user what's going on while it's working. > > > It's certainly simpler than the current state of afairs and unless the kernel > NDIS grows the ability to directly read .sys & .inf files from your disk > (which would be very cool :) it's about a simple as it's going to get.. > > >>- What should the script be called? wintobsd.sh sounds kind of lame. > > > encappe > win2elf > pe2elf > necronomicon? Scott