1# Lenovo Sandy Bridge series 2 3## Flashing coreboot 4```{eval-rst} 5+---------------------+--------------------+ 6| Type | Value | 7+=====================+====================+ 8| Socketed flash | no | 9+---------------------+--------------------+ 10| Size | 8 MiB | 11+---------------------+--------------------+ 12| In circuit flashing | Yes | 13+---------------------+--------------------+ 14| Package | SOIC-8 | 15+---------------------+--------------------+ 16| Write protection | No | 17+---------------------+--------------------+ 18| Dual BIOS feature | No | 19+---------------------+--------------------+ 20| Internal flashing | Yes | 21+---------------------+--------------------+ 22``` 23 24## Installation instructions 25 26Flashing coreboot for the first time needs to be done using an external 27programmer, because vendor firmware prevents rewriting the BIOS region. 28 29* Update the EC firmware, as there's no support for EC updates in coreboot. 30* Do **NOT** accidentally swap pins or power on the board while a SPI flasher 31 is connected. It will destroy your device. 32* It's recommended to only flash the BIOS region. In that case you don't 33 need to extract blobs from vendor firmware. 34 If you want to flash the whole chip, you need blobs when building 35 coreboot. 36* The shipped *Flash layout* allocates 3MiB to the BIOS region, which is the space 37 usable by coreboot. 38* ROM chip size should be set to 8MiB. 39 40Please also have a look at the [flashing tutorial] 41 42## Flash layout 43There's one 8MiB flash which contains IFD, GBE, ME and BIOS regions. 44On Lenovo's UEFI the EC firmware update is placed at the start of the BIOS 45region. The update is then written into the EC once. 46 47![][fl] 48 49[fl]: flashlayout_Sandy_Bridge.svg 50 51## Reducing Intel Management Engine firmware size 52 53It is possible to reduce the Intel ME firmware size to free additional 54space for the `bios` region. This is usually referred to as *cleaning the ME* or 55*stripping the ME*. 56After reducing the Intel ME firmware size you must modify the original IFD 57and then write a full ROM using an [external programmer]. 58Have a look at [me_cleaner] for more information. 59 60Tests on Lenovo X220 showed no issues with a stripped ME firmware. 61 62**Modified flash layout:** 63 64![][fl2] 65 66[fl2]: flashlayout_Sandy_Bridge_stripped_me.svg 67 68The overall size of the `gbe`, `me,` `ifd` region is less than 128KiB, leaving 69the remaining space for the `bios` partition. 70 71 72[me_cleaner]: ../../northbridge/intel/sandybridge/me_cleaner.md 73[external programmer]: ../../tutorial/flashing_firmware/index.md 74[flashing tutorial]: ../../tutorial/flashing_firmware/index.md 75