view liblfds.6/runme_before_win_kernel_build_readme.txt @ 766:6300617040e0

Big changes - not ready for production use.
Removed all the custom DMA handling code as it was completely incompatible with the Windows verifier.
Added liblfds (using the lock free stack) from so that grant's can be obtained at DIRQL.
Fixed xennet and xenvbd to support the changes.
xenusb and xenscsi almost certainly will not yet work after the changes.
author James Harper <>
date Sun Jan 31 21:28:42 2010 +1100 (2010-01-31)
line source
1 The Windows kernel build environment is primitive and has a number
2 of severe limitations; in particular, all source files must be in
3 one directory and it is not possible to choose the output binary type
4 (static or dynamic library) from the build command line; rather,
5 a string has to be modified in a text file used by the build (!)
7 To deal with these limitations, it is necessary for a Windows kernel
8 build to run a batch file prior to building.
10 There are two batch files, one for static library builds and the other
11 for dynamic library builds.
13 They are both idempotent; you can run them as often as you like and
14 switch between them as often as you want. It's all fine; whenever
15 you run one of them, it will take you from whatever state you were
16 previously in, into the state you want to be in.
18 Both batch files copy all the sources file into a single directory,
19 "/src/single_dir_for_windows_kernel/".
21 The static library batch file will then copy "/sources.static" into
22 "/src/single_dir_for_windows_kernel/", which will cause a static
23 library to be built.
25 The dynamic library batch file will then copy "/sources.dynamic" into
26 "/src/single_dir_for_windows_kernel/", which will cause a dynamic
27 library to be built. It will also copy "src/driver_entry.c" into
28 "/src/single_dir_for_windows_kernel/", since the linker requires
29 the DriverEntry function to exist for dynamic libraries, even
30 though it's not used.