Commit Graph

4425 Commits

Author SHA1 Message Date
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
Richard Hughes
9a5bd5e9d7 libfwupd: Split up a function for future new API 2020-07-09 20:57:00 +01:00
Richard Hughes
17da521916 libfwupd: Add fwupd_remote_load_signature_bytes() for when a file is not available 2020-07-09 20:57:00 +01:00
Richard Hughes
cc93f7c336 trivial: Allow the uset to set the ApprovalRequired remote value
This allows the local user with appropriate permissions to do:

    fwupdmgr modify-remote lvfs ApprovalRequired true
2020-07-09 12:52:38 +01:00
Richard Hughes
ff0dc24e54 trivial: Add some documentation for the ApprovedFirmware config key 2020-07-09 12:52:38 +01:00
Benson Leung
852c6685ff cros-ec: Set protocol for cros-ec-usb-device
Specify "com.google.usb.crosec" to indicate support for Google's
USB endpoint updater protocol.
2020-07-09 07:44:19 +01:00
Benson Leung
8ed9f5f0a1 cros-ec: Write firmware to usb target
Write the firmware to the usb device, first finding which section to
write to, then breaking into blocks (based on maximum pdu size),
and then into chunks, which are transferred to the device using bulk transfers.
2020-07-09 07:44:19 +01:00
Benson Leung
4ed2400cab cros-ec: Store image_idx in section
Makes it a bit easier to retrieve the image later.
2020-07-09 07:44:19 +01:00
Benson Leung
9326e19118 cros-ec: Give cros-ec-firmware a get_sections
Add a getter for the sections.
2020-07-09 07:44:19 +01:00
Benson Leung
d0cd862acf cros-ec: Add fu_cros_ec_firmware_pick_sections
Add this to allow the usb-device to mark which section of the firmware
image is writeable by setting the section's ustatus to FU_CROS_EC_FW_NEEDED.
2020-07-09 07:44:19 +01:00
Benson Leung
befd9a420e cros-ec: Convert cros-ec-firmware's sections to GPtrArray 2020-07-09 07:44:19 +01:00
Benson Leung
6472742bea cros-ec: Add prepare firmware
Prepare firmware by parsing it, which will be of fu_cros_ec_firmware type.
2020-07-09 07:44:19 +01:00
Benson Leung
a989975812 cros-ec: Update documentation to reflect fmap
The file format was added last time around, so update cros-ec's
documentation to reflect that fwupd now supports fmap format
blobs.
2020-07-09 07:44:19 +01:00
Richard Hughes
907fd15e55 trivial: Fix two hard to translate strings 2020-07-08 21:08:46 +01:00
Richard Hughes
9b6d616383 fwupd: Export fwupd_client_download_bytes() into the client library
The logic here is that we can use one central session for all client actions.

Also, set the user agent for the *runtime* version of fwupd -- it's the runtime
version we use when checking capabilities, rather than the built-against
version. This would also explain why there are so many very obsolete versions
of fwupd being recorded on the LVFS...
2020-07-08 19:00:42 +01:00
Richard Hughes
77d0fd31df fwupd: Split out two trivial helpers 2020-07-08 19:00:42 +01:00
mendel5
72f78dc060 fix syntax in German translation file (de.po) 2020-07-07 20:18:46 +01:00
Ryan Lee
ef7b7b0efd ccgx: modify installation time for hp g2 dock 2020-07-07 13:00:02 +01:00
Richard Hughes
4d2c0f8047 trivial: Fall back to the HSI ID if the name is not available
This fixes a crash if you 'ninja install' with a newer fwupd version and then
run fwupdtool from an older version.
2020-07-07 12:02:35 +01:00
Richard Hughes
fb0a938f6c Cache the FuSecurityAttrs in the daemon
At the moment at startup we're calculating the attrs so we can export the HSI
string property on the D-Bus interface. Running `fwupdtool security` actually
gets all the security attributes at least twice!
2020-07-03 20:47:28 +01:00
Mario Limonciello
c90eca4787 thunderbolt: add support for retimers 2020-07-03 12:56:44 -05:00
Mario Limonciello
a2431e07ff trivial: fu-udev-device: add support for exporting the udev device type
This is useful in some plugins that will behave differently for
multiple device types.
2020-07-03 12:56:44 -05:00
Mario Limonciello
eb7be16bf0 fu-util/fu-tool: Group devices in get-updates/update calls
Fixes: #1840
2020-07-03 11:58:34 -05:00
Richard Hughes
885faa4011 trivial: Require libjcat even when compiled with -Dbuild=library 2020-07-03 11:51:05 -05:00
Richard Hughes
a852254d92 trivial: Hide the UEFI DBX parsing by default 2020-07-03 12:32:06 +01:00
Ryan Lee
62618bedb6 ccgx: add extra 45% removal time for worst case 2020-07-03 10:18:57 +01:00
Richard Hughes
6269a839eb Add a security attribute for BootGuard
This information is obtained from the MEI configuration space.
2020-07-02 20:25:48 +01:00
Richard Hughes
81a12a1b17 pci-mei: Split out the HFSTS registers
The register specifications have been taken as a superset of the coreboot
documentation as different flags were documented in more detail on various
different platforms.

