index.html 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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>GRUB payload</title>
  10. </head>
  11. <body>
  12. <div class="section">
  13. <h1 id="pagetop">GRUB payload</h1>
  14. <p>
  15. This section relates to the GRUB payload used in libreboot.
  16. </p>
  17. <p>
  18. Or <a href="../index.html">Back to main index</a>.
  19. </p>
  20. <ul>
  21. <li><a href="#grub_background">Changing the background image in GRUB</a></li>
  22. <li><a href="#grub_font">Setting font in GRUB</a></li>
  23. <li><a href="#grub_keyboard">GRUB keyboard layouts</a>
  24. <ul>
  25. <li><a href="#grub_custom_keyboard">Custom keyboard layout in GRUB</a></li>
  26. <li><a href="#grub_ukdvorak_keyboard">UK Dvorak keyboard layout in GRUB</a></li>
  27. </ul>
  28. </li>
  29. </ul>
  30. </div>
  31. <div class="section">
  32. <h1 id="grub_background">Changing the background image in GRUB</h1>
  33. <p>
  34. Use cbfstool from libreboot_util, or libreboot_src/coreboot/util/cbfstool/ if you want to build from source.
  35. </p>
  36. <p>
  37. ./cbfstool yourrom.rom remove background.png -n background.png<br/>
  38. ./cbfstool yourrom.rom add -f background.png -n background.png -t raw
  39. </p>
  40. <p>
  41. When you've done this, re-flash your ROM and you should have a new background at boot time.
  42. </p>
  43. </div>
  44. <div class="section">
  45. <h1 id="grub_font">Setting font in GRUB (for reference)</h1>
  46. <p>You don't need to do this unless you would like to change the default font yourself.
  47. (this is just for reference. It has already been done for you)</p>
  48. <p>The old font used was Unifont, and this had some missing characters: for instance, the border showed ??? characters instead of lines.</p>
  49. <p>I tried DeJavu Sans Mono from this website:
  50. <a href="http://dejavu-fonts.org/wiki/Download">dejavu-fonts.org</a></p>
  51. <p>Specifically, the version that I chose was the latest at the time of writing (Saturday 21 June 2014):
  52. <a href="http://sourceforge.net/projects/dejavu/files/dejavu/2.34/dejavu-fonts-ttf-2.34.tar.bz2">this one</a></p>
  53. <p>This is a free font that is also contained in GNU/Linux distributions like Trisquel or Parabola.</p>
  54. <p><b>$ cd libreboot_src/grub</b><br/>
  55. compile grub (the build scripts info on how to do this)<br/>
  56. come back out into libreboot_src/resources/grub:<br/>
  57. <b>$ cd ../libreboot_src/resources/grub/font</b></p>
  58. <p>I took Dejavu Sans Mono from dejavu (included in this version of libreboot) and did:<br/>
  59. <b>$ ../../../grub/grub-mkfont -o dejavusansmono.pf2 dejavu-fonts-ttf-2.34/ttf/DejaVuSansMono.ttf</b></p>
  60. <p>I then added the instructions to 'gen.sh' script in grub-assemble to include resources/grub/dejavusansmono.pf2
  61. in all of the ROM images, at the root of the GRUB memdisk.<br/>
  62. I then added that instructions to the grub.cfg files (to load the font):<br/>
  63. <b>loadfont (memdisk)/dejavusansmono.pf2</b></p>
  64. <p><a href="#pagetop">Back to top of page</a></p>
  65. </div>
  66. <div class="section">
  67. <h1 id="grub_keyboard">GRUB keyboard layouts (for reference)</h1>
  68. <div class="subsection">
  69. <h2 id="grub_custom_keyboard">Custom keyboard layout in GRUB (for reference)</h2>
  70. <p>
  71. Keymaps are stored in resources/utilities/grub-assemble/keymap/.
  72. </p>
  73. <p>
  74. Example (French Azerty):<br/>
  75. <b>$ ckbcomp fr &gt; frazerty</b><br/><br/>
  76. Go in grub directory:<br/>
  77. <b>cat frazerty | ./grub/grub-mklayout -o frazerty.gkb</b>
  78. </p>
  79. <p>
  80. You must make sure that the files are named keymap and keymap.gkb (where 'keymap' can be whatever you want).
  81. </p>
  82. <p>
  83. Then from the above example, you would put <b>frazerty</b> in <b>resources/utilities/grub-assemble/keymap/original/</b> and
  84. the <b>frazerty.gkb</b> file goes under <b>resources/utilities/grub-assemble/keymap/</b>
  85. </p>
  86. <p>
  87. The build scripts will automatically see this, and automatically build
  88. ROM images with your custom layout (given the name) and include them under bin. Example: <b>libreboot_frazerty.rom</b>.
  89. </p>
  90. <p><a href="#pagetop">Back to top of page</a></p>
  91. </div>
  92. <div class="subsection">
  93. <h2 id="grub_ukdvorak_keyboard">UK Dvorak keyboard layout in GRUB (for reference)</h2>
  94. <p>
  95. ukdvorak had to be created manually, based on usdvorak. diff them (under resources/utilities/grub-assemble/keymap/original)
  96. to see how ukdvorak file was created
  97. </p>
  98. <p><b>$ cat ukdvorak | ./grub/grub-mklayout -o ukdvorak.gkb</b></p>
  99. <p><a href="#pagetop">Back to top of page</a></p>
  100. </div>
  101. </div>
  102. <div class="section">
  103. <p>
  104. Copyright &copy; 2014 Leah Rowe &lt;info@minifree.org&gt;<br/>
  105. Permission is granted to copy, distribute and/or modify this document
  106. under the terms of the GNU Free Documentation License, Version 1.3
  107. or any later version published by the Free Software Foundation;
  108. with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
  109. A copy of the license can be found at <a href="../gfdl-1.3.txt">../gfdl-1.3.txt</a>
  110. </p>
  111. <p>
  112. Updated versions of the license (when available) can be found at
  113. <a href="https://www.gnu.org/licenses/licenses.html">https://www.gnu.org/licenses/licenses.html</a>
  114. </p>
  115. <p>
  116. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
  117. EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
  118. AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
  119. ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
  120. IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
  121. WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
  122. PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
  123. ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
  124. KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
  125. ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
  126. </p>
  127. <p>
  128. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
  129. TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
  130. NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
  131. INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
  132. COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
  133. USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
  134. ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
  135. DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
  136. IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
  137. </p>
  138. <p>
  139. The disclaimer of warranties and limitation of liability provided
  140. above shall be interpreted in a manner that, to the extent
  141. possible, most closely approximates an absolute disclaimer and
  142. waiver of all liability.
  143. </p>
  144. </div>
  145. </body>
  146. </html>