Commit Graph

3084 Commits

Author SHA1 Message Date
Richard Hughes
ebd55e5d14 superio: Split and export fu_superio_device_ec_writeX() 2019-03-23 12:04:18 +00:00
Richard Hughes
08609f3920 superio: Remove the port from fu_superio_device_ec_read()
It's always going to be PM1_IOBAD0.
2019-03-23 12:04:18 +00:00
Richard Hughes
1fccae68ad superio: Move the register read/write into the FuSuperioDevice object
This will allow us to use them from subclassed objects.
2019-03-23 12:04:18 +00:00
Richard Hughes
140ce926ae superio: Check the IOBAD0 is usable during setup 2019-03-23 12:04:18 +00:00
Richard Hughes
4c9d00c1d5 superio: Use fu_device_set_firmware_size() 2019-03-23 12:04:18 +00:00
Richard Hughes
bb73e6594d superio: Move some constants out to the common header 2019-03-23 12:04:18 +00:00
Richard Hughes
f83639fb77 superio: Use GObject properties in FuSuperioDevice 2019-03-23 12:04:18 +00:00
Richard Hughes
b12d0bfec5 superio: Convert FuSuperioDevice to be derivable
We'll need this for future refactoring.
2019-03-23 12:04:18 +00:00
Richard Hughes
1dfc367ba2 Update Plymouth when updating pending firmware
Some updates take some time to deploy, so we need to update the UI to avoid the
user thinking it's just hung.
2019-03-23 12:00:26 +00:00
Richard Hughes
19e56866f6 trivial: Disable MemoryDenyWriteExecute
This is failing for new versions of Gio for some reason. Revert when required.
2019-03-23 11:59:14 +00:00
Richard Hughes
809abea834 Ask to reboot after scheduling an offline firmware update 2019-03-23 11:14:44 +00:00
Richard Hughes
db69c81e86 trivial: Show the progressbar properly when scheduling complete 2019-03-23 10:52:47 +00:00
Richard Hughes
484ee298da Do not fail when scheduling more than one update to be run offline 2019-03-23 10:52:14 +00:00
Richard Hughes
f517c9aa09 Allow running offline updates when in system-update.target 2019-03-23 10:45:52 +00:00
Richard Hughes
3dbacdf541 Fix the location of fwupdoffline in the service file 2019-03-21 20:58:42 +00:00
Richard Hughes
42a1b9aea3 trivial: Make testing the offline update easier by allowing reinstalls
Only refuse to schedule an offline update if the device is already pending.
2019-03-21 20:58:42 +00:00
Richard Hughes
8356a83c4a trivial: Fix potential critical when converting empty object to GVariant 2019-03-21 17:15:43 +00:00
Richard Hughes
705402cebd trivial: Do not offer to report firmware for the installed tests 2019-03-21 15:54:52 +00:00
Richard Hughes
2da42d3cd4 trivial: Add fu_device_set_firmware_size()
This allows us to set the value where the blob has to be a specific size.
2019-03-21 10:31:35 +00:00
Richard Hughes
2aad104473 trivial: Add fu_common_bytes_compare() 2019-03-21 10:28:20 +00:00
Richard Hughes
4c6d61dc3a trivial: Add fu_device_get_firmware_size_min() 2019-03-21 10:27:08 +00:00
Richard Hughes
23b1a9d3be trivial: Add missing gtk-doc for _REMOTE_KIND_DIRECTORY 2019-03-21 10:09:11 +00:00
Richard Hughes
36999464c7 trivial: Move a useful function out of libdfu 2019-03-19 21:17:48 +00:00
Richard Hughes
c9223be26c Add optional vfuncs to allow detaching and attaching verify()
Some devices (e.g. Wacom, DFU and SuperIO) require the device to be in
'bootloader' mode before the device checksums can be populated.

