Commit Graph

2860 Commits

Author SHA1 Message Date
Richard Hughes
297055c9d8 Report the DeviceInstanceIDs to fwupdmgr get-updates
This makes it much easier to write metainfo files as we don't have to ask OEMs
or ODMs to run fwupdtool or fwupd with --verbose and then sort through hundreds
of debugging statements.

The fwupdmgr get-devices output also now prints output like this:

    20EQS64N0C System Firmware
      Guid:                 ddc0ee61-e7f0-4e7d-acc5-c070a398838e
      Guid:                 40ce5954-bfa8-5762-926b-f4848cb28bc8 <- UEFI\RES_{DDC0EE61-E7F0-4E7D-ACC5-C070A398838E}

We're deliberately not showing the InstanceId lines in the get-updates command
as the instance IDs are not useful in this case. It will also only show the
InstanceID lines when run as a trusted user, for instance root.
2019-02-04 15:19:57 +00:00
Richard Hughes
592baedfff Export some of the GUID functionality 2019-02-04 15:19:57 +00:00
Mario Limonciello
dc73a47563 trivial: read and use all build flags used by Debian and Ubuntu builds
Filter out -Wl,-Bsymbolic-functions and run the test suite to make
sure any future build flags introduced will cause errors.
2019-02-04 08:56:43 -06:00
Mario Limonciello
39ddd968b8 trivial: contrib: debian: Don't allow -Wl,-Bsymbolic-functions
This linker flag is used by Ubuntu by default for packages.
It however doesn't work when compiled with `-Wl,-z,defs` which is
the default behavior since 0e17e6d030.

Recommended-by: Aleksander Morgado <aleksander@aleksander.es>
Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
2019-02-04 08:56:43 -06:00
Richard Hughes
5297678d3c Allow a plugin to set _ANOTHER_WRITE_REQUIRED to run more than one plugin
For this to work with different plugins the device IDs must match.
2019-02-04 14:54:54 +00:00
Richard Hughes
03df0d5379 trivial: Break apart fu_engine_install_blob() into sane chunks
This fixes a number of bugs, where the plugin changing was not always detected
properly. It also means we always record a error failure if _install_blob()
returns FALSE.
2019-02-04 14:54:54 +00:00
Richard Hughes
84af6e71f4 trivial: Move all the history database writing to fu_engine_install() 2019-02-04 14:54:54 +00:00
Richard Hughes
9fd7207f55 trivial: Move the update schedule to fu_engine_install() 2019-02-04 14:54:54 +00:00
Richard Hughes
afca203839 trivial: Move the history database writing to fu_engine_install() 2019-02-04 14:54:54 +00:00
Richard Hughes
c6c312f267 trivial: Move fu_plugin_runner_schedule_update() into the engine 2019-02-04 14:54:54 +00:00
Mario Limonciello
8efc5a3633 nvme: Add an extra check for Dell plugins to avoid false positives
Component IDs should always be ASCII characters.
None have been reported yet, but this should still help to prevent them.
2019-02-04 10:39:20 +00:00
Mario Limonciello
b503aa8650 ata: Add support for detecting Dell GUIDs
Similar to NVME, ATA drives distributed by Dell have special values
that should be used to designate fwupd GUIDs and only run correct
firmware.

When detecting Dell GUIDs remove the standard fwupd GUIDs.  "Generic"
firmware targeted to those GUIDs will fail to install.
2019-02-04 10:39:20 +00:00
Mario Limonciello
b05a918431 trivial: Move GUID testing into fu-common-guid
This allows other plugins to use this part of the routine.
2019-02-04 10:39:20 +00:00
Richard Hughes
b1d1c3b089 Fix the self tests when using glib2 >=2.59.0
Replace the non-breaking space with a traditional space rather than changing
the expected output with #ifdef to allow running the tests with a daemon
compiled against an older glib2 version.
2019-02-03 17:39:43 +00:00
Richard Hughes
96e6783982 trivial: Fix potential compile failures for high -j values 2019-02-01 16:52:16 +00:00
Mario Limonciello
53ce25d985 Add support to call composite prepare and cleanup using fwupdtool
Two new arguments added to fwupdtool: `--prepare` and `--cleanup`

They are used only with the `install-blob` command

This makes sure that devices can get rebooted in dell-dock even if using
fwupdtool to install a single blob.

Signed-off-by: Richard Hughes <richard@hughsie.com>
2019-02-01 16:39:08 +00:00
Richard Hughes
1e07ec95b6 uefi: Disable -Wno-address-of-packed-member
Unaligned reads don't really matter on all the architectures the EFI binary is
being built for.
2019-02-01 16:38:14 +00:00
Richard Hughes
c6b94791ec uefi: Don't unconditionally enable Werror for the EFI binary 2019-02-01 16:38:14 +00:00
Richard Hughes
a039e72363 Disable -Wno-address-of-packed-member
It's incompatible with g_autoptr(), which is probably unintentional.
2019-02-01 16:38:14 +00:00
Richard Hughes
575eb71efc trivial: post release version bump 2019-02-01 14:31:46 +00:00
Richard Hughes
8ece8874b5 Release fwupd 1.2.4 2019-02-01 14:28:36 +00:00
Richard Hughes
7ccba7afba Remove the autogenerated headers in the gettext files
These change every release as we're importing from Transifex. They're not
required, so strip them out using a small python script.
2019-02-01 14:25:26 +00:00
Richard Hughes
0a26551bf3 ata: Default to the non-activation 0xE subcommand
During download and activation we have to reset the drive to apply the new
firmware. If the kernel gets an unexpected ATA reset then it might panic.
Default to activating the command on the next drive power-up to be safe.

