To build a coreboot image that contains a small Linux system in the BIOS (this setup is also know as LAB — Linux as BIOS) we suggest that you have a look at the buildrom utility that downloads and compiles all required components.
Further Information