Windows PV Drivers/Building: Difference between revisions

From Xen
Jump to navigationJump to search
(Created page with "{{TODO|Create Content}} Category:Windows PV Drivers")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== Getting ready ==
{{TODO|Create Content}}

First of all, you have to get the driver source.

Then you will need a device driver development environment. You can use a Windows 8 or 8.1 [http://msdn.microsoft.com/en-us/windows/hardware/hh852365.aspx WDK], which will involve installing either Visual Studio 2012 or 2013 respectively. Note that you cannot use Visual Studio 2012 Express edition for building drivers. (You may find it useful to install [http://www.slysoft.com/en/virtual-clonedrive.html VirtualCloneDrive] as Visual Studio is generally supplied in ISO form).

Install Visual Studio first (you only need install MFC for C++) and then the WDK. Set an environment variable called VS to the base
of the Visual Studio Installation (e.g. C:\Program Files\Microsoft Visual Studio 12.0) and a variable called KIT to the base of the
WDK (e.g. C:\Program Files\Windows Kits\8.1). Also set an environment variable called SYMBOL_SERVER to point at a location where
driver symbols can be stored. This can be local directory e.g. C:\Symbols.

Next you'll need a 3.x version of Python (which you can get from http://www.python.org). Make sure python.exe is somewhere on your
default path.

== Building a driver package ==

Now fire up a Command Prompt and navigate to the base of your git repository.
At the prompt type:

<pre>
build.py checked
</pre>

This will create a debug build of the driver. To create a non-debug build
type:

<pre>
build.py free
</pre>

Note that Static Driver Verifier is run by default as part of the build
process. This can be very time consuming. If you don't want to run the
verifier then you can add the 'nosdv' keyword to the end of your command
e.g.:

<pre>
build.py free nosdv
</pre>


[[Category:Windows PV Drivers]]
[[Category:Windows PV Drivers]]

Latest revision as of 15:27, 9 September 2014

Getting ready

First of all, you have to get the driver source.

Then you will need a device driver development environment. You can use a Windows 8 or 8.1 WDK, which will involve installing either Visual Studio 2012 or 2013 respectively. Note that you cannot use Visual Studio 2012 Express edition for building drivers. (You may find it useful to install VirtualCloneDrive as Visual Studio is generally supplied in ISO form).

Install Visual Studio first (you only need install MFC for C++) and then the WDK. Set an environment variable called VS to the base of the Visual Studio Installation (e.g. C:\Program Files\Microsoft Visual Studio 12.0) and a variable called KIT to the base of the WDK (e.g. C:\Program Files\Windows Kits\8.1). Also set an environment variable called SYMBOL_SERVER to point at a location where driver symbols can be stored. This can be local directory e.g. C:\Symbols.

Next you'll need a 3.x version of Python (which you can get from http://www.python.org). Make sure python.exe is somewhere on your default path.

Building a driver package

Now fire up a Command Prompt and navigate to the base of your git repository. At the prompt type:

build.py checked

This will create a debug build of the driver. To create a non-debug build type:

build.py free

Note that Static Driver Verifier is run by default as part of the build process. This can be very time consuming. If you don't want to run the verifier then you can add the 'nosdv' keyword to the end of your command e.g.:

build.py free nosdv