1 stable release
1.0.57 | Dec 26, 2023 |
---|
#820 in Unix APIs
75 stars & 18 watchers
16KB
380 lines
system76-firmware
The system76-firmware package has a CLI tool for installing firmware updates. Also included is the system76-firmware-daemon package, which has a systemd service that exposes a DBUS API for handling firmware updates.
Dependencies
- cargo
- dbus
- rustc
- systemd
Make Targets
The following make targets are supported:
make all
- compile all binariesmake clean
- remove compiled binariesmake install
- install binaries and configuration filesmake uninstall
- uninstall binaries and configuration filemake vendor
- prepare source for offline compilationmake distclean
- remove prepared source and compiled binaries
Installation
make
sudo make install
Packaging
In order to package this, you need cargo-vendor
:
cargo install cargo-vendor
You can then run the following to create an offline-capable package:
make vendor
Now you can compile and install the package.
To clean out the vendor source, you can run this command:
make distclean
API
The system76-firmware-daemon will download the latest firmware package, if it has changed, and will provide a DBUS interface for a user to query the current firmware status, query the update information, and schedule an update.
The DBUS API is as follows:
Bios() -> (String model, String version)
Query the BIOS model and version.EmbeddedController(Boolean primary) -> (String project, String version)
Query the embedded controller for project and version. Optionally, a second embedded controller can be queried.ManagementEngine() -> (Boolean enabled, String version)
Query the ME status and version.Download() -> (String digest, String changelog)
Download the latest changelog informationSchedule(String digest) -> ()
Prepare the latest firmware update for installationUnschedule() -> ()
Cancel installation of the latest firmware update
Dependencies
~7.5MB
~164K SLoC