Differences

This shows you the differences between two versions of the page.

doc:howto:hardware.button [2013/01/17 20:02]
veoxwmt
doc:howto:hardware.button [2013/04/15 06:24] (current)
xiloynaha fix script's url
Line 10: Line 10:
===== Kernel configuration ===== ===== Kernel configuration =====
 +If a target platform is known to support buttons, appropriate kernel modules are selected by default.
-Depending on platform, kernel modules ''input-gpio-buttons'' and ''gpio-button-hotplug'' might be required.+If a platform is not known to support buttons, various kernel modules might be required. These might be ''diag'', ''input-gpio-buttons'', ''gpio-button-hotplug'' and others. However, installing various modules will not necessarily yield a successful result.
===== Preliminary steps ===== ===== Preliminary steps =====
Line 53: Line 54:
''BTN_1'' is the name of the button you want to use. If you want or need to use another button, replace every instance of ''BTN_1'' in the rest of this document with the correct text. From now on, there are several possible approaches: the first uses the ''00-button'' script from the ''atheros'' target, the other a simpler shell script. ''BTN_1'' is the name of the button you want to use. If you want or need to use another button, replace every instance of ''BTN_1'' in the rest of this document with the correct text. From now on, there are several possible approaches: the first uses the ''00-button'' script from the ''atheros'' target, the other a simpler shell script.
 +
 +**notice**
 +
 +If you want to run programs from hotplug's scripts you need to be sure ''PATH'' and the like are initialized properly, scripts invoked by hotplug only have a default env. Especially if you install stuff into nonstandard locations like /opt/usr/bin. It's possible by adding ''. /etc/profile'' after ''#!/bin/sh''
 +
 +<code>
 +#!/bin/sh
 +. /etc/profile
 +</code>
===== Using Atheros' 00-button + UCI ===== ===== Using Atheros' 00-button + UCI =====
Line 58: Line 68:
<code> <code>
-# wget -O /etc/hotplug.d/button/00-button https://dev.openwrt.org/browser/trunk/target/linux/atheros/base-files/etc/hotplug.d/button/00-button +# wget -O /etc/hotplug.d/button/00-button https://dev.openwrt.org/export/36332/trunk/target/linux/atheros/base-files/etc/hotplug.d/button/00-button
</code> </code>

Back to top

doc/howto/hardware.button.1358449356.txt.bz2 · Last modified: 2013/01/17 20:02 by veoxwmt