fwupd/plugins/nordic-hid
Richard Hughes 0c51630991 Check firmware magic in a more standard way
Some parsers are ignoring the magic when using _FLAG_IGNORE_CHECKSUM
(which is wrong; fuzzers have no problem with enforcing a static prefix)
and other either disregard the offset or check the magic in an unsafe
way. Also, use FWUPD_ERROR_INVALID_FILE consistently for magic failure.

Add a vfunc, and move all the clever code into one place.
2022-07-14 14:48:15 +01:00
..
tests plugins/nordic-hid: support images for MCUBoot 2021-12-30 10:24:22 +00:00
fu-nordic-hid-archive.c Check firmware magic in a more standard way 2022-07-14 14:48:15 +01:00
fu-nordic-hid-archive.h plugins/nordic-hid: added initial version 2021-12-07 08:19:29 +00:00
fu-nordic-hid-cfg-channel.c Remove duplicate ->probe() calls to speed up startup by 150ms 2022-06-14 21:01:57 +01:00
fu-nordic-hid-cfg-channel.h plugins/nordic-hid: add peers and bootloader type detection 2021-12-30 10:24:22 +00:00
fu-nordic-hid-firmware-b0.c Make the FuFirmware->parse() vfunc more helpful 2022-06-27 15:40:11 -05:00
fu-nordic-hid-firmware-b0.h plugins/nordic-hid: support images for MCUBoot 2021-12-30 10:24:22 +00:00
fu-nordic-hid-firmware-mcuboot.c Make the FuFirmware->parse() vfunc more helpful 2022-06-27 15:40:11 -05:00
fu-nordic-hid-firmware-mcuboot.h plugins/nordic-hid: support images for MCUBoot 2021-12-30 10:24:22 +00:00
fu-nordic-hid-firmware.c Make the FuFirmware->parse() vfunc more helpful 2022-06-27 15:40:11 -05:00
fu-nordic-hid-firmware.h plugins/nordic-hid: support images for MCUBoot 2021-12-30 10:24:22 +00:00
fu-plugin-nordic-hid.c Add plugin quirk keys earlier in the startup process 2022-05-09 11:13:52 +01:00
meson.build Build the quirk files into the daemon as a GResource 2022-06-30 18:52:24 +01:00
nordic-hid.quirk plugins/nordic-hid: add peers and bootloader type detection 2021-12-30 10:24:22 +00:00
README.md plugins/nordic-hid: extend the doc with tested HW 2022-02-04 13:46:59 +03:00

Nordic Semiconductor HID

Introduction

This plugin is able flash the firmware for the hardware supported by nRF52-Desktop. Tested with the following devices:

The plugin is using Nordic Semiconductor HID config channel to perform devices update.

Firmware Format

The cabinet file contains ZIP archive prepared by Nordic Semiconductor. This ZIP archive includes 2 signed image blobs for the target device, one firmware blob per application slot, and the manifest.json file with the metadata description. At the moment only nRF Secure Immutable Bootloader aka "B0" is supported and tested.

This plugin supports the following protocol ID:

  • Nordic HID Config Channel: com.nordic.hidcfgchannel

GUID Generation

For GUID generation the standard HIDRAW DeviceInstanceId values are used with the addition of the target board and bootloader name:

  • HIDRAW\VEN_1915&DEV_52DE&BOARD_nrf52840dk&BL_B0 -> 22952036-c346-5755-9646-7bf766b28922
  • HIDRAW\VEN_1915&DEV_52DE&BOARD_nrf52840dk&BL_MCUBOOT -> 43b38427-fdf5-5400-a23c-f3eb7ea00e7c

Quirk Use

This plugin uses the following plugin-specific quirks:

NordicHidBootloader

Explicitly set the expected bootloader type: "B0" or "MCUBOOT" This quirk must be set for devices without support of bootloader variant DFU option.

Update Behavior

The firmware is deployed when the device is in normal runtime mode, and the device will reset when the new firmware has been written.

Vendor ID Security

The vendor ID is set from the HID vendor ID, in this instance set to HIDRAW:0x1915.

External Interface Access

This plugin requires ioctl HIDIOCSFEATURE and HIDIOCGFEATURE access.