Commit Graph

2860 Commits

Author SHA1 Message Date
Richard Hughes
d5f0da15ab nvme: Support FGUID to get the SKU GUID 2019-01-16 13:14:50 +00:00
Richard Hughes
a9d81cfb10 nvme: Support FWUG to get the write block size 2019-01-16 13:14:50 +00:00
Richard Hughes
1eaf71c91b nvme: Add trivial comment to clarify address bitshifting 2019-01-16 13:14:50 +00:00
Richard Hughes
b6e9dacc9a uefi: Do not check the BGRT status before uploading a UX capsule
Microsoft description about the Status is:

    The Status field of the BGRT describes whether the image is currently
    displayed on the screen. This is not applicable to the firmware update
    display capsule.

Many thanks to Steven Chang for identifying this issue.

Fixes: https://github.com/hughsie/fwupd/issues/935
2019-01-16 13:08:48 +00:00
Richard Hughes
e58fa31887 dfu: Fix flashing various Jabra devices
Do not unset the quirks when closing the device, the _NO_DFU_RUNTIME quirk is
needed when re-opening the device during detach.

Fixes https://github.com/hughsie/fwupd/issues/927
2019-01-16 11:22:05 +00:00
Mario Limonciello
4c0df63db1 trivial: meson.build: Fix builds with -Ddaemon=false but no other changes
Without this fix build will fail like below:
```
$ meson build -Ddaemon=false
.
.
.

src/meson.build:21:4: ERROR:  Unknown variable "colorhug_pkcs7_signature".
```
2019-01-15 16:24:38 -06:00
Mario Limonciello
ed021ab448 upower: Add support for checking battery percentage
On any devices that normally would require checking for AC also
check that at least one battery on the system has at least 30% to
perform an update.

Fixes: #925
2019-01-15 10:43:18 -06:00
Mario Limonciello
78efa4d2a6 trivial: thunderbolt: If unable to find inactive nvmem, don't mark updatable
This situation may happen in the future in systems where the TBT NVM is embedded
in a different location and only upgradable through system firmware.
2019-01-15 10:33:52 -06:00
Richard Hughes
fa8b7aab0a nvme: Check the return code of the admin passthru ioctl
This meant we reported firmware update success when the image format or offset
was incorrect.
2019-01-15 16:26:30 +00:00
Mario Limonciello
18f3ab4e4d trivial: dell-dock: Prohibit downgrades on board 4 or later below EC19
Some SKUs of board 4 and later have silicon that will not work with anything
but EC19 or later.  So once flashed up to EC19 prohibit downgrades below that
to keep from bricking devices.
2019-01-15 08:52:12 +00:00
Mario Limonciello
46aaee8cec fu-tool: Add support for an 'update' command to fwupdtool
This will perform updates with all currently present metadata.

It is "intended" for usage with local metadata repositories referring
to local files.

