-
Notifications
You must be signed in to change notification settings - Fork 138
Building Driver
- Install Visual Studio 2015
- Install Windows 10 WDK from https://msdn.microsoft.com/en-us/windows/hardware/hh852365.aspx
- Install Windows 10 SDK from https://dev.windows.com/en-US/downloads/windows-10-sdk
- Launch Visual Studio 2015 and open solution at graphics-driver-samples\render-only-sample\ros.sln
- Select Debug or Release
- Select X64, X32 or ARM targets
- Build solution
The project can be built either in Visual Studio or on the command line. To build on the command line,
- Launch Developer Command Prompt for VS2015 from the Start Menu
- Change directories to the render-only-sample folder
- Invoke msbuild
To build all projects in the solution, run
msbuild ros.sln /p:Configuration=Debug /p:Platform=ARM
This will build the entire solution in the Debug|ARM configuration. To build a single project, pass the project name to the /t parameter. For example, to build only the roskmd project,
msbuild ros.sln /t:roskmd /p:Configuration=Debug /p:Platform=ARM
You can run the command from anywhere in the source tree as long as you pass the path of ros.sln to msbuild. If you were in the roskmd directory, you could run
msbuild ..\ros.sln /t:roskmd /p:Configuration=Debug /p:Platform=ARM
To do a clean, build the 'clean' target:
msbuild ros.sln /t:clean /p:Configuration=Debug /p:Platform=ARM
After installing the driver following the instructions at Building Render Only Sample for Raspberry Pi 2, you will need to update roskmd.sys
and rosumd.dll
whenever you make a code change.
In Windbg, set up a kdfiles association for roskmd.sys
:
.kdfiles -m \Systemroot\System32\drivers\roskmd.sys <local path to roskmd.sys>
For example,
.kdfiles -m \Systemroot\System32\drivers\roskmd.sys d:\workspace\graphics-driver-samples\render-only-sample\ARM\Debug\roskmd.sys
Whenever the system tries to load roskmd.sys
, it will pull the file from your development machine.
rosumd.dll
must be updated manually using sfpcopy
. To update rosumd.dll
, first copy rosumd.dll
from your development machine to c:\data
on your Pi using SMB, then SSH into your Pi and sfpcopy
the new file over the old one:
cd \data
sfpcopy rosumd.dll c:\windows\system32\rosumd.dll
In summary, use the following procedure during development:
- Create a .kdfiles association for
roskmd.sys
when you initially install the driver. This association will persist for the lifetime of your windbg process. - Make code changes and rebuild the driver
- Sfpcopy the new version of
rosumd.dll
- Reboot