From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Sun, 18 Dec 2011 22:34:11 +0100 Subject: [U-Boot] [PATCH 15/15] RX-51: Add support for bootmenu In-Reply-To: <1324244051-25756-1-git-send-email-pali.rohar@gmail.com> References: <1778406.ezGto4lKnu@pali-elitebook> <1324244051-25756-1-git-send-email-pali.rohar@gmail.com> Message-ID: <1324244051-25756-15-git-send-email-pali.rohar@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de * default bootmenu entries: NOLO kernel, internal eMMC memory, external SD card, u-boot boot order * when keyboard slide is closed always boot NOLO kernel * when keyborad slide is open in CONFIG_PREBOOT try load bootmenu.scr from first FAT partition of internal eMMC memory (also known as MyDocs) which (should) overwrite default bootmenu entries Signed-off-by: Pali Roh?r --- include/configs/nokia_rx51.h | 22 ++++++++++++++++++---- 1 files changed, 18 insertions(+), 4 deletions(-) diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h index c892f65..2a1de85 100644 --- a/include/configs/nokia_rx51.h +++ b/include/configs/nokia_rx51.h @@ -134,6 +134,7 @@ #define CONFIG_CMD_MMC /* MMC support */ #undef CONFIG_CMD_ONENAND /* NAND support */ +#define CONFIG_CMD_BOOTMENU /* ANSI terminal Boot Menu */ #define CONFIG_CMD_CLEAR /* ANSI terminal clear screen command */ #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */ @@ -185,8 +186,6 @@ int rx51_kp_getc(void); #endif /* Environment information */ -#define CONFIG_BOOTDELAY 3 - #define CONFIG_EXTRA_ENV_SETTINGS \ "usbtty=cdc_acm\0" \ "stdin=vga\0" \ @@ -232,10 +231,22 @@ int rx51_kp_getc(void); "fi;" \ "fi\0" \ "immcboot=setenv mmcnum 1; run trymmcboot\0" \ - "emmcboot=setenv mmcnum 0; run trymmcboot\0" + "emmcboot=setenv mmcnum 0; run trymmcboot\0" \ + "menucmd=bootmenu\0" \ + "bootmenu_0=Internal flash=run noloboot\0" \ + "bootmenu_1=Internal eMMC=run immcboot\0" \ + "bootmenu_2=External SD card=run emmcboot\0" \ + "bootmenu_3=U-Boot boot order=boot\0" \ + "bootmenu_delay=3\0" #define CONFIG_PREBOOT \ - "if test $slide_sw != open; then run noloboot; fi;" + "if test $slide_sw = open; then " \ + "setenv mmcnum 1; setenv mmcpart 1; setenv mmctype fat;" \ + "setenv mmcfile bootmenu.scr;" \ + "run trymmcscript;" \ + "else " \ + "setenv bootmenu_delay 0;" \ + "fi" #define CONFIG_PREMONITOR \ "echo Extra commands:;" \ @@ -253,7 +264,10 @@ int rx51_kp_getc(void); "run noloboot;" \ "echo" +#define CONFIG_MENUCMD + #define CONFIG_AUTO_COMPLETE + /* * Miscellaneous configurable options */ -- 1.7.5.4