From: Urja Rannikko Date: Sat, 22 Jun 2013 22:45:36 +0000 (+0100) Subject: pandora: Add menu entry to enter console X-Git-Tag: sz_175~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66dd229b6bfcf6985576b2d6dc75b2e37554e4fa;p=pandora-u-boot.git pandora: Add menu entry to enter console Signed-off-by: Urja Rannikko --- diff --git a/board/pandora/menu.c b/board/pandora/menu.c index 8fd4885edc3..eba459576ba 100644 --- a/board/pandora/menu.c +++ b/board/pandora/menu.c @@ -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)