Thinkpad X230 Coreboot and me_cleaner flashing

home

step 0 - prep work and tools

step 1 - remove flash ROMs

  1. disassemble the laptop
  2. desolder SPI1 and SPI2

step 2 - dump flash ROMs

  1. dump SPI1
  2. dump SPI2
  3. join the dumps

step 3 - nuke the ME firmware from the flash dump

  1. check me_cleaner chipset status
  2. check ME dump
    1. build ifdtool
      1. cd coreboot/util/ifdtool
      2. make
    2. ifdtool --dump bios-12m.img
  3. run me_cleaner
    1. cd me_cleaner
    2. check ME again
      • python me_cleaner.py -c bios-12m.img
    3. enable ME kill switch and clean ME
      • python me_cleaner.py -S -O bios-12m-cleaned.img bios-12m.img
  4. unlock flash descriptor and ME region
    1. ifdtool --unlock bios-12m-cleaned.img
    2. mv bios-12m-cleaned.img.new bios-12m-cleaned-unlocked.img

step 4 - build flash dump with Coreboot

  1. extract blobs
  2. configure Coreboot
    1. cd coreboot
    2. make distclean
    3. make menuconfig
      • General setup --->
        • [*] Use CMOS for configuration values
      • Mainboard --->
        • Mainboard vendor --->
          • (X) Lenovo
        • Mainboard model --->
          • (X) ThinkPad X230
        • ROM chip size --->
          • (X) 12288 KB (12 MB)
            • this should be selected by default
      • Chipset --->
        • [*] Add Intel descriptor.bin file
          • flashregion_0_flashdescriptor.bin
        • [*] Add Intel ME/TXE firmware
          • flashregion_2_intel_me.bin
      • Devices --->
        • Graphics initialization --->
          • (X) Use native graphics init
            • should be selected by default?
            • allows us to not need VGA option ROM (only for Intel mobile CPUs with LVDS screens)
      • <Save>
  3. build Coreboot
    1. make crossgcc-i386 CPUS=4
    2. make crossgcc-x64 CPUS=4
    3. make
    4. cp build/coreboot.rom ../coreboot.img

step 5 - split flash dump

  1. dd bs=1M count=8 if=coreboot.img of=coreboot-8m.img
  2. dd bs=1M skip=8 count=4 if=coreboot.img of=coreboot-4m.img
  3. use ls -l to make sure coreboot-8m.img and coreboot-4m.img are the same size as bios-8m.img and bios-4m.img, respectively

step 6 - write the ROMs

  1. write SPI1
  2. write SPI2

step 7 - re-solder flash ROMs, re-assemble laptop, enjoy