2014年6月30日 星期一

Windows Driver 3_ Provision Computer For Driver Deployment And Testing

In the previous discussion, I used [manually configure debuggers and do not provision], but in this way, the driver files must be installed by myself. In order to save time, I use [Provision computer and choose debugger settings], the more details is in 
http://msdn.microsoft.com/en-us/library/windows/hardware/hh698272(v=vs.85).aspx

I'll show steps briefly...
Assume that the driver has built already and the things we have to do is to  deploy and test it.

1. Go to C:\Program Files\Windows Kits\8.1\Remote\x86, then copy [WDK Test Target Setup x86-x86_en-us] into your target computer and install it. 


2. In Host Computer (Visual Studio 2013)

   [Driver] menu -> test-> Configure Computer

   choose second one, and notice that the computer name must as same as the name of your target computer,



you can find your target computer's name just like second pictures:


After clicking next, you have to set the pipe name. 



Note that the pipe name must as same as the pipename you set in vmware. The picture below shows the pipe name that I set at VMware before.
(We create this serial port to let virtual computer know that there's a port it can use. This serial port is a virtual port and VMware will receive the data from virtual computer through this port, then send the data out to the host computer according to the pipe name, the host computer must have the same pipe name to receive these data from VMware and handle them, and that's why we set a pipe name in Visual Studio and in VMware both the same.)




After finishing the configuration, system will connect to your target computer, and if success, it will show "complete" at last.

3. Now go back to the Visual Studio and in the Solution Manager Window(方案總管), right click [HelloWorld Package]-> properties -> Driver Install -> Deployment
Click [Enable deployment] and [Remove previous driver versions before deployment]
Then, entering Target Computer Name
Finally, in the [Hardware ID Driver Update], Type "Root\HelloWorld". Hardware ID does not identify a real hardware, it identifies an virtual device, and we must give it a place in the devie tree as child of the root node. The doc in Microsoft mentioned that we do not need to select [Hardware ID Driver Update] if it's a real hardware. Instead, we should choose [Install and Verify]


4. When you click F5 in your visual studio trying to remote debug to the target computer, this program will control the target computer, create a WDKRemoteUser account and move the driver packages, even run the driver automatically.


From now on, you don't need to copy your driver packages into the target computer manually, the debugger in Visual Studio will do it for U. Hurray!!!!!!





沒有留言:

張貼留言

全國推廣動物認領養平台串聯貼紙

全國推廣動物認領養平台串聯貼紙