Flashing x200 within the Laptop(Internal)

You can only (re)flash internally, if your bios is already flashed with Libreboot/Coreboot

Using this tutorial, you'll be able to flash your bios with libreboot internally, so you don't need external hardware or disassemble your laptop at al.

For this tutorial, we'll create libreboot folder and perform all our terminal command from this folder. cd ~/libreboot

What do you need

Install Flashrom

# Debian based OS
sudo apt install flashrom

# Arch based OS
sudo pacman -S flashrom

A. Get rom file

# Download tar file
wget https://www.mirrorservice.org/sites/libreboot.org/release/stable/20160907/rom/grub/
libreboot_r20160907_grub_x200_8mb.tar.xz

# Extract tar file to roms folder
tar -xvf libreboot_r20160907_grub_x200_8mb.tar.xz && mv libreboot_r20160907_grub_x200_8mb roms

# Copy pecompiled rom file
cp ./roms/x200_8mb_ukqwerty_vesafb.rom ./libreboot.rom

# [Optional] remove tar file
rm libreboot_r20160907_grub_x200_8mb.tar.xz

If your chipset is another model, You can look at different files here

To know your chipsize, use the following command flashrom -p internal, it is possible that you need to run this with sudo privileges

B. Use current rom

# Get your own rom using flashrom
sudo flashrom -p internal -r ./libreboot.rom

# If you need to specify the chipset.
sudo flashrom -c MX25L6405 -p internal -r ./libreboot.rom

You can find the chipset using flashrom -p internal

Get flash utils

# Download tar file
wget https://www.mirrorservice.org/sites/libreboot.org/release/stable/20160907/
libreboot_r20160907_util.tar.xz

# Extract tar file to utils folder
tar -xvf libreboot_r20160907_util.tar.xz utils

# Symlink needed files
ln -s ./utils/cbfstool/x86_64/cbfstool ./cbfstool
ln -s ./utils/ich9deblob/x86_64/ich9gen ./ich9gen

# [Optional] remove tar file
rm libreboot_r20160907_util.tar.xz

by creating symlinks, you don't need to cd into that folders anymore(except for ./flash command)

Change your MAC address

This step is neccesary if you are using a new rom, instead of current rom

# Create binary with your mac-address
./ich9bin --macaddress XX:XX:XX:XX:XX:XX

# Write the binary to rom
dd if=ich9fdgbe_8m.bin of=libreboot.rom bs=12k count=1 conv=notrunc

# [Optional] remove generated (unnecesary) files
rm ich9fd* mkgbe.*

Check the mb size with flashrom -p internal

Change Grub config

Use grubtest.cfg instead of grub.cfg, to make sure you test your grub file before flashing the main file

# Extract grub file
./cbfstol libreboot.rom extract -n grubtest.cfg -f grubtest.cfg

# Edit grubtest file with your prefered editor
vim grubtest.cfg
#(save and close the file)

# Remove old file from the rom
./cbfstool libreboot.rom remove -n grubtest.cfg

# Add new file in the rom
./cbfstool libreboot.rom add -n grubtest.cfg -f grubtest.cfg -t raw

Change background image

Changing the background image is the same as updating the grub(test).cfg file

# Remove old file from the rom
./cbfstool libreboot.rom remove background.jpg -n background.jpg

# Add new file in the rom
./cbfstool libreboot.rom add -f background.jpg -n background.jpg -t raw

!IMPORTANT: if you don't see the background after restarting, you can grab a copy of the original background.jpg from the git repository, and past your image on top of it, and use that image instead.

Font

Changing font can break your libreboot, so you need to reflash using external devices. So do it at your own risk.

Setting font in GRUB (for reference)

Flash

# Get your own rom using flashrom
sudo flashrom -p internal -w ./libreboot.rom

# If you need to specify the chipset.
sudo flashrom -c MX25L6405 -p internal -w ./libreboot.rom

Attention: to read the internal rom use -r, to overwrite the internal rom use -w

Check the mb size with flashrom -p internal

Alternatively

# Goto util directory
cd utils

# perform the flashing
sudo ./flash update ../libreboot.rom

# If previous command fails, you can force the flashing by doing
sudo ./flash forceupdate ../libreboot.rom

Result

if you see Verifying flash... VERIFIED at the end, the Flashing has succeeded.