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 <tcrawford@system76.com>
This commit is contained in:
Tim Crawford
2022-01-14 09:24:24 -07:00
committed by Jeremy Soller
parent 998378efcc
commit 10c256d6fa

View File

@ -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). 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 ./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 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 ./scripts/build.sh qemu
``` ```
### Emulate firmware, only available after building the qemu model 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
``` - `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.