fwupdtool however does also support fetching a file from the web
and if the metadata refers to the file on the web it should also work
for that.
2019-01-11 12:59:00 +00:00
Mario Limonciello
baa5af4504 trivial: fu-engine: Clarify the message when no releases are available 2019-01-11 12:59:00 +00:00
Mario Limonciello
84e948a5b0 trivial: dell-dock: correct an assertion related to setting EC version
This is probably fall out from a previous code re-shuffling.
The EC version is already set elsewhere, and in many cases `self->ec_version`
is `NULL` at this time.
2019-01-10 13:44:48 -06:00
Mario Limonciello
8963d6b4b2 dell-dock: Set minimum board to board 4
This allows dropping all the quirks related to older boards.
2019-01-08 12:36:36 -06:00
Mario Limonciello
993fc1636c dell-dock: Workaround a manufacturing bug for board level 4
Board 4 was manufactured with package version 89.16.01.00 and this
will prevent properly upgrading between releases.  Reset this version
to 00.00.00.00 if detected on this board.
2019-01-08 12:36:36 -06:00
Mario Limonciello
b4e3698cfb dell-dock: Wait longer for re-enumeration on TBT SKU
Emperically this seems to take 7-10 seconds longer on this SKU.
2019-01-08 12:36:36 -06:00
Richard Hughes
831eb7ef7e superio: Support IT89xx devices
We can switch to LDN 0x11 and read the IO base address for the PM1 legacy port
rather than hardcoding data and command ports.
2019-01-08 12:53:57 +00:00
Richard Hughes
3548186462 trivial: Make fu_common_dump_raw() more useful for debugging 2019-01-08 12:53:57 +00:00
Mario Limonciello
46bb4e91a0 fu-main: remove incompatible locale error message
Downgrade this to debugging instead. (Fixes: #912)
2019-01-08 11:03:50 +00:00
Mario Limonciello
c9f46290bc Add a new plugin checklist (Fixes: #899) 2019-01-07 10:07:27 -06:00
Richard Hughes
847959d89c trivial: post release version bump 2019-01-04 11:09:50 +00:00
Richard Hughes
36a5b8f7a2 Release fwupd 1.2.3 2019-01-04 11:08:49 +00:00
Richard Hughes
f692b71dc4 Correctly migrate the history database
I forgot to include the protocol column when migrating to v3, so create a v4
which ignores the sqlite error if the column already exists.

Fixes https://github.com/hughsie/fwupd/issues/909
2019-01-04 09:34:56 +00:00
Richard Hughes
305f1f2ab1 trivial: Add some debugging data to wacom-usb 2019-01-02 09:50:39 +00:00
Richard Hughes
fb0e10722a trivial: post release version bump 2018-12-30 15:23:27 +00:00
Richard Hughes
c2b4b56bd3 Release fwupd 1.2.2 2018-12-30 15:19:01 +00:00
Richard Hughes
8be03791c7 Log an error if started with an incompatible locale
Test with `LC_ALL=de_DE.UTF-8 ./src/fwupd`
2018-12-26 06:28:30 -06:00
Richard Hughes
0e17e6d030 Fix building with -Wl,-z,defs
This allows us to find undefined references at compile time, not runtime.
2018-12-25 16:10:54 -06:00
Richard Hughes
363127e518 ebitdo: Fix the reported version number if the daemon locale is not C.UTF-8
Always use a dot as the delimiter of a semver rather than treating it as a
floating point number.

Related to https://github.com/hughsie/lvfs-website/issues/216
2018-12-25 16:09:45 -06:00
Miklós Márton
7f59a6f844 Add Dell TB18DC to the known devices list 2018-12-25 16:08:10 -06:00
Richard Hughes
319dbcba5c trivial: Don't show 'Update Duration: 49710 days'
Use the correct 'value not found' constant for xb_node_get_attr_as_uint().
2018-12-18 17:59:09 +00:00
Richard Hughes
420ccd46fa Allow replacing the last byte in the image when using 'dfu-tool replace-data'
Fixes https://github.com/hughsie/fwupd/issues/903
2018-12-18 08:35:24 +00:00
Richard Hughes
8d02612893 trivial: Fix an error code if a search string is unfound 2018-12-18 08:34:27 +00:00
Richard Hughes
9d6dc95f41 trivial: Fix a memory leak if dfu-tool returns with an error 2018-12-18 08:34:06 +00:00
Richard Hughes
6055200822 trivial: Check the GUID length before attempting to parse it
It seems uuid_parse() doesn't check the string length before unwrapping the
string into a struct. Fixes:

    Conditional jump or move depends on uninitialised value(s)
       at 0x4E0C358: uuid_is_null (isnull.c:44)
2018-12-18 08:33:12 +00:00
Richard Hughes
45bbfc9cae Check the device checksum as well as the content checksum during verify
Some firmware has a different on-device checksum to the hash of the firmware
file itself. This may be because:

 * The content is not a binary file, e.g. Intel HEX or SREC
 * Only part of the firmware is flashed, e.g. ignoring the bootloader section
 * The device checksum is calculated using another method entirely, e.g. PCR0

It's also made complicated as there may be more than one 'correct' device
checksum in some cases, but nothing that a union query can't solve.
2018-12-14 19:23:04 +00:00
Richard Hughes
e2fa12ed2f Submit the device firmware checksum and update protocol in the submitted report
This is usually the same as the content checksum, but can be a different value
for instance in the PCR0 UEFI case.
2018-12-14 19:23:04 +00:00
Richard Hughes
08435169a7 trivial: Don't invalidate the current checksums for fw that requries a reboot 2018-12-14 19:23:04 +00:00
Richard Hughes
1812fc783b trivial: Clear the device checksums only if the plugin implements verify()
This ensures that plugins that set the checksums in probe() or setup() don't
get erased by accident.
2018-12-14 19:23:04 +00:00
Richard Hughes
4e886a4dfa Include the device checksum and update protocol in the historydb 2018-12-14 19:23:04 +00:00
Richard Hughes
b56015ed3f uefi: Add the PCR0 value as the device checksum for system firmware
We can't actually access the UEFI ROM from userspace, but the PCR0 is a hash
built from the ROM itself. We could use this value to ensure the firmware has
been written correctly, and that the PCR0 matches the expected value specified
in the metadata.
2018-12-14 19:23:04 +00:00
Richard Hughes
adeb2b1b4d Add new API to get the release protocol from the metadata 2018-12-14 18:15:01 +00:00
Richard Hughes
9729584ee4 Allow plugins to define support for a 'well-known' protocol
Future metadata from the LVFS will set the protocol the firmware is expected to
use. As vendors love to re-use common terms like DFU for incompatible protocols,
namespace them with the controlling company ID with an approximate reverse DNS
namespace.

This also allows more than one plugin to define support for the same protocol,
for instance rts54hid+rts54hub and synapticsmst+dell-dock.
2018-12-14 18:15:01 +00:00
Mario Limonciello
8612318158 uefi: When adding headers set the header size to 4k
This solves issues with implementations that require 4k alignment
of pages in BIOS which is seen on certain architectures.

The UEFI spec prescribes that the "minimum" size is the size of
the EFI header but that this may be increased up to larger sizes
due to extended header entries.
2018-12-11 12:51:57 -06:00
Mario Limonciello
2ac3aca2a7 uefi: Append the header on capsules without headers from Linux
This allows using better heuristics and potentially phasing this out
in the future.
2018-12-11 12:51:57 -06:00
Mario Limonciello
6131f5df8f trivial: uefi: correct a logic error in setting variable
efi_guid_cmp uses memcmp and hence should return 0 when a match
is found.
2018-12-11 12:51:57 -06:00
Mario Limonciello
c9d775c321 trivial: dell-dock: Correct variable for turning off HDCP 2.2 2018-12-07 14:17:41 -06:00
Richard Hughes
8dc599a23e flashrom: Ensure the quirks database is set on the new object 2018-12-07 16:30:55 +00:00
Richard Hughes
a0da340b60 uefi: Do not add devices with invalid GUIDs
Note: We deliberately don't add the device without 'UPDATABLE' as there's
nothing the user can actually do to repair this themselves.
2018-12-07 09:05:30 -06:00
Richard Hughes
4badf7e963 Do not allow a GUID of zero
The tempation for OEMs or ODMs to ship firmware updates matching a NULL GUID is
too fragile to allow -- even with CHID restrictions.
2018-12-07 09:05:30 -06:00