r/coreboot • • 2h ago

ThinkPad T400 - Coreboot 26.09 + GRUB2 2.14, custom graphical theme, SeaBIOS and multiple firmware fixes

Thumbnail gallery
6 Upvotes

I've been working on a custom Coreboot firmware build for my Lenovo ThinkPad T400 Quad Core Edition, and I wanted to share some technical details about the process.

The laptop is running an Intel Core 2 Quad Q9100 (4C/4T), installed using a CPU pin modification and GTLREF mod, with 8 GB RAM and Debian 13 Trixie.

But the firmware side of this project turned out to be just as interesting as the hardware modifications.

Firmware setup:

  • Coreboot 26.09
  • GRUB2 2.14 as the primary payload
  • SeaBIOS 1.17 as a secondary payload
  • Coreinfo, NVRAMCUI, Memtest86+ and Tint
  • Custom graphical GRUB2 theme at 1280x800
  • Direct Debian boot from the GRUB2 payload

GRUB2 compilation challenges

Building GRUB2 2.14 wasn't entirely straightforward.

First, I encountered several libgcrypt compilation errors caused by conflicting size_t and grub_size_t declarations.

After resolving those issues, I ran into a linker problem:

kernel.img is miscompiled: its start address is 0x9054 instead of 0x9000

The solution involved changing the linker configuration to use -Wl,-Ttext instead of -Wl,--image-base.

After rebuilding, the GRUB2 payload was finally generated correctly.

Additional firmware fixes

I also worked through issues with Coreinfo and NVRAMCUI, eventually getting both working with the correct CMOS configuration and default values.

Another interesting problem involved incorrect colors in Memtest86+. This turned out to be related to a framebuffer color conversion issue in Coreboot's Linux trampoline code, which I fixed by correcting the bit rotation instruction.

Custom graphical boot environment

One of my main goals was to create a fully graphical boot menu stored directly in firmware.

The GRUB2 theme includes a custom background, fonts and menu layout, matching the classic ThinkPad design.

Everything fits into the 2 MiB BIOS region, including the graphical assets and additional payloads.

The original non-BIOS firmware regions were preserved.

The result is a fully functional Coreboot-powered T400 that boots directly into Debian through a graphical GRUB2 interface, while keeping SeaBIOS and several diagnostic tools available.

It's been a great learning experience, especially debugging the firmware and understanding how Coreboot, GRUB2, CBFS and the different payloads work together.

I'm sharing a few pictures of the finished boot interface and the laptop itself.