Commit Graph

4748 Commits

Author SHA1 Message Date
Mario Limonciello
c5ea3a39f9 trivial: uefi: quiet down debugging messages
With how well fwupd UEFI updates work these days >99% of people
don't need to see messages about the capsule update running.
Those who have problems, this isn't going to help them.
2020-10-03 06:58:13 -05:00
Richard Hughes
7d1267fd84 Clarify various parts of the HSI specification
Firsly, that HSI isn't expected for embedded devices and then secondary how we
require SecureBoot to be available for HSI:1

At the moment we get a runtime failure if it is disabled. Making SB a part of
`HSI:1` makes this requiremnt explicit and prevents us getting `HSI:2!` if it
is not available.
2020-10-02 09:13:56 +01:00
Richard Hughes
f64e7a9cb4 trivial: Fix typo when setting _HAS_MULTIPLE_BRANCHES
Fixes https://github.com/fwupd/fwupd/issues/2439
2020-10-01 18:05:36 +01:00
Richard Hughes
521c2e2cd2 trivial: Do not print 'bare' GError strings
Give them come context so we know where they came from...
2020-10-01 16:39:10 +01:00
Richard Hughes
5e0729ecf8 ata: Demote two debug lines to require the plugin verbose flag 2020-10-01 16:39:10 +01:00
Richard Hughes
f4052b53f4 trivial: Do not warn about the same missing remote more than once
Removes 4 instances of 'ignoring unfound remote fwupd' at startup.
2020-10-01 16:39:10 +01:00
Richard Hughes
61a2dbad13 trivial: Do not inform if no fwupd::ReleaseFlags were set
This is never set in the AppStream metadata, and means that every call to
fu_engine_ensure_device_supported() at startup does not generate 16x debugs.

For cab archives we know if the archive was unsigned as we show the flags in
the to_string() output.
2020-10-01 16:39:10 +01:00
Richard Hughes
e9ada9ed72 uefi-dbx: Remove three unhelpful lines of debugging 2020-10-01 16:39:10 +01:00
Richard Hughes
66ff7c45a9 vli: Remove invalid quirk entry
The 721C is a VL103, which isn't a FuVliUsbhubDevice at all. Fixes the:

    already set GType to FuVliPdDevice, ignoring FuVliUsbhubDevice

...message when the Mini dock / powered hub is inserted.
2020-10-01 16:39:10 +01:00
Richard Hughes
538fa633e8 vli: Remove useless debugging line
We know the flash_id as it's one of the InstanceIDs.
2020-10-01 16:39:10 +01:00
Richard Hughes
69f7a8c459 vli: Remove 32 lines of debugging at startup
I'll admit it's not normal to have *two* docks connected to one machine...
2020-10-01 16:39:10 +01:00
Richard Hughes
d852480f12 tpm-eventlog: Remove 8 lines of debugging at startup 2020-10-01 16:39:10 +01:00
Richard Hughes
2d22ee2fae Remove 16 extra lines of debugging at startup
On my system I get 16 lines of 'device overwriting same name value' for the ME
device. Once we set valid metadata about a device just remove the flag to stop
scanning for every call to fu_engine_ensure_device_supported()
2020-10-01 16:39:10 +01:00
Richard Hughes
10c3fd2ff9 Support loading DMI data from DT systems
To do this with the existing codebase just fake the required SMBIOS structures.
2020-09-30 19:22:45 -05:00
Richard Hughes
1a61258239 Allow devices to save the old firmware to disk for recovery
This would also help, for example, to go back to the nonfree firmware when the
alternate firmware did not work as well as hoped. It would also allow flashing
the firmware using an SPI programmer if everything went very wrong indeed.
2020-09-30 18:33:00 +01:00
Richard Hughes
460c4b75fe Add the concept of firmware 'branches'
This allows a device to identify with different streams, for instance a Lenovo
laptop could have a coreboot firmware or a AMI firmware. The GUIDs would be the
same, but switching firmware would only be done rarely and very carefully.

Another example would be switching the Broadcom BCM57xx nework adaptors from the
vendor nonfree firmware with a signed PXE image, to the free software reverse
engineered driver with no PXE support (and thus no signed DXE) at all.

It is expected firmware would have additional metadata something like this:

    ...
    <branch>sdcc</branch>
    <description>
      <p>
        This is an alternate firmware built by the community using only free
        software tools.
      </p>
    </description>
    <requires>
      <id compare="ge" version="1.5.0">org.freedesktop.fwupd</id>
      <client>switch-branch</client>
    </requires>
    ...

Additionally, alternate branch firmware will not be returned for clients not
setting the FWUPD_FEATURE_FLAG_SWITCH_BRANCH before the GetReleases request.
2020-09-30 18:33:00 +01:00
Daniel Campello
f8fb2dc436 Fix get-updates and activate to use GUID in addition to device-id
Also merge fu_engine_get_device and fu_engine_get_device_by_id
2020-09-30 09:38:56 +01:00
Richard Hughes
0f89a0d2f0 Use pkttyagent to request user passwords if running without GUI
This change will allow it to use pkcon over remote-shells (ssh) or
to use it witout a running GUI desktop environment in the background.

Should fix https://github.com/fwupd/fwupd/issues/2429
2020-09-29 19:21:18 +01:00
Richard Hughes
a350198f53 Quit the replug loop on idle
If we wait for the child of a composite device to reappear and *then* go on to
update the replugged parent in the same transaction then we still use the old
GUsbDevice as the add event is still pending when we quit the replug loop.

