--- title: Thinkpad T440p Coreboot Guide description: The definitive guide on corebooting a Thinkpad T440p author: Timothy Pidashev tags: [t440p, coreboot, thinkpad] date: 2025-01-15 image: "/blog/thinkpad-t440p-coreboot-guide/thumbnail.png" isDraft: true --- import { Commands, Command, CommandSequence } from "@/components/mdx/command"; import Advertisement from '@/content/blog/components/thinkpad-t440p-coreboot-guide/advertisement'; > **Interactive Script Available!** > Want to skip the manual steps in this guide? > I've created an interactive script that can automate the entire process step by step as you follow along. > This script supports Arch, Debian, Fedora, Gentoo, and Nix! Don't pipe anyone's scripts to **sh** blindly, including mine - audit the source. ## Getting Started The Thinkpad T440p is a powerful and versatile laptop that can be further enhanced by installing coreboot, an open-source BIOS replacement. This guide will walk you through the process of corebooting your T440p, including flashing the BIOS chip and installing the necessary software. ## What You'll Need Before getting started corebooting your T440p, make sure you have the following: - **Thinkpad T440p**: This guide is specifically for the T440p model. - **CH341A Programmer**: This is a USB device used to flash the BIOS chip. - **Screwdriver**: A torx screwdriver is needed to open the laptop. ## Installing Dependencies Install the following programs. These will be needed to compile coreboot and flash the BIOS. ## Disassembling the Laptop 1. **Power off your laptop**: Make sure your T440p is completely powered off and unplugged from any power source. 2. **Remove the battery**: Flip the laptop over and remove the battery by sliding the latch to the unlock position and lifting it out. 3. **Unscrew the back panel**: Use a torx screwdriver to remove the screws securing the back panel. ## Locating the EEPROM Chips In order to flash the laptop, you will need to have access to two EEPROM chips located next to the sodimm RAM. ![EEPROM Chips Location](/blog/thinkpad-t440p-coreboot-guide/eeprom_chips_location.png) ## Assembling the SPI Flasher Place the SPI flasher ribbon cable into the correct slot and make sure its the 3.3v variant ![SPI Flasher Assembly](/blog/thinkpad-t440p-coreboot-guide/spi_flasher_assembly.png) After the flasher is ready, connect it to your machine and ensure its ready to use: Flashrom should report that programmer initialization was a success. ## Extracting Original BIOS To begin, first create a clean directory where all work to coreboot the T440p will be done. Next, extract the original rom from both EEPROM chips. This is done by attaching the programmer to the correct chip and running the subsequent commands. It may take longer than expected, and ensuring the bios was properly extracted is important before proceeding further. If the diff checks pass, combine both files into one ROM. ## Building Required Tools Now that the original bios has been successfuly extracted, it is time to clone the coreboot repository and build every tool needed to build a new bios image. We will need to build `idftool`, which will be used to export all necessary blobs from our original bios, and `cbfstool`, which will be used to extract __mrc.bin__(a blob from a haswell chromebook peppy image). ## Exporting Firmware Blobs Once the necessary tools have been built, we can export the 3 flash regions from our original bios image. ## Obtaining mrc.bin In order to obtain __mrc.bin__, we need the chromeos peppy image. This can be pulled by running the `crosfirmware.sh` script found in util/chromeos. We can now obtain __mrc.bin__ using cbfstool to extract the blob from the image. ## Configuring Coreboot Configuring coreboot is really where most of your time will be spent. To help out, I've created several handy configs that should suit most use cases, and can be easily tweaked to your liking. Here is a list of whats available: ### 1. GRUB2 (Recommended) GRUB2 is the recommended payload for most users. It boots Linux directly without needing a separate bootloader installation on disk. This configuration includes three secondary payloads: - **memtest86+** - Memory testing utility - **nvramcui** - CMOS/NVRAM settings editor - **coreinfo** - System information viewer If your T440p has the optional GT730M dGPU, the GRUB2 config also includes the necessary VGA option ROM for it. ### 2. SeaBIOS SeaBIOS provides a traditional BIOS interface, making it the most compatible option. Choose this if you need to boot operating systems that expect a legacy BIOS, such as Windows or BSD. ### 3. edk2 (UEFI) edk2 provides a UEFI firmware interface. Choose this if you prefer UEFI boot or need UEFI-specific features. --- If using the interactive script, it will prompt you to choose a payload and apply a preset configuration automatically. You can also choose to open the full configuration menu (`make nconfig`) to customize further. For manual configuration, first copy the extracted blobs into place: Then open the configuration menu: Key settings to configure: - **Mainboard** → Mainboard vendor: **Lenovo** → Mainboard model: **ThinkPad T440p** - **Chipset** → Add Intel descriptor.bin, ME firmware, and GbE configuration (set paths to your blobs) - **Chipset** → Add haswell MRC file (set path to mrc.bin) - **Payload** → Choose your preferred payload (GRUB2, SeaBIOS, or edk2) ## Building and Flashing After configuring coreboot, it is time to build and flash it onto your unsuspecting T440p :D Once the coreboot build has completed, split the built ROM for the 8MB(bottom) chip & 4MB(top) chip. Now flash the new bios onto your thinkpad! Thats it! If done properly, your thinkpad should now boot! ## Reverting to Original If for some reason you feel the need to revert back, or your T440p can't boot, here are the steps needed to flash the original image back. ### Can't Boot ### Can Boot Reboot to apply `iomem=relaxed` And that about wraps it up! If you liked the guide, leave a reaction or comment any changes or fixes I should make below. Your feedback is greatly appreciated!