Commit Graph

5021 Commits

Author SHA1 Message Date
Richard Hughes
a83deb42b5 Add commands to fwupdtool for interacting with the ESP 2020-08-12 18:35:15 +01:00
Richard Hughes
8f0b2d1708 libfwupdplugin: Add FuVolume to interact with the ESP
This allows us to rip out a lot of legacy code and make interacting with the
ESP possible from more than one plugin.
2020-08-12 18:35:15 +01:00
Richard Hughes
99dda53cc2 trivial: Define one more EFI GUID 2020-08-12 15:13:09 +01:00
Richard Hughes
0031b474bc Fix a critical warning if constructing a FuDeviceLocker using the GType 2020-08-12 14:23:01 +01:00
Vincent Huang
334a4d9f30 synaptics-prometheus: generate new guid with configid and add pids to
quirk file
2020-08-12 09:47:46 +01:00
Mario Limonciello
8131fceb6b trivial: adjust migration code to remove duplication 2020-08-10 17:14:15 +01:00
Richard Hughes
3120683143 Allow blocking specific firmware releases by checksum
Fixes https://github.com/fwupd/fwupd/issues/2280
2020-08-10 17:14:15 +01:00
Mario Limonciello
27fd95ae88 trivial: fu-config: stop setting local variable archive_size_max 2020-08-10 10:33:31 -05:00
Mario Limonciello
abfc72d6c0 trivial: add a missing assertion in self test 2020-08-10 10:33:31 -05:00
Mario Limonciello
0ebddc9fcf trivial: fix some unused variables found by clang-10 2020-08-10 10:33:31 -05:00
Mario Limonciello
2c55382944 trivial: cpu: add noreturn attribute 2020-08-10 10:33:31 -05:00
Mario Limonciello
f79680bfd1 trivial: move ubuntu ci to clang 10 2020-08-10 10:33:31 -05:00
Richard Hughes
ced2fa1ca4 trivial: Fix the Fedora CI 2020-08-06 15:31:58 +01:00
Simon McVittie
fc974c7240 trivial: Don't skip methods on plain structs
This resulted in losing g_usb_source_set_callback@LIBGUSB_0.1.0 which causes a
build failure when building gusb as a subproject, and also the little-used
fu_chunk_to_string() from libfwupdplugin.

Signed-off-by: Richard Hughes <richard@hughsie.com>
2020-08-06 15:31:58 +01:00
Richard Hughes
1a58062be9 Refresh the handle to device before testing ANOTHER_WRITE_REQUIRED
fu_engine_install_blob may result in the device being reset during attach or
detach and needing to be replugged.
The device handle we're holding may be stale, but it is still used by the do
while loop itself for the ANOTHER_WRITE_REQUIRED test.

Similar to the other functions in the loop, let's get the device handle by id
in case that happened.

Original patch by Benson Leung <bleung@chromium.org>, many thanks.

Fixes https://github.com/fwupd/fwupd/issues/2297
2020-08-03 19:30:01 +01:00
Benson Leung
8b9f9ab47a Save custom flags on device replace
New instances of a device may be interested in custom flags. Copy them
over on fu_device_list_replace.

fixes #2298
2020-08-03 18:02:43 +01:00
Mario Limonciello
27c49542ef trivial: try to fix circleci news generation script 2020-07-30 11:12:16 -05:00
Richard Hughes
4a0d14b097 trivial: Fix the quirk entry for the Star LabTop Mk IV 2020-07-30 15:13:00 +01:00
Richard Hughes
b76b4f8deb trivial: Make the bash completion script reflect reality 2020-07-29 15:05:15 +01:00
Richard Hughes
45adc67c82 trivial: Fix aarch64 Fedora build 2020-07-29 15:05:15 +01:00
Sean Rhodes
c7edf611c3 Added quirk for LabTop Mk IV 2020-07-29 12:58:02 +01:00
Ryan Lee
0b5ed33b23 ccgx: Modify readme to remove customer info 2020-07-29 12:01:31 +01:00
Emily Miller
b700783bf6 vli: Add dual-image feature for VL103 backup firmware 2020-07-29 10:57:02 +01:00
mendel5
db2906d49c fu-plugin-synaptics-mst.c: replace github.com/hughsie with github.com/fwupd 2020-07-28 14:28:15 -05:00
mendel5
92f8e92daa pull_request_template.md: replace github.com/hughsie with github.com/fwupd 2020-07-28 14:28:15 -05:00
Richard Hughes
5bfa7bf808 trivial: Add a device test for the Thelio Io device 2020-07-28 16:01:47 +01:00
Richard Hughes
8edaa89076 libfwupdplugin: Allow opening i2c devices with O_NONBLOCK 2020-07-28 14:19:24 +01:00
Richard Hughes
070084e0d8 libfwupdplugin: Set the physical device ID for i2c devices 2020-07-28 14:19:24 +01:00
Richard Hughes
e031774a8b Split out the fwupd tutorial into a new file
No content changes.
2020-07-28 09:22:07 +01:00
Richard Hughes
cad96542e2 Check if CET is actually being used on the runtime system
With thanks to H.J. Lu <hjl.tools@gmail.com> for the initial code.
2020-07-27 15:53:38 +01:00
Richard Hughes
fa34c319da trivial: Translate the FwupdSecurityAttrFlags suffix 2020-07-27 11:00:11 +01:00
Richard Hughes
cb1e6075c5 thelio-io: Define the protocol on the runtime device
This allows us to use 'protocol' in the device test JSON and also prevents a
daemon warning at startup.
2020-07-25 09:09:24 +01:00
Richard Hughes
587ca9793f nitrokey: Define the protocol on the runtime device
This prevents a daemon warning.
2020-07-25 09:09:24 +01:00
Richard Hughes
4f617e2eb6 thelio-io: Set the runtime version to 0.0.0 for pre-1.0.0 firmware 2020-07-23 14:12:31 +01:00
Richard Hughes
8fe710135b thelio-io: Add the DFU instance ID as a counterpart only
This means we do not add possibly unwanted bootloader-specific quirks to the
runtime device.
2020-07-23 14:12:31 +01:00
Richard Hughes
a99b5adfb6 trivial: Export fwupd_client_ensure_networking()
This is required when the calling application needs the low-level soup-session
with the user agent set correctly rather than using the helper methods like
fwupd_client_download_bytes().

