fwupd/plugins/cros-ec
Benson Leung 3a02ad5129 cros-ec: Add cros-ec-firmware
cros-ec firmware are in fmap layout, and have two sections
that this plugin will look for, the EC_RO, and EC_RW sections.

Tested using a servo_micro firmware:
$ fwupdtool firmware-parse servo_micro_v2.4.17-df61092c3.bin
<select fmap option>
FuCrosEcFirmware:
Version:                 2.4.17
  FuFirmwareImage:
  ID:                    EC_RO
  Index:                 0x1
  Version:               servo_micro_v2.4.17-df61092c3
  Data:                  0xf000
  FuFirmwareImage:
  ID:                    FR_MAIN
  Index:                 0x2
  Data:                  0xf000
  FuFirmwareImage:
  ID:                    RO_FRID
  Index:                 0x3
  Address:               0xc4
  Data:                  0x20
  FuFirmwareImage:
  ID:                    FMAP
  Index:                 0x4
  Address:               0x9a40
  Version:               1.0
  Data:                  0x15e
  FuFirmwareImage:
  ID:                    WP_RO
  Index:                 0x5
  Data:                  0x10000
  FuFirmwareImage:
  ID:                    EC_RW
  Index:                 0x6
  Address:               0x10000
  Version:               servo_micro_v2.4.17-df61092c3
  Data:                  0x10000
  FuFirmwareImage:
  ID:                    RW_FWID
  Index:                 0x7
  Address:               0x100c4
  Data:                  0x20
2020-06-20 07:24:32 +01:00
..
data cros-ec: Initial skeleton 2020-05-29 06:55:40 +01:00
cros-ec.quirk cros-ec: Initial skeleton 2020-05-29 06:55:40 +01:00
fu-cros-ec-common.c cros-ec: Parse version number into triplet 2020-05-29 06:55:40 +01:00
fu-cros-ec-common.h cros-ec: Parse version number into triplet 2020-05-29 06:55:40 +01:00
fu-cros-ec-firmware.c cros-ec: Add cros-ec-firmware 2020-06-20 07:24:32 +01:00
fu-cros-ec-firmware.h cros-ec: Add cros-ec-firmware 2020-06-20 07:24:32 +01:00
fu-cros-ec-usb-device.c cros-ec: Provide device metadata as a part of to_string 2020-05-29 06:55:40 +01:00
fu-cros-ec-usb-device.h cros-ec: Add usb_findit functionality 2020-05-29 06:55:40 +01:00
fu-plugin-cros-ec.c cros-ec: Add cros-ec-firmware 2020-06-20 07:24:32 +01:00
meson.build cros-ec: Add cros-ec-firmware 2020-06-20 07:24:32 +01:00
README.md cros-ec: Initial skeleton 2020-05-29 06:55:40 +01:00

Chrome OS EC Support

Introduction

This plugin provides support for the firmware updates for Chrome OS EC project based devices.

Initially, it supports the USB endpoint updater, but lays the groundwork for future updaters which use other update methods other than the USB endpoint.

This is based on the chromeos ec project's usb_updater2 application [1].

Information about the USB update protocol is available at [2].

Firmware Format

The plugin at the moment does not support a firmware payload, but will support the Google firmware format used in Chrome OS firmware known as flashmap[3].

GUID Generation

These devices use the standard USB DeviceInstanceId values, e.g.

  • USB\VID_18D1&PID_501A

Vendor ID Security

The vendor ID is set from the USB vendor, which is set to various different values depending on the model and device mode. The list of USB VIDs used is:

  • USB:0x18D1

[1] https://chromium.googlesource.com/chromiumos/platform/ec/+/master/extra/usb_updater/usb_updater2.c [2] https://chromium.googlesource.com/chromiumos/platform/ec/+/master/docs/usb_updater.md [3] https://www.chromium.org/chromium-os/firmware-porting-guide/fmap