Just schedule an idle action to quit the loop to allow the child *and* parent
to be added on replug.

Fixes https://github.com/fwupd/fwupd/issues/2376
2020-09-29 13:43:45 +01:00
Richard Hughes
deabfc5012 uefi-dbx: Do not upload a failure report for a failed dbx check
Use one of the errors mapping to FWUPD_UPDATE_STATE_FAILED_TRANSIENT to avoid
uploading a failure report for something the user has to fix, i.e. update the
distro shim package.
2020-09-29 13:15:50 +01:00
Sean-StarLabs
177470e9eb Update superio.quirk
Added Lite Mk III
2020-09-29 11:40:55 +01:00
Daniel Campello
9fbd7fe65d Allow to filter get-updates on device-id
This change allows to get available updates for a given device. This is
similar to what is done for the update and activate commands.
2020-09-28 16:43:42 -05:00
Mario Limonciello
c53940e7d7 trivial: fu-history: don't show message on every device fetch 2020-09-28 15:58:53 -05:00
Mario Limonciello
2865b61991 trivial: don't show messages about missing version format
This is a plugin error, it shouldn't be in logs constantly for history
devices while plugins load
2020-09-28 15:58:53 -05:00
Mario Limonciello
d4155ff673 trivial: fu-common: don't mention making directories unless they don't exist 2020-09-28 15:58:53 -05:00
Mario Limonciello
c7cf40ebda trivial: fu-engine: simplify missing plugin errors 2020-09-28 15:58:53 -05:00
Mario Limonciello
7a3664f52b use < instead of less than 2020-09-28 15:58:53 -05:00
Mario Limonciello
4a20214183 trivial: fu-engine: don't show 0 devices with subsystem %s message 2020-09-28 15:58:53 -05:00
Mario Limonciello
67a8b89453 trivial: clean up some debugging statements 2020-09-28 15:58:53 -05:00
Mario Limonciello
5d902778e4 trivial: uefi: remove extra flag for secure boot (shown in device flags) 2020-09-28 15:58:53 -05:00
Mario Limonciello
10ef83c96f trivial: thunderbolt: drop unnecessary verbose statements 2020-09-28 15:58:53 -05:00
Richard Hughes
0430bf2b8c policy: Make config modification authorization also imply remote modification 2020-09-28 20:05:39 +01:00
Richard Hughes
905ad3e1a7 policy: Make downgrade authorization also imply upgrade 2020-09-28 20:05:39 +01:00
Richard Hughes
3754b007d3 policy: Make untrusted authorization also imply trusted 2020-09-28 20:05:39 +01:00
Richard Hughes
33dcfb7219 trivial: Remove over-eager debugging output 2020-09-28 16:43:12 +01:00
Richard Hughes
c46aa815ea trivial: Do not show the libxmlb debugging by default 2020-09-28 16:43:12 +01:00
boger.wang
4986e0f020 Add plugin for goodix fingerprint sensors
Support updating firmware for Goodix MOC fingerprint sensors.
2020-09-28 12:43:49 +01:00
Richard Hughes
496fb826f1 trivial: Add fu_udev_device_get_number() 2020-09-26 12:20:41 +01:00
Richard Hughes
44ae2a75e4 trivial: Add CRC8 as well 2020-09-25 18:00:21 +01:00
Richard Hughes
6f5e35a3ea Add common CRC routines
We have quite a few versions of CRC in-tree, and are about to get two more...
2020-09-25 17:52:43 +01:00
Richard Hughes
f02571b3f3 Use the 'real' hardware class for virtual classes like net 2020-09-25 13:25:52 +01:00
Richard Hughes
de9be2d34c trivial: Correctly set subsystem when using _VENDOR_FROM_PARENT 2020-09-25 13:25:52 +01:00
Richard Hughes
95187939ca platform-integrity: Use the post-review BIOS write protection attrs 2020-09-25 09:43:56 +01:00
Richard Hughes
3e9fafcc6f Add fu_firmware_remove_image() 2020-09-24 10:54:27 -05:00
Richard Hughes
fbd8b5d325 Add fu_device_dump_firmware()
Conceptually we were trying to stuff subtly different actions into one vfunc:

 * Read firmware from the device to update the verification checksums

 * Read a firmware blob from the device for debugging

For the first action we might want to mask out the sections of the flash with
serial numbers (so the verification hashes match the ones published on the LVFS)
and for the second we want just a raw ROM file from the hardware with no
pre-processing that we can compare against an external SPI dumper.

Split out ->dump_firmware to get the raw blob, and allow plugins to also
implement ->read_firmware() if they have to mask out specific offsets or remove
specific images from the FuFirmware container.

In the common case when masking is not required, fall back to using a 'binary'
FuFirmware automatically to make most plugins simpler.
2020-09-24 10:54:27 -05:00
Richard Hughes
6f4f1caca4 trivial: Fix some typos spotted by codespell 2020-09-24 10:48:26 +01:00
Richard Hughes
6b5926ca59 trivial: Fix two warnings in the win32 build 2020-09-24 09:19:15 +01:00
Richard Hughes
da17ff4888 trivial: Add another Toshiba OUI quirk
Fixes https://github.com/fwupd/fwupd/issues/2413
2020-09-24 08:07:31 +01:00
Richard Hughes
88d80119d1 trivial: Document the firmware build XML format 2020-09-23 15:22:31 +01:00
Richard Hughes
aff64d3e75 trivial: Allow specifying zero-sized data sections
This can be done using '<data/>' to specify a zero-sized image.
2020-09-23 15:22:31 +01:00