From 66dd229b6bfcf6985576b2d6dc75b2e37554e4fa Mon Sep 17 00:00:00 2001 From: Urja Rannikko Date: Sat, 22 Jun 2013 23:45:36 +0100 Subject: [PATCH] pandora: Add menu entry to enter console Signed-off-by: Urja Rannikko --- board/pandora/menu.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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) -- 2.39.5