t400_external.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <style type="text/css">
  7. @import url('../css/main.css');
  8. </style>
  9. <title>ThinkPad T400: flashing tutorial (BeagleBone Black)</title>
  10. </head>
  11. <body>
  12. <div class="section">
  13. <h1 id="pagetop">Flashing the T400 with a BeagleBone Black</h1>
  14. <p>Initial flashing instructions for T400.</p>
  15. <p>
  16. This guide is for those who want libreboot on their ThinkPad T400
  17. while they still have the original Lenovo BIOS present. This guide
  18. can also be followed (adapted) if you brick your T400, to know how
  19. to recover.
  20. </p>
  21. <p><a href="index.html">Back to main index</a></p>
  22. </div>
  23. <div class="section">
  24. <h2 id="serial_port">Serial port</h2>
  25. <p>
  26. EHCI debug might not be needed. It has been reported that the docking station
  27. for this laptop has a serial port, so it might be possible to use that instead.
  28. </p>
  29. </div>
  30. <div class="section" id="cpu_compatibility">
  31. <h1>A note about CPUs</h1>
  32. <p>
  33. <a href="http://www.thinkwiki.org/wiki/Category:T400">ThinkWiki</a> has a list of CPUs
  34. for this system. The Core 2 Duo P8400, P8600 and P8700 are believed to work in libreboot.
  35. The T9600 was confirmed to work, so the T9500/T9550 probably also work.
  36. </p>
  37. <h2>Quad-core CPUs</h2>
  38. <p>
  39. Although blocked by lenovobios (as was reported), it is reported that there are quad-core CPUs
  40. for GM45. This laptop has socketed CPUs, so it might be possible to use them
  41. (they are untested in coreboot; support may have to be added).
  42. Core 2 Quad Q9000, Q9100 or QX9300.
  43. </p>
  44. <p>
  45. Look at this link:<br/>
  46. <a href="https://en.wikipedia.org/wiki/List_of_Intel_Core_2_microprocessors#Quad-Core_Notebook_processors">https://en.wikipedia.org/wiki/List_of_Intel_Core_2_microprocessors#Quad-Core_Notebook_processors</a>
  47. </p>
  48. </div>
  49. <div class="section" id="switchable_graphics">
  50. <h1>A note about GPUs</h1>
  51. <p>
  52. Some models have an Intel GPU, while others have both an ATI and an Intel GPU; this
  53. is referred to as &quot;switchable graphics&quot;. In the <i>BIOS setup</i> programme
  54. for lenovobios, you can specify that the system will use one or the other (but not both).
  55. </p>
  56. <p>
  57. Libreboot is known to work on systems with only the Intel GPU, using native graphics initialization.
  58. On systems with switchable graphics, the Intel GPU is used and the ATI GPU is disabled, so
  59. native graphics initialization works all the same.
  60. </p>
  61. <h1>CPU paste required</h1>
  62. <p>
  63. See <a href="#paste">#paste</a>.
  64. </p>
  65. </div>
  66. <div class="section">
  67. <h1 id="flashchips">Flash chips</h1>
  68. <p>
  69. The T400 will use an 8MiB or 64Mb SOIC-16 chip (rare models
  70. will use a 4MiB or 32Mb SOIC-8 chip).
  71. </p>
  72. <p>
  73. To easily identify which size chip is present, before fully disassemblying:<br>
  74. # <b>dmidecode | grep ROM\ Size</b><br>
  75. or (on some distributions):<br/>
  76. $ <b>sudo dmidecode | grep ROM\ Size</b><br/>
  77. Example output:
  78. </p>
  79. <pre>
  80. # ROM Size: 8192 kB
  81. </pre>
  82. <p>
  83. <a href="#pagetop">Back to top of page.</a>
  84. </p>
  85. </div>
  86. <div class="section photos">
  87. <h1 id="macaddress">MAC address</h1>
  88. <p>
  89. On the T400, the MAC address for the onboard
  90. gigabit ethernet chipset is stored inside the flash chip,
  91. along with other configuration data.
  92. </p>
  93. <p>
  94. Keep a note of the MAC address before disassembly; this is
  95. very important, because you will need to insert this into
  96. the libreboot ROM image before flashing it.
  97. It will be written in one of these locations:
  98. </p>
  99. <p>
  100. <img src="images/t400/macaddress0.jpg" alt="" />
  101. <img src="images/t400/macaddress1.jpg" alt="" />
  102. <img src="images/x200/disassembly/0001.jpg" alt="" />
  103. </p>
  104. </div>
  105. <div class="section photos">
  106. <h1>Initial BBB configuration</h1>
  107. <p>
  108. Refer to <a href="bbb_setup.html">bbb_setup.html</a> for how to
  109. configure the BBB for flashing.
  110. </p>
  111. <p>
  112. The following shows how to connect clip to the BBB (on the P9 header), for SOIC-16 (clip: Pomona 5252):
  113. </p>
  114. <pre>
  115. POMONA 5252 (correlate with the BBB guide)
  116. === ethernet jack and VGA port ====
  117. NC - - 21
  118. 1 - - 17
  119. NC - - NC
  120. NC - - NC
  121. NC - - NC
  122. NC - - NC
  123. 18 - - 3.3V (PSU)
  124. 22 - - NC - this is pin 1 on the flash chip
  125. === SATA port ===
  126. <i>This is how you will connect. Numbers refer to pin numbers on the BBB, on the plugs near the DC jack.</i><br/>
  127. <img src="images/t400/0065.jpg" alt="" />
  128. </pre>
  129. <p>
  130. The following shows how to connect clip to the BBB (on the P9 header), for SOIC-8 (clip: Pomona 5250):
  131. </p>
  132. <pre>
  133. POMONA 5250 (correlate with the BBB guide)
  134. === RAM slots ====
  135. 18 - - 1
  136. 22 - - NC
  137. NC - - 21
  138. 3.3V (PSU) - - 17 - this is pin 1 on the flash chip
  139. === slot where the AC jack is connected ===<br/>
  140. <i>This is how you will connect. Numbers refer to pin numbers on the BBB, on the plugs near the DC jack.</i><br/>
  141. <img src="images/t400/soic-8.jpg" alt="" />
  142. </pre>
  143. <h2>
  144. The procedure
  145. </h2>
  146. <p>
  147. Remove <i>all</i> screws, placing them in the order that you removed them:<br/>
  148. <img src="images/t400/0001.jpg" alt="" />
  149. <img src="images/t400/0002.jpg" alt="" />
  150. </p>
  151. <p>
  152. Remove those three screws then remove the rear bezel:<br/>
  153. <img src="images/t400/0003.jpg" alt="" />
  154. <img src="images/t400/0004.jpg" alt="" />
  155. <img src="images/t400/0005.jpg" alt="" />
  156. <img src="images/t400/0006.jpg" alt="" />
  157. </p>
  158. <p>
  159. Remove the speakers:<br/>
  160. <img src="images/t400/0007.jpg" alt="" />
  161. <img src="images/t400/0008.jpg" alt="" />
  162. <img src="images/t400/0009.jpg" alt="" />
  163. <img src="images/t400/0010.jpg" alt="" />
  164. <img src="images/t400/0011.jpg" alt="" />
  165. </p>
  166. <p>
  167. Remove the wifi:<br/>
  168. <img src="images/t400/0012.jpg" alt="" />
  169. <img src="images/t400/0013.jpg" alt="" />
  170. </p>
  171. <p>
  172. Remove this cable:<br/>
  173. <img src="images/t400/0014.jpg" alt="" />
  174. <img src="images/t400/0015.jpg" alt="" />
  175. <img src="images/t400/0016.jpg" alt="" />
  176. <img src="images/t400/0017.jpg" alt="" />
  177. <img src="images/t400/0018.jpg" alt="" />
  178. </p>
  179. <p>
  180. Unroute those antenna wires:<br/>
  181. <img src="images/t400/0019.jpg" alt="" />
  182. <img src="images/t400/0020.jpg" alt="" />
  183. <img src="images/t400/0021.jpg" alt="" />
  184. <img src="images/t400/0022.jpg" alt="" />
  185. <img src="images/t400/0023.jpg" alt="" />
  186. </p>
  187. <p>
  188. Remove the LCD assembly:<br/>
  189. <img src="images/t400/0024.jpg" alt="" />
  190. <img src="images/t400/0025.jpg" alt="" />
  191. <img src="images/t400/0026.jpg" alt="" />
  192. <img src="images/t400/0027.jpg" alt="" />
  193. <img src="images/t400/0028.jpg" alt="" />
  194. <img src="images/t400/0029.jpg" alt="" />
  195. <img src="images/t400/0030.jpg" alt="" />
  196. <img src="images/t400/0031.jpg" alt="" />
  197. </p>
  198. <p>
  199. Disconnect the NVRAM battery:<br/>
  200. <img src="images/t400/0033.jpg" alt="" />
  201. </p>
  202. <p>
  203. Disconnect the fan:<br/>
  204. <img src="images/t400/0034.jpg" alt="" />
  205. </p>
  206. <p>
  207. Unscrew these:<br/>
  208. <img src="images/t400/0035.jpg" alt="" />
  209. <img src="images/t400/0036.jpg" alt="" />
  210. <img src="images/t400/0037.jpg" alt="" />
  211. <img src="images/t400/0038.jpg" alt="" />
  212. </p>
  213. <p>
  214. Unscrew the heatsink, then lift it off:<br/>
  215. <img src="images/t400/0039.jpg" alt="" />
  216. <img src="images/t400/0040.jpg" alt="" />
  217. </p>
  218. <p>
  219. Disconnect the power jack:<br/>
  220. <img src="images/t400/0041.jpg" alt="" />
  221. <img src="images/t400/0042.jpg" alt="" />
  222. </p>
  223. <p>
  224. Loosen this:<br/>
  225. <img src="images/t400/0043.jpg" alt="" />
  226. </p>
  227. <p>
  228. Remove this:<br/>
  229. <img src="images/t400/0044.jpg" alt="" />
  230. <img src="images/t400/0045.jpg" alt="" />
  231. <img src="images/t400/0046.jpg" alt="" />
  232. <img src="images/t400/0047.jpg" alt="" />
  233. <img src="images/t400/0048.jpg" alt="" />
  234. </p>
  235. <p>
  236. Unscrew these:<br/>
  237. <img src="images/t400/0049.jpg" alt="" />
  238. <img src="images/t400/0050.jpg" alt="" />
  239. </p>
  240. <p>
  241. Remove this:<br/>
  242. <img src="images/t400/0051.jpg" alt="" />
  243. <img src="images/t400/0052.jpg" alt="" />
  244. </p>
  245. <p>
  246. Unscrew this:<br/>
  247. <img src="images/t400/0053.jpg" alt="" />
  248. </p>
  249. <p>
  250. Remove the motherboard (the cage is still attached) from
  251. the right hand side, then lift it out:<br/>
  252. <img src="images/t400/0054.jpg" alt="" />
  253. <img src="images/t400/0055.jpg" alt="" />
  254. <img src="images/t400/0056.jpg" alt="" />
  255. </p>
  256. <p>
  257. Remove these screws, placing the screws in the same layout
  258. and marking each screw hole (so that you know what ones
  259. to put the screws back into later):
  260. <img src="images/t400/0057.jpg" alt="" />
  261. <img src="images/t400/0058.jpg" alt="" />
  262. <img src="images/t400/0059.jpg" alt="" />
  263. <img src="images/t400/0060.jpg" alt="" />
  264. <img src="images/t400/0061.jpg" alt="" />
  265. <img src="images/t400/0062.jpg" alt="" />
  266. </p>
  267. <p>
  268. Separate the motherboard:<br/>
  269. <img src="images/t400/0063.jpg" alt="" />
  270. <img src="images/t400/0064.jpg" alt="" />
  271. </p>
  272. <p>
  273. Connect your programmer, then connect GND and 3.3V<br/>
  274. <img src="images/t400/0065.jpg" alt="" />
  275. <img src="images/t400/0066.jpg" alt="" />
  276. <img src="images/t400/0067.jpg" alt="" />
  277. <img src="images/t400/0069.jpg" alt="" />
  278. <img src="images/t400/0070.jpg" alt="" />
  279. <img src="images/t400/0071.jpg" alt="" />
  280. </p>
  281. <p>
  282. A dedicated 3.3V PSU was used to create this guide, but
  283. at ATX PSU is also fine:<br/>
  284. <img src="images/t400/0072.jpg" alt="" />
  285. </p>
  286. <p>
  287. Of course, make sure to turn on your PSU:<br/>
  288. <img src="images/x200/disassembly/0013.jpg" alt="" />
  289. </p>
  290. <p>
  291. Now, you should be ready to install libreboot.
  292. </p>
  293. <p>
  294. Flashrom binaries for ARM (tested on a BBB) are distributed in libreboot_util. Alternatively,
  295. libreboot also distributes flashrom source code which can be built.
  296. </p>
  297. <p>
  298. Log in as root on your BBB, using the instructions in <a href="bbb_setup.html#bbb_access">bbb_setup.html#bbb_access</a>.
  299. </p>
  300. <p>
  301. Test that flashrom works:<br/>
  302. # <b>./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512</b><br/>
  303. In this case, the output was:
  304. </p>
  305. <pre>
  306. flashrom v0.9.7-r1854 on Linux 3.8.13-bone47 (armv7l)
  307. flashrom is free software, get the source code at http://www.flashrom.org
  308. Calibrating delay loop... OK.
  309. Found Macronix flash chip &quot;MX25L6405(D)&quot; (8192 kB, SPI) on linux_spi.
  310. Found Macronix flash chip &quot;MX25L6406E/MX25L6436E&quot; (8192 kB, SPI) on linux_spi.
  311. Found Macronix flash chip &quot;MX25L6445E/MX25L6473E&quot; (8192 kB, SPI) on linux_spi.
  312. Multiple flash chip definitions match the detected chip(s): &quot;MX25L6405(D)&quot;, &quot;MX25L6406E/MX25L6436E&quot;, &quot;MX25L6445E/MX25L6473E&quot;
  313. Please specify which chip definition to use with the -c &lt;chipname&gt; option.
  314. </pre>
  315. <p>
  316. How to backup factory.rom (change the -c option as neeed, for your flash chip):<br/>
  317. # <b>./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory.rom</b><br/>
  318. # <b>./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory1.rom</b><br/>
  319. # <b>./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory2.rom</b><br/>
  320. Note: the <b>-c</b> option is not required in libreboot's patched flashrom, because
  321. the redundant flash chip definitions in <i>flashchips.c</i> have been removed.<br/>
  322. Now compare the 3 images:<br/>
  323. # <b>sha512sum factory*.rom</b><br/>
  324. If the hashes match, then just copy one of them (the factory.rom) to a safe place (on a drive connected to another machine, not
  325. the BBB). This is useful for reverse engineering work, if there is a desirable behaviour in the original firmware
  326. that could be replicated in coreboot and libreboot.
  327. </p>
  328. <p>
  329. Follow the instructions at <a href="../hcl/gm45_remove_me.html#ich9gen">../hcl/gm45_remove_me.html#ich9gen</a>
  330. to change the MAC address inside the libreboot ROM image, before flashing it.
  331. Although there is a default MAC address inside the ROM image, this is not what you want. <b>Make sure
  332. to always change the MAC address to one that is correct for your system.</b>
  333. </p>
  334. <p>
  335. Now flash it:<br/>
  336. # <b>./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -w path/to/libreboot/rom/image.rom -V</b>
  337. </p>
  338. <p>
  339. <img src="images/x200/disassembly/0015.jpg" alt="" />
  340. </p>
  341. <p>
  342. You might see errors, but if it says <b>Verifying flash... VERIFIED</b> at the end, then it's flashed and should boot.
  343. If you see errors, try again (and again, and again); the message <b>Chip content is identical to the requested image</b>
  344. is also an indication of a successful installation.
  345. </p>
  346. <p>
  347. Example output from running the command (see above):
  348. </p>
  349. <pre>
  350. flashrom v0.9.7-r1854 on Linux 3.8.13-bone47 (armv7l)
  351. flashrom is free software, get the source code at http://www.flashrom.org
  352. Calibrating delay loop... OK.
  353. Found Macronix flash chip &quot;MX25L6405(D)&quot; (8192 kB, SPI) on linux_spi.
  354. Reading old flash chip contents... done.
  355. Erasing and writing flash chip... FAILED at 0x00001000! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x0000ffff: 0xd716
  356. ERASE FAILED!
  357. Reading current flash chip contents... done. Looking for another erase function.
  358. Erase/write done.
  359. Verifying flash... VERIFIED.
  360. </pre>
  361. <p>
  362. <a href="#pagetop">Back to top of page.</a>
  363. </p>
  364. </div>
  365. <div class="section photos" id="paste">
  366. <h1>Thermal paste (IMPORTANT)</h1>
  367. <p>
  368. Because part of this procedure involved removing the heatsink, you will need to apply new paste.
  369. Arctic Silver 5 is ok. You will also need isopropyl alcohol and an anti-static cloth to clean with.
  370. </p>
  371. <p>
  372. When re-installing the heatsink, you must first clean off all old paste with the alcohol/cloth.
  373. Then apply new paste. AS5 is also much better than the default paste used on these machines.
  374. </p>
  375. <p>
  376. <img src="images/t400/paste.jpg" alt="" />
  377. </p>
  378. <p>
  379. NOTE: the photo above is for illustration purposes only, and does not show how to properly apply the thermal paste.
  380. Other guides online detail the proper application procedure.
  381. </p>
  382. </div>
  383. <div class="section">
  384. <h1 id="wifi">Wifi</h1>
  385. <p>
  386. The T400 typically comes with an Intel wifi chipset, which does not
  387. work without proprietary software. For a list of wifi chipsets that
  388. work without proprietary software, see
  389. <a href="../hcl/index.html#recommended_wifi">../hcl/index.html#recommended_wifi</a>.
  390. </p>
  391. <p>
  392. Some T400 laptops might come with an Atheros chipset, but this is 802.11g only.
  393. </p>
  394. <p>
  395. It is recommended that you install a new wifi chipset. This can only
  396. be done after installing libreboot, because the original firmware has
  397. a whitelist of approved chips, and it will refuse to boot if you
  398. use an 'unauthorized' wifi card.
  399. </p>
  400. <p>
  401. The following photos show an Atheros AR5B95 being installed, to
  402. replace the Intel chip that this T400 came with:<br/>
  403. <img src="images/t400/0012.jpg" alt="" />
  404. <img src="images/t400/ar5b95.jpg" alt="" />
  405. </p>
  406. </div>
  407. <div class="section">
  408. <h1 id="wwan">WWAN</h1>
  409. <p>
  410. If you have a WWAN/3G card and/or sim card reader, remove them permanently.
  411. The WWAN-3G card has DMA, and proprietary firmware inside; the technology is
  412. identical to what is used in mobile phones, so it can also track your movements.
  413. </p>
  414. <p>
  415. Not to be confused with wifi (wifi is fine).
  416. </p>
  417. </div>
  418. <div class="section photos">
  419. <h1 id="memory">Memory</h1>
  420. <p>
  421. You need DDR3 SODIMM PC3-8500 RAM installed, in matching pairs
  422. (speed/size). Non-matching pairs won't work. You can also install a
  423. single module (meaning, one of the slots will be empty) in slot 0.
  424. </p>
  425. <p>
  426. Make sure that the RAM you buy is the 2Rx8 density.
  427. </p>
  428. <p>
  429. The following photo shows 8GiB (2x4GiB) of RAM installed:<br/>
  430. <img src="images/t400/memory.jpg" alt="" />
  431. </p>
  432. </div>
  433. <div class="section photos">
  434. <h2>
  435. Boot it!
  436. </h2>
  437. <p>
  438. You should see something like this:
  439. </p>
  440. <p>
  441. <img src="images/t400/boot0.jpg" alt="" />
  442. <img src="images/t400/boot1.jpg" alt="" />
  443. </p>
  444. <p>
  445. Now <a href="../gnulinux/index.html">install GNU/Linux</a>.
  446. </p>
  447. </div>
  448. <div class="section">
  449. <p>
  450. Copyright &copy; 2015 Francis Rowe &lt;info@gluglug.org.uk&gt;<br/>
  451. Copyright &copy; 2015 Chris Ryder &lt;cdkr00@gmail.com&gt;<br/>
  452. This document is released under the Creative Commons Attribution-ShareAlike 4.0 International Public License and all future versions.
  453. A copy of the license can be found at <a href="../cc-by-sa-4.txt">../cc-by-sa-4.txt</a>.
  454. </p>
  455. <p>
  456. This document is distributed in the hope that it will be useful,
  457. but WITHOUT ANY WARRANTY; without even the implied warranty of
  458. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See <a href="../cc-by-sa-4.txt">../cc-by-sa-4.txt</a> for more information.
  459. </p>
  460. </div>
  461. </body>
  462. </html>