[ previous ] [ next ] [ threads ]
 
 From:  "Walter C. Pelissero" <walter at pelissero dot de>
 To:  m0n0wall dash dev at lists dot m0n0 dot ch
 Subject:  front panel LEDs
 Date:  Fri, 20 May 2005 18:51:09 +0200
The following is a patch that enables m0n0wall 1.2 to use the
/dev/led/* devices on the PC-Engine WRAP boards.


Index: geode.c
===================================================================
RCS file: /usr/src.cvs/src/sys/i386/i386/geode.c,v
retrieving revision 1.5
diff -u -r1.5 geode.c
--- geode.c	16 Jun 2004 09:47:07 -0000	1.5
+++ geode.c	20 May 2005 15:42:28 -0000
@@ -145,8 +145,8 @@
 			led1b = 20;
 			led1 = led_create(led_func, &led1b, "error");
 		} else if (NULL !=
-		    bios_string(0xf9000, 0xf9000, "PC Engines WRAP.1C ", 0)) {
-			printf("PC Engines WRAP.1C platfrom\n");
+		    bios_string(0xf9000, 0xf9010, "PC Engines WRAP", 0)) {
+			printf("PC Engines WRAP platfrom\n");
 			led1b = -2;
 			led2b = -3;
 			led3b = -18;



Although my original aim was a bit grander at the moment I'm using it
just to blink led1 after bootstrap to show that the box is running
fine.  To do so it's enough to add the following line somewhere in the
/etc/rc file:

  # On platforms equipped with LEDs start blinking to show activity
  test -d /dev/led && echo f8 > /dev/led/led1

I'm about to file a PR for the FreeBSD project but I wouldn't expect
such a small patch to show up any time soon in the CVS tree.

-- 
walter pelissero
http://www.pelissero.de