As mentioned in another post, we need extra thing to support the switch at the back of the ls-wvl. But instead of poll the status of the switch continuously, I prefer to use hot plug event to do that. And to do that, I use the button hotplug kernel module found on openwrt.org. But again, a patch is needed to support udev.

First get the button hotplug sources from here (button-hotplug.c and Kconfig are needed):h==ps://dev.openwrt.org/browser/trunk/package/button-hotplug/src

Apply this patch (got from h==ps://lists.openwrt.org/pipermail/openwrt-devel/2012-February/014205.html. I applied the patch manually, one line after another since it was mentioned that the source in trunk is different, but later found that the patch could be applied cleanly.)

Modify the TOPDIR to point to your topdir that kernel modules are placed, and KVERSION to your kernel version. Then under the source directory, type

Code:

make && make install

to get the module compiled and installed. Note that it was assumed that the sources were cross-compiled. And the kernel module is placed at $TOPDIR/lib/modules/$KVERSION, the kernel source should be pointed at by $TOPDIR/lib/modules/$KVERSION/build. So you still need to copy the kernel module sub-directory to the machine. And if it's not the case, modify the Makefile accordingly.

That's all. When you move the switch from on to off or to auto, the machine will try to power off. But if the power switch is moved to auto, the machine will actually restart. Distinguish auto from off is possible, but I didn't bother to try that since this is already enough for me. And to implement that I'll need to search again since I don't have too much shell script skill. (Basically you define another rule for AUTO switch (BTN_2), when it is on, create a file. Then for power switch "BTN_1", when it is released, delay a few time, then check that file's existence, you know the switch's exact position).

Hi hato,can you help me guide me to patche it for kernel linux 3.8.3?I use buffalo ls-wvl run debian wheezy + kernel linux 3.8.3 but not control button on, off or auto behind boxpls help me. thanks you very much

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum