From: Dan A. <da...@gm...> - 2004-01-30 19:18:40
|
On Fri, Jan 30, 2004 at 10:53:10AM -0800, ePAc wrote: > now i'm stuck. it appears that since Jan 4th 2004, the Windows DDK is > payware. you can buy the CD, but no longer download it unless you have > access to MSDN (about $700 for the basic new subscription to the required > level to get the DDK). that's a little arsh for something that used to be > free... > Yeah, that's a problem. We currently depend on the DDK in order to link the sys file in the final linkage stage of the driver. <cough> ed2k://|file|Microsoft Windows 2000 DDK - Driver Development Kit.exe|68905688|661645e0c800fa55604765ad41844668| </cough> Some background: Fortunately, the cygwin gcc toolchain outputs a valid COFF file to be passed as input to Microsoft's linker, so that coLinux's build system basicly compiles the driver using the toolchain just until the final stage where it produces driver.o. Then, that file is passed to the DDK in order to be linked into linux.sys. I thought about 2 methods that can help us get rid of this dependency. * Try to use the cygwin toolchain solely in order to link a valid linux.sys. ReactOS's developers use this method in order to link their Windows-compatible drivers that load on ReactOS. However, Windows does more sanity checks when loading a driver than ReactOS, and because of that, I have yet managed to produced a .sys file that Windows will accept using this method. * Write a util that converts a .o file to a .sys file. After driver.o is linked with libntoskrnl.a and libhal.a using cygwin's ld, an .o file with no undefined symbols is produced - which means that no other input files are needed, and this .o file contains all the information that is needed in order to produce the .sys. Which method sounds more plausible? The first probably involves modifying existing binutils code. The second involves writing a separate util, but requires a rather complete knowledge about the file format and structures. -- Dan Aloni da...@gm... |