Commit Graph

2860 Commits

Author SHA1 Message Date
Richard Hughes
82f7499faa udev-device: Add a utility function for debugging
I normally have to remember this trick every time I write a new plugin, so
include this in the common code to be called by plugins as required.
2019-01-29 22:28:09 +00:00
Richard Hughes
57d8afd659 udev-device: Set the firmware revision automatically 2019-01-29 22:28:09 +00:00
Richard Hughes
297e1e8971 udev-device: Set the serial number automatically 2019-01-29 22:28:09 +00:00
Richard Hughes
caadb7b66a udev-device: Fall back to non-database model and vendor values 2019-01-29 22:28:09 +00:00
Richard Hughes
fc4fbfc98f udev-device: Fix critical warning if the device has no parent 2019-01-29 22:28:09 +00:00
Mario Limonciello
5502cd5689 dell-dock: Add support for a passive flow
This behavior will prevent the dock from performing most resets until
it has been unplugged from a host system.

This significantly speeds up the perceived update duaration and prevents
data loss during update.

It's not confirmed whether EC23 or later EC will enable it.
* So only enable by a custom flag until this is confirmed.
* Custom flag will be dropped when included into stable EC release.

This functionality also relies upon the CAB file providing a message warning
user that the dock might not be usable after unplugging for up to 1 minute.
2019-01-29 15:51:12 -06:00
Mario Limonciello
32241f4256 Add support for an UpdateMessage and display it in tools
The idea is that if the user should know something about the device update
"after" it's succesfully completed then the plugin can set `UpdateMessage`
for the device and a client can show it.

An example would be a device that doesn't reboot on its own and the user
needs to power cycle it manually.
2019-01-29 13:59:07 -06:00
Mario Limonciello
1e35e4c22d fu-tool: Port the get-updates command over
Now that there is actually support to load non-static information
(at least from fwupd perspective) it makes sense to support this
command in both tools.
2019-01-29 09:21:54 -06:00
Mario Limonciello
4f24d0bae3 When using directory remote type automatically generate metadata
The CAB files will be parsed upon `fwupd`/`fwupdtool` startup and
loaded into the daemon.
2019-01-29 09:21:54 -06:00
Mario Limonciello
706ab43898 libfwupd: Add support for new remote type "directory"
This remote will be used for automatically building metadata based
on files in a directory.
2019-01-29 09:21:54 -06:00
Richard Hughes
fd826c10a0 trivial: Print some debugging when ignoring a remote path 2019-01-29 09:21:54 -06:00
Richard Hughes
09cbacd771 trivial: Move Fedora CI to f29
We'll need this for some updated deps soon.
2019-01-28 15:42:30 +00:00
Richard Hughes
0af196151d Ensure cabinet archives always have a container checksum
This means the correct hash is shown when using `fwupdtool get-details` and
will be useful for future functionality.
2019-01-28 13:00:30 +00:00
Richard Hughes
7185828163 Add support for a per-release source and details URL
The source URL allows us to comply with our various obligations when shipping
firmware built from GPL licensed sources. The details URL allows vendors to
include a link to a full HTML details page about the specific release.
2019-01-28 12:59:39 +00:00
Richard Hughes
9d3ec971f3 trivial: Never allow the content checksum filename to be NULL
This prevents a critical warning from gcab_folder_get_file_by_name()
2019-01-28 12:53:53 +00:00
Mario Limonciello
51ddf18faa When generating a CAB Silo use the prefix "components"
This makes fu_engine_get_details use a more standard prefix.
2019-01-28 09:52:37 +00:00
Richard Hughes
0a212fd1d6 uefi: Add a trivial debugging statement to debug a UX capsule failure 2019-01-25 11:04:35 +00:00
Richard Hughes
9ba9d8a98b uefi: Use fwup_new0() to allocate the updates table array
Although malloc probably works due to the page size, it's not the thing to use.
2019-01-25 11:04:30 +00:00
Szczepan Zalega
f80bb89238 nitrokey: Correct Nitrokey Storage invalid firmware version read
Currently used structures were based on early libnitrokey definitions
(which were broken for some time). Corrected their sizes and elements,
and added tests.

Fixes #960

Signed-off-by: Richard Hughes <richard@hughsie.com>
2019-01-25 09:53:05 +00:00
Mario Limonciello
654b583031 trivial: dell-dock: Correct a left shift error in BIT_CLEAR macro 2019-01-24 10:35:53 -06:00
Mario Limonciello
d6e453b0ba dell-dock: Add support for flashing Thunderbolt over I2C
This uses an API in the Realtek USB 3.1G2 controller to perform
the flash procedure.
2019-01-24 16:23:00 +00:00
Richard Hughes
367f4590d6 wacom-raw: Add a plugin to update Wacom embedded EMR and AES panels 2019-01-24 10:18:40 +00:00
Mario Limonciello
3f243a9e9e fu-util/fu-tool: sync up reboot and shutdown behavior
It's currently a hodge podge of commands that can install files not
always invoking a reboot or shutdown.

