[[!toc levels=3]]
+## Coreboot for T400 without blobs
+ #!/bin/bash -e
+ #Building Coreboot without blobs for T400
+ #Assumed 8MB rom (can use ./flashrom -p internal to see this on the proprietary T400)
+ #If not 8MB just change size in menuconfig and take other .bin from ich9gen, no problem
+
+
+ # See also https://www.coreboot.org/Build_HOWTO#debian
+ apt update && apt upgrade -y
+ apt-get install git build-essential gnat flex bison libncurses5-dev wget zlib1g-dev -y
+
+ # CLONE
+ git clone https://review.coreboot.org/coreboot
+ cd coreboot
+ git submodule update --init --checkout
+
+ #You can copy our config and use it if you wish
+ #cp coreboot_config_t400_8mb coreboot/.config
+
+ # CONFIGURE
+ # In this menu config set wanted settings (see our config, or the guide for T400 by zerocat http://www.zerocat.org/projects/coreboot-machines/doc/generated-documentation/html/md_doc_build-coreboot-t400.html)
+ # Our final conf is in ~/coreboot_config_t400_8mb
+ # NOTE: we add descriptor for gbit ethernet later (NO need for "add Intel descriptor.bin file")
+ make menuconfig #or make nconfig
+
+ # BUILD toolchain
+ make crossgcc-x64 CPUS=2
+ #or make crossgcc CPUS=2 #for all architectures
+
+ # BUILD rom
+ make
+ cp build/coreboot.rom ~/t400_8mb_coreboot_notReady.rom
+
+
+ # DESCRIPTOR
+ # We add the gbit ethernet descriptor with the tool provided by libreboot
+ git clone https://notabug.org/libreboot/libreboot
+ cd libreboot
+ ./oldbuild module ich9deblob
+ cd resources/utilities/ich9deblob/
+
+ #NOTE: SET YOUROWN MAC HERE! Should be unique, just take the one which is under the T400
+ ./ich9gen --mac-address 00:24:7E:AA:AA:AA
+
+ cp ~/t400_8mb_coreboot_notReady.rom ~/t400_8mb_coreboot_flashable.rom
+ dd if=ich9fdgbe_8m.bin of=t400_8mb_coreboot_flashable.rom bs=12k count=1 conv=notrunc
+
+ exit
+
+ # ROM IS READY!
+ # NEXT STEPS ARE DONE ON EXTERNAL DEVICE (we used BeagleBoneBlack)
+ # See libreboot for external flash, just disassemble laptops (can take a few hours) -> https://libreboot.org/docs/install/t400_external.html
+ # Flash with for example BBB: https://libreboot.org/docs/install/bbb_setup.html
+ ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory1.rom
+ ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=1024 -r factory2.rom
+ ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=1024 -r factory3.rom
+ ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=256 -r factory4.rom
+ ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=2048 -r factory5.rom
+ sha256sum factory*.rom #a majority should match, or at least 2 should have the same hash
+
+ ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -w ~/t400_8mb_coreboot_flashable.rom
+ #Should say "Verified". If you're paranoid you could read it again and check hash.
+
+
+
##GRUB
###Boot manually
For some setups the default GRUB script does not work. Either try updating the grub.cfg (next section) or boot manually (below).
## LASTLY FLASH TO CHIP (here internally)
#sudo ./flashrom/flashrom -p internal -w x200.rom
-
###X200
####Flashing Internally
To internally flash your ROM use the kernel parameter "iomem=relaxed". Thus, if you boot manually you would enter e g "linux=vmlinuz.. iomem=relaxed".