diff --git a/README.md b/README.md index 38ec067a..01bea67c 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,8 @@ Notes: * Booting Qubes requires patching Xen's real mode startup code see `patches/xen-4.6.3.patch` and adding `no-real-mode` to start of the Xen command line. Booting or installing Qubes is a bit hacky and needs to be documented. - +* Building for the Lenovo X220 requires binary blobs to be placed in the blobs/x220/ folder. +See the readme.txt file in that folder Signing with GPG --- diff --git a/blobs/x220/ifd.bin b/blobs/x220/ifd.bin new file mode 100644 index 00000000..b71c701a Binary files /dev/null and b/blobs/x220/ifd.bin differ diff --git a/blobs/x220/layout.txt b/blobs/x220/layout.txt new file mode 100644 index 00000000..bbd90962 --- /dev/null +++ b/blobs/x220/layout.txt @@ -0,0 +1,4 @@ +00000000:00000fff fd +00018000:007fffff bios +00003000:00017fff me +00001000:00002fff gbe diff --git a/blobs/x220/readme.txt b/blobs/x220/readme.txt new file mode 100644 index 00000000..54d0dd59 --- /dev/null +++ b/blobs/x220/readme.txt @@ -0,0 +1,18 @@ +To build for X220 we need to have the following files in this folder: +me.bin - ME binary that has been stripped and truncated with me_cleaner +gbe.bin - Network card blob from the original firmware +ifd.bin - Flash layout file has been provided, layout.txt is also present for changes + +To get the binaries, start with a copy of the original lenovo firmware image. +If you do not have one already, you can read one out from the laptops SPI flash. + +flashrom --programmer internal:laptop=force_I_want_a_brick -r original.bin + +Once you have the image, run ifdtool -x to extract the parts. +Rename flashregion_3_gbe.bin to gbe.bin +Run "me_cleaner -r -t -O me.bin flashregion_2_intel_me.bin" to truncate and neuter +the ME blob. + +You can now compile the image with: + +make CONFIG=config/x220-qubes.conf diff --git a/config/coreboot-x220.config b/config/coreboot-x220.config index 1416ea76..af145af5 100644 --- a/config/coreboot-x220.config +++ b/config/coreboot-x220.config @@ -116,7 +116,7 @@ CONFIG_MAINBOARD_PART_NUMBER="ThinkPad X220" CONFIG_MAINBOARD_VENDOR="LENOVO" CONFIG_MAX_CPUS=8 CONFIG_CACHE_ROM_SIZE_OVERRIDE=0x0 -CONFIG_CBFS_SIZE=0x700000 +CONFIG_CBFS_SIZE=0x7e8000 CONFIG_VGA_BIOS_ID="8086,0126" CONFIG_ONBOARD_VGA_IS_PRIMARY=y # CONFIG_VGA_BIOS is not set @@ -300,8 +300,8 @@ CONFIG_LOCK_SPI_ON_RESUME_RO=y # CONFIG_LOCK_SPI_ON_RESUME_NO_ACCESS is not set CONFIG_SOUTHBRIDGE_INTEL_COMMON=y CONFIG_SOUTHBRIDGE_INTEL_COMMON_GPIO=y -CONFIG_IFD_BIN_PATH="/home/jgrip/firmware/modded/descriptor-trunc.bin" -CONFIG_ME_BIN_PATH="/home/jgrip/firmware/modded/me-trunc.bin" +CONFIG_IFD_BIN_PATH="../../blobs/x220/ifd.bin" +CONFIG_ME_BIN_PATH="../../blobs/x220/me.bin" # CONFIG_LOCK_MANAGEMENT_ENGINE is not set # @@ -321,7 +321,7 @@ CONFIG_HAVE_INTEL_FIRMWARE=y # Intel Firmware # # CONFIG_EM100 is not set -CONFIG_GBE_BIN_PATH="/home/jgrip/firmware/modded/gbe.bin" +CONFIG_GBE_BIN_PATH="../../blobs/x220/gbe.bin" CONFIG_VBOOT_VBNV_OFFSET=0x26 # CONFIG_VBOOT_VBNV_CMOS is not set # CONFIG_VBOOT_VBNV_EC is not set