The Ur Project

Documenting the craft of stacking things so they remain stacked. For a very long time.

Buildroot-8.4 was blessed

This weekend marked the ceremonial blessing of Buildroot-8.4. It's the 8th "bootstrap" cycle since we started (the 7.x cycle was the last one). We do these regularly, probably every 2-4 weeks depending on upstream changes.

Upgrading LLVM and Rust is a major driver of this process. This one brings LLVM 23.1.6 and Rust 1.100.0.

Why do we bootstrap?

The Ur Project is a distribution build system with an emphasis on compliance, verifiable trust, and starting your own OS, if you want to.

But it's one thing to say that these are important goals of the project. It's another thing to turn that into something that people can actually use in that way. So we have to prove that we're doing things in certain ways that make it possible.

Our compliance focus stems from the fact that the Open Source ecosystem is, in many ways, an enormous wild west show. And it likely will always remain that way to a certain degree. But we can take precautions and do all the necessary checks to make sure that the software we include is properly licensed, and that we know where it comes from.

Our verifiable trust strategy heavily leans on reproducible builds: It's the solid evidence that lets anyone prove that what we built is exactly what we said it was. We don't just sign the binary content and tell you "trust us" - instead we give you the tools to verify it. And we post weekly in our status about how we're achieving 100% (and when we don't, what went wrong and how we fixed it).

But the focus on "you can start your own OS" needs a little bit more work.

Starting anew

Without an OS to start your own OS, you're back to Linux From Scratch. (A marvellous thing, BTW, if you try it once.) But this method is tedious and not necessary. There are, well, hundreds of projects that will help you bootstrap an OS from another OS.

The Ur Project maintains a bootstrap repo. For everyone. Use it any way you want. It's called Buildroot-X.Y. The first blessed one was 1.5. It was about 120 recipes large. We've shrunk it down a little. It's now

  1. Those 94 recipes and the packages that come out of it

are all you will ever need to start your own independent OS that forks from Sandcastle. You can deploy dispatcher and federate the Buildroot-8.4 repo, and start building out your own OS. It'd take at most 10 minutes to set it up.

We build each Buildroot 4-5 times for a reason

You may have noticed that Buildroot-8.4 has two numbers in the name. The first number is the epoch. Buildroot-1 was the first one. Buildroot-8 was the 8th time we rolled it. Each time the content changed. Sometimes the content changed a lot. Some of the epochs are almost identical.

The second number is the round. We build every Buildroot against itself until it no longer changes. And then once more, to verify. So when we start Buildroot-8.1, and then build Buildroot-8.2, we compare 8.1 against 8.2 and see if they are identical. If not, we do another round, until we have 3 rounds that are identical.

Why 3 rounds, and not 2? Well, in Buildroot-2.x, we ran into a feature that flipped on/off/on/off as we rebuilt rounds. By chance I noticed it. It was a Python feature that flipped on/off as it attempted to find an external provider, and would disable the internal feature. The next round it found the feature from the previous round in the floor, and flipped it the other way. And so forth. So from there on we compare 3 rounds, and not 2.

Blessed is the last round in the series of 3 equals

Once we reach 3 rounds that are identical, we bless the last one. That means we throw away the key that signed its packages, so nothing can ever be added or changed. And we publish the repo, plus the pkg-repo-buildroot-8-4 recipe and package. From that moment on, this new Buildroot becomes the floor for Sandcastle-Base.

What that means is that packages in the Base repo, like gcc, that also need gcc to compile gcc, can pull the gcc from the floor repository to build itself. Without this mechanism, gcc would always have to build against itself, and rely on its own copy being sane and not broken. And I'll tell you, that is iffy at best. It's incredibly easy to break a self-maintaining floor if you continuously change it in small but steady ways.

So as of today, Sandcastle-Base no longer floors on Buildroot-7.4 and instead floors on Buildroot-8.4, lifting the floor up and solidifying the new LLVM and Rust compilers as the new base for all packages building from today on.

Rust and LLVM are updated, too

Yes. And that has consequences. We build Rust software as individual rustlib static archives. And the end programs use those individual rustlib archives instead of cargo downloading everything on the fly. We can't let cargo do that, because a build system that downloads as it is building can't prove provenance, which compliance depends on.

