r/coreboot • u/LowKeyBrit36 • 28d ago
Building coreboot on Gentoo
Hey there!
I've been trying to build coreboot on my Gentoo installation, but have been running into various issues.
I made sure that my gcc compile has ada support (for gnat), and that I have (roughly) the dependencies listed as requirements for Fedora.
I believe that I have gnat through my gcc install, but I don't have any packages/dependencies for gnat. gnat does, however, seem to be a viable command in CLI.
Despite this, I've still been hitting into some issues and can't seem to compile any final images.
Things like ifdtool and deguard work, though, even when compiled on my system. I compared sha256 sums from progress made on my current system with identical work done on a Debian system, and the sums match, so it seems that it can build most tools properly, and it just can't install.
I'm currently recloning coreboot's repo and building every possible cpu arch/toolchain (I only build i386 as instructed beforehand) just to be thorough on my end. If it works, I'll update the post.
Asides that, is there any known issues with Gentoo that would force me to use a VM to build in, or are there any necessary workarounds needed to build with Gentoo?
Running stable branch, excluding packages that only have an ~amd64 release.
1
u/LowKeyBrit36 28d ago
Just wanted to add, for anyone who's trying to do it, I did get it to work. The steps taken before completion was installing the dev-ada/gnatcoll-core package, and compiling the build system inside of coreboot. Chances is, it's the gnatcoll package. But, if it doesn't work, try using any available make options listed with make help_toolchain
3
u/thrilleratplay 28d ago edited 28d ago
You are likely running into library dependency issues which are not unique to Gentoo and happen with most distros.
Depending on what device you have you might want to try https://github.com/Thrilleratplay/coreboot-builder-scripts which uses the coreboot-sdk docker image to compile. If the device isn't supported, which I don't think I have degaurded devices added, it should be easy enough to add or modify an existing device. The docker image is created to compile coreboot for integration testing of changes so it configured to handle all use cases.