aboutsummaryrefslogtreecommitdiff
path: root/docs/misc
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>2017-04-03 10:23:37 -0700
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>2017-04-03 10:23:37 -0700
commit6caf836e3390faefaad8257b9cec2eb97bdbfb41 (patch)
tree0c96f4640b4b8bce441269b5d2bdf83e7f12a459 /docs/misc
parent78c7b8355832b9f3eb574788ab4c5a7d96f0486e (diff)
downloadlibrebootfr-6caf836e3390faefaad8257b9cec2eb97bdbfb41.tar.gz
librebootfr-6caf836e3390faefaad8257b9cec2eb97bdbfb41.zip
Global fix
Diffstat (limited to 'docs/misc')
-rw-r--r--docs/misc/index.md18
-rw-r--r--docs/misc/patch.md33
2 files changed, 34 insertions, 17 deletions
diff --git a/docs/misc/index.md b/docs/misc/index.md
index afffbbeb..dabe1e54 100644
--- a/docs/misc/index.md
+++ b/docs/misc/index.md
@@ -62,7 +62,8 @@ Be root
$ su -
-Installed powertop:\
+Installed powertop:
+
# pacman -S powertop
and added the following to /etc/systemd/system/powertop.service :
@@ -80,7 +81,8 @@ and added the following to /etc/systemd/system/powertop.service :
[Install]
WantedBy=multi-user.target
-Finally, as root do that:\
+Finally, as root do that:
+
# systemctl enable powertop
# systemctl start powertop
@@ -109,7 +111,8 @@ 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):\
+On the 2nd system, you can try this (using GNU Screen):
+
$ sudo screen /dev/ttyUSB0 115200
How to quit GNU Screen: Ctrl+A then release and press K, and then press
@@ -234,7 +237,8 @@ Disable or enable beeps when removing/adding the charger:
$ sudo ./nvramtool -w power\_management\_beeps=Disable
Disable or enable beeps when battery is low:
- $ sudo ./nvramtool -w low\_battery\_beep=Enable\
+ $ sudo ./nvramtool -w low\_battery\_beep=Enable
+
$ sudo ./nvramtool -w low\_battery\_beep=Disable
A reboot is required, for these changes to take effect.
@@ -248,10 +252,12 @@ Get the panel name with **sudo get-edid | strings**\
Or look in **/sys/class/drm/card0-LVDS-1/edid**
Alternatively you can use i2cdump. In Debian and Devuan, this is in the
-package i2c-tools.\
+package i2c-tools.
+
$ sudo modprobe i2c-dev
$ sudo i2cdump -y 5 0x50 (you might have to change the value for
--y)\
+-y)
+
$ sudo rmmod i2c-dev
You'll see the panel name in the output (from the EDID dump).
diff --git a/docs/misc/patch.md b/docs/misc/patch.md
index a8dffc92..73d4979a 100644
--- a/docs/misc/patch.md
+++ b/docs/misc/patch.md
@@ -15,7 +15,8 @@ To apply a patch to a single file, do that in it's directory:
Assuming that the patch is distributed in unified format identifying the
-file the patch should be applied to, the above will work. Otherwise:\
+file the patch should be applied to, the above will work. Otherwise:
+
$ patch foo.txt < bar.patch
You can apply a patch to an entire directory, but note the "p level".
@@ -24,7 +25,8 @@ 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:\
+Usually a p level of 1 will work, so you would use:
+
$ patch -p1 < baz.patch
Change to the top level directory before running this. If a patch level
@@ -32,14 +34,16 @@ of 1 cannot identify the files to patch, then inspect the patch file for
file names. For example:\
**/home/user/do/not/panic/yet.c**
-and you are working in a directory that contains panic/yet.c, use:\
+and you are working in a directory that contains panic/yet.c, use:
+
$ 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\
+Removing a patch using the -R flag
+
$ patch -p5 -R < baz.patch
[Back to top of page.](#pagetop)
@@ -49,13 +53,16 @@ Removing a patch using the -R flag\
Create a patch with diff
========================
-Diff can create a patch for a single file:\
+Diff can create a patch for a single file:
+
$ diff -u original.c new.c > original.patch
-For diff'ing a source tree:\
+For diff'ing a source tree:
+
$ cp -R original new
-Do whatever you want in new/ and then diff it:\
+Do whatever you want in new/ and then diff it:
+
$ diff -rupN original/ new/ > original.patch
[Back to top of page.](#pagetop)
@@ -69,10 +76,12 @@ git is something special.
Note: this won't show new files created.
-Just make whatever changes you want to a git clone and then:\
+Just make whatever changes you want to a git clone and then:
+
$ git diff > patch.git
-Note the git revision that you did this with:\
+Note the git revision that you did this with:
+
$ git log
Alternatively (better yet), commit your changes and then use:
@@ -89,10 +98,12 @@ 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:\
+with the git revision you found from above:
+
$ git reset --hard REVISIONNUMBER
-Now put patch.git in the git clone directory and do:\
+Now put patch.git in the git clone directory and do:
+
$ git apply patch.git
If you use a patch from git format-patch, then use **git am patch.git**