Many thanks to the Dell storage team for the advice.
2019-02-01 06:13:38 -06:00
Aleksander Morgado
0f0da353c2 fastboot: Use a much longer timeout as the removal delay
A device that has gone through a fastboot update may need more than
the previous default of 10s to come back up. Just use a much longer
value to make sure it's detected properly.

Signed-off-by: Richard Hughes <richard@hughsie.com>
2019-02-01 10:26:43 +00:00
Aleksander Morgado
0de532b0b0 trivial: Allow iterating over the contents of an archive
Signed-off-by: Richard Hughes <richard@hughsie.com>
2019-02-01 10:25:20 +00:00
Mario Limonciello
9b31e6f33a fu-progressbar: be more quiet when running non-interactive
If fwupdmgr or fwupdtool are scripted all the erasing of lines and
progressbars are much less useful.
2019-01-31 22:40:50 +00:00
Mario Limonciello
303c4f0f90 trivial: upower: correct a logic error from ed021ab
When unable to read battery value this should return FALSE to indicate
AC power.
2019-01-31 14:56:08 -06:00
Mario Limonciello
7a3df4bb07 fu-tool: Show UpdateMessage if applicable for install command
When calling with a CAB as an install argument, this needs to be
manually populated since the release won't be built.
2019-01-31 13:54:01 -06:00
Mario Limonciello
1d26689b2f trivial: dell-dock: mirror update status from passive flow
If fwupd is restarted multiple times before dock is unplugged, don't
let any devices update if we can avoid it.
2019-01-31 10:53:54 -06:00
Mario Limonciello
ead0deaa25 trivial: dell-dock: enable passive flow on all EC23+
The feature did land in EC23 and testing looks positive.
2019-01-31 10:53:54 -06:00
Richard Hughes
206b70120d dfu: Simplify the SREC parser to avoid a crash with an invalid file
Splitting the file into lines does increase memory usage, but allows us to use
a much simpler parser design. This is just like we fixed IHEX a few weeks ago.
2019-01-31 16:05:34 +00:00
Richard Hughes
ccc79c9fbc trivial: Split out strnsplit for future use 2019-01-31 16:05:34 +00:00
Richard Hughes
c1fad937d8 wacom-raw: Use the correct error codes when the panel is not supported
Otherwise, we get a nasty red console warning when plugging in a *USB* panel.
2019-01-31 11:55:48 +00:00
Richard Hughes
a3b13046c2 wacom-usb: Add some more information to the README 2019-01-31 11:55:12 +00:00
Mario Limonciello
19968a756d fu-keyring-utils: Don't fail missing PKI directory when compiled with GPG/PKCS7
This directory won't be installed when compiled without those.
2019-01-30 16:29:17 -06:00
Mario Limonciello
769f990cf6 trivial: dell: filter another dock SKU from this plugin
Prevents showing errors in the logs
2019-01-30 11:00:45 -06:00
Mario Limonciello
423dde520c dell: Check that the flash interface command is available
This prevents the kernel showing errors when running on systems
without this command.

Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=202259
2019-01-30 11:00:45 -06:00
Richard Hughes
52b9800744 wacom-usb: Fix the plugin name to allow devices to be updated 2019-01-30 13:09:54 +00:00
Richard Hughes
b9b6834f54 trivial: Add FuFastbootDeviceReadFlags to fu_fastboot_device_cmd() 2019-01-30 12:14:17 +00:00
Aleksander Morgado
046c84b5b3 fastboot: flash the partition after downloading the file 2019-01-30 12:14:17 +00:00
Richard Hughes
44ce5aeae4 uefi: Add a quirk to use the legacy bootmgr description
Some hardware from Lenovo deduplicates UEFI Boot entries, and uses the old
string 'Linux-Firmware-Updater' to avoid removing the firmware update entry.
Although this is forbidden in the UEFI specification we shouldn't break
firmware updates from old firmware versions.

Provide a quirk for this, and automatically whitelist anything with the LENOVO
SMBIOS Manufacturer.
2019-01-30 12:13:39 +00:00
Richard Hughes
2a77afcd5c trivial: Do not propagate UNKNOWN from FuDevice->FuEngine->FuMain 2019-01-30 06:10:36 -06:00
Richard Hughes
96019e815c trivial: Allow reflashing the same device more than once without restarting
Set the device status back to the default when completed flashing so that we
don't ignore the status change for the subsequent flash.
2019-01-30 06:10:36 -06:00
Richard Hughes
dd0264d0ef ata: Mark all devices as needing a reboot
Although not strictly required, I would feel a lot more warm and fuzzy knowing
the drives are running the new firmware ASAP.
2019-01-30 06:10:36 -06:00
Richard Hughes
0bf8ee810b ata: Add a new plugin to upgrade firmware on ATA/ATAPI hardware
Some of the ATA12 fixup code is by Mark Lord, taken from the hdparm project.

Fixes: https://github.com/hughsie/fwupd/issues/946
2019-01-29 22:28:09 +00:00
Richard Hughes
4fef28d0ac trivial: Add the missing protocol IDs to the plugin READMEs 2019-01-29 22:28:09 +00:00
Richard Hughes
62eae7a981 trivial: Show the possible subsystems when failing to set the physical ID
This makes new plugin development much easier.
2019-01-29 22:28:09 +00:00
Richard Hughes
bdd17b6ffc trivial: Use DEVPATH for the physical ID when using scsi devices 2019-01-29 22:28:09 +00:00
Richard Hughes
f6838c738a trivial: Add fu_udev_device_get_slot_depth()
We'll need this for another plugin soon.
2019-01-29 22:28:09 +00:00
Richard Hughes
a08891b6cb trivial: Do not use the testing remote for the Fedora CI 2019-01-29 22:28:09 +00:00