pandora: Add menu entry to enter console
[pandora-u-boot.git] / board / pandora / menu.c
index 8fd4885..eba4595 100644 (file)
@@ -91,6 +91,18 @@ static int menu_do_serial(struct menu_item *item)
        return 1;
 }
 
+#ifdef CONFIG_KEYBOARD
+static int menu_do_console(struct menu_item *item)
+{
+       printf("Switched to console.\n");
+       setenv("stdout", "lcd");
+       setenv("stderr", "lcd");
+       setenv("stdin",  "kbd");
+       setenv("bootcmd", "");
+       return 1;
+}
+#endif
+
 static int menu_do_script_cmd(struct menu_item *item)
 {
        int failed = 0;
@@ -183,6 +195,9 @@ static struct menu_item default_menu_items[] = {
        { "power off",          menu_do_poweroff, },
        { "USB serial prompt",  menu_do_usb_serial, },
        { "serial prompt",      menu_do_serial, },
+#ifdef CONFIG_KEYBOARD
+       { "console prompt",     menu_do_console, },
+#endif
 };
 
 static void do_mmc(int dev_id)