So we have the choice of downloading vendored fat tarballs with all dependencies (and hoping there's no outdated and insecure stuff with CVEs in there) or we can go the rustlib route. We opted for the rustlib route. Effectively, about 1,500 of the packages in our repos are nothing more than static rlib packages that Rust programs are linked against.

When a Rust version changes, you can't use the rustlibs from the older version to link into a new Rust program, because the two objects were made by different Rust compilers. And I hope you can see where this is going, but yes, this means that when the Rust version changes, we rebuild the entire Rust world. That's 1,595 recipes, rustlibs and programs combined. About half of everything we build.

This sounds insane in many ways. But it's a whole lot better than the alternative. There's no way that I would want to pry apart every fat vendored Rust tarball and maintain the collective provenance over all of them. Plus each copy of each individual vendored crate may have CVEs. And each individual vendored crate must be identified before the CVE scanner can even work, so there is no escape here - vendoring really is the worse option.

Those 1,595 Rust recipes build in about 3 hours. That's possible because individual crates compile in under 15 seconds on average. It may seem like a crazy amount, but in those 3 hours we even build everything twice to make sure the builds are reproducible. And we set up a full sysroot for every crate. And make the actual data payloads and repo metadata. All in under 15 seconds per recipe for most of them. A reproduced build. Provenance known. Licenses recorded. Scanned for CVEs. Tests run. No exceptions.

What does this look like for the operator?

Well, mostly, it's just a few steps in the dispatch-web UI and dispatch-tui. And then letting it run.

Each round then becomes a pattern:

After a few rounds, we use the compare-rounds tool in dispatch-tui, and, if successful, bless it and throw the signing key away (seal it). Then move the floor of Base to the final Buildroot-8.4 that was blessed.

dispatch-tui's compare tab for generation 8: the chain Buildroot-8.2 to 8.3 to 8.4, each round built on the one before. Both boundaries, 8.2 to 8.3 and 8.3 to 8.4, match all 2018 targets with zero content differences, nothing absent and nothing added, so the triple-double holds: Buildroot-8.2 equals 8.3 equals 8.4 over 2018 targets

The compare function in dispatch-tui matches the manifests (which includes the content sha256sums)

Then all that is left is to create the recipe for the Buildroot so that reproducible builds on the client can rely on the provenance records in the Buildroot-8.4 repo on the server. Without it they cannot verify any builds in the Base repo.

How is Buildroot-8.4 itself verifiable and/or reproducible?

That's the cool part. The methodology we used is to rebuild Buildroot-8.x over and over and over until it no longer changes. From that follows that anyone can take Buildroot-8.4 and throw it in a clean dispatcher deployment, and build itself against itself, and the result is identical. Rounds 8.3 and 8.4 are exactly that: Buildroot-8.x rebuilt against itself, with identical results. All you need is a copy of registry-base and check out the branch bootstrap-8-branch and a copy of the Buildroot-8.4 repo.

On top of the fact that you can do another "round", you can also grab the provenance records from the Buildroot-8.4 repo (using pkg provenance) and do individual rebuilds. The only caveat here is that those records correctly point at Buildroot-8.3, but, since they are binary-identical to Buildroot-8.4, they should be substitutable and you should get the same answers. Now, I haven't actually done so myself, but, it would be a reasonably simple thing to do in practice.

Too much work

Maybe. I agree it's not a light process. But it's mostly automated away and the stepladder for each round has handholds in the web UI and tui, and I feel it's worth it. Ultimately, I can start anew at any point in time because I have a solid bootstrap ready to go. We can use this to build an LTS release, for instance. And others can start their own custom OS with it - and I did exactly this for the future work I'm doing for VergeIO. The tooling makes it logical and mechanical, the key work is pushbutton. The builds roll themselves if the recipes are well maintained.

Here's the history of when I rolled Buildroots, so you get an idea of how often this needs to happen, or makes sense:

2026 Jun 29 20:32  Buildroot-1.5
2026 Jul 10 22:32  Buildroot-2.5
2026 Jul 22 21:27  Buildroot-3.4
2026 Aug  6 15:41  Buildroot-4.5
2026 Sep  7 11:05  Buildroot-5.5
2026 Sep 21 17:32  Buildroot-6.4
2026 Oct 26 14:27  Buildroot-7.4
2026 Nov 22 17:15  Buildroot-8.4

The project has been public since mid-October, and we've only rolled 2 Buildroots since. All the others were before that. On average there's been about 3 weeks in between them. The last two of them are about a month apart. This isn't a heavy burden - it might need a little careful planning, and I tend to run them over a weekend.

--sofar (aka Auke)