Having this new data allows us to add future tests and make the current tests
much easier to understand.
2020-07-02 20:25:48 +01:00
Reto Kromer
2b0a329cf1 fix alignment (in the code) 2020-07-01 21:11:17 +01:00
Richard Hughes
b99df2ef93 Use the security attributes to construct a better name
Fixes https://github.com/fwupd/fwupd/issues/2184
2020-07-01 20:10:39 +01:00
Richard Hughes
1de98dcd72 mei: Add extra metadata to the security attributes 2020-07-01 20:10:39 +01:00
Richard Hughes
2adeb7688a mei: Store the family in the plugin data 2020-07-01 20:10:39 +01:00
Richard Hughes
7b57ce226b libfwupd: Allow storing metadata on the security attr 2020-07-01 20:10:39 +01:00
Richard Hughes
ec2a4b586f trivial: Move some code for future use 2020-07-01 20:10:39 +01:00
Richard Hughes
5c22406a18 libfwupd: Do not export non-introspectable symbols without a version
This is needed for future functionality.
2020-07-01 20:10:39 +01:00
Richard Hughes
dc805b41f1 trivial: Remove unused variables 2020-07-01 20:10:39 +01:00
Mario Limonciello
b1cf96abe1 trivial: acpi-dmar: lower missing DMAR table to debug
If the system is missing a DMAR table, users can find out from
`fwupdtool/fwupdmgr security`.  No need to actually warn in the logs
every single time.
2020-07-01 13:42:28 -05:00
Richard Hughes
d09cf101c3 Change all instances of master/slave to initiator/target
This makes perfect sense, because the 'initiator' starts the transaction and
the 'target' is the addressee of the transaction. Even the I²C spec defines the
'master' as 'initiating' the transaction.

This is the same nomenclature now used by the Glasgow project too.
2020-07-01 15:44:30 +01:00
Ryan Lee
7ebcd06ae4 ccgx: remove verify flag in plugin 2020-07-01 14:14:10 +01:00
Mario Limonciello
6a6029f132 uefi: disable plugin if efivar is not supported
Don't even try to coldplug the device.

Fixes: #2237
2020-06-30 13:55:33 -05:00
Mario Limonciello
89a11acdaa trivial: update various symbols to 1.4.5
See https://github.com/fwupd/fwupd/pull/2235 for details
2020-06-30 11:52:26 -05:00
Richard Hughes
85226fd9d1 Remove potentially problematic language
Red Hat wants to drive an initiative in correcting problematic and potentially
divisive language in open source projects. These naming conventions and
descriptive phrases are hurtful and offensive to many of our colleagues across
the open source universe.

See https://www.redhat.com/en/blog/making-open-source-more-inclusive-eradicating-problematic-language
2020-06-30 17:31:17 +01:00
Mario Limonciello
4b69830e1c trivial: minor optimization for no timestamp case 2020-06-30 10:46:49 -05:00
Mario Limonciello
eaf7f0b529 trivial: convert log warnings to ASCII
Fixes: #2234
2020-06-30 10:46:49 -05:00
Richard Hughes
d9f3bec6d0 trivial: Fix GtkDoc issue with FuFmapFirmware 2020-06-29 15:49:14 +01:00
Richard Hughes
df89cd566e Allow firmware to require specific features from front-end clients
At the moment we just blindly assume the capabilities of the front-end client
when installing firmware. We can somewhat work around by requiring a new enough
fwupd daemon version, but the client software may be older or just incomplete.

This would allow, for instance, the firmware to specify that it requries the
client to be able to show a detach image. This would not be set by a command
line tool using FwupdClient, but would be set by a GUI client that is capable
of downloading a URL and showing a PNG image.

Clients that do not register features are assumed to be dumb.
2020-06-27 15:43:57 +01:00
Richard Hughes
4fd4b982ac Support LVFS::UpdateImage in GUI clients
The idea here is that we can show the user both a string and an optional
line-art image when the update has completed. The line art is often more well
understood for non-English speakers.
2020-06-26 12:29:54 +01:00