--- grub/stage2/builtins.c	2006-11-29 18:29:16.000000000 +0100
+++ grub2/stage2/builtins.c	2006-11-29 15:47:51.000000000 +0100
@@ -842,6 +842,7 @@
   return 0;
 }
 
+
 static struct builtin builtin_onportsel =
 {
   "onportsel",
@@ -853,6 +854,69 @@
 };
 
 
+/* lannerhw */
+static int
+lannerhw_func (char *arg, int flags)
+{
+  int i = 0;
+  int port, on, mask;
+  unsigned char byte;
+  char hw[50];
+
+  while(1)
+  {
+    switch(i)
+    {
+      case 0:
+      	if(grub_strlen(arg) > sizeof(hw))
+					return 1;
+				grub_strcpy(hw, arg);
+				break;
+    }
+    i++;
+    arg = skip_to(0, arg);
+    if(arg[0] == '\0') break;
+  }
+	
+  if(grub_strcmp(hw, "FW-7500C") == 0 ||
+     grub_strcmp(hw, "FW-7550B") == 0)
+  {
+		port = 0x48f;
+		on = 0x10;
+		mask = 0xe7;
+	}
+	else if(grub_strcmp(hw, "FW-7656A") == 0 ||
+	        grub_strcmp(hw, "FW-7656B") == 0)
+	{
+	  port = 0x480 + 0x38;
+	  on = 0x40;
+	  mask = 0x9f;
+	}
+	else
+	{
+	  return 1;
+	}
+	grub_printf("Lanner-HW: %s\n", hw);
+  byte = portin(port);
+  byte &= mask;
+  byte |= on;
+  portout(port, byte);
+  return 0;
+}
+
+
+static struct builtin builtin_lannerhw =
+{
+  "lannerhw",
+  lannerhw_func,
+  BUILTIN_MENU,
+  "lannerhw HW-TYPE",
+  "Turn on the status LED of the Lanner hardware"
+};
+
+
+
+
 #ifdef GRUB_UTIL
 /* device */
 static int
@@ -5031,6 +5095,7 @@
   &builtin_install,
   &builtin_ioprobe,
   &builtin_kernel,
+	&builtin_lannerhw,
   &builtin_lock,
   &builtin_makeactive,
   &builtin_map,
--- grub/stage2/stage2.c	2006-11-29 18:29:16.000000000 +0100
+++ grub2/stage2/stage2.c	2006-11-29 13:55:21.000000000 +0100
@@ -250,10 +250,6 @@
         { entryno = onportsel_entry; mbi.lpt_val = 1; }
       else
         mbi.lpt_val = 0;
-      byte = portin(0x48f);
-      byte &= 0xe7;
-      byte |= 0x10;
-      portout(0x48f, byte);
     }
   
   /* Dumb terminal always use all entries for display 

