Building coreboot on a Windows computer

A coreboot based bios is most often built from the linux environment. Because many bios developers are more familiar with Windows than linux, it is useful to know how to build a coreboot bios on a Windows system. Here are the steps:

An msys+mingw that is customized for building coreboot and SeaBIOS can be downloaded here. Decompress the archive into any directory. Note: Avoid the use of spaces in the project path and directory name! In the top level is an msys directory. This is the complete coreboot-ready msys+mingw. The go.bat file starts the coreboot build environment.

Here are step-by-step instructions for building a coreboot bios on a windows machine:

  1. Decompress the build environment into any directory. Note: Avoid the use of spaces in the project path and directory name! Use 7-zip for decompression.
  2. Using Windows explorer, navigate to the coreboot directory. Click on go.bat to start the build environment. It will look something like this:

  1. At the $ prompt, type make. After a few seconds, the build should complete:

The final bios image is in file coreboot\build\coreboot.rom:

d:\tmp>dir D:\tmp\coreboot-winbuild-5741-001\coreboot\build\coreboot.rom
Volume in drive D is raptor
Volume Serial Number is 54CB-32EF

Directory of D:\tmp\coreboot-winbuild-5741-001\coreboot\build

08/25/10 10:17 PM 524,288 coreboot.rom
1 File(s) 524,288 bytes
0 Dir(s) 156,713,394,176 bytes free

To test the bios, download and install AMD's simnow. This example uses version simnow-win64-4.6.2pub.exe. (note, simnow requires a 64-bit operation system). Add an environment variable named simnow that points to the directory where simnow is installed:

 

From Windows explorer, launch coreboot\simnow\simnow.bat. This will open 3 windows:

Optionally, setup a boot cd-rom, floppy, or hard disk image:

Now, start the simulation by clicking the 'Run Simulation' button.

Putty will capture serial debug messages:

After a few seconds, video will appear:

At this point, the simulation waits a couple of minutes for a keyboard response (needs debugging). Press a key while the mouse cursor is in the simnow window to avoid the delay. Next, the seabios payload executes:

If the optional disk image was supplied, it will boot:

Looking good...

Oops, some ACPI debugging is needed here...

 

Known problems with simnow execution:

  1. For both AMD Tilapia and Cheetah, there is a crash caused by an AP core clearing fixed MTRRs and losing cache as ram stack. The work-around used in the sample project is to remove AP cores from the simnow model.
  2. For AMD Tilapia, execution loops endlessly while scanning PCI busses. No work-around found yet.
  3. For AMD Tilapia, a rom image bigger than 512KB will not work. The reason is that the documented default value of SB700 device 14h, function 3, offset 6Ch does not match actual hardware. Simnow matches the documented value, while coreboot relies on the undocumented default.
  4. For AMD Cheetah, there are keyboard problems.

 

Known problems with windows building:

  1. Libncurses is not available, which prevents make menuconfig from building. Work-around: use make oldconfig instead.