From: Grazvydas Ignotas Date: Tue, 4 May 2010 22:08:09 +0000 (+0300) Subject: disable bootdelay, use menu item for serial prompt instead X-Git-Tag: Release-2010-05/1~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58b4beb59718a8e244cbb9b774a5fcb2a87802fb;p=pandora-u-boot.git disable bootdelay, use menu item for serial prompt instead --- diff --git a/board/pandora/menu.c b/board/pandora/menu.c index 97fd3ebabd5..02216ef2ed4 100644 --- a/board/pandora/menu.c +++ b/board/pandora/menu.c @@ -68,6 +68,15 @@ static int menu_do_poweroff(struct menu_item *item) return 0; } +static int menu_do_serial(struct menu_item *item) +{ + printf("Switched to serial.\n"); + + setenv("stdout", "serial"); + setenv("bootcmd", ""); + return 1; +} + static int menu_do_script_cmd(struct menu_item *item) { int failed = 0; @@ -84,12 +93,13 @@ static int menu_do_script_cmd(struct menu_item *item) static struct menu_item default_menu_items[] = { { "default boot", menu_do_default, }, { "power off", menu_do_poweroff, }, + { "serial prompt", menu_do_serial, }, }; static void menu_init(void) { - const char *check_format1 = "%sload mmc1 0:%d ${loadaddr} boot.scr"; - const char *check_format2 = "%sload mmc1 0:%d ${loadaddr} boot.txt"; + const char *check_format1 = "%sload mmc1 0:%d ${loadaddr} boot.scr 4"; + const char *check_format2 = "%sload mmc1 0:%d ${loadaddr} boot.txt 4"; const char *run_format1 = "%sload mmc1 0:%d ${loadaddr} boot.scr;source ${loadaddr}"; const char *run_format2 = "mw.l ${loadaddr} 0 1024;%sload mmc1 0:%d ${loadaddr} boot.txt;" "ssource ${loadaddr}"; @@ -99,7 +109,7 @@ static void menu_init(void) struct menu_item *mitem; int i; - for (i = 0; i < ARRAY_SIZE(default_menu_items); i++) + for (i = 0; i < 2; i++) menu_items[i] = &default_menu_items[i]; menu_item_count = i; @@ -153,6 +163,9 @@ found: menu_items[menu_item_count++] = mitem; } + if (menu_item_count < ARRAY_SIZE(menu_items)) + menu_items[menu_item_count++] = &default_menu_items[2]; + setenv("stdout", "lcd"); } diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h index 743b66e1b83..3d9c33dff97 100644 --- a/include/configs/omap3_pandora.h +++ b/include/configs/omap3_pandora.h @@ -165,7 +165,7 @@ #endif /* Environment information */ -#define CONFIG_BOOTDELAY 1 +#define CONFIG_BOOTDELAY 0 #define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x82000000\0" \