From 10c256d6fa72ce425cd7ec353e4c35af56ee6b37 Mon Sep 17 00:00:00 2001 From: Tim Crawford Date: Fri, 14 Jan 2022 09:24:24 -0700 Subject: [PATCH] readme: Rewrite info for building Replace the headers with setences. Provide a brief description on the different methods to flash and link to `flashing.md` for more details. Signed-off-by: Tim Crawford --- README.md | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 286ebe6..db217b0 100644 --- a/README.md +++ b/README.md @@ -43,24 +43,34 @@ You may not share these without explicit permission from System76. For a list of important changes please see the [changelog](./CHANGELOG.md). -## Dependencies +## Building + +Dependencies can be installed with the provided script. -### Install toolchain ``` ./scripts/deps.sh ``` -### Load Rust environment (or optionally reboot) +If rustup was installed for the first time, it will be required to source the +environment file it installed to use the correct Rust toolchain. + ``` source ~/.cargo/env ``` -### Build firmware, replace qemu with your model (look in the models directory for examples) +A script is provided to build the firmware. The available targets for building +are the model folders in `models/`. For example, to build for QEMU: + ``` ./scripts/build.sh qemu ``` -### Emulate firmware, only available after building the qemu model -``` -./scripts/qemu.sh -``` +Once built, the firmware must be flashed to use. Several scripts are available +to flash the new firmware, depending on how it is going to be written. + +- `scripts/qemu.sh`: Run the firmware in QEMU (specific to the QEMU model) +- `scripts/flash.sh`: Flash using the internal flasher +- `scripts/ch341a-flash.sh`: Flash using a CH341A programmer +- `scripts/spipi-flash.sh`: Flash using a Raspberry Pi + +See [Flashing firmware](./docs/flashing.md) for more details.