There are four types of scripts in this solution:

bsp scripts

These are used to create a board support package (BSP). A BSP is a loose collection of files which get applied to a Windows image to specialize it for a particular development board. Effectively it's a directory with a bunch of drivers in it along with an XML manifest.

Typically these scripts will only be used by the creator of a development board.

setup scripts

These are used to apply a BSP to a Windows image file (WIM) in order to specialize the image, or to deploy an image directly to a device (future). These scripts are used by the user of a development board.


These are developer support scripts which are included by the setup scripts in the specialized OS image.


These are scripts used to test the BSP & setup scripts. They depend on Pester, a powershell test harness. You can install Pester using NuGet.
  • Getting Started:

If you are making a new developer board:

Go to "How to create a board support package"

If you are using a developer board that you purchased:
obtain the board support package from your vendor.
Go to "How to create a Windows Image to install on a developer board"
  • Building:

This solution is constructed using a vcxproj with a custom build rule. The rule copies every item
(file) of type "Text" to the $(TargetDir) during build.

If you add a script and want it copied to the output directory, bring up the file properties in the
solution explorer and change the Type from "Does not participate in build" to "Text".

Note: the scripts under the tests directory are not marked as type Text.
  • Testing Changes:

Testing is done with scripts under the tests directory. These scripts use
Pester ( as a test runner.

To fetch Pester the first time, right click on the solution in Solution Explorer and choose Manage
NuGet packages. At the top of the dialog (after a short delay) you should see an option to restore
NuGet packages associated with this project. Click that.

To start the tests open powershell underneath the solution directory and then run:

cd devboard_scripts\unittests
. .\dotest.ps1 # this will import the Pester module needed for the next line

To configure the devboard_scripts package to run the unit tests when F5 is pressed, set
the debugging program to launch to cmd.exe and the parameters to:
/c "$(SolutionDir)packages\Pester.2.1.0\tools\bin\pester.bat & pause"

There is also an end-to-end functional test which doesn't rely on mocking. It's under
devboard_scripts\FunctionalTests. There is a SetupTestEnvironment.ps1 script there which you
must run first. The default settings are for my development machine - feel free to reset them
to whatever you need on your machine. Once you've done that, run invoke-pester to run the test
  • How to create a board support package:

1. Take all the driver packages the ODM/SIV provide and copy them into one directory tree. Ideal structure is:
root \
component_type \ (e.g. WIFI)
driver files
driver inf

2. If you have INFs in the BSP directory that you don't want included in the actual BSP, you can write a .ignore file. Each line of the
.ignore file should be the path, relative to the root of the BSP directory, to the INF file you want excluded. For example if you need
to exclude c:\devbsp\WIFI\WindowsXP\wifidriver.inf add this line:


to c:\devboard\.ignore

The Create-DevboardSupportPackage.ps1 script will skip including those files in the BSP manifest

3. Once you have a BSP directory in c:\devbsp (or wherever) run Create-DevboardSupportPackage.ps1 as follos:

.\Create-DevboardSupportPackage.ps1 -SourceDirectory c:\devbsp -Destination c:\devbsp\devbsp_index.xml.

This will create a manifest for the BSP. This file is used by the setup scripts to know which drivers in the BSP should be applied to the Windows image.

4. The entire directory tree (root\...) is the BSP.

  • How to create a Windows Image to install on a developer board:

1. Copy a windows install image to your local machine.
\\winbuilds\release\WINBLUEREFRESH\9600.17050.140317-1640\x86fre\iso\isoembeddedindustry_en-us is a good option. This matches the ISO we have up for public download.

2. Get the BSP for your development board. The BSP can be local or on a network share.

3. Run the following script:

Create-DevboardImage -SourcePath <path to windows image>\sources\install.wim -BspManifest <path to BSP manifest>

4. Copy the install image to a Fat32 formatted USB key

5. Plug key into developer and boot off it. Run setup.
a. from the UEFI shell run fs1:\efi\boot\bootia32.efi (note: fs1 might not be the right drive letter for the USB key)
  • How to run scripts on a Windows 7 system

To run these scripts on Windows 7 you must first install some prerequisites:

1. Powershell 4.0
2. The Windows 8.1 Update Assessment & Deployment Kit (ADK)

Once these are installed:

* start a cmd window with the "Deployment and Imaging Tools Environment (x86)" link found under the start menu.
* Start powershell from within that command window
* run the scripts within that powershell

The Deployment and Imaging Tools Environment links setup some environment variables which are needed for the DISM
tools to run properly. Failure to use this shell can result in DISM failures with cryptic error codes.
  • How to run scripts on a Windows 8 system

The development board scripts are not supported on a Windows 8 system. Please install the Windows

Last edited Aug 27, 2014 at 6:52 AM by dmonger, version 2