Driver feature manifests
Drier feature manifests define the location of the drivers you want to include in an image. Like other feature manifests, driver feature manifests need to be included in the <AdditionalFMs>
element in your image's OEMInput.xml file for the drivers defined in the driver fm to be included in an image.
For your first image, you can add all your drivers at once to your image using CreateWSKDriversFM
and UpdateWSKDriversFM
.
Sample driver feature manifest
<?xml version="1.0" encoding="utf-8"?>
<FeatureManifest
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.microsoft.com/embedded/2004/10/ImageUpdate" Revision="1" SchemaVersion="1.2">
<Drivers>
<BaseDriverPackages>
<DriverPackageFile Path="%WSKWorkspaceRoot%\DCHUDrivers\" Name="always.inf" />
</BaseDriverPackages>
<DriverFeatures>
<DriverPackageFile Path="%WSKWorkspaceRoot%\DCHUDrivers\" Name="optional.inf">
<FeatureID>OPTIONAL_DRIVER</FeatureID>
<!-- This FeatureID must be referenced in the OEMInput file to be included in the image. -->
</DriverPackageFile>
</DriverFeatures>
</Drivers>
</FeatureManifest>
Optional drivers
The scripts in the Windows system kit configure every driver in a driver FM so they're included in an image. You can modify a driver FM so that certain drivers have to be specifically added to an OEMInput.xml to be included in an image.
Each driver FM includes a BaseDriverPackages
section that defines the drivers that will be included in all images, and a DriverFeatures
section that defines drivers that need to be manually included in an image by adding its Feature ID to the OEMInput.xml.
If you're using a single collateral set for multiple images, configuring your driver FM to include optional drivers enables you choose the drivers to include in specific image configurations. A driver FM in this scenario can include all the drivers in your collateral set, while also specifying:
- The base set of drivers to be included in all images
- A set of optional drivers that you can manually add to specific OEMInput.xml files
Drivers marked optional won't be included in any image unless you specifically include them in an image design. This allows you to reuse your driver feature manifest for multiple images.
Work with optional drivers
When you're designing a collection of images that include different set of drivers, you can add logic into the feature manifest to make a driver optional and then you can include it by adding to your image configuration file (OEMInput).
By default, all drivers listed here are included in all images.
To specify an driver as optional:
Choose a driver you want to make optional:
<BaseDriverPackages> <DriverPackageFile Path="%WSKWorkspaceRoot%\DCHUDrivers\" Name="optional.inf" /> </BaseDriverPackages>
In the driver FM, move the driver from the
BaseDriverPackages
element to theDriverFeatures
section. When a driver is in theDriverFeatures
element, it will no longer be included automatically.<DriverFeatures> <DriverPackageFile Path="%WSKWorkspaceRoot%\DCHUDrivers\" Name="optional.inf"> </DriverPackageFile> </DriverFeatures>
Assign a FeatureID to the optional driver. The FeatureID you assign can be added into your OEMInput.xml so that the driver is added to an image:
<DriverFeatures> <DriverPackageFile Path="%WSKWorkspaceRoot%\DCHUDrivers\" Name="optional.inf"> <FeatureID>OPTIONAL_DRIVER</FeatureID> <!-- This FeatureID must be referenced in the OEMInput file to be included in the image. --> </DriverPackageFile> </DriverFeatures>
Add the FeatureID to individual images in your collection by updating your OEMInput.xml as follows:
<Features>
...
<OEM>
<Feature>OPTIONAL_DRIVER</Feature>
</OEM>
</Features>