diff options
author | Alyssa Rosenzweig <alyssa@rosenzweig.io> | 2017-03-17 23:15:09 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <alyssa@rosenzweig.io> | 2017-03-17 23:15:09 -0700 |
commit | 1eb5130a1c70a7238548d977e9c6f371c007eed7 (patch) | |
tree | ee28aa07cbb52f25b5f468f59ec8d9587edff739 /docs/misc | |
parent | b62dbec1e23f03ae944b51fc4b510dc56ed9b83e (diff) | |
download | librebootfr-1eb5130a1c70a7238548d977e9c6f371c007eed7.tar.gz librebootfr-1eb5130a1c70a7238548d977e9c6f371c007eed7.zip |
It wasn't me, I swear!
Diffstat (limited to 'docs/misc')
-rw-r--r-- | docs/misc/bbb_ehci.md | 21 | ||||
-rw-r--r-- | docs/misc/index.md | 36 | ||||
-rw-r--r-- | docs/misc/patch.md | 45 |
3 files changed, 68 insertions, 34 deletions
diff --git a/docs/misc/bbb_ehci.md b/docs/misc/bbb_ehci.md index 4d08fea7..5cd68eab 100644 --- a/docs/misc/bbb_ehci.md +++ b/docs/misc/bbb_ehci.md @@ -126,7 +126,8 @@ next step. ### Patch BBB's g\_dbgp module (optional, but highly recommended) {#PatchBBBsgdbgpmoduleoptionalbuthighlyrecommended} For the reasons why you need this, see: [EHCI Gadget -Debug](http://www.coreboot.org/EHCI_Gadget_Debug).\ +Debug](http://www.coreboot.org/EHCI_Gadget_Debug). + Make sure that you have cross compiling environment for arm-linux-gnueabihf setup on your *host*. @@ -198,7 +199,8 @@ arm-linux-gnueabihf setup on your *host*. ### Configure libreboot with EHCI debug {#ConfigurelibrebootwithEHCIdebug} Libreboot(coreboot) should be configured with debug turned on and to -push debug messages to the EHCI debug port.\ +push debug messages to the EHCI debug port. + If you've downloaded the binary distribution, you can check if it is properly configured in the following way: @@ -234,7 +236,8 @@ documented [here](https://johnlewis.ie/coreboot-ehci-debug-gadget-demonstration/) (also tested/verified). -Then:\ +Then: + CONFIG_CONSOLE_USB=y (Console -> USB dongle console output) @@ -255,7 +258,8 @@ refer to the doc(**FIXME: link** about compiling libreboot. #### Selecting HCD Index and USB Debug port {#SelectingHCDIndexandUSBDebugport} This applies (and works) only if the USB controller that supports debug -(found in the first section) is from Intel.\ +(found in the first section) is from Intel. + If the PCI ID of the port you found in the first section is 0000:00:1a.0 or 0000:00:1d.0 , you are ok. Otherwise you have to try without guarantee that will work. @@ -266,10 +270,12 @@ then for CONFIG\_USBDEBUG\_HCD\_INDEX choose 2, otherwise choose 0 . For CONFIG\_USBDEBUG\_DEFAULT\_PORT choose the port from the first section that correspond to the PCI ID -Notes:\ +Notes: + The above is based on the implementation of coreboot/src/southbridge/intel/common/usb\_debug.c : -pci\_ehci\_dbg\_dev() .\ +pci\_ehci\_dbg\_dev() . + This is enough as it applies for the supported GM45/G45 Thinkpads. coreboot support some other contollers too, but they are irellevent for libreboot (for now). @@ -356,7 +362,8 @@ Interface](http://cs.usfca.edu/~cruse/cs698s10/) -Copyright © 2015 Alex David <opdecirkel@gmail.com>\ +Copyright © 2015 Alex David <opdecirkel@gmail.com> + Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike 4.0 International license or any later version published by Creative diff --git a/docs/misc/index.md b/docs/misc/index.md index 30914faf..af29304c 100644 --- a/docs/misc/index.md +++ b/docs/misc/index.md @@ -58,10 +58,12 @@ 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\ +Be root + $ su - -Installed powertop:\ +Installed powertop: + # pacman -S powertop and added the following to /etc/systemd/system/powertop.service : @@ -79,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 @@ -107,7 +110,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 @@ -122,7 +126,8 @@ can also configure your distro so that a terminal (TTY) is accessible from the serial console. The following guide is for Ubuntu, but it should work in Debian and -Devuan, to enable a serial console using GeTTY:\ +Devuan, to enable a serial console using GeTTY: + <https://help.ubuntu.com/community/SerialConsoleHowto> (we DO NOT recommend Ubuntu, because it contains non-free software in the default repos. Use Debian or Devuan) @@ -226,11 +231,13 @@ 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:\ +Disable or enable beeps when removing/adding the charger: + $ sudo ./nvramtool -w power\_management\_beeps=Enable $ **sudo ./nvramtool -w power\_management\_beeps=Disable** -Disable or enable beeps when battery is low:\ +Disable or enable beeps when battery is low: + $ sudo ./nvramtool -w low\_battery\_beep=Enable $ **sudo ./nvramtool -w low\_battery\_beep=Disable** @@ -245,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). @@ -268,14 +277,16 @@ needed for cause): e1000e 0000:00:19.0 enp0s25: Detected Hardware Unit Hang -Possible workaround, tested by Nazara: Disable C-STATES.\ +Possible workaround, tested by Nazara: Disable C-STATES. + **NOTE: this also disables power management, because disabling C-States means that your CPU will now be running at full capacity (and therefore using more power) non-stop, which will drain battery life if this is a laptop. If power usage is a concern, then you should not use this. (we're also not sure whether this workaround is appropriate)** -To disable c-states, do this in GNU+Linux:\ +To disable c-states, do this in GNU+Linux: + **for i in /sys/devices/system/cpu/cpu/cpuidle/state/disable; do echo 1 > $i; done** @@ -296,7 +307,8 @@ Put this script in /etc/init.d/ on debian-based systems. -Copyright © 2014, 2015, 2016 Leah Rowe <info@minifree.org>\ +Copyright © 2014, 2015, 2016 Leah Rowe <info@minifree.org> + Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike 4.0 International license or any later version published by Creative diff --git a/docs/misc/patch.md b/docs/misc/patch.md index 43c35382..f9df55c0 100644 --- a/docs/misc/patch.md +++ b/docs/misc/patch.md @@ -11,11 +11,13 @@ This is just a quick guide for reference, use 'man' to know more. Apply a patch ============= -To apply a patch to a single file, do that in it's directory:\ +To apply a patch to a single file, do that in it's directory: + $ 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:\ +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,22 +26,26 @@ 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 of 1 cannot identify the files to patch, then inspect the patch file for -file names. For example:\ +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 +55,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,13 +78,16 @@ 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:\ +Alternatively (better yet), commit your changes and then use: + $ git format-patch -N Replace N with the number of commits that you want to show. @@ -89,10 +101,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** @@ -103,7 +117,8 @@ aswell, instead of just applying the patch. -Copyright © 2014, 2015 Leah Rowe <info@minifree.org>\ +Copyright © 2014, 2015 Leah Rowe <info@minifree.org> + Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike 4.0 International license or any later version published by Creative |