view liblfds.6/runme_before_win_kernel_build_readme.txt @ 1075:5e8aeb18279c

Add export methods to retrieve and set the hypercall stubs for the dump_xenpci driver
author James Harper <>
date Mon Dec 09 13:30:14 2013 +1100 (2013-12-09)
parents 6300617040e0
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.