This is what GNOME Software needs to handle the GsApp progress completion.
2020-07-23 13:00:39 +01:00
Torsten Hilbrich
9b819e634c fu-util: Allow get-updates without download remotes
If a system is configured without any downloadable remotes (e.g. with
a remote pointing to a local directory) the call of

fwupdmgr get-updates

fails by outputting "No remotes enabled." even though the call
"get-remotes" clearly shows the configured remote.

I found the following commit:

commit 991c95697e
Author: Mario Limonciello <mario.limonciello@dell.com>
Date:   Wed Jun 17 15:23:13 2020 -0500

    trivial: fu-util: correct an assertion when no remotes configured

introduced the problem. In the call chain:

fu_util_get_updates
-> fu_util_perhaps_refresh_remotes
-> fu_util_check_oldest_remote

the function fu_util_check_oldest_remote now returns FALSE if no
remote of kind FWUPD_REMOTE_KIND_DOWNLOAD is found.

The function fu_util_perhaps_refresh_remotes then returns FALSE
indicating failure even though without a downloadable remote the
concept of refreshing is not useful.

I think, we should return TRUE in this case, as no refresh is needed
and the operation can continue.

As the failure of fu_util_check_oldest_remote is ignored we also need
to pass NULL as error pointer here.

The use-case of this scenario without downloadable remote is by
distributing firmware updates through software updates where the
vendor directory with the capsule file is provided.
2020-07-22 22:06:55 -05:00
Richard Hughes
4e13a790df vli: Rename FuVliUsbhubI2cDevice to FuVliUsbhubMsp430Device
The I²C proxy specification is not always shared with all other devices as
I originally hoped, instead there are other legacy devices that use different
sets of I²C commands.

Un-share various bits of code to allow for additional I²C devices to be added.

No logic changes.
2020-07-22 20:04:20 +01:00
Richard Hughes
fa540cf539 trivial: Fix aarch64 Fedora build 2020-07-22 09:45:42 +01:00
Richard Hughes
ef3924c9ea trivial: Fix Debian CI 2020-07-20 22:50:31 +01:00
Richard Hughes
30f7ffbdbd pci-mei: Split up the bootguard HSI checks into multiple entries
Additionally, demote the error policy to HSI-3 and do not show the other
failures if BootGuard is disabled.

Fixes https://github.com/fwupd/fwupd/issues/2265
2020-07-20 22:50:31 +01:00
Richard Hughes
f8c10c2b11 Use --plugins for the fwupdtool argument name
This is much more obvious than --plugin-enable=foo,bar,baz ever was.
2020-07-20 22:50:31 +01:00
Richard Hughes
474d1442f1 trivial: Use proper AppStream namespacing for HSI attributes 2020-07-20 22:50:31 +01:00
Richard Hughes
9a04ce8f29 msr: Add a new plugin to detect the Intel DCI state 2020-07-16 20:13:06 +01:00
Mario Limonciello
ec9eb9061f trivial: add oui quirk for samsung (Fixes: #2070) 2020-07-10 13:42:31 -05:00
Richard Hughes
f4c55d888e libfwupd: Add fwupd_client_install_release()
This allows us to remove a lot of copy-and-paste code in GNOME Software.
2020-07-09 20:57:00 +01:00
Richard Hughes
02d94d3139 libfwupd: Add fwupd_client_install_bytes()
Sometimes you do not have a filename and just a blob of memory.
2020-07-09 20:57:00 +01:00
Richard Hughes
59f871deda libfwupd: Move GUnixInputStream-creating functions to common code
We'll need to use them from other methods soon.
2020-07-09 20:57:00 +01:00
Richard Hughes
d528571971 libfwupd: Add fwupd_client_refresh_remote()
This takes care of downloading the correct files and allows remotes to be
refreshed from other CLI and GUI tools without copying large chunks of code.

This also allows us to download the metadata without writing two temp files
to the users cache directory. Although not security sensitive, it's probably
not a good idea if we can avoid it.
2020-07-09 20:57:00 +01:00
Richard Hughes
71ba813a71 libfwupd: Add fwupd_client_update_metadata_bytes()
Sometimes the data is coming from a blob of memory and not a cached file, so
use a memfd to create a file descriptor that can be passed to the daemon.
2020-07-09 20:57:00 +01:00