New driver loading scheme for Project Evil, need input

Scott Long scottl at samsco.org
Tue Apr 19 21:52:08 PDT 2005


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


More information about the freebsd-current mailing list