1 unstable release
0.3.8 | Nov 20, 2023 |
---|
#1486 in Hardware support
69KB
2K
SLoC
System76 EC
System76 EC is a GPLv3 licensed embedded controller firmware for System76 laptops.
Documentation
- Supported embedded controllers
- Flashing firmware
- Debugging
- Creating a custom keyboard layout
- Development environment
- Adding a new board
Quickstart
Install dependencies using the provided script.
./scripts/deps.sh
If rustup was installed as part of this, then the correct cargo
will not be
available in the running session. Start a new shell session or source the env
file to update PATH
.
source $HOME/.cargo/env
Then build the firmware for your laptop model.
make BOARD=system76/<model>
See Flashing for how to use the new firmware image.
Releases
The EC firmware itself does not have tagged releases. Any commit of this repo may be used as a part of a System76 Open Firmware release.
In official releases the EC shares the same version as the BIOS firmware. Run the follow command from firmware-open to determine the corresponding EC commit for a release.
git ls-tree <release_hash> ec
Legal
System76 EC is copyright System76 and contributors.
System76 EC firmware is made available under the terms of the GNU General Public License, version 3. See LICENSE for details.
- firmware: GPL-3.0-only
- ecflash: LGPL-2.1-or-later
- ecsim: MIT
- ectool: MIT
Datasheets for the ITE embedded controllers used in System76 laptops cannot be shared outside of company. (However, the IT81202E datasheet is publicly available. While it uses a different core, a significant portion of the register information is the same as IT85878E/IT5570E.)
lib.rs
:
Library for accessing System76 ECs
First, construct an access method, using an object implementing the Access
trait. Next, an Ec
object can be constructed, which exposes the command interface.
There are some differences between targets and features that are listed below:
AccessHid
requires thehidapi
feature. Only functional on USB ECs.AccessLpcDirect
requires theredox_hwio
feature and a nightly compiler. This method is only recommended for use in firmware with LPC ECs, as mutual exclusion is not guaranteed.AccessLpcLinux
requires thestd
feature andlinux
target_os. Recommended for LPC ECs, as this method can utilize mutual exclusion.EcLegacy
,Pmc
, andSuperIo
all require theredox_hwio
feature and a nightly compiler. It is only recommended to use these in firmware, as mutual exclusion is not guaranteed.
Dependencies
~1.8–2.4MB
~41K SLoC