Updating Device Firmware using Windows Update

This topic describes how to update a removable or in-chassis device’due south firmware using the Windows Update (WU) service. For information near updating system firmware, meet
Windows UEFI firmware update platform.

To do this, y’all’ll provide an update machinery, implemented as a device driver, that includes the firmware payload. If your device uses a vendor-supplied driver, you take the option of adding the firmware update logic and payload to your existing office driver, or providing a dissever firmware update driver packet. If your device uses a Microsoft-supplied driver, you must provide a separate firmware update driver package. In both cases, the firmware update driver package must be universal. For more info near universal drivers, see
Getting Started with Windows Drivers. The driver binary tin apply
or the
Windows Driver Model.

Because WU cannot execute software, the firmware update driver must hand the firmware to Plug and Play (PnP) for installation.

Firmware update driver actions

Typically, the firmware update commuter is a lightweight device driver that does the following:

  • At device commencement or in the driver’due south


    callback function:

    1. Identify the device to which information technology is attached.
    2. Determine whether the driver has a firmware version that is more recent than the version on the firmware currently flashed on device hardware.
    3. If a firmware update is necessary, gear up an effect timer to schedule the update.
    4. Otherwise, do nothing until the driver is started again.
  • During system runtime:

    1. If an update is queued, wait for a set of conditions to exist met.
    2. When conditions are met, perform the firmware update on the device.
Read:  Cara Flash Advan Hammer R3d

Firmware update driver contents

Typically, the firmware update commuter package contains the following:

Submit your firmware update bundle as a separate driver submission.

Adding firmware update logic to a vendor-supplied driver

The existing office driver can implement the firmware update mechanism, as shown in the post-obit diagram:

Using Windows Update to deliver firmware update via existing function driver.

Alternatively, if y’all want to update the part driver and the firmware update driver separately, create a 2d device node, on which you lot will install the firmware update driver. The post-obit diagram shows how one device can have ii separate device nodes:

Using Windows Update to deliver firmware update via separate device node.

In this case, the function and firmware device nodes must take different hardware IDs in order to be targeted independently.

There are a couple ways to create a second device node. Certain device types have the power to expose a second device node on ane physical device, such as USB. You can use this functionality to create a device node targetable by WU, and install a firmware update driver on information technology. Many device types, notwithstanding, do not allow a single concrete device to enumerate more than than one device node.

In this case, employ an extension INF that specifies the
directive to create a device node that can be targeted by Windows Update and install the firmware update driver on it. The post-obit snippet from an INF file shows how you tin exercise this:

            [Manufacturer] %Contoso%=Standard,NTamd64 [Standard.NTamd64] %DeviceName%=Device_Install, PCI\DEVICE_ID [Device_Install.Components] AddComponent=ComponentName,,AddComponentSection [AddComponentSection] ComponentIDs = ComponentDeviceId

In the above INF sample,
ComponentIDs = ComponentDeviceId
indicates that the child device will have a hardware ID of
SWC\ComponentDeviceId. When installed, this INF creates the following device hierarchy:

Read:  Please Describe the Vulnerabilities You Discovered in the Gnome Firmware.

Parent device, primary device, AddComponent device.

For futurity firmware updates, update the INF and binary file containing the firmware payload.

Adding firmware update logic to a Microsoft-supplied commuter

To update firmware for devices that use a Microsoft-supplied driver, you lot need to create a second device node, equally shown above.

Best practices

  • In your firmware update driver INF, specify
    DIRID 13
    to cause PnP to leave the files in the driver packet in the DriverStore:

                    [Firmware_AddReg] ; Store location of firmware payload HKR,,FirmwareFilename,,"%13%\firmware_payload.bin"

    PnP resolves this location when it installs the device. The commuter tin can and so open up this registry primal to determine the location of the payload.

  • Firmware update drivers should specify the following INF entries:

                    Course=Firmware ClassGuid={f2e7dd72-6468-4e36-b6f1-6488f42c1b52}
  • To locate another device node, the firmware commuter should walk the device tree relative to itself, not by enumerating all device nodes for a friction match. A user may have plugged in multiple instances of the device, and the firmware driver should only update the device with which it is associated. Typically, the device node to exist located is the parent or sibling of the device node on which the firmware driver is installed. For instance, in the diagram above with two device nodes, the firmware update driver can look for a sibling device to find the part driver. In the diagram immediately higher up, the firmware driver tin look for the parent device to find the principal device with which it needs to communicate.

  • The driver should exist robust to multiple instances of the device existence on the organisation, possibly with multiple dissimilar firmware versions. For case, there may be one instance of the device that has been connected and updated several times; a brand new device may and so be plugged in which is several firmware versions old. This means that state (such as current version) must be stored confronting the device, and not in a global location.

  • If at that place is an existing method to update the firmware (EXE or co-installer, for example), yous can largely reuse the update code within a UMDF driver.

Read:  How to Install Upgrade Firmware on Mac Mini 2009 Easily