r500_external.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  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 R500: flashing tutorial (BeagleBone Black)</title>
  10. </head>
  11. <body>
  12. <div class="section">
  13. <h1 id="pagetop">Flashing the R500 with a BeagleBone Black</h1>
  14. <p>Initial flashing instructions for R500.</p>
  15. <p>
  16. This guide is for those who want libreboot on their ThinkPad R500
  17. while they still have the original Lenovo BIOS present. This guide
  18. can also be followed (adapted) if you brick your R500, to know how
  19. to recover.
  20. </p>
  21. <p>
  22. Before following this section, please make sure to setup your libreboot ROM properly first.
  23. Although ROM images are provided pre-built in libreboot, there are some modifications that
  24. you need to make to the one you chose before flashing. (instructions referenced later in
  25. this guide)
  26. </p>
  27. <p>
  28. <b>
  29. NOTE: This board is unsupported in libreboot 20150518. To use it in libreboot, for now, you
  30. must build for it from source using the libreboot git repository.
  31. </b>
  32. </p>
  33. <p><a href="index.html">Back to main index</a></p>
  34. </div>
  35. <div class="section">
  36. <h2 id="serial_port">Serial port</h2>
  37. <p>
  38. EHCI debug might not be needed. It has been reported that the docking station
  39. for this laptop has a serial port, so it might be possible to use that instead.
  40. </p>
  41. </div>
  42. <div class="section">
  43. <h1 id="lcd_compatibility">LCD compatibly</h1>
  44. <p>
  45. Not all LCD panels are known to be compatible yet. See <a href="../hcl/gm45_lcd.html">../hcl/gm45_lcd.html</a>.
  46. </p>
  47. </div>
  48. <div class="section" id="cpu_compatibility">
  49. <h1>A note about CPUs</h1>
  50. <p>
  51. <a href="http://www.thinkwiki.org/wiki/Category:R500">ThinkWiki</a> has a list of CPUs
  52. for this system. The Core 2 Duo P8400, P8600 and P8700 are believed to work in libreboot.
  53. The Core 2 Duo T9600 was confirmed to work (on a different laptop, but still GM45), so the T9400 probably also works.
  54. <b>The Core 2 Duo T5870/5670 and Celeron M 575/585 are untested!</b>
  55. </p>
  56. <h2>Quad-core CPUs</h2>
  57. <p>
  58. Although blocked by lenovobios (as was reported), it is reported that there are quad-core CPUs
  59. for GM45. This laptop has socketed CPUs, so it might be possible to use them
  60. (they are untested in coreboot; support may have to be added).
  61. Core 2 Quad Q9000, Q9100 or QX9300.
  62. </p>
  63. <p>
  64. Look at this link:<br/>
  65. <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>
  66. </p>
  67. </div>
  68. <div class="section" id="switchable_graphics">
  69. <h1>A note about GPUs</h1>
  70. <p>
  71. <a href="http://www.thinkwiki.org/wiki/Category:R500">ThinkWiki</a> lists
  72. two possible GPUs: Intel or ATI. Only the Intel GPUs work in libreboot; the ATI
  73. GPUs require a proprietary Video BIOS, and so those are unsupported in libreboot.
  74. </p>
  75. <p>
  76. On other GM45 laptops in libreboot (e.g. T400, T500), so-called <i>switchable graphics</i>
  77. is used, which means that the laptop will have <b>both</b> an ATI and Intel GPU, or it will
  78. only have Intel, depending on which variation you have. On the systems with ATI and Intel,
  79. you can disable the ATI GPU and use only the Intel GPU, which works in libreboot.
  80. </p>
  81. <div class="important">
  82. <p>
  83. <b>
  84. It is unknown whether R500 laptops with an ATI GPU still have an Intel GPU, where you could
  85. disable the ATI GPU and use the Intel GPU. These are budget laptops, so it's highly likely
  86. that Lenovo decided on this model to ship with one GPU or the other, but not both (GPUs cost money).
  87. </b>
  88. </p>
  89. <p>
  90. <b>
  91. It is **HIGHLY** recommended, when ordering an R500 laptop, to **ENSURE** that the
  92. one you're ordering has an Intel GPU.
  93. </b>
  94. </p>
  95. </div>
  96. <h1>CPU paste required</h1>
  97. <p>
  98. See <a href="#paste">#paste</a>.
  99. </p>
  100. </div>
  101. <div class="section">
  102. <h1 id="flashchips">Flash chip size</h1>
  103. <p>
  104. Use this to find out:<br>
  105. # <b>dmidecode | grep ROM\ Size</b><br>
  106. </p>
  107. <p>
  108. It is believed that all R500 laptops have only SOIC-8 (4MiB) chips.
  109. </p>
  110. <p>
  111. <a href="#pagetop">Back to top of page.</a>
  112. </p>
  113. </div>
  114. <div class="section photos">
  115. <h1 id="macaddress">MAC address</h1>
  116. <p>
  117. Unlike other GM45 thinkpads, the R500 has a different onboard gigabit NIC,
  118. where the MAC address is built-in. You do not need to change the MAC address
  119. at all on this laptop; simply flash the provided ROM images, as-is.
  120. </p>
  121. </div>
  122. <div class="section photos">
  123. <h1>Initial BBB configuration</h1>
  124. <p>
  125. Refer to <a href="bbb_setup.html">bbb_setup.html</a> for how to
  126. setup the BBB for flashing.
  127. </p>
  128. <p>
  129. The following shows how to connect clip to the BBB (on the P9 header), for SOIC-8 (clip: Pomona 5250):
  130. </p>
  131. <pre>
  132. POMONA 5250 (correlate with the BBB guide)
  133. === VGA and ethernet socket ===
  134. 18 - - 1
  135. 22 - - NC
  136. NC - - 21
  137. 3.3V (PSU) - - 17 - this is pin 1 on the flash chip
  138. === DVD drive ===
  139. <i>This is how you will connect. Numbers refer to pin numbers on the BBB, on the plugs near the DC jack.</i><br/>
  140. <img src="images/r500/flashchip.jpg" alt="" />
  141. </pre>
  142. <h2 id="disassembly">Disassembly</h2>
  143. <p>
  144. <img src="images/r500/0001.JPG" alt="" />
  145. <img src="images/r500/0002.JPG" alt="" />
  146. <img src="images/r500/0003.JPG" alt="" />
  147. <img src="images/r500/0004.JPG" alt="" />
  148. <img src="images/r500/0005.JPG" alt="" />
  149. <img src="images/r500/0006.JPG" alt="" />
  150. <img src="images/r500/0007.JPG" alt="" />
  151. <img src="images/r500/0008.JPG" alt="" />
  152. <img src="images/r500/0009.JPG" alt="" />
  153. <img src="images/r500/0010.JPG" alt="" />
  154. <img src="images/r500/0011.JPG" alt="" />
  155. <img src="images/r500/0012.JPG" alt="" />
  156. <img src="images/r500/0013.JPG" alt="" />
  157. <img src="images/r500/0014.JPG" alt="" />
  158. <img src="images/r500/0015.JPG" alt="" />
  159. <img src="images/r500/0016.JPG" alt="" />
  160. <img src="images/r500/0017.JPG" alt="" />
  161. <img src="images/r500/0018.JPG" alt="" />
  162. <img src="images/r500/0019.JPG" alt="" />
  163. <img src="images/r500/0020.JPG" alt="" />
  164. <img src="images/r500/0021.JPG" alt="" />
  165. <img src="images/r500/0022.JPG" alt="" />
  166. <img src="images/r500/0023.JPG" alt="" />
  167. <img src="images/r500/0024.JPG" alt="" />
  168. <img src="images/r500/0025.JPG" alt="" />
  169. <img src="images/r500/0026.JPG" alt="" />
  170. <img src="images/r500/0027.JPG" alt="" />
  171. <img src="images/r500/0028.JPG" alt="" />
  172. <img src="images/r500/0029.JPG" alt="" />
  173. <img src="images/r500/0030.JPG" alt="" />
  174. <img src="images/r500/0031.JPG" alt="" />
  175. </p>
  176. <p>
  177. Remove the motherboard from the cage, and the SPI flash
  178. chip will be next to the memory slots:<br/>
  179. <img src="images/r500/0032.JPG" alt="" />
  180. <img src="images/r500/flashchip.jpg" alt="" />
  181. </p>
  182. <p>
  183. The following image is for illustration only, to show how a SOIC-8 clip is connected.
  184. This photo is from a T500, which has a different arrangement to the R500:<br/>
  185. <img src="images/t500/0061.jpg" alt="" />
  186. </p>
  187. <p>
  188. Connect your programmer, then connect GND and 3.3V<br/>
  189. <img src="images/t400/0067.jpg" alt="" />
  190. <img src="images/t400/0069.jpg" alt="" />
  191. <img src="images/t400/0070.jpg" alt="" />
  192. <img src="images/t400/0071.jpg" alt="" />
  193. </p>
  194. <p>
  195. A dedicated 3.3V PSU was used to create this guide, but
  196. at ATX PSU is also fine:<br/>
  197. <img src="images/t400/0072.jpg" alt="" />
  198. </p>
  199. <p>
  200. Of course, make sure to turn on your PSU:<br/>
  201. <img src="images/x200/disassembly/0013.jpg" alt="" />
  202. </p>
  203. <p>
  204. Now, you should be ready to install libreboot.
  205. </p>
  206. <p>
  207. Flashrom binaries for ARM (tested on a BBB) are distributed in libreboot_util. Alternatively,
  208. libreboot also distributes flashrom source code which can be built.
  209. </p>
  210. <p>
  211. Log in as root on your BBB, using the instructions in <a href="bbb_setup.html#bbb_access">bbb_setup.html#bbb_access</a>.
  212. </p>
  213. <p>
  214. Test that flashrom works:<br/>
  215. # <b>./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512</b><br/>
  216. In this case, the output was:
  217. </p>
  218. <pre>
  219. flashrom v0.9.7-r1854 on Linux 3.8.13-bone47 (armv7l)
  220. flashrom is free software, get the source code at http://www.flashrom.org
  221. Calibrating delay loop... OK.
  222. Found Macronix flash chip &quot;MX25L6405(D)&quot; (8192 kB, SPI) on linux_spi.
  223. Found Macronix flash chip &quot;MX25L6406E/MX25L6436E&quot; (8192 kB, SPI) on linux_spi.
  224. Found Macronix flash chip &quot;MX25L6445E/MX25L6473E&quot; (8192 kB, SPI) on linux_spi.
  225. Multiple flash chip definitions match the detected chip(s): &quot;MX25L6405(D)&quot;, &quot;MX25L6406E/MX25L6436E&quot;, &quot;MX25L6445E/MX25L6473E&quot;
  226. Please specify which chip definition to use with the -c &lt;chipname&gt; option.
  227. </pre>
  228. <p>
  229. How to backup factory.rom (change the -c option as neeed, for your flash chip):<br/>
  230. # <b>./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory.rom</b><br/>
  231. # <b>./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory1.rom</b><br/>
  232. # <b>./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory2.rom</b><br/>
  233. Note: the <b>-c</b> option is not required in libreboot's patched flashrom, because
  234. the redundant flash chip definitions in <i>flashchips.c</i> have been removed.<br/>
  235. Now compare the 3 images:<br/>
  236. # <b>sha512sum factory*.rom</b><br/>
  237. If the hashes match, then just copy one of them (the factory.rom) to a safe place (on a drive connected to another system, not
  238. the BBB). This is useful for reverse engineering work, if there is a desirable behaviour in the original firmware
  239. that could be replicated in coreboot and libreboot.
  240. </p>
  241. <p>
  242. Now flash it:<br/>
  243. # <b>./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -w path/to/libreboot/rom/image.rom -V</b>
  244. </p>
  245. <p>
  246. <img src="images/x200/disassembly/0015.jpg" alt="" />
  247. </p>
  248. <p>
  249. You might see errors, but if it says <b>Verifying flash... VERIFIED</b> at the end, then it's flashed and should boot.
  250. If you see errors, try again (and again, and again); the message <b>Chip content is identical to the requested image</b>
  251. is also an indication of a successful installation.
  252. </p>
  253. <p>
  254. Example output from running the command (see above):
  255. </p>
  256. <pre>
  257. flashrom v0.9.7-r1854 on Linux 3.8.13-bone47 (armv7l)
  258. flashrom is free software, get the source code at http://www.flashrom.org
  259. Calibrating delay loop... OK.
  260. Found Macronix flash chip &quot;MX25L6405(D)&quot; (8192 kB, SPI) on linux_spi.
  261. Reading old flash chip contents... done.
  262. Erasing and writing flash chip... FAILED at 0x00001000! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x0000ffff: 0xd716
  263. ERASE FAILED!
  264. Reading current flash chip contents... done. Looking for another erase function.
  265. Erase/write done.
  266. Verifying flash... VERIFIED.
  267. </pre>
  268. <p>
  269. <a href="#pagetop">Back to top of page.</a>
  270. </p>
  271. </div>
  272. <div class="section photos" id="paste">
  273. <h1>Thermal paste (IMPORTANT)</h1>
  274. <p>
  275. Because part of this procedure involved removing the heatsink, you will need to apply new paste.
  276. Arctic Silver 5 is ok. You will also need isopropyl alcohol and an anti-static cloth to clean with.
  277. </p>
  278. <p>
  279. When re-installing the heatsink, you must first clean off all old paste with the alcohol/cloth.
  280. Then apply new paste. AS5 is also much better than the default paste used on these systems.
  281. </p>
  282. <p>
  283. <img src="images/t400/paste.jpg" alt="" />
  284. </p>
  285. <p>
  286. NOTE: the photo above is for illustration purposes only, and does not show how to properly apply the thermal paste.
  287. Other guides online detail the proper application procedure.
  288. </p>
  289. </div>
  290. <div class="section">
  291. <h1 id="wifi">Wifi</h1>
  292. <p>
  293. The R500 typically comes with an Intel wifi chipset, which does not
  294. work without proprietary software. For a list of wifi chipsets that
  295. work without proprietary software, see
  296. <a href="../hcl/index.html#recommended_wifi">../hcl/index.html#recommended_wifi</a>.
  297. </p>
  298. <p>
  299. Some R500 laptops might come with an Atheros chipset, but this is 802.11g only.
  300. </p>
  301. <p>
  302. It is recommended that you install a new wifi chipset. This can only
  303. be done after installing libreboot, because the original firmware has
  304. a whitelist of approved chips, and it will refuse to boot if you
  305. use an 'unauthorized' wifi card.
  306. </p>
  307. <p>
  308. The following photos show an Atheros AR5B95 being installed, to
  309. replace the Intel chip that this R500 came with:<br/>
  310. <img src="images/t400/0012.jpg" alt="" />
  311. <img src="images/t400/ar5b95.jpg" alt="" />
  312. </p>
  313. </div>
  314. <div class="section">
  315. <h1 id="wwan">WWAN</h1>
  316. <p>
  317. If you have a WWAN/3G card and/or sim card reader, remove them permanently.
  318. The WWAN-3G card has proprietary firmware inside; the technology is
  319. identical to what is used in mobile phones, so it can also track your movements.
  320. </p>
  321. <p>
  322. Not to be confused with wifi (wifi is fine).
  323. </p>
  324. </div>
  325. <div class="section photos">
  326. <h1 id="memory">Memory</h1>
  327. <p>
  328. You need DDR3 SODIMM PC3-8500 RAM installed, in matching pairs
  329. (speed/size). Non-matching pairs won't work. You can also install a
  330. single module (meaning, one of the slots will be empty) in slot 0.
  331. </p>
  332. <p>
  333. Make sure that the RAM you buy is the 2Rx8 density.
  334. </p>
  335. <p>
  336. The following photo shows 8GiB (2x4GiB) of RAM installed:<br/>
  337. <img src="images/t400/memory.jpg" alt="" />
  338. </p>
  339. </div>
  340. <div class="section photos">
  341. <h2>
  342. Boot it!
  343. </h2>
  344. <p>
  345. You should see something like this:
  346. </p>
  347. <p>
  348. <img src="images/t400/boot0.jpg" alt="" />
  349. <img src="images/t400/boot1.jpg" alt="" />
  350. </p>
  351. <p>
  352. Now <a href="../gnulinux/index.html">install GNU/Linux</a>.
  353. </p>
  354. </div>
  355. <div class="section">
  356. <p>
  357. Copyright &copy; 2015 Francis Rowe &lt;info@gluglug.org.uk&gt;<br/>
  358. Permission is granted to copy, distribute and/or modify this document
  359. under the terms of the GNU Free Documentation License, Version 1.3
  360. or any later version published by the Free Software Foundation;
  361. with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
  362. A copy of the license can be found at <a href="../gfdl-1.3.txt">../gfdl-1.3.txt</a>
  363. </p>
  364. <p>
  365. Updated versions of the license (when available) can be found at
  366. <a href="https://www.gnu.org/licenses/licenses.html">https://www.gnu.org/licenses/licenses.html</a>
  367. </p>
  368. <p>
  369. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
  370. EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
  371. AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
  372. ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
  373. IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
  374. WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
  375. PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
  376. ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
  377. KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
  378. ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
  379. </p>
  380. <p>
  381. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
  382. TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
  383. NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
  384. INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
  385. COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
  386. USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
  387. ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
  388. DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
  389. IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
  390. </p>
  391. <p>
  392. The disclaimer of warranties and limitation of liability provided
  393. above shall be interpreted in a manner that, to the extent
  394. possible, most closely approximates an absolute disclaimer and
  395. waiver of all liability.
  396. </p>
  397. </div>
  398. </body>
  399. </html>