Rather than each plugin handle both the open()->detach()->detach()->close()
sequence handle this in the plugin loader. It's not super-easy to do the right
thing for the failure case, and having two new dedicated vfuncs makes it a lot
simpler.
2019-03-19 20:25:26 +00:00
Richard Hughes
6109652f5a trivial: Remove some dead code
Found using Coverity.
2019-03-18 16:36:30 +00:00
Richard Hughes
b7537782cb trivial: Fix the debug print when dumping SuperIO registers
Found using Coverity.
2019-03-18 16:35:01 +00:00
Richard Hughes
37b6c70aa0 superio: Add list of SPI commands for future usage 2019-03-18 15:59:33 +00:00
Richard Hughes
1568449e69 Add a verify-update command to fwupdtool
This is useful for debugging to just read the checksum from the device.
2019-03-18 10:08:58 +00:00
Richard Hughes
11f612c1d3 trivial: Ensure the parent dir exists before saving the verify silo 2019-03-18 10:08:58 +00:00
Richard Hughes
5c18617e8f uefi: Actually upload the UPDATE_INFO entry for the UX capsule 2019-03-15 14:22:01 +00:00
Richard Hughes
079b7b6f9d superio: Get the chip size from the EC rather than hardcoding
I'm not sure why we can't just use SIO_LDNxx_IDX_CHIPID1, but lets do the same
as the vendor tool in case there is a good reason that I don't know about.
2019-03-15 13:47:57 +00:00
Richard Hughes
72e7a82c88 uefi: Check the error code of QueryCapsuleCapabilities() correctly
We can't print max or reset as they are undefined in the event of failure.
2019-03-15 09:27:55 +00:00
Peter Jones
fda89fd15e Update the UEFI UX Capsule Header checksum when needed.
Signed-off-by: Peter Jones <pjones@redhat.com>
2019-03-14 14:06:06 -05:00
Richard Hughes
35b6e13d96 uefi: Copy the shimx64.efi binary for known broken firmware
Some system firmware helpfully 'deduplicate' the boot loader entries based on
the filepath, without taking into account either the label or optional data.

This means we have to use a custom copy of shim for firmware updates.
2019-03-14 17:00:53 +00:00
Richard Hughes
68db74b006 Correctly get the check the new version for devices that replug
There are a lot of failures in the LVFS with 'device version not updated on
success' and this is because we were looking at the original FuDevice, rather
than the FuDevice that came back after the bootloader replug phase.

Before doing the check get the new FuDevice to prevent failing the check with
a false positive.
2019-03-14 08:50:06 -05:00
Richard Hughes
363aa54605 trivial: Update the capsule header helper to work without flags set 2019-03-13 11:15:49 +00:00
Richard Hughes
b008bcab50 Add a simple script to add a capsule header
This may be helpful for OEMs and ODMs shipping 'bare' firmware.
2019-03-12 13:54:29 -05:00
Richard Hughes
d364184209 trivial: Do not create the private key if _USE_CLIENT_CERT unset 2019-03-12 08:25:22 -05:00
Richard Hughes
f3c7d42289 Ensure the PKCS-7 client certificate exists at startup
This ensures the certificate is always present even before the user has
generated a report or manually signed test data.

Also, if the GnuTLS version is too old just log a message and continue.
2019-03-12 08:25:22 -05:00
connor nolan
03fbe471e8 fix makecab directive options 2019-03-12 06:28:12 -05:00
Thaodan
156538f1c3 fwpup.service: use display-manager.service instead of gdm.service
Instead of referring to just *gdm.service* use the alias *display-manager.service* instead to allow other display managers like *sddm* too.
2019-03-12 10:03:27 +00:00
Steve McIntyre
c8de6b6398 trivial: debian: Update the format of the json metadata to match new requirements
* Move all the data under a new top-level "packages" key
* Add an empty "trusted_certs" key - our binaries do not do any
  further verification with an embedded key.
2019-03-11 17:06:21 -05:00
Richard Hughes
4ffc14f6ea Allow signing the fwupd report with the client certificate 2019-03-11 13:57:39 +00:00
Richard Hughes
3d60762bed Add a D-Bus method to generate a signature using the self-signed client certificate 2019-03-11 13:57:39 +00:00
Richard Hughes
f28abe7fda Allow signing and verifying data using a PKCS-7 self-signed client certificate
This is a per-client certificate and private key that can be used to sign
metadata sent to remote servers, for instance success/failure reports.
2019-03-11 13:57:39 +00:00
Richard Hughes
26e1549d16 trivial: Abstract out fu_keyring_pkcs7_load_crt_from_filename()
We'll need this for future functionality.
2019-03-11 13:57:39 +00:00
Richard Hughes
ca6d92aa5c trivial: Allow PKCS-7 certificates for DIGITAL_SIGNATURE
This allows us to also use a self-signed certificate for verification.
2019-03-11 13:57:39 +00:00
Richard Hughes
2eee2582fd trivial: Fix several NULL/FALSE return mistakes 2019-03-11 13:17:55 +00:00
Richard Hughes
6bc7098640 Fix a critical warning when loading a PKCS-7 certificate with no DN 2019-03-11 13:13:00 +00:00
Richard Hughes
06ef7f7e46 Include all device checksums in the LVFS report
On some hardware the SHA1 checksum is not set and so we want to use the SHA256
hash value as well.

The LVFS doesn't currently read the ChecksumDevice value and so nothing will
explode serverside when changing this type from 'string' to 'array of strings'.
2019-03-11 06:42:26 -05:00