summaryrefslogtreecommitdiff
path: root/coreboot-x201.mdwn
blob: 31223211c9ed180e14f0818aa33033d61a2691d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
[[!map pages="coreboot-x201/* and ! coreboot-x201/*/*"]]



## n00bie guide for getting coreboot to an x201{i/s/t}

###why would I want this?
- free open source BIOS / EFI implementation
- fast (faster than lenovo BIOS)
- no whitelist restrictions (wifi cards etc.)
- you can boot even with HD-password (for example to change/delete it)
- hotswap harddrive (didn't test, but should work)
- it's cool.

###okay, show me how!
#### preliminary
first you should update your existing BIOS. This is important as you cannot update your ECP version afterwards. Linux users can use the iso files provided by lenovo and do some nice trick described [[here|http://www.thinkwiki.org/wiki/BIOS_update_without_optical_disk]]

It is also advisable to save the output of dmidecode somewhere, as you need specific BIOS versions strings to get thinkpad_acpi to work.

next buy or build a SPI flasher and get a SOIC8 clip for mounting the chip correctly.

#### the ugly part
we have to dump the existing BIOS using [[flashrom|http://www.flashrom.org]] and an external SPI flasher.
here's the pinout:
[[!format io """
===  front (display) ====
     3.3V     N/C        CLK      MOSI
      |        |          |        |
      |        |          |        |
     CS       MISO       N/C      ground
===  back (touchpad) ===
"""]]

[[!img bus_pirate.jpg align="right" size="" alt="buspirate attached"]]
Now it should look similar to this:

You probably have to adjust your contacts quite often for it to work, so don't give up ;)
[[!format c """
flashrom -p <yourprogrammer> -r flash.bin
flashrom -p <yourprogrammer> -r flash2.bin
diff flash.bin flash2.bin
"""]]

If the files differ, check your cables.

#### easy part
- extract descriptor / intel ME
[[!format c """
dd if=flash.bin of=coreboot/3rdparty/mainboard/lenovo/x201/descriptor.bin \
   count=12288 bs=1M iflag=count_bytes
dd if=flash.bin of=coreboot/3rdparty/mainboard/lenovo/x201/me.bin \
   skip=12288 count=5230592 bs=1M iflag=count_bytes,skip_bytes
"""]]
- extract vgabios.bin from BIOS (I used PhoenixTool for this, as the included bios extractor from coreboot didn't work for me) 
hint: SWIM uploaded it somewhere in the internets (google md5hash: )

- [[compile coreboot|http://www.coreboot.org/Build_HOWTO]]