Move the actual code into `fu-util-common.c` and make sure that all
`install` and `update` functions call it now.
2019-01-22 21:06:08 +00:00
Richard Hughes
42c514764a dfu: Ignore the SUB ASCII value
This is probably written by a non-free post-processing tool and can be ignored.
2019-01-22 14:43:13 +00:00
Richard Hughes
720b5deb00 dfu: Fix the parser to support extended segment addresses
Split the data into lines, which is less efficient but also much easier to
understand and debug.
2019-01-22 14:43:13 +00:00
Richard Hughes
f6a6fe8ec5 dfu: Support ihex files with leading comments
Also look for the EOF in the file.
2019-01-22 14:43:13 +00:00
Richard Hughes
650eea91ee trivial: Fix a build issue when building with high -j values 2019-01-22 10:17:51 +00:00
Mario Limonciello
b13f784462 trivial: dell: When plugging in a dock supported by dell-dock don't show an error
Some aspects of the method for querying dock firmware do work in 'dell' plugin
but that is not useful for fwupd because it's incomplete.

Due to this the following error shows up in fwupd journal if run on a Dell system
when the new Dell dock is plugged in:
failed to add USB device 0bda:8153: failed to add device using on dell: invalid dock component request Query 3 0 2 4 0

Detect this scenario, and prevent showing errors in logs.
2019-01-22 09:11:50 +00:00
Mario Limonciello
68fb11f453 uefi: Correct a boot order creation bug (Fixes: #956)
Unfortunately the previous fix (6131f5d) introduced this bug.

The code previously was actually looking for the non-zero case
which was correct, but non-obvious since `efi_guid_cmp` works like
`g_strcmp0` where a match returns zero.

So rather than revert 6131f5d make this completly explicit.
2019-01-22 07:28:32 +00:00
Richard Hughes
088c258894 trivial: Make one uefi function static 2019-01-20 22:29:44 +00:00
Richard Hughes
c7327385f4 uefi: Remove all variable length arrays 2019-01-20 22:29:44 +00:00
Richard Hughes
31c10b7293 uefi: Fix a logic bug in fwup_search_file()
If n_handles==0 then we'd return with EFI_SUCCESS, rather than failure.
2019-01-20 22:29:44 +00:00
Richard Hughes
59407ca42d uefi: Use _cleanup_free in one more place 2019-01-20 22:29:44 +00:00
Richard Hughes
00b87884c4 uefi: Do not pass required attrs to fwup_delete_variable()
This lets us refactor some code and remove some complexity.
2019-01-20 22:29:44 +00:00
Richard Hughes
aa6498866c uefi: Delete the old Linux-Firmware-Updater boot entry 2019-01-20 22:29:44 +00:00
Richard Hughes
525433e4de uefi: Use the GNU-EFI BOOL type 2019-01-20 22:29:44 +00:00
Aleksander Morgado
37b985c156 Check if plugin changed after the device attaches or detaches
If the device is rebooted into a different shape, the plugin managing
the device may also be different.

This would be the case for plugins that just subclass the update_detach()
method, and leave to other plugins the actual required update procedure.
2019-01-20 20:01:40 +00:00
Richard Hughes
818071d178 uefi: Refactor and simplify the EFI loader 2019-01-19 18:36:46 +00:00
Richard Hughes
f425d29a28 Show a console warning if loading an out-of-tree plugin
Fixes https://github.com/hughsie/fwupd/issues/950
2019-01-19 07:26:20 +00:00
Richard Hughes
4e30d25668 UEFI: Do the UX checksum calculation in fwupd
This makes the EFI binary much simpler.
2019-01-18 19:27:21 +00:00
Richard Hughes
09bf3b5246 trivial: Don't manually zero-fill efi_ux_capsule_header_t 2019-01-18 19:27:21 +00:00
Richard Hughes
4bdb513937 trivial: Make the capsule_image_size calculation more obvious 2019-01-18 19:27:21 +00:00
Richard Hughes
e554c1b501 trivial: Clarify our position on proprietary plugins 2019-01-18 12:21:46 -06:00
Richard Hughes
5dc757f6c1 wacom-usb: Add two more Intuos tablets
These do not need the runtime-version quirk like the others.
2019-01-18 16:11:53 +00:00
Richard Hughes
4a68fd60dc nvme: Add the needs-shutdown quirk to Phison NVMe drives
Affected drives should have a prominent statement in the update description,
possibly even the first line so it shows up by default in the updates panel.
2019-01-17 16:35:34 +00:00
Richard Hughes
f803964e37 Add _NEEDS_SHUTDOWN flag for devices
Some devices require the system to be powered down and back up, rather than
just being "warm" rebooted.
2019-01-17 16:35:34 +00:00
Richard Hughes
b91efa6c38 trivial: Cast to FuDevice from FuUdevDevice 2019-01-17 16:35:34 +00:00
Richard Hughes
a958e1c32f trivial: Fix a potential type-check warning when setting SUPPORTED
We can't use the superclassed FuDevice as this was created as a FwupdDevice.
2019-01-17 16:35:34 +00:00
Richard Hughes
72c18fd4e4 Use GCC __cleanup__ features in the EFI loader
This simplifies memory management.
2019-01-16 12:06:09 -06:00
Richard Hughes
fc90f3954e nvme: Add flag to support manually aligning the firmware to the FWUG value
This is required for drives from Phison.
2019-01-16 13:14:50 +00:00