Table of Contents

Information

Resources

Coreboot

Issues

RAM

Incompatible

Compatible

Dependencies

Ubuntu Server

sudo apt-get install -y bison build-essential curl flex git gnat libncurses5-dev m4 zlib1g-dev python-minimal

Download Source

Coreboot

cd ~ && mkdir -p ~/'Projects' && rm -Rf ~/'Projects/coreboot/src' && git clone --branch 'master' --depth '1' --recurse-submodules 'https://review.coreboot.org/coreboot.git' ~/'Projects/coreboot/src' && sync

Libreboot

cd ~ && mkdir -p ~/'Projects' && rm -Rf ~/'Projects/libreboot/src' && git clone --branch 'master' --depth '1' --recurse-submodules 'https://notabug.org/libreboot/libreboot.git' ~/'Projects/libreboot/src' && sync

ich9gen

Notes

Compile

cd ~/'Projects/libreboot/src/resources/utilities/ich9deblob' && make clean && make jobs='16' && sync

Generate

cd ~/'Projects/libreboot/src/resources/utilities/ich9deblob' && ~/'Projects/libreboot/src/resources/utilities/ich9deblob/ich9gen' --macaddress 'x'

Move

mkdir -p ~/'Projects/coreboot/src/3rdparty/blobs/mainboard/lenovo/t400' && mv ~/'Projects/libreboot/src/resources/utilities/ich9deblob/ich9fdgbe_4m.bin' ~/'Projects/coreboot/src/3rdparty/blobs/mainboard/lenovo/t400/descriptor.bin' && ls ~/'Projects/coreboot/src/3rdparty/blobs/mainboard/lenovo/t400/descriptor.bin' && cd ~ && rm -Rf ~/'Projects/libreboot' && sync

Build Toolchain

cd ~/'Projects/coreboot/src' && make 'crossgcc-clean' && make 'crossgcc-i386' CPUS='16'

Settings

cd ~/'Projects/coreboot/src' && make 'distclean' && make 'nconfig' && sync

Query

cd ~/'Projects/coreboot/src' && make 'savedefconfig' && nano ~/'Projects/coreboot/src/defconfig'
CONFIG_LOCALVERSION="Spinesnap"
CONFIG_USE_OPTION_TABLE=y
CONFIG_STATIC_OPTION_TABLE=y
# CONFIG_COMPRESS_RAMSTAGE is not set
# CONFIG_INCLUDE_CONFIG_FILE is not set
# CONFIG_COLLECT_TIMESTAMPS is not set
CONFIG_VENDOR_LENOVO=y
# CONFIG_DRIVERS_UART_8250IO is not set
CONFIG_HAVE_IFD_BIN=y
CONFIG_BOARD_LENOVO_T500=y
CONFIG_PCIEXP_L1_SUB_STATE=y
CONFIG_COREBOOT_ROMSIZE_KB_4096=y
CONFIG_PCIEXP_ASPM=y
CONFIG_PCIEXP_COMMON_CLOCK=y
CONFIG_PCIEXP_CLK_PM=y
# CONFIG_CONSOLE_CBMEM is not set
# CONFIG_ENABLE_VMX is not set
# CONFIG_SET_IA32_FC_LOCK_BIT is not set
CONFIG_CPU_MICROCODE_CBFS_NONE=y
CONFIG_GENERIC_LINEAR_FRAMEBUFFER=y
# CONFIG_DRIVERS_INTEL_WIFI is not set
CONFIG_SECURITY_CLEAR_DRAM_ON_REGULAR_BOOT=y
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_0=y
CONFIG_NO_POST=y
CONFIG_SEABIOS_MASTER=y
CONFIG_SEABIOS_THREAD_OPTIONROMS=y
CONFIG_SEABIOS_DEBUG_LEVEL=0

CMOS Settings

nano ~/'Projects/coreboot/src/src/mainboard/lenovo/t400/cmos.default'
gfx_uma_size=352M

Make

cd ~/'Projects/coreboot/src' && make clean && make && sync

Finalize

mkdir -p ~/'coreboot-bin' && mv ~/'Projects/coreboot/src/build/coreboot.rom' ~/'coreboot-bin/T500-coreboot-'$(date +%Y-%m-%d)'.rom' && sync

Virtual Machine

scp 192.168.122.X:~/coreboot-bin/*.rom ~/Downloads

Flash

sync && sudo flashrom --programmer 'internal:laptop=force_I_want_a_brick' --chip 'MX25L3205D/MX25L3208D' --write ~/'Downloads/T500-coreboot-'*'.rom'
2)
incompatible with Coreboot 2018/12 (unknown day), incompatible with Libreboot 20160907, untested with Lenovo Vendor BIOS 3.26
3)
compatible with Coreboot 2019/01/25, untested with Libreboot, untested with Lenovo Vendor BIOS 3.26
4)
Intel Management Engine
5)
this should look like --macaddress XX:XX:XX:XX:XX:XX
6)
keep 3rdparty/blobs/mainboard/$(MAINBOARDDIR)/descriptor.bin path
7)
Running the Lenovo vendor BIOS through ifdtool with the --unlock flag does not unlock the chip; so any re-flash to the Lenovo vendor BIOS will require an external programmer to flash different firmware