ayaheka / firmware-open

System76 Open Firmware

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

System76 Open Firmware

An open source distribution of firmware utilizing coreboot, EDK2, and System76 firmware applications.

Please note that only the darp6 and galp4 models are officially supported - if you brick your device it will be up to you to restore the current firmware using an external programmer.

If you would like to view schematics for any supported System76 model, please send an email to firmware@system76.com with the subject line Schematics for MODEL, where MODEL is the name of a directory in the models directory, such as darp6.

Dependencies

Install toolchain

./scripts/deps.sh

Load Rust environment (or optionally reboot)

source ~/.cargo/env

Build firmware, replace qemu with your model (look in the models directory for examples)

./scripts/build.sh qemu

Emulate firmware, only available after building the qemu model

./scripts/qemu.sh

Flashing

Flashing firmware manually is not recommended for the normal user!

Internal programmer

Use this method for flashing a system already running System76 Open Firmware.

./scripts/flash.sh <model>

External programmer

Use this method for first-time flashing or flashing a bricked system.

Creating a SPI Pi

SPI Pi is a Raspberry Pi used to flash the SPI ROM. To create a SPI Pi:

  • Get a Raspberry Pi 2 or 3 with Ubuntu 16.04
  • Hook up a SPI clip to the SPI Pi
  • Connect the SPI Pi's SPI clip to the SPI ROM, ensuring pin 1 of the clip aligns with pin 1 on the ROM
  • On the SPI Pi, run the following commands:
sudo apt install flashrom
git clone https://github.com/system76/firmware-open.git firmware

Flashing with a SPI Pi

  1. Turn off the computer
  2. Remove the bottom panel
  3. Attach the clip to the SPI ROM chip
  4. Connect to the Raspberry Pi and wait it for boot
sudo tio -b 115200 /dev/ttyUSB0
  1. From the RPi session, test that the chip is detected.
cd firmware
./scripts/spipi.sh -r backup.rom
  1. From the host, flash the firmware
SPIPI=<user@spipi> ./scripts/spipi-flash.sh <model>

Contents

  • apps - Applications
  • coreboot - coreboot README
  • edk2 - EDK II Project
  • edk2-non-osi - This branch holds modules not compatible with the normal
  • edk2-platforms - This branch holds all platforms actively maintained against the
  • FSP - Intel® Firmware Support Package (Intel® FSP) Binaries
  • libs - Libraries
  • models - Models
  • scripts
  • tools - Tools

About

System76 Open Firmware


Languages

Language:C++ 79.0%Language:Shell 18.5%Language:Rust 2.4%Language:GDB 0.1%