- Notifications
You must be signed in to change notification settings - Fork23
Rust libraries and tools to interact with the Framework Computer systems
License
FrameworkComputer/framework-system
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Rust libraries and tools to interact with the system.
The tool works on Linux, Windows and the UEFI shell.Most features are supported on every "OS".
You can find lots of examples inEXAMPLES.md.
- NixOS
nix-shell -p framework-tool
- ArchLinux
pacman -S framework-system
- Bazzite
- No need to install - included in the base image
- OpenSUSE
zypper install framework_tool
- Others
- Build from source
- Or downloadlatest binary
- ChromeOS
- Build from source
winget install framework_toolsudo pkg install framework-systemTo check which features are supported on which OS and platform,see theSupport Matrices.
The following operating environments are supported.
- Linux
- Windows
- UEFI
- FreeBSD
Most functionality depends communication with the EC.For Linux and Windows there are dedicated drivers.On UEFI and FreeBSD raw port I/O is used - on Linux this can also be used as a fallback, if the driver is not available or not working.
| Port I/O | Linux | Windows | |
|---|---|---|---|
| Framework 12 | |||
| Intel Core 12th Gen | Yes | 6.12 | Yes |
| Framework 13 | |||
| Intel Core 11th Gen | Yes | 6.11 | Not yet |
| Intel Core 12th Gen | Yes | 6.13 | Not yet |
| Intel Core 13th Gen | Yes | 6.13 | Not yet |
| AMD Ryzen 7040 | Yes | 6.10 | BIOS 3.16+ |
| Intel Core Ultra S1 | Yes | 6.12 | BIOS 3.06+ |
| AMD Ryzen AI 300 | Yes | 6.12 | Yes |
| Framework 16 | |||
| AMD Ryzen 7040 | Yes | 6.10 | BIOS 3.06+ |
| AMD Ryzen AI 300 | Yes | 6.10 | Yes |
| Framework Desktop | |||
| AMD Ryzen AI Max | Yes | 6.15 | Yes |
- Show system information
- ESRT table (UEFI, Linux, FreeBSD only) (
--esrt) - SMBIOS
- ESRT table (UEFI, Linux, FreeBSD only) (
- Get firmware version from binary file
- EC (Legacy and Zephyr based) (
--ec-bin) - CCG5 PD (11th Gen TigerLake) (
--pd-bin) - CCG6 PD (Intel systems, Framework Desktop) (
--pd-bin) - CCG8 PD (AMD Laptops) (
--pd-bin) - H2O BIOS Capsule (
--h2o-capsule)- BIOS Version
- EC Version
- CCG5/CCG6/CCG8 PD Version
- UEFI Capsule (
--capsule)
- EC (Legacy and Zephyr based) (
- Parse metadata from capsule binary
- Determine type (GUID) of capsule binary
- Extract bitmap image from winux capsule to file
- Get firmware version from system (
--versions)- BIOS
- EC
- PD Controller
- ME (Only on Linux)
- Retimer
- Touchpad (Linux, Windows, FreeBSD, not UEFI)
- Touchscreen (Linux, Windows, FreeBSD, not UEFI)
- Get Expansion Card Firmware (Not on UEFI so far)
- HDMI Expansion Card (
--dp-hdmi-info) - DisplayPort Expansion Card (
--dp-hdmi-info) - Audio Expansion Card (
--audio-card-info)
- HDMI Expansion Card (
- Update Expansion Card Firmware (Not on UEFI so far)
- HDMI Expansion Card (
--dp-hdmi-update) - DisplayPort Expansion Card (
--dp-hdmi-update) - Audio Expansion Card
- HDMI Expansion Card (
All of these need EC communication support in order to work.
- Get information about battery/AC (
--power) - Get information about USB-C PD ports (
--pdports) - Get information about CCGX PD Controllers (
--pd-info) - Show status of intrusion switches (
--intrusion) - Show status of privacy switches (
--privacy) - Check recent EC console output (
--console recent)
- Get and set keyboard brightness (
--kblight) - Get and set battery charge limit (
--charge-limit) - Get and set fingerprint LED brightness (
--fp-brightness,--fp-led-level) - Override tablet mode, instead of follow G-Sensor and hall sensor (
--tablet-mode) - Disable/Enable touchscreen (
--touchscreen-enable)
- Framework Laptop 12 (Intel 13th Gen)
- Framework Laptop 13 (Intel 11-13th Gen)
- Framework Laptop 13 (AMD Ryzen 7080)
- Framework Laptop 13 (AMD Ryzen AI 300)
- Framework Laptop 16 (AMD Ryzen 7080)
- Framework Laptop 16 (AMD Ryzen AI 300)
- Framework Desktop (AMD Ryzen AI Max 300)
- Port I/O communication on Linux
- Port I/O communication in UEFI
- Port I/O communication on FreeBSD
- Using
cros_ecdriver in Linux kernel - UsingFramework EC Windows driver based oncoolstar's
- UsingDHowett's Windows CrosEC driver
Rustup is convenient for setting up the right Rust version.Based onrust-toolchain.toml it will install the right toolchain and version for this project.
MSRV (Minimum Supported Rust Version):
- 1.74 for Linux/Windows
- 1.74 for UEFI
System dependencies
# NixOSnix-shell --run fish -p cargo systemd udev hidapi pkg-configdirenv shell# Fedorasudo dnf install systemd-devel hidapi-devel# FreeBSDsudo pkg install hidapi# Running lintercargo clippy# Running autoformatter as a checkcargo fmt --check# Fixing format issuescargo fmt# Building the library and toolcargo build# Building only the librarycargo build -p framework_lib# Building only the toolcargo build -p framework_toolls -l target/debug/framework_tool# Build the UEFI application# Can't be built with cargo! That's why we need to exclude it in the other commands.make -C framework_uefils -l framework_uefi/build/x86_64-unknown-uefi/boot.efi
> cargo install --path framework_tool> which framework_tool/home/zoid/.cargo/bin/framework_toolRun without any arguments to see the help.
Many actions require root. First build with cargo and then run the binary with sudo:
cargo build&& sudo ./target/debug/framework_toolAbout
Rust libraries and tools to interact with the Framework Computer systems
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.