mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-22 09:12:32 +00:00

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
22 lines
485 B
C
22 lines
485 B
C
/*
|
|
* Copyright (C) 2020 Benson Leung <bleung@chromium.org>
|
|
*
|
|
* SPDX-License-Identifier: LGPL-2.1+
|
|
*/
|
|
|
|
#include "config.h"
|
|
|
|
#include "fu-plugin-vfuncs.h"
|
|
#include "fu-hash.h"
|
|
|
|
#include "fu-cros-ec-usb-device.h"
|
|
#include "fu-cros-ec-firmware.h"
|
|
|
|
void
|
|
fu_plugin_init (FuPlugin *plugin)
|
|
{
|
|
fu_plugin_set_build_hash (plugin, FU_BUILD_HASH);
|
|
fu_plugin_set_device_gtype (plugin, FU_TYPE_CROS_EC_USB_DEVICE);
|
|
fu_plugin_add_firmware_gtype (plugin, "cros-ec", FU_TYPE_CROS_EC_FIRMWARE);
|
|
}
|