index.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  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 or install libreboot (if you are already running libreboot or coreboot)</a></li>
  26. <li><a href="#flashrom">KFSN4-DRE: initial installation guide (if running the proprietary firmware)</a></li>
  27. <li><a href="#flashrom_lenovobios">ThinkPad X60/T60: Initial installation guide (if running the proprietary firmware)</a></li>
  28. <li><a href="#flashrom_macbook21">MacBook2,1: Initial installation guide (if running the proprietary firmware)</a></li>
  29. </ul>
  30. <h2>Hardware methods</h2>
  31. <ul>
  32. <li><a href="bbb_setup.html">How to program an SPI flash chip with the BeagleBone Black</a></li>
  33. <li><a href="bbb_ehci.html">How to configure EHCI debugging on the BeagleBone Black</a></li>
  34. <li><a href="x60_unbrick.html">ThinkPad X60: Recovery guide</a></li>
  35. <li><a href="x60tablet_unbrick.html">ThinkPad X60 Tablet: Recovery guide</a></li>
  36. <li><a href="t60_unbrick.html">ThinkPad T60: Recovery guide</a></li>
  37. <li><a href="x200_external.html">ThinkPad X200/X200S/X200T (needed if running the proprietary firmware, or to unbrick)</a></li>
  38. <li><a href="r400_external.html">ThinkPad R400 (needed if running the proprietary firmware, or to unbrick)</a></li>
  39. <li><a href="r500_external.html">ThinkPad R500 (needed if running the proprietary firmware, or to unbrick)</a></li>
  40. <li><a href="t400_external.html">ThinkPad T400 (needed if running the proprietary firmware, or to unbrick)</a></li>
  41. <li><a href="t500_external.html">ThinkPad T500 (needed if running the proprietary firmware, or to unbrick)</a></li>
  42. </ul>
  43. </div>
  44. <div class="section">
  45. <h1 id="rom">List of ROM images in libreboot</h1>
  46. <p>
  47. Libreboot distributes pre-compiled ROM images, built from the libreboot source code.
  48. These images are provided for user convenience, so that they don't have
  49. to build anything from source on their own.
  50. </p>
  51. <p>
  52. The ROM images in each archive use the following at the end of the file name,
  53. if they are built with the GRUB payload: <b>_<i>keymap</i>_<i>mode</i>.rom</b>
  54. </p>
  55. <p>
  56. Available <i>modes</i>: <b>vesafb</b> or <b>txtmode</b>. The <i>vesafb</i> ROM images are recommended, in most cases;
  57. <i>txtmode</i> ROM images come with MemTest86+, which requires text-mode instead of the usual framebuffer used
  58. by coreboot native graphics initialization.
  59. </p>
  60. <p>
  61. <i>keymap</i> can be one of several keymaps that keyboard supports (there are quite a few),
  62. which affects the keyboard layout configuration that is used in GRUB. It doesn't matter
  63. which ROM image you choose here, as far as the keymap in GNU/Linux is concerned.
  64. </p>
  65. <p>
  66. Keymaps are named appropriately according to each keyboard layout
  67. support in GRUB. To learn how these keymaps are created, see
  68. <a href="../grub/index.html#grub_keyboard">../grub/index.html#grub_keyboard</a>
  69. </p>
  70. <h2 id="qemu">QEMU</h2>
  71. <p>
  72. Libreboot comes with ROM images built for QEMU, by default:
  73. </p>
  74. <p>
  75. Examples of how to use libreboot ROM images in QEMU:
  76. </p>
  77. <ul>
  78. <li>$ <b>qemu-system-i386 -M q35 -m 512 -bios qemu_q35_ich9_keymap_mode.rom</b></li>
  79. <li>$ <b>qemu-system-i386 -M pc -m 512 -bios qemu_i440fx_piix4_keymap_mode.rom</b></li>
  80. </ul>
  81. <p>
  82. You can optionally specify the <b>-serial stdio</b> argument, so that QEMU will emulate
  83. a serial terminal on the standard input/output (most likely your terminal emulator or TTY).
  84. </p>
  85. <p>
  86. Other arguments are available for QEMU. The manual will contain more information.
  87. </p>
  88. <p>
  89. <a href="#pagetop">Back to top of page.</a>
  90. </p>
  91. </div>
  92. <div class="section">
  93. <h1 id="flashrom">How to update or install libreboot (if you are already running libreboot or coreboot)</h1>
  94. <p>
  95. On all current targets, updating libreboot can be accomplished without disassembly and,
  96. therefore, without having to externally re-flash using any dedicated hardware. In other words,
  97. you can do everything entirely in software, directly from the OS that is running on your libreboot
  98. system.
  99. </p>
  100. <div class="important">
  101. <p>
  102. <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>
  103. </p>
  104. </div>
  105. <p>
  106. Look at the <a href="#rom">list of ROM images</a> to see which image is compatible with your device.
  107. </p>
  108. <h2>Are you currently running the original, proprietary firmware?</h2>
  109. <p>
  110. If you are currently running the proprietary firmware (not libreboot or coreboot),
  111. then the flashing instructions for your system are going to be different.
  112. </p>
  113. <p>
  114. X60/T60 users running the proprietary firmware should refer to <a href="#flashrom_lenovobios">#flashrom_lenovobios</a>.
  115. MacBook2,1 users running Apple EFI should refer to <a href="#flashrom_macbook21">#flashrom_macbook21</a>
  116. </p>
  117. <p>
  118. X200 users, refer to <a href="x200_external.html">x200_external.html</a>,
  119. R400 users refer to <a href="r400_external.html">r400_external.html</a>,
  120. R500 users refer to <a href="r500_external.html">r500_external.html</a>,
  121. T400 users refer to <a href="t400_external.html">t400_external.html</a>,
  122. T500 users refer to <a href="t500_external.html">t500_external.html</a>
  123. </p>
  124. <h2>ASUS KFSN4-DRE?</h2>
  125. <p>
  126. Internal flashing should work just fine, even if you are
  127. currently booting the proprietary firmware.
  128. </p>
  129. <p>
  130. Libreboot currently lacks documentation for externally
  131. re-flashing an LPC flash chip. However, these boards have
  132. the flash chip inside of a PLCC socket, and it is possible
  133. to hot-swap the chips. If you want to back up your
  134. known-working image, simply hot-swap the chip for one that
  135. is the same capacity, after having dumped a copy of the
  136. current firmware (flashrom -p internal -r yourchosenname.rom),
  137. and then flash that chip with the known-working image.
  138. Check whether the system still boots, and if it does, then
  139. it should be safe to flash the new image (because you now
  140. have a backup of the old image).
  141. </p>
  142. <p>
  143. Keeping at least one spare LPC PLCC chip with working firmware
  144. on it is highly recommended, in case of bricks.
  145. </p>
  146. <p>
  147. <b>
  148. DO NOT hot-swap the chip with your bare hands. Use a PLCC
  149. chip extractor. These can be found online.
  150. See <a href="http://www.coreboot.org/Developer_Manual/Tools#Chip_removal_tools">http://www.coreboot.org/Developer_Manual/Tools#Chip_removal_tools</a>
  151. </b>
  152. </p>
  153. <p>
  154. Do check the HCL entry: <a href="../hcl/kfsn4-dre.html">../hcl/kfsn4-dre.html</a>
  155. </p>
  156. <h2>Are you currently running libreboot (or coreboot)?</h2>
  157. <p>
  158. X60/T60 users should be fine with this guide. If you write-protected the flash chip, please refer to
  159. <a href="x60_unbrick.html">x60_unbrick.html</a>, <a href="x60tablet_unbrick.html">x60tablet_unbrick.html</a>
  160. or <a href="t60_unbrick.html">t60_unbrick.html</a>. <i>This probably does not apply to you. Most people
  161. do not write-protect the flash chip, so you probably didn't either.</i>
  162. </p>
  163. <p>
  164. Similarly, it is possible to write-protect the flash chip in coreboot or libreboot on GM45 laptops
  165. (X200/R400/R500/T400/T500). If you did this, then you will need to use the links above for flashing,
  166. treating your laptop as though it currently has the proprietary firmware (because write-protected SPI flash
  167. requires external re-flashing, as is also the case when running the proprietary firmware).
  168. </p>
  169. <p>
  170. If you did not write-protect the flash chip, or it came to you without any write-protection
  171. (<b><i>libreboot does not write-protect the flash chip by default, so this probably applies to you</i></b>),
  172. read on!
  173. </p>
  174. <h2>MAC address on GM45 (X200/R400/T400/T500)</h2>
  175. <p>
  176. <b>Users of the X200/R400/T400/T500 take note:</b> The MAC address for the onboard ethernet chipset
  177. is located inside the flash chip. Libreboot ROM images for these laptops contain a generic MAC
  178. address by default (00:F5:F0:40:71:FE), but this is not what you want.
  179. <i>Make sure to change the MAC address inside the ROM image, before flashing it.
  180. The instructions on <a href="../hcl/gm45_remove_me.html#ich9gen">../hcl/gm45_remove_me.html#ich9gen</a>
  181. show how to do this.</i>
  182. </p>
  183. <p>
  184. It is important that you change the default MAC address, before flashing. It will be printed on a sticker
  185. at the bottom of the laptop, or it will be printed on a sticker next to or underneath the RAM. Alternatively,
  186. and assuming that your current firmware has the correct MAC address in it, you can get it from your OS.
  187. </p>
  188. <p>
  189. <b>
  190. R500 users: your laptop lacks a GbE region, because it has a different NIC. You do not need to change the MAC
  191. address on this laptop; it will already be correct. You can simply flash the available ROM images for the R500, as-is.
  192. See <a href="../hcl/r500.html#nogbe">../hcl/r500.html#nogbe</a>.
  193. </b>
  194. </p>
  195. <h2>Flash chip size</h2>
  196. <p>
  197. Use this to find out:<br/>
  198. # <b>dmidecode | grep ROM\ Size</b>
  199. </p>
  200. <h2>All good?</h2>
  201. <p>Excellent! Moving on...</p>
  202. <p>
  203. Download the <i>libreboot_util.tar.xz</i> archive, and extract it. Inside, you will find
  204. a directory called <i>flashrom</i>. This contains statically compiled executable files of
  205. the <i>flashrom</i> utility, which you will use to re-flash your libreboot system.
  206. </p>
  207. <p>
  208. Simply use <i>cd</i> on your terminal, to switch to the <i>libreboot_util</i> directory. Inside,
  209. there is a script called <i>flash</i>, which will detect what CPU architecture you have
  210. (e.g. i686, x86_64) and use the appropriate executable. It is also possible for you to
  211. build these executables from the libreboot source code archives.
  212. </p>
  213. <div class="important">
  214. <p>
  215. How to update the flash chip contents:<br/>
  216. $ <b>sudo ./flash update <a href="#rom">yourrom.rom</a></b>
  217. </p>
  218. </div>
  219. <div class="important">
  220. <p>
  221. Ocassionally, coreboot changes the name of a given board. If flashrom complains about a board mismatch, but
  222. you are sure that you chose the correct ROM image, then run this alternative command:<br/>
  223. $ <b>sudo ./flash forceupdate <a href="#rom">yourrom.rom</a></b>
  224. </p>
  225. </div>
  226. <div class="important">
  227. <p>
  228. You should see <b>&quot;Verifying flash... VERIFIED.&quot;</b> written at the end of the flashrom output. <b>Shut down</b>
  229. after you see this, and then boot up again after a few seconds.
  230. </p>
  231. </div>
  232. <p><a href="#pagetop">Back to top of page</a></p>
  233. </div>
  234. <div class="section">
  235. <h1 id="flashrom_lenovobios">ThinkPad X60/T60: Initial installation guide (if running the proprietary firmware)</h1>
  236. <p><b>This is for the ThinkPad X60 and T60 while running Lenovo BIOS. If you already have coreboot or libreboot running,
  237. then go to <a href="#flashrom">#flashrom</a> instead!</b></p>
  238. <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>
  239. <div class="important">
  240. <p>
  241. <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>
  242. </p>
  243. </div>
  244. <p>
  245. <b>
  246. Warning: this guide will not instruct the user how to backup the original Lenovo BIOS firmware. These backups
  247. are tied to each system, and will not work on any other.
  248. For that, please refer to <a href="http://www.coreboot.org/Board:lenovo/x60/Installation">http://www.coreboot.org/Board:lenovo/x60/Installation</a>.
  249. </b>
  250. </p>
  251. <div class="important">
  252. <p>
  253. <b>
  254. If you're using libreboot 20150518, note that there is a mistake in the flashing script.
  255. Apply this patch to the BASH script named <i>flash</i> (this is the script for flashing
  256. libreboot into your X60): <a href="x60flashscript.patch">x60flashscript.patch</a>.
  257. This patch is merged in the main git repository, and in all releases after 20150518.
  258. </b>
  259. </p>
  260. <p>
  261. The first half of the procedure is as follows:<br/>
  262. $ <b>sudo ./flash i945lenovo_firstflash <a href="#rom">yourrom.rom</a>.</b>
  263. </p>
  264. </div>
  265. <div class="important">
  266. <p>
  267. You should see within the output the following:<br/>
  268. <b>&quot;Updated BUC.TS=1 - 64kb address ranges at 0xFFFE0000 and 0xFFFF0000 are swapped&quot;</b>.
  269. </p>
  270. <p>
  271. You should also see within the output the following:<br/>
  272. <b>&quot;Your flash chip is in an unknown state&quot;</b>, <b>&quot;FAILED&quot;</b> and <b>&quot;DO NOT REBOOT OR POWEROFF&quot;</b><br/>
  273. Seeing this means that the operation was a <b>resounding</b> success! <b>DON'T PANIC</b>.
  274. </p>
  275. <p>
  276. See this link for more details:
  277. <a href="http://thread.gmane.org/gmane.linux.bios.flashrom/575">http://thread.gmane.org/gmane.linux.bios.flashrom/575</a>.
  278. </p>
  279. <p>
  280. 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).
  281. </p>
  282. </div>
  283. <div class="important">
  284. <p>
  285. When you have booted up again, you must also do this:<br/>
  286. $ <b>sudo ./flash i945lenovo_secondflash <a href="#rom">yourrom.rom</a></b>
  287. </p>
  288. <p>
  289. If flashing fails at this stage, try the following:<br/>
  290. $ <b>sudo ./flashrom/i686/flashrom -p internal:laptop=force_I_want_a_brick -w <a href="#rom">yourrom.rom</a></b>
  291. </p>
  292. </div>
  293. <div class="important">
  294. <p>
  295. You should see within the output the following:<br/>
  296. <b>&quot;Updated BUC.TS=0 - 128kb address range 0xFFFE0000-0xFFFFFFFF is untranslated&quot;</b>
  297. </p>
  298. <p>
  299. You should also see within the output the following:<br/>
  300. <b>&quot;Verifying flash... VERIFIED.&quot;</b>
  301. </p>
  302. </div>
  303. <p><a href="#pagetop">Back to top of page.</a></p>
  304. </div>
  305. <div class="section">
  306. <h1 id="flashrom_macbook21">MacBook2,1: Initial installation guide (if running the proprietary firmware)</h1>
  307. <div class="important">
  308. <p>
  309. <b>If you have a MacBook1,1, refer to <a href="../hcl/index.html#macbook11">../hcl/index.html#macbook11</a> for flashing instructions.</b>
  310. </p>
  311. </div>
  312. <p>
  313. <b>
  314. This is for the MacBook2,1 while running Apple EFI firmware. If you already have
  315. coreboot or libreboot running, then go to <a href="#flashrom">#flashrom</a> instead!
  316. </b>
  317. </p>
  318. <p>
  319. Be sure to read the information in <a href="../hcl/index.html#macbook21">../hcl/index.html#macbook21</a>.
  320. </p>
  321. <p>
  322. <b>
  323. Warning: this guide will not instruct the user how to backup the original Apple EFI firmware.
  324. For that, please refer to <a href="http://www.coreboot.org/Board:apple/macbook21">http://www.coreboot.org/Board:apple/macbook21</a>.
  325. </b>
  326. </p>
  327. <div class="important">
  328. <p>
  329. <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>
  330. </p>
  331. </div>
  332. <p>
  333. Look at the <a href="#rom">list of ROM images</a> to see which image is compatible with your device.
  334. </p>
  335. <div class="important">
  336. <p>
  337. Use this flashing script, to install libreboot:<br/>
  338. $ <b>sudo ./flash i945apple_firstflash <a href="#rom">yourrom.rom</a></b>
  339. </p>
  340. </div>
  341. <div class="important">
  342. <p>
  343. You should also see within the output the following:<br/>
  344. <b>&quot;Verifying flash... VERIFIED.&quot;</b>
  345. </p>
  346. <p>
  347. Shut down.
  348. </p>
  349. </div>
  350. <p><a href="#pagetop">Back to top of page.</a></p>
  351. </div>
  352. <div class="section">
  353. <p>
  354. Copyright &copy; 2014, 2015 Francis Rowe &lt;info@gluglug.org.uk&gt;<br/>
  355. Permission is granted to copy, distribute and/or modify this document
  356. under the terms of the GNU Free Documentation License, Version 1.3
  357. or any later version published by the Free Software Foundation;
  358. with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
  359. A copy of the license can be found at <a href="../gfdl-1.3.txt">../gfdl-1.3.txt</a>
  360. </p>
  361. <p>
  362. Updated versions of the license (when available) can be found at
  363. <a href="https://www.gnu.org/licenses/licenses.html">https://www.gnu.org/licenses/licenses.html</a>
  364. </p>
  365. <p>
  366. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
  367. EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
  368. AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
  369. ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
  370. IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
  371. WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
  372. PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
  373. ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
  374. KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
  375. ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
  376. </p>
  377. <p>
  378. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
  379. TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
  380. NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
  381. INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
  382. COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
  383. USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
  384. ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
  385. DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
  386. IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
  387. </p>
  388. <p>
  389. The disclaimer of warranties and limitation of liability provided
  390. above shall be interpreted in a manner that, to the extent
  391. possible, most closely approximates an absolute disclaimer and
  392. waiver of all liability.
  393. </p>
  394. </div>
  395. </body>
  396. </html>