index.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  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>Installing libreboot</title>
  10. </head>
  11. <body>
  12. <div class="section">
  13. <h1 id="pagetop">Installing libreboot</h1>
  14. <p>
  15. This section relates to installing libreboot on supported targets.
  16. </p>
  17. <p>
  18. <a href="../index.html">Back to previous index</a>
  19. </p>
  20. </div>
  21. <div class="section">
  22. <h2>Software methods</h2>
  23. <ul>
  24. <li><a href="#rom">List of ROM images in libreboot</a></li>
  25. <li><a href="#flashrom">How to update libreboot (if you are already running libreboot or coreboot)</a></li>
  26. <li><a href="#flashrom_lenovobios">ThinkPad X60/T60: Initial installation guide (if running the proprietary firmware)</a></li>
  27. <li><a href="#flashrom_macbook21">MacBook2,1: Initial installation guide (if running the proprietary firmware)</a></li>
  28. </ul>
  29. <h2>Hardware methods</h2>
  30. <ul>
  31. <li><a href="bbb_setup.html">How to programme an SPI flash chip with the BeagleBone Black</a></li>
  32. <li><a href="x60_unbrick.html">ThinkPad X60: Recovery guide</a></li>
  33. <li><a href="x60tablet_unbrick.html">ThinkPad X60 Tablet: Recovery guide</a></li>
  34. <li><a href="t60_unbrick.html">ThinkPad T60: Recovery guide</a></li>
  35. <li><a href="x200_external.html">ThinkPad X200/X200S/X200T (needed if running the proprietary firmware, or to unbrick)</a></li>
  36. <li><a href="r400_external.html">ThinkPad R400 (needed if running the proprietary firmware, or to unbrick)</a></li>
  37. <li><a href="t400_external.html">ThinkPad T400 (needed if running the proprietary firmware, or to unbrick)</a></li>
  38. <li><a href="t500_external.html">ThinkPad T500 (needed if running the proprietary firmware, or to unbrick)</a></li>
  39. </ul>
  40. </div>
  41. <div class="section">
  42. <h1 id="rom">List of ROM images in libreboot</h1>
  43. <p>
  44. Libreboot supports the following (refer to the <a href="../release.html">release</a> page):
  45. </p>
  46. <ul>
  47. <li>Apple MacBook1,1 and MacBook2,1: download <b>libreboot_macbook21.tar.xz</b></li>
  48. <li>ThinkPad X60, X60s and X60 Tablet: download <b>libreboot_x60.tar.xz</b></li>
  49. <li>ThinkPad T60: download <b>libreboot_t60.tar.xz</b> (see <a href="../hcl/index.html#supported_t60_list">../hcl/index.html#supported_t60_list</a>)</li>
  50. <li>ThinkPad X200: download <b>libreboot_x200_8mb.tar.xz</b> (8MiB flash chip) or <b>libreboot_x200_4mb.tar.xz</b> (4MiB flash chip) (see <a href="../hcl/x200.html">../hcl/x200.html</a>)</li>
  51. <li>ThinkPad R400: download <b>libreboot_r400_8mb.tar.xz</b> (8MiB flash chip) or <b>libreboot_r400_4mb.tar.xz</b> (4MiB flash chip) (see <a href="../hcl/r400.html">../hcl/r400.html</a>)</li>
  52. <li>ThinkPad T400: download <b>libreboot_t400_8mb.tar.xz</b> (8MiB flash chip) or <b>libreboot_t400_4mb.tar.xz</b> (4MiB flash chip) (see <a href="../hcl/t400.html">../hcl/t400.html</a>)</li>
  53. <li>ThinkPad T500: download <b>libreboot_t500_8mb.tar.xz</b> (8MiB flash chip) or <b>libreboot_t500_4mb.tar.xz</b> (4MiB flash chip) (see <a href="../hcl/t500.html">../hcl/t500.html</a>)</li>
  54. </ul>
  55. <p>
  56. The ROM images in each archive use the following naming convention: <b>boardname_keymap_mode.rom</b>
  57. </p>
  58. <p>
  59. Available <i>modes</i>: <b>vesafb</b> or <b>txtmode</b>. The <i>vesafb</i> ROM images are recommended, in most cases;
  60. <i>txtmode</i> ROM images come with MemTest86+, which requires text-mode instead of the usual framebuffer used
  61. by coreboot native graphics initialization.
  62. </p>
  63. <p>
  64. Keymaps are named appropriate/y according to each keyboard layout
  65. support in GRUB. To learn how these keymaps are created, see
  66. <a href="../grub/index.html#grub_keyboard">../grub/index.html#grub_keyboard</a>
  67. </p>
  68. <h2 id="qemu">QEMU</h2>
  69. <p>
  70. Libreboot comes with ROM images built for QEMU, by default:
  71. </p>
  72. <ul>
  73. <li><b>libreboot_qemu_q35_ich9.tar.xz</b></li>
  74. <li><b>libreboot_qemu_i440fx_piix4.tar.xz</b></li>
  75. </ul>
  76. <p>
  77. Examples of how to use libreboot in QEMU:
  78. </p>
  79. <ul>
  80. <li>$ <b>qemu-system-i386 -M q35 -m 512 -bios qemu_q35_ich9_keymap_mode.rom</b></li>
  81. <li>$ <b>qemu-system-i386 -M pc -m 512 -bios qemu_i440fx_piix4_keymap_mode.rom</b></li>
  82. </ul>
  83. <p>
  84. You can optionally specify the <b>-serial stdio</b> argument, so that QEMU will emulate
  85. a serial terminal on the standard input/output (most likely your terminal emulator or TTY).
  86. </p>
  87. <p>
  88. Other arguments are available for QEMU. The manual will contain more information.
  89. </p>
  90. <p>
  91. On GM45 hardware (with libreboot), make sure that the <i>kvm</i> and <i>kvm_intel</i> kernel modules
  92. are not loaded, when using QEMU.
  93. </p>
  94. <p>
  95. <a href="#pagetop">Back to top of page.</a>
  96. </p>
  97. </div>
  98. <div class="section">
  99. <h1 id="flashrom">How to update libreboot (if you are already running libreboot or coreboot)</h1>
  100. <p>
  101. On all current targets, updating libreboot can be accomplished without disassembly and,
  102. therefore, without having to externally re-flash using any dedicated hardware. In other words,
  103. you can do everything entirely in software, directly from the OS that is running on your libreboot
  104. system.
  105. </p>
  106. <div class="important">
  107. <p>
  108. <b>If you are using libreboot_src or git, then make sure that you built the sources first (see <a href="../git/index.html#build">../git/index.html#build</a>).</b>
  109. </p>
  110. </div>
  111. <p>
  112. Look at the <a href="#rom">list of ROM images</a> to see which image is compatible with your device.
  113. </p>
  114. <h2>Are you currently running the original, proprietary firmware?</h2>
  115. <p>
  116. If you are currently running the proprietary firmware (not libreboot or coreboot),
  117. then the flashing instructions for your system are going to be different.
  118. </p>
  119. <p>
  120. X60/T60 users running the proprietary firmware should refer to <a href="#flashrom_lenovobios">#flashrom_lenovobios</a>.
  121. MacBook2,1 users running Apple EFI should refer to <a href="#flashrom_macbook21">#flashrom_macbook21</a>
  122. </p>
  123. <p>
  124. X200 users, refer to <a href="x200_external.html">x200_external.html</a>,
  125. R400 users refer to <a href="r400_external.html">r400_external.html</a>,
  126. T400 users refer to <a href="t400_external.html">t400_external.html</a>,
  127. T500 users refer to <a href="t500_external.html">t500_external.html</a>
  128. </p>
  129. <h2>Are you currently running libreboot (or coreboot)?</h2>
  130. <p>
  131. X60/T60 users should be fine with this guide. If you write-protected the flash chip, please refer to
  132. <a href="x60_unbrick.html">x60_unbrick.html</a>, <a href="x60tablet_unbrick.html">x60tablet_unbrick.html</a>
  133. or <a href="t60_unbrick.html">t60_unbrick.html</a>. <i>This probably does not apply to you. Most people
  134. do not write-protect the flash chip, so you probably didn't either.</i>
  135. </p>
  136. <p>
  137. Similarly, it is possible to write-protect the flash chip in coreboot or libreboot on GM45 laptops
  138. (X200/R400/T400/T500). If you did this, then you will need to use the links above for flashing,
  139. treating your laptop as though it currently has the proprietary firmware (because write-protected SPI flash
  140. requires external re-flashing, as is also the case when running the proprietary firmware).
  141. </p>
  142. <p>
  143. If you did not write-protect the flash chip, or it came to you without any write-protection
  144. (<b><i>libreboot does not write-protect the flash chip by default, so this probably applies to you</i></b>),
  145. read on!
  146. </p>
  147. <h2>MAC address on GM45 (X200/R400/T400/T500)</h2>
  148. <p>
  149. <b>Users of the X200/R400/T400/T500 take note:</b> The MAC address for the onboard ethernet chipset
  150. is located inside the flash chip. Libreboot ROM images for these laptops contain a generic MAC
  151. address by default (00:F5:F0:40:71:FE), but this is not what you want.
  152. <i>Make sure to change the MAC address inside the ROM image, before flashing it.
  153. The instructions on <a href="../hcl/gm45_remove_me.html#ich9gen">../hcl/gm45_remove_me.html#ich9gen</a>
  154. show how to do this.</i>
  155. </p>
  156. <p>
  157. It is important that you change the default MAC address, before flashing. It will be printed on a sticker
  158. at the bottom of the laptop, or it will be printed on a sticker next to or underneath the RAM. Alternatively,
  159. and assuming that your current firmware has the correct MAC address in it, you can get it from your OS.
  160. </p>
  161. <h2>Flash chip size on GM45 (X200/R400/T400/T500)</h2>
  162. <p>
  163. <b>Users of the X200/R400/T400/T500 take note:</b> There are two different sized capacities
  164. that your flash chip could have: 4MiB or 8MiB. There are archives for each capacity, for each
  165. of these laptops, and you will need to select the correct size.
  166. </p>
  167. <p>
  168. To easily identify which size chip is present:<br/>
  169. # <b>dmidecode | grep ROM\ Size</b><br/>
  170. or (on some distributions):<br/>
  171. $ <b>sudo dmidecode | grep ROM\ Size</b><br/>
  172. Example output:
  173. </p>
  174. <pre>
  175. # ROM Size: 8192 kB
  176. </pre>
  177. <h2>All good?</h2>
  178. <p>Excellent! Moving on...</p>
  179. <p>
  180. Download the <i>libreboot_util.tar.xz</i> archive, and extract it. Inside, you will find
  181. a directory called <i>flashrom</i>. This contains statically compiled executable files of
  182. the <i>flashrom</i> utility, which you will use to re-flash your libreboot system.
  183. </p>
  184. <p>
  185. Simply use <i>cd</i> on your terminal, to switch to the <i>libreboot_util</i> directory. Inside,
  186. there is a script called <i>flash</i>, which will detect what CPU architecture you have
  187. (e.g. i686, x86_64) and use the appropriate executable. It is also possible for you to
  188. build these executables from the libreboot source code archives.
  189. </p>
  190. <div class="important">
  191. <p>
  192. How to update the flash chip contents:<br/>
  193. $ <b>sudo ./flash update <a href="#rom">yourrom.rom</a></b>
  194. </p>
  195. </div>
  196. <div class="important">
  197. <p>
  198. Ocassionally, coreboot changes the name of a given board. If flashrom complains about a board mismatch, but
  199. you are sure that you chose the correct ROM image, then run this alternative command:<br/>
  200. $ <b>sudo ./flash forceupdate <a href="#rom">yourrom.rom</a></b>
  201. </p>
  202. </div>
  203. <div class="important">
  204. <p>
  205. You should see <b>&quot;Verifying flash... VERIFIED.&quot;</b> written at the end of the flashrom output. <b>Shut down</b>
  206. after you see this, and then boot up again after a few seconds.
  207. </p>
  208. </div>
  209. <p><a href="#pagetop">Back to top of page</a></p>
  210. </div>
  211. <div class="section">
  212. <h1 id="flashrom_lenovobios">ThinkPad X60/T60: Initial installation guide (if running the proprietary firmware)</h1>
  213. <p><b>This is for the ThinkPad X60 and T60 while running Lenovo BIOS. If you already have coreboot or libreboot running,
  214. then go to <a href="#flashrom">#flashrom</a> instead!</b></p>
  215. <p><b>If you are flashing a Lenovo ThinkPad T60, be sure to read <a href="../hcl/index.html#supported_t60_list">../hcl/index.html#supported_t60_list</a></b></p>
  216. <div class="important">
  217. <p>
  218. <b>If you are using libreboot_src or git, then make sure that you built the sources first (see <a href="../git/index.html#build">../git/index.html#build</a>).</b>
  219. </p>
  220. </div>
  221. <p>
  222. <b>
  223. Warning: this guide will not instruct the user how to backup the original Lenovo BIOS firmware. These backups
  224. are tied to each machine, and will not work on any other.
  225. For that, please refer to <a href="http://www.coreboot.org/Board:lenovo/x60/Installation">http://www.coreboot.org/Board:lenovo/x60/Installation</a>.
  226. </b>
  227. </p>
  228. <div class="important">
  229. <p>
  230. <b>
  231. If you're using libreboot 20150518, note that there is a mistake in the flashing script.
  232. Apply this patch to the BASH script named <i>flash</i> (this is the script for flashing
  233. libreboot into your X60): <a href="x60flashscript.patch">x60flashscript.patch</a>.
  234. This patch is merged in the main git repository, and in all releases after 20150518.
  235. </b>
  236. </p>
  237. <p>
  238. The first half of the procedure is as follows:<br/>
  239. $ <b>sudo ./flash i945lenovo_firstflash <a href="#rom">yourrom.rom</a>.</b>
  240. </p>
  241. </div>
  242. <div class="important">
  243. <p>
  244. You should see within the output the following:<br/>
  245. <b>&quot;Updated BUC.TS=1 - 64kb address ranges at 0xFFFE0000 and 0xFFFF0000 are swapped&quot;</b>.
  246. </p>
  247. <p>
  248. You should also see within the output the following:<br/>
  249. <b>&quot;Flash chip is in an unknown state&quot;</b>, <b>&quot;FAILED&quot;</b> and <b>&quot;DO NOT SHUTDOWN OR REBOOT&quot;</b><br/>
  250. Seeing this means that the operation was a <b>resounding</b> success! <b>DON'T PANIC</b>.
  251. </p>
  252. <p>
  253. See this link for more details:
  254. <a href="http://thread.gmane.org/gmane.linux.bios.flashrom/575">http://thread.gmane.org/gmane.linux.bios.flashrom/575</a>.
  255. </p>
  256. <p>
  257. If the above is what you see, then <b>SHUT DOWN</b>. Wait a few seconds, and then boot; libreboot is running, but there is a 2nd procedure <b>*needed*</b> (see below).
  258. </p>
  259. </div>
  260. <div class="important">
  261. <p>
  262. When you have booted up again, you must also do this:<br/>
  263. $ <b>sudo ./flash i945lenovo_secondflash <a href="#rom">yourrom.rom</a></b>
  264. </p>
  265. </div>
  266. <div class="important">
  267. <p>
  268. You should see within the output the following:<br/>
  269. <b>&quot;Updated BUC.TS=0 - 128kb address range 0xFFFE0000-0xFFFFFFFF is untranslated&quot;</b>
  270. </p>
  271. <p>
  272. You should also see within the output the following:<br/>
  273. <b>&quot;Verifying flash... VERIFIED.&quot;</b>
  274. </p>
  275. </div>
  276. <p><a href="#pagetop">Back to top of page.</a></p>
  277. </div>
  278. <div class="section">
  279. <h1 id="flashrom_macbook21">MacBook2,1: Initial installation guide (if running the proprietary firmware)</h1>
  280. <div class="important">
  281. <p>
  282. <b>If you have a MacBook1,1, refer to <a href="../hcl/index.html#macbook11">../hcl/index.html#macbook11</a> for flashing instructions.</b>
  283. </p>
  284. </div>
  285. <p>
  286. <b>
  287. This is for the MacBook2,1 while running Apple EFI firmware. If you already have
  288. coreboot or libreboot running, then go to <a href="#flashrom">#flashrom</a> instead!
  289. </b>
  290. </p>
  291. <p>
  292. Be sure to read the information in <a href="../hcl/index.html#macbook21">../hcl/index.html#macbook21</a>.
  293. </p>
  294. <p>
  295. <b>
  296. Warning: this guide will not instruct the user how to backup the original Apple EFI firmware.
  297. For that, please refer to <a href="http://www.coreboot.org/Board:apple/macbook21">http://www.coreboot.org/Board:apple/macbook21</a>.
  298. </b>
  299. </p>
  300. <div class="important">
  301. <p>
  302. <b>If you are using libreboot_src or git, then make sure that you built the sources first (see <a href="../git/index.html#build">../git/index.html#build</a>).</b>
  303. </p>
  304. </div>
  305. <p>
  306. Look at the <a href="#rom">list of ROM images</a> to see which image is compatible with your device.
  307. </p>
  308. <div class="important">
  309. <p>
  310. Use this flashing script, to install libreboot:<br/>
  311. $ <b>sudo ./flash i945apple_firstflash <a href="#rom">yourrom.rom</a></b>
  312. </p>
  313. </div>
  314. <div class="important">
  315. <p>
  316. You should also see within the output the following:<br/>
  317. <b>&quot;Verifying flash... VERIFIED.&quot;</b>
  318. </p>
  319. <p>
  320. Shut down.
  321. </p>
  322. </div>
  323. <p><a href="#pagetop">Back to top of page.</a></p>
  324. </div>
  325. <div class="section">
  326. <p>
  327. Copyright &copy; 2014, 2015 Francis Rowe &lt;info@gluglug.org.uk&gt;<br/>
  328. Copyright &copy; 2015 Chris Ryder &lt;cdkr00@gmail.com&gt;<br/>
  329. This document is released under the Creative Commons Attribution-ShareAlike 4.0 International Public License and all future versions.
  330. A copy of the license can be found at <a href="../cc-by-sa-4.txt">../cc-by-sa-4.txt</a>.
  331. </p>
  332. <p>
  333. This document is distributed in the hope that it will be useful,
  334. but WITHOUT ANY WARRANTY; without even the implied warranty of
  335. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See <a href="../cc-by-sa-4.txt">../cc-by-sa-4.txt</a> for more information.
  336. </p>
  337. </div>
  338. </body>
  339. </html>