Commit Graph

4 Commits

Author SHA1 Message Date
Richard Hughes
6e5fd3b3d8 trivial: Fix coreboot commit to fix CI 2019-11-27 14:40:49 +00:00
Patrick Rudolph
b21c3af2ea plugins/coreboot: Improve version detection
Only on Lenovo devices the DMI version string is prefixed with
CBETxxxx to make the thinkpad_acpi kernel module happy.

Add a new quirk called "CorebootVersionQuirks" to detect platforms
that need to cut of the prefix.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2019-11-27 14:26:26 +00:00
Mario Limonciello
3d65399626 trivial: coreboot: fix a clang compiler error
```
../plugins/coreboot/fu-plugin-coreboot.c:96:7: error: assigning to 'gchar *' (aka 'char *') from 'const gchar *' (aka 'const char *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]

        name = fu_plugin_coreboot_get_name_for_type (plugin, NULL);

             ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../plugins/coreboot/fu-plugin-coreboot.c:98:8: error: assigning to 'gchar *' (aka 'char *') from 'const gchar *' (aka 'const char *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]

                name = fu_plugin_get_dmi_value (plugin, FU_HWIDS_KEY_PRODUCT_NAME);
```
2019-10-18 10:22:21 +01:00
Patrick Rudolph
0b7143da66 plugins: Add coreboot plugin
Detect and parse current coreboot version.
There's no need to depend on libflashrom for now.

An update mechanism isn't implemented as the kernel interface isn't
stable yet and will be implemented in a separate commit.

Tested on coreboot enabled machine.
Example output:
coreboot System Firmware
  DeviceId:             81104bde9db7cb037936659ea727c739f47a5029
  Guid:                 230c8b18-8d9b-53ec-838b-6cfc0383493a <- main-system-firmware
  Guid:                 de6fd40f-4ec9-5c0b-95e1-8fb13d1b030c <- LENOVO&ThinkPad T410&2537VG5
  Guid:                 978b0d18-bfe9-5279-9a9f-68dc247a705f <- LENOVO&ThinkPad T410&LENOVO&2537VG5
  Summary:              Open Source system boot firmware
  Plugin:               coreboot
  Flags:                internal|registered
  Vendor:               LENOVO
  Version:              4.10.991
  VersionFormat:        triplet
  Icon:                 computer
  Created:              2019-10-14

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2019-10-17 18:31:01 +02:00