BACKPORT: Revert "thunderbolt: Reload the retimer version after the payload is deployed"

(This reverts commit 2dc288e4ca81b0032461a886bcee929f5b1a3758
 https://github.com/fwupd/fwupd.git)

BUG=b:402584597;b:421845812,b:439520097
TEST=emerge; cros deploy; ectool usbpdmuxinfo; verified TBT=0;
TEST=ls /sys/bus/thunderbolt/devices shows no 1-0:3.1

Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/fwupd/+/6350077
Tested-by: Rishabh Agrawal <[email protected]>
Reviewed-by: Benson Leung <[email protected]>
Commit-Queue: Benson Leung <[email protected]>
Tested-by: Benson Leung <[email protected]>
Auto-Submit: Rishabh Agrawal <[email protected]>

Change-Id: Ic9097ae7e9444a9ae6125fdeb0fc892a59c6e2fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/fwupd/+/6615864
Commit-Queue: Benson Leung <[email protected]>
Reviewed-by: Benson Leung <[email protected]>
Reviewed-by: Benson Leung <[email protected]>
Auto-Submit: Benson Leung <[email protected]>
Tested-by: Benson Leung <[email protected]>
Tested-by: Benson Leung <[email protected]>
Reviewed-by: Kyle Williams <[email protected]>
(cherry picked from commit c6020b9dc708f95bdf8202cda2fb007715520577)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/fwupd/+/6860769
Commit-Queue: Rishabh Agrawal <[email protected]>
Reviewed-by: Rishabh Agrawal <[email protected]>
Tested-by: Rishabh Agrawal <[email protected]>
Reviewed-by: Harsha Muttavarapu <[email protected]>
Tested-by: Harsha Muttavarapu <[email protected]>
8 files changed
tree: b83288ad0e9a820cac82a16d5177785b452ffb08
  1. .github/
  2. .tx/
  3. contrib/
  4. data/
  5. docs/
  6. generate-build/
  7. libfwupd/
  8. libfwupdplugin/
  9. plugins/
  10. po/
  11. policy/
  12. src/
  13. subprojects/
  14. .clang-format
  15. .clang-tidy
  16. .clangd
  17. .codecov.yml
  18. .editorconfig
  19. .git-blame-ignore-revs
  20. .gitconfig
  21. .gitignore
  22. .gitmodules
  23. .markdownlint.json
  24. .pre-commit-config.yaml
  25. CODE_OF_CONDUCT.md
  26. COMMITMENT
  27. CONTRIBUTING.md
  28. COPYING
  29. DIR_METADATA
  30. MAINTAINERS
  31. meson.build
  32. meson_options.txt
  33. OWNERS
  34. PRESUBMIT.cfg
  35. README.chromium
  36. README.md
  37. RELEASE
  38. SECURITY.md
README.md

fwupd

Build Status CodeQL Coverity Scan Build Status Fuzzing Status Codecov Coverage Status OpenSSF Scorecard OpenSSF Best Practices

This project aims to make updating firmware on Linux automatic, safe, and reliable.

Additional information is available at the website.

Where to get help?

Compiling

See Building and Debugging for how to build the fwupd development environment.

NOTE: In most cases, end users should not compile fwupd from scratch; it‘s a complicated project with dozens of dependencies (and as many configuration options) and there’s just too many things that can go wrong.

Users should just have fwupd installed and updated by their distro, managed and tested by the package maintainer. The distribution will have also done some testing with how fwupd interacts with other software on your system, for instance using GNOME Software.

Installing fwupd using Snap or using Flatpak might be useful to update a specific device on the command line that needs a bleeding edge fwupd version, but it should not be considered as a replacement to the distro-provided system version.

Using Tartan

Tartan is a LLVM static analysis plugin built to analyze GLib code. It can be installed and then run using:

mkdir build-tartan
CC=clang-17 meson ../
SCANBUILD=../contrib/tartan.sh ninja scan-build

LVFS

This project is configured by default to download firmware from the Linux Vendor Firmware Service (LVFS).

This service is available to all OEMs and firmware creators who would like to make their firmware available to Linux users.

You can find more information about the technical details of creating a firmware capsule in the hardware vendors section of the fwupd website.

Basic usage flow (command line)

If you have a device with firmware supported by fwupd, this is how you can check for updates and apply them using fwupd's command line tools.

# fwupdmgr get-devices

This will display all devices detected by fwupd.

# fwupdmgr refresh

This will download the latest metadata from LVFS.

# fwupdmgr get-updates

If updates are available for any devices on the system, they'll be displayed.

# fwupdmgr update

This will download and apply all updates for your system.

  • Updates that can be applied live will be done immediately.
  • Updates that run at bootup will be staged for the next reboot.

You can find more information about the update workflow in the end users section of the fwupd website.

Passim

If the Passim project is also installed and enabled, fwupd will re-publish the downloaded metadata file to be served on 0.0.0.0:27500 by default.

Other clients on the same network can make use of this via mDNS/LLMNR to reduce network bandwidth to configured remotes.

To disable this functionality either set P2pPolicy=none in /etc/fwupd/daemon.conf, uninstall the passim package or use systemctl mask passim.service on the terminal.

Reporting status

fwupd will encourage users to report both successful and failed updates back to LVFS. This is an optional feature, but encouraged as it provides valuable feedback to LVFS administrators and OEM developers regarding firmware update process efficacy.

The privacy policy regarding this data can be viewed on the lvfs readthedocs site.

To report the status of an update, run:

# fwupdmgr report-history

Only updates that were distributed from the LVFS will be reported to the LVFS.

Enterprise use

The flow of updates can be controlled in the enterprise using the “approved updates” feature. This allows the domain administrator to filter the possible updates from a central server (e.g. the LVFS, or a mirror) to only firmware that have been tested specifically in your organization.

The list of approved updates can be enabled by adding ApprovalRequired=true to the remote configuration file, e.g. lvfs.conf. Once enabled, the list of approved updates can be set in fwupd.conf using a comma-delimited list.

For example:

ApprovedFirmware=foo,bar

Where foo,bar refers to the container checksums that would correspond to two updates in the metadata file.

Additionally, the list of approved firmware can be supplemented using fwupdmgr set-approved-firmware baz or using the D-Bus interface.

Other frontends

fwupdmgr is a command line client, but various additional graphical frontends are enumerated in the fwupdmgr man page.

SAST Tools

  • Coverity - static analyzer for Java, C/C++, C#, JavaScript, Ruby, and Python code.
  • PVS-Studio - static analyzer for C, C++, C#, and Java code.

Packaging notes

If you are working or maintaining a package of fwupd downstream, please consider the following notes.

  • The Meson build option systemd_unit_user should be used carefully, and the specified user (or resulting group) should be inaccessible to unprivileged system users. Otherwise, this may pose a risk for privilege escalation. The default value for this setting (DynamicUser=true) is secure and should be used in the general case.