diff --git a/README.md b/README.md index cceeaa6..ee9fdee 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ ### Simple declarative and reproducible coreboot images -This repository contains a minimal interface to build coreboot images using Nix. -Coreboot is already near 100% binary reproducible and can be configured via -[Kconfig](https://doc.coreboot.org/getting_started/kconfig.html); however +This repository contains a minimal interface to build coreboot images using +Nix. Coreboot is already near 100% binary reproducible and can be configured +via [Kconfig](https://doc.coreboot.org/getting_started/kconfig.html); however the process is somewhat involved: it requires maintaining a local checkout of the coreboot source, several config files and shell scripts. Nixboot automates this process and allows to control it declaratively from a single file. @@ -24,9 +24,9 @@ Other payloads (including secondaries) can be very easily added. ### 1. Fetching sources -Go to the board [status page](1) and find the latest tested revision for your -mainboard, or pick one yourself. Next, to fetch all the source archives needed -to build coreboot, run: +Go to the board [status page](https://coreboot.org/status/board-status.html) +and find the latest tested revision for your mainboard, or pick one yourself. +Next, to fetch all the source archives needed to build coreboot, run: scripts/gen-sources.sh REV > sources.nix @@ -38,7 +38,7 @@ build its own compiler toolchain from source. ### 2. Configuring Once the `sources.nix` has been generated, to configure coreboot and the -payload, write a `board.nix`, like: +payload, write a `board.nix`, like this one: ``` { pkgs ? import { } }: @@ -75,9 +75,10 @@ pkgs.callPackage ./coreboot.nix { } ``` -The configuration options can be found on the coreboot [website](2). The names -are case-insensitive and options with the same prefix (for example `PCIEXP_`) -can be conveniently grouped into a set. +The configuration options can be found on the coreboot +[website](https://coreboot.org/status/kconfig-options.html). The names are +case-insensitive and options with the same prefix (for example `PCIEXP_`) can +be conveniently grouped into a set. Valid option values includes: @@ -87,8 +88,8 @@ Valid option values includes: - paths (will be copied into the Nix store) - derivations (will be converted to store paths) -[1]: https://coreboot.org/status/board-status.html -[2]: https://coreboot.org/status/kconfig-options.html + + ### 3. Building @@ -97,18 +98,16 @@ Simply run nix build -f board.nix coreboot -This will build the toolchain, -the full configuration and use them to build coreboot itself. The output -consist of: +This will build the toolchain, the full configuration and use them to build +coreboot itself. The output consist of: result/ ├── config ├── coreboot.rom └── defconfig -where `config` contains the full coreboot configuration, `defconfig` only -the non-default ones and `coreboot.rom` is the final image, ready to be -flashed. +where `config` contains the full coreboot configuration, `defconfig` only the +non-default ones and `coreboot.rom` is the final image, ready to be flashed. It's also possible to only build the toolchain using the `toolchain` attribute and see the defconfig before building with `defConfig`.