summaryrefslogtreecommitdiffstats
path: root/docs/misc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/misc')
-rw-r--r--docs/misc/index.html254
-rw-r--r--docs/misc/index.texi156
-rw-r--r--docs/misc/patch.html218
-rw-r--r--docs/misc/patch.texi97
4 files changed, 253 insertions, 472 deletions
diff --git a/docs/misc/index.html b/docs/misc/index.html
deleted file mode 100644
index 5ff06a3..0000000
--- a/docs/misc/index.html
+++ /dev/null
@@ -1,254 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
-
- <style type="text/css">
- @import url('../css/main.css');
- </style>
-
- <title>Miscellaneous</title>
-</head>
-
-<body>
-
- <div class="section">
- <h1 id="pagetop">Miscellaneous</h1>
- <p>
- Or <a href="../index.html">Back to main index</a>.
- </p>
- <ul>
- <li><a href="#trisquel7_powertop">High Pitched Whining Noise on Idle (how to remove in Trisquel 7)</a></li>
- <li><a href="#high_pitch_parabola">High Pitched Whining Noise on Idle (how to remove in Parabola)</a></li>
- <li><a href="#serial">X60/T60: Serial port - how to use (for dock owners)</a></li>
- <li><a href="#powerbeeps">Power Management Beeps on Thinkpads</a></li>
- <li><a href="patch.html">Using diff and patch</a></li>
- <li><a href="#get_edid_panelname">Get EDID: Find out the name (model) of your LCD panel</a></li>
- </ul>
- </div>
-
- <div class="section">
-
- <h1 id="trisquel7_powertop">High Pitched Whining Noise on Idle (how to remove in Trisquel 7)</h1>
-
- <div class="subsection">
- <h2 id="trisquel7_powertop_autostart">Start powertop automatically at boot time</h2>
-
- <p>Included with libreboot is a script called 'powertop.trisquel7'. Run this as root and it will setup powertop to run with --auto-tune
- at boot time. Load the file in your text editor to see how it does that.</p>
-
- <p>$ <b>sudo ./resources/scripts/misc/powertop.trisquel7</b></p>
- <p>
- Might want to run with --calibrate first
- </p>
- <p>
- If powertop doesn't work, another way (reduces battery life slightly) is
- to add <i>processor.max_cstate=2</i> to the <i>linux</i> line in grub.cfg,
- using <a href="../gnulinux/grub_cbfs.html">this guide</a>.
- </p>
- </div>
-
- <p><a href="#pagetop">Back to top of page</a></p>
-
- </div>
-
- <div class="section">
-
- <h1 id="high_pitch_parabola">High Pitched Whining Noise on Idle (how to remove in Parabola)</h1>
-
- <p>The following removes most of the noise. It reduces what is a high frequency whine
- (that not everyone can hear) to a slight buzz (which most people can't hear or doesn't bother most people).</p>
-
- <p>This is not perfect! The full solution is still not discovered but this is a step towards that.
- Also, in some instances you will need to run 'sudo powertop --auto-tune' again.
- This needs to be implemented properly in coreboot itself!</p>
-
- <p>On the X60 with coreboot or libreboot, there is a high pitched sound when idle.
- So far we have use processor.max_cstate=2 or idle=halt in GRUB.
- These consume power. Stop using them! </p>
-
- <p>Be root<br/>
- <b>$ su -</b></p>
-
- <p>Installed powertop:<br/>
- <b># pacman -S powertop</b></p>
-
- <p>and added the following to /etc/systemd/system/powertop.service :</p>
-
-<pre><i>
-[Unit]
-Description=Powertop tunings
-
-[Service]
-Type=oneshot
-RemainAfterExit=no
-ExecStart=/usr/bin/powertop --auto-tune
-# "powertop --auto-tune" still needs a terminal for some reason. Possibly a bug?
-Environment="TERM=xterm"
-
-[Install]
-WantedBy=multi-user.target
-</i></pre>
-
-
- <p>Finally, as root do that:<br/>
- <b># systemctl enable powertop</b><br/>
- <b># systemctl start powertop</b></p>
-
- <p>The next time you boot the system, the buzz will be gone.</p>
-
- <p>
- Might want to run with --calibrate first
- </p>
- <p>
- If powertop doesn't work, another way (reduces battery life slightly) is
- to add <i>processor.max_cstate=2</i> to the <i>linux</i> line in grub.cfg,
- using <a href="../gnulinux/grub_cbfs.html">this guide</a>.
- </p>
-
- <p><a href="#pagetop">Back to top of page</a></p>
-
- </div>
-
- <div class="section">
-
- <h1 id="serial">X60/T60: Serial port - how to use (for dock owners)</h1>
- <p>
- For the Thinkpad X60 you can use the <b>&quot;UltraBase X6&quot;</b> dock (for the X60 Tablet it is called
- X6 Tablet UltraBase). For the ThinkPad T60,
- you can use the <b>&quot;Advanced Mini Dock&quot;</b>.
- </p>
- <p>
- If you are using one of the ROM images with 'serial' in the name, then you have serial port enabled in libreboot
- and you have memtest86+ included inside the ROM. Connect your null modem cable to the serial port on the dock
- and connect the other end to a 2nd system using your USB Serial adapter.
- </p>
- <p>
- On the 2nd system, you can try this (using GNU Screen):<br/>
- <b>$ sudo screen /dev/ttyUSB0 115200</b>
- </p>
- <p>
- How to quit GNU Screen: Ctrl+A then release and press K, and then press Y.
- </p>
- <p>There are also others like Minicom but I like GNU Screen</p>
- <p>
- By doing this before booting the X60/T60, you will see console output from libreboot. You will also see
- GRUB displaying on the serial output, and you will be able to see MemTest86+ on the serial output aswell.
- You can also configure your distro so that a terminal (TTY) is accessible from the serial console.
- </p>
- <p>
- The following guide is for Ubuntu, and can be followed for Trisquel 6.0 which is based on Ubuntu 12.04
- (should also work in Trisquel 7, based on Ubuntu 14.04) to enable a serial console using GeTTY:<br/>
- <a href="https://help.ubuntu.com/community/SerialConsoleHowto">https://help.ubuntu.com/community/SerialConsoleHowto</a>
- </p>
- <p>
- Note: part of the tutorial above requires changing your grub.cfg. Just change the <b>linux</b> line to add instructions for enabling getty.
- See <a href="../gnulinux/grub_cbfs.html">../gnulinux/grub_cbfs.html</a>.
- </p>
- <p><a href="#pagetop">Back to top of page</a>
-
- </div>
-
- <div class="section" id="powerbeeps">
-
- <h1>Power Management Beeps on Thinkpads</h1>
-
- <p>
- When disconnecting or connecting the charger, a beep occurs.
- When the battery goes to a critically low charge level,
- a beep occurs. Nvramtool is included in libreboot, and can
- be used to enable or disable this behaviour.
- </p>
-
- <p>
- Disable or enable beeps when removing/adding the charger:<br/>
- $ <b>sudo ./nvramtool -w power_management_beeps=Enable</b><br/>
- $ <b>sudo ./nvramtool -w power_management_beeps=Disable</b>
- </p>
-
- <p>
- Disable or enable beeps when battery is low:<br/>
- $ <b>sudo ./nvramtool -w low_battery_beep=Enable</b><br/>
- $ <b>sudo ./nvramtool -w low_battery_beep=Disable</b>
- </p>
-
- <p>
- A reboot is required, for these changes to take effect.
- </p>
-
- </div>
-
- <div class="section">
-
- <h1 id="get_edid_panelname">Get EDID: Find out the name (model) of your LCD panel</h1>
- <p>
- Get the panel name with <b>sudo get-edid | strings</b><br/>
- Or look in <b>/sys/class/drm/card0-LVDS-1/edid</b>
- </p>
- <p>
- Alternatively you can use i2cdump. In Trisquel, this is in the package i2c-tools.<br/>
- $ <b>sudo modprobe i2c-dev</b><br/>
- $ <b>sudo i2cdump -y 5 0x50</b> (you might have to change the value for -y)<br/>
- $ <b>sudo rmmod i2c-dev</b><br/>
- You'll see the panel name in the output (from the EDID dump).
- </p>
- <p>
- If neither of these options work (or they are unavailable), physically removing the LCD panel is an option.
- Usually, there will be information printed on the back.
- </p>
-
- <p><a href="#pagetop">Back to top of page.</a></p>
-
- </div>
-
- <div class="section">
-
- <p>
- Copyright &copy; 2014, 2015 Francis Rowe &lt;info@gluglug.org.uk&gt;<br/>
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.3
- or any later version published by the Free Software Foundation;
- with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
- A copy of the license can be found at <a href="../gfdl-1.3.txt">../gfdl-1.3.txt</a>
- </p>
-
- <p>
- Updated versions of the license (when available) can be found at
- <a href="https://www.gnu.org/licenses/licenses.html">https://www.gnu.org/licenses/licenses.html</a>
- </p>
-
- <p>
- UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
- EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
- AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
- ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
- IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
- WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
- PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
- ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
- KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
- ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
- </p>
- <p>
- TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
- TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
- NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
- INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
- COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
- USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
- ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
- DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
- IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
- </p>
- <p>
- The disclaimer of warranties and limitation of liability provided
- above shall be interpreted in a manner that, to the extent
- possible, most closely approximates an absolute disclaimer and
- waiver of all liability.
- </p>
-
- </div>
-
-</body>
-</html>
diff --git a/docs/misc/index.texi b/docs/misc/index.texi
new file mode 100644
index 0000000..d334cc9
--- /dev/null
+++ b/docs/misc/index.texi
@@ -0,0 +1,156 @@
+\input texinfo
+@documentencoding UTF-8
+
+@ifnottex
+@paragraphindent 0
+@end ifnottex
+@titlepage
+@title Miscellaneous
+@end titlepage
+
+@node Top
+@top Miscellaneous
+
+@menu
+* Miscellaneous::
+* High Pitched Whining Noise on Idle how to remove in Trisquel 7::
+* High Pitched Whining Noise on Idle how to remove in Parabola::
+* X60/T60 Serial port - how to use for dock owners::
+* Power Management Beeps on Thinkpads::
+* Get EDID Find out the name model of your LCD panel::
+@end menu
+
+@node Miscellaneous
+@chapter Miscellaneous
+@anchor{#miscellaneous}
+Or @uref{../index.html,Back to main index}.
+
+@itemize
+@item
+@ref{#trisquel7_powertop,High Pitched Whining Noise on Idle (how to remove in Trisquel 7)}
+@item
+@ref{#high_pitch_parabola,High Pitched Whining Noise on Idle (how to remove in Parabola)}
+@item
+@ref{#serial,X60/T60: Serial port - how to use (for dock owners)}
+@item
+@ref{#powerbeeps,Power Management Beeps on Thinkpads}
+@item
+@uref{patch.html,Using diff and patch}
+@item
+@ref{#get_edid_panelname,Get EDID: Find out the name (model) of your LCD panel}
+@end itemize
+
+@node High Pitched Whining Noise on Idle how to remove in Trisquel 7
+@chapter High Pitched Whining Noise on Idle (how to remove in Trisquel 7)
+@anchor{#high-pitched-whining-noise-on-idle-how-to-remove-in-trisquel-7}
+@menu
+* Start powertop automatically at boot time::
+@end menu
+
+@node Start powertop automatically at boot time
+@section Start powertop automatically at boot time
+@anchor{#start-powertop-automatically-at-boot-time}
+Included with libreboot is a script called 'powertop.trisquel7'. Run this as root and it will setup powertop to run with --auto-tune at boot time. Load the file in your text editor to see how it does that.
+
+$ @strong{sudo ./resources/scripts/misc/powertop.trisquel7}
+
+Might want to run with --calibrate first
+
+If powertop doesn't work, another way (reduces battery life slightly) is to add @emph{processor.max_cstate=2} to the @emph{linux} line in grub.cfg, using @uref{../gnulinux/grub_cbfs.html,this guide}.
+
+@ref{#pagetop,Back to top of page}
+
+@node High Pitched Whining Noise on Idle how to remove in Parabola
+@chapter High Pitched Whining Noise on Idle (how to remove in Parabola)
+@anchor{#high-pitched-whining-noise-on-idle-how-to-remove-in-parabola}
+The following removes most of the noise. It reduces what is a high frequency whine (that not everyone can hear) to a slight buzz (which most people can't hear or doesn't bother most people).
+
+This is not perfect! The full solution is still not discovered but this is a step towards that. Also, in some instances you will need to run 'sudo powertop --auto-tune' again. This needs to be implemented properly in coreboot itself!
+
+On the X60 with coreboot or libreboot, there is a high pitched sound when idle. So far we have use processor.max_cstate=2 or idle=halt in GRUB. These consume power. Stop using them!
+
+Be root@* @strong{$ su -}
+
+Installed powertop:@* @strong{# pacman -S powertop}
+
+and added the following to /etc/systemd/system/powertop.service :
+
+@verbatim
+[Unit]
+Description=Powertop tunings
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStart=/usr/bin/powertop --auto-tune
+# "powertop --auto-tune" still needs a terminal for some reason. Possibly a bug?
+Environment="TERM=xterm"
+
+[Install]
+WantedBy=multi-user.target
+@end verbatim
+
+Finally, as root do that:@* @strong{# systemctl enable powertop}@* @strong{# systemctl start powertop}
+
+The next time you boot the system, the buzz will be gone.
+
+Might want to run with --calibrate first
+
+If powertop doesn't work, another way (reduces battery life slightly) is to add @emph{processor.max_cstate=2} to the @emph{linux} line in grub.cfg, using @uref{../gnulinux/grub_cbfs.html,this guide}.
+
+@ref{#pagetop,Back to top of page}
+
+@node X60/T60 Serial port - how to use for dock owners
+@chapter X60/T60: Serial port - how to use (for dock owners)
+@anchor{#x60t60-serial-port---how-to-use-for-dock-owners}
+For the Thinkpad X60 you can use the @strong{"UltraBase X6"} dock (for the X60 Tablet it is called X6 Tablet UltraBase). For the ThinkPad T60, you can use the @strong{"Advanced Mini Dock"}.
+
+If you are using one of the ROM images with 'serial' in the name, then you have serial port enabled in libreboot and you have memtest86+ included inside the ROM. Connect your null modem cable to the serial port on the dock and connect the other end to a 2nd system using your USB Serial adapter.
+
+On the 2nd system, you can try this (using GNU Screen):@* @strong{$ sudo screen /dev/ttyUSB0 115200}
+
+How to quit GNU Screen: Ctrl+A then release and press K, and then press Y.
+
+There are also others like Minicom but I like GNU Screen
+
+By doing this before booting the X60/T60, you will see console output from libreboot. You will also see GRUB displaying on the serial output, and you will be able to see MemTest86+ on the serial output aswell. You can also configure your distro so that a terminal (TTY) is accessible from the serial console.
+
+The following guide is for Ubuntu, and can be followed for Trisquel 6.0 which is based on Ubuntu 12.04 (should also work in Trisquel 7, based on Ubuntu 14.04) to enable a serial console using GeTTY:@* @uref{https://help.ubuntu.com/community/SerialConsoleHowto,https://help.ubuntu.com/community/SerialConsoleHowto}
+
+Note: part of the tutorial above requires changing your grub.cfg. Just change the @strong{linux} line to add instructions for enabling getty. See @uref{../gnulinux/grub_cbfs.html,../gnulinux/grub_cbfs.html}.
+
+@ref{#pagetop,Back to top of page}
+
+@node Power Management Beeps on Thinkpads
+@chapter Power Management Beeps on Thinkpads
+@anchor{#power-management-beeps-on-thinkpads}
+When disconnecting or connecting the charger, a beep occurs. When the battery goes to a critically low charge level, a beep occurs. Nvramtool is included in libreboot, and can be used to enable or disable this behaviour.
+
+Disable or enable beeps when removing/adding the charger:@* $ @strong{sudo ./nvramtool -w power_management_beeps=Enable}@* $ @strong{sudo ./nvramtool -w power_management_beeps=Disable}
+
+Disable or enable beeps when battery is low:@* $ @strong{sudo ./nvramtool -w low_battery_beep=Enable}@* $ @strong{sudo ./nvramtool -w low_battery_beep=Disable}
+
+A reboot is required, for these changes to take effect.
+
+@node Get EDID Find out the name model of your LCD panel
+@chapter Get EDID: Find out the name (model) of your LCD panel
+@anchor{#get-edid-find-out-the-name-model-of-your-lcd-panel}
+Get the panel name with @strong{sudo get-edid | strings}@* Or look in @strong{/sys/class/drm/card0-LVDS-1/edid}
+
+Alternatively you can use i2cdump. In Trisquel, this is in the package i2c-tools.@* $ @strong{sudo modprobe i2c-dev}@* $ @strong{sudo i2cdump -y 5 0x50} (you might have to change the value for -y)@* $ @strong{sudo rmmod i2c-dev}@* You'll see the panel name in the output (from the EDID dump).
+
+If neither of these options work (or they are unavailable), physically removing the LCD panel is an option. Usually, there will be information printed on the back.
+
+@ref{#pagetop,Back to top of page.}
+
+Copyright © 2014, 2015 Francis Rowe <info@@gluglug.org.uk>@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license can be found at @uref{../gfdl-1.3.txt,../gfdl-1.3.txt}
+
+Updated versions of the license (when available) can be found at @uref{https://www.gnu.org/licenses/licenses.html,https://www.gnu.org/licenses/licenses.html}
+
+UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+
+TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+
+The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
+
+@bye
diff --git a/docs/misc/patch.html b/docs/misc/patch.html
deleted file mode 100644
index 2f488a0..0000000
--- a/docs/misc/patch.html
+++ /dev/null
@@ -1,218 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
-
- <style type="text/css">
- @import url('../css/main.css');
- </style>
-
- <title>
- Libreboot documentation: using diff and patch
- </title>
-
-</head>
-
-<body>
-
- <div class="section">
- <h1 id="pagetop">Diff and patch</h1>
- <p>This is just a quick guide for reference, use 'man' to know more.</p>
- <p>
- <a href="index.html">Back to index</a>
- </p>
- </div>
-
- <div class="section">
-
- <h1>
- Apply a patch
- </h1>
-
- <p class="important">
- To apply a patch to a single file, do that in it's directory:<br/>
- <b>$ patch &lt; foo.patch</b>
- </p>
-
- <p>
- Assuming that the patch is distributed in unified format identifying
- the file the patch should be applied to, the above will work. Otherwise:<br/>
- <b>$ patch foo.txt &lt; bar.patch</b>
- </p>
-
- <p>
- You can apply a patch to an entire directory, but note the &quot;p level&quot;.
- What this means is that inside patch files will be the files that you
- intend to patch, identified by path names that might be different
- when the files ane located on your own computer instead of on the computer
- where the patch was created. 'p' level instructs the 'patch' utility to
- ignore parts of the path name to identify the files correctly. Usually a
- p level of 1 will work, so you would use:<br/>
- <b>$ patch -p1 &lt; baz.patch</b>
- </p>
-
- <p>
- Change to the top level directory before running this. If a patch level
- of 1 cannot identify the files to patch, then inspect the patch file for file names.
- For example:<br/>
- <b>/home/user/do/not/panic/yet.c</b>
- </p>
-
- <p>
- and you are working in a directory that contains panic/yet.c, use:<br/>
- <b>$ patch -p5 &lt; baz.patch</b>
- </p>
-
- <p>
- You usually count one up for each path separator (forward slash)
- removed from the beginning of the path, until you are left with a path
- that exists in the current working directory. The count is the p level.
- </p>
-
- <p>
- Removing a patch using the -R flag<br/>
- <b>$ patch -p5 -R &lt; baz.patch</b>
- </p>
-
- <p><a href="#pagetop">Back to top of page.</a></p>
-
- </div>
-
- <div class="section">
-
- <h1>
- Create a patch with diff
- </h1>
-
- <p>
- Diff can create a patch for a single file:<br/>
- <b>$ diff -u original.c new.c &gt; original.patch</b>
- </p>
-
- <p>
- For diff'ing a source tree:<br/>
- <b>$ cp -R original new</b>
- </p>
-
- <p>
- Do whatever you want in new/ and then diff it:<br/>
- <b>$ diff -rupN original/ new/ &gt; original.patch</b>
- </p>
-
- <p><a href="#pagetop">Back to top of page.</a></p>
-
- </div>
-
- <div class="section">
-
- <h1>
- git diff
- </h1>
-
- <p>
- git is something special.
- </p>
- <p>
- Note: this won't show new files created.
- </p>
-
- <p>
- Just make whatever changes you want to a git clone and then:<br/>
- <b>$ git diff &gt; patch.git</b>
- </p>
-
- <p>
- Note the git revision that you did this with:<br/>
- <b>$ git log</b>
- </p>
-
- <p>
- Alternatively (better yet), commit your changes and then use:<br/>
- $ <b>git format-patch -N</b><br/>
- Replace N with the number of commits that you want to show.
- </p>
-
- <p><a href="#pagetop">Back to top of page.</a></p>
-
- </div>
-
- <div class="section">
-
- <h1>
- git apply
- </h1>
-
- <p>it really is.</p>
-
- <p>
- Now to apply that patch in the future, just git clone it again and do
- with the git revision you found from above:<br/>
- <b>$ git reset --hard REVISIONNUMBER</b>
- </p>
-
- <p>
- Now put patch.git in the git clone directory and do:<br/>
- <b>$ git apply patch.git</b>
- </p>
-
- <p>
- If you use a patch from git format-patch, then use <b>git am patch.git</b> instead of <b>git apply patch.git</b>. git-am
- will re-create the commits aswell, instead of just applying the patch.
- </p>
-
- <p><a href="#pagetop">Back to top of page.</a></p>
-
- </div>
-
- <div class="section">
-
- <p>
- Copyright &copy; 2014, 2015 Francis Rowe &lt;info@gluglug.org.uk&gt;<br/>
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.3
- or any later version published by the Free Software Foundation;
- with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
- A copy of the license can be found at <a href="../gfdl-1.3.txt">../gfdl-1.3.txt</a>
- </p>
-
- <p>
- Updated versions of the license (when available) can be found at
- <a href="https://www.gnu.org/licenses/licenses.html">https://www.gnu.org/licenses/licenses.html</a>
- </p>
-
- <p>
- UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
- EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
- AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
- ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
- IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
- WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
- PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
- ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
- KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
- ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
- </p>
- <p>
- TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
- TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
- NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
- INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
- COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
- USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
- ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
- DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
- IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
- </p>
- <p>
- The disclaimer of warranties and limitation of liability provided
- above shall be interpreted in a manner that, to the extent
- possible, most closely approximates an absolute disclaimer and
- waiver of all liability.
- </p>
-
- </div>
-
-</body>
-</html>
diff --git a/docs/misc/patch.texi b/docs/misc/patch.texi
new file mode 100644
index 0000000..abf94cc
--- /dev/null
+++ b/docs/misc/patch.texi
@@ -0,0 +1,97 @@
+\input texinfo
+@documentencoding UTF-8
+
+@ifnottex
+@paragraphindent 0
+@end ifnottex
+@titlepage
+@title Libreboot documentation: using diff and patch
+@end titlepage
+
+@node Top
+@top Libreboot documentation: using diff and patch
+
+@menu
+* Diff and patch::
+* Apply a patch::
+* Create a patch with diff::
+* git diff::
+* git apply::
+@end menu
+
+@node Diff and patch
+@chapter Diff and patch
+@anchor{#diff-and-patch}
+This is just a quick guide for reference, use 'man' to know more.
+
+@uref{index.html,Back to index}
+
+@node Apply a patch
+@chapter Apply a patch
+@anchor{#apply-a-patch}
+To apply a patch to a single file, do that in it's directory:@* @strong{$ patch < foo.patch}
+
+Assuming that the patch is distributed in unified format identifying the file the patch should be applied to, the above will work. Otherwise:@* @strong{$ patch foo.txt < bar.patch}
+
+You can apply a patch to an entire directory, but note the "p level". What this means is that inside patch files will be the files that you intend to patch, identified by path names that might be different when the files ane located on your own computer instead of on the computer where the patch was created. 'p' level instructs the 'patch' utility to ignore parts of the path name to identify the files correctly. Usually a p level of 1 will work, so you would use:@* @strong{$ patch -p1 < baz.patch}
+
+Change to the top level directory before running this. If a patch level of 1 cannot identify the files to patch, then inspect the patch file for file names. For example:@* @strong{/home/user/do/not/panic/yet.c}
+
+and you are working in a directory that contains panic/yet.c, use:@* @strong{$ patch -p5 < baz.patch}
+
+You usually count one up for each path separator (forward slash) removed from the beginning of the path, until you are left with a path that exists in the current working directory. The count is the p level.
+
+Removing a patch using the -R flag@* @strong{$ patch -p5 -R < baz.patch}
+
+@ref{#pagetop,Back to top of page.}
+
+@node Create a patch with diff
+@chapter Create a patch with diff
+@anchor{#create-a-patch-with-diff}
+Diff can create a patch for a single file:@* @strong{$ diff -u original.c new.c > original.patch}
+
+For diff'ing a source tree:@* @strong{$ cp -R original new}
+
+Do whatever you want in new/ and then diff it:@* @strong{$ diff -rupN original/ new/ > original.patch}
+
+@ref{#pagetop,Back to top of page.}
+
+@node git diff
+@chapter git diff
+@anchor{#git-diff}
+git is something special.
+
+Note: this won't show new files created.
+
+Just make whatever changes you want to a git clone and then:@* @strong{$ git diff > patch.git}
+
+Note the git revision that you did this with:@* @strong{$ git log}
+
+Alternatively (better yet), commit your changes and then use:@* $ @strong{git format-patch -N}@* Replace N with the number of commits that you want to show.
+
+@ref{#pagetop,Back to top of page.}
+
+@node git apply
+@chapter git apply
+@anchor{#git-apply}
+it really is.
+
+Now to apply that patch in the future, just git clone it again and do with the git revision you found from above:@* @strong{$ git reset --hard REVISIONNUMBER}
+
+Now put patch.git in the git clone directory and do:@* @strong{$ git apply patch.git}
+
+If you use a patch from git format-patch, then use @strong{git am patch.git} instead of @strong{git apply patch.git}. git-am will re-create the commits aswell, instead of just applying the patch.
+
+@ref{#pagetop,Back to top of page.}
+
+Copyright © 2014, 2015 Francis Rowe <info@@gluglug.org.uk>@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license can be found at @uref{../gfdl-1.3.txt,../gfdl-1.3.txt}
+
+Updated versions of the license (when available) can be found at @uref{https://www.gnu.org/licenses/licenses.html,https://www.gnu.org/licenses/licenses.html}
+
+UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+
+TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+
+The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
+
+@bye