Skip to content

Commit 2e200f9

Browse files
authored
Merge pull request #153 from tlaurion/nix_buildstack_corrections
General build instructions: update documentation since Nix buildstack is now used
2 parents f29e41a + 9aaa6f5 commit 2e200f9

File tree

1 file changed

+6
-35
lines changed
  • Installing-and-Configuring/Building-Heads

1 file changed

+6
-35
lines changed

Installing-and-Configuring/Building-Heads/general.md

Lines changed: 6 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -18,42 +18,14 @@ grand_parent: Installing and configuring
1818
</details>
1919
<!-- markdownlint-enable MD033 -->
2020

21-
2221
Building Heads
2322
===
2423

25-
Heads is supposed to be a [reproducible build](https://reproducible-builds.org/)
26-
since [v0.1.0](https://github.com/osresearch/heads/releases/tag/v0.1.0) since it
27-
achieved this goal. Unfortunately, things broke since release 0.2.1, since some
28-
host tools and paths are now bleeding into the final ROM. An alternative build
29-
system is being proposed [here](https://github.com/osresearch/linux-builder),
30-
with it's own issues. More research and development needs to be done to bring
31-
Heads to be reproducible again, with some [additional thinking on reproducibility](https://github.com/osresearch/linux-builder/issues/1).
32-
Reproducible builds mean that you are supposed to get the same bit by bit output
33-
for the same commit. When this idea is confronted to time and inclusion of
34-
upstream code which also change and do not necessarily follow guidelines for
35-
reproducibility, things are more complicated then it seems. You can try to build
36-
0.2.1 for yourself today to see that it simply doesn't build anymore to get an
37-
idea of some of the problems of such concept if things care not carefully thought
38-
forward to be future proof, and get into [reproducible build milestone](https://github.com/osresearch/heads/milestone/1)
39-
to see current issues that need to be addressed. If you have redroducible build
40-
kung fu, please help.
41-
42-
The downside of the reproducibility goal is that the initial build can take a
43-
very long time as it downloads and builds all of the its dependencies. One
44-
issue right now is that it builds not just one, but *two* cross compilers and
45-
as a result takes about 45 minutes. Luckily subsequent builds only take about
46-
30 seconds to produce a full coreboot and Linux ROM image, but that first ones
47-
a doozy...
48-
49-
Heads builds will eventiually be fully reproducible again on any Linux-ish system
50-
([OSX build is not supported](https://github.com/osresearch/heads/issues/96)).
51-
If you don't get the same hashes as reported on the release page, please
52-
search/file an issue with the [reproducible build milestone](https://github.com/osresearch/heads/milestone/1).
53-
54-
With a vanilla Debian 11/12 or Ubuntu 20.04/23.04 install, such as a digitalocean
55-
droplet, you need to first install some support tools. This takes a
56-
short while, so get a cup of coffee and [install host build requirements packages as specified by apt calls here](https://github.com/osresearch/heads/blob/master/.circleci/config.yml)
24+
With the new Nix build system, building Heads has become more streamlined.
25+
26+
Please refer to the [Building Heads](https://github.com/linuxboot/heads/blob/master/README.md#building-heads) section in the [Heads README](https://github.com/linuxboot/heads/blob/master/README.md) for updated instructions on how to build Heads using the Nix build system's produced docker image reproducibly.
27+
28+
For more information, you can also check out the [pull request #1661](https://github.com/linuxboot/heads/pull/1661) which provides additional details and updates to the build process.
5729

5830
Clone the tree:
5931

@@ -76,7 +48,6 @@ However, this also means that the first time you build Heads it must first build
7648

7749
Useful targets, stored under the `boards` directory of the git tree.
7850

79-
8051
Generic
8152
---
8253

@@ -88,7 +59,7 @@ Generally, everything that is needed to flash the SPI flash of a board is a
8859
Make Heads for another board (`XXX` should be the name of your board in ./boards and YY the number of CPUs you want to build with):
8960

9061
```Makefile
91-
make BOARD=XXX CPUS=YY
62+
docker run -e DISPLAY=$DISPLAY --network host --rm -ti -v $(pwd):$(pwd) -w $(pwd) tlaurion/heads-dev-env:latest -- make BOARD=XXX CPUS=YY
9263
```
9364

9465
The resulting rom file for a x86 board will be either `./build/x86/XXX/XXX.rom` or

0 commit comments

Comments
 (0)