From patchwork Thu Sep 1 11:34:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 112890 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 15505B6F7C for ; Thu, 1 Sep 2011 21:38:16 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3443D281E9; Thu, 1 Sep 2011 13:37:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rId0u4Z7qkjf; Thu, 1 Sep 2011 13:37:34 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E665D28159; Thu, 1 Sep 2011 13:37:22 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B9A6F281AE for ; Thu, 1 Sep 2011 13:37:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A0FyP++9518B for ; Thu, 1 Sep 2011 13:37:20 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-bw0-f44.google.com (mail-bw0-f44.google.com [209.85.214.44]) by theia.denx.de (Postfix) with ESMTPS id 12A2E281C5 for ; Thu, 1 Sep 2011 13:37:12 +0200 (CEST) Received: by mail-bw0-f44.google.com with SMTP id r4so1508588bka.3 for ; Thu, 01 Sep 2011 04:37:12 -0700 (PDT) Received: by 10.204.7.199 with SMTP id e7mr344964bke.255.1314877032282; Thu, 01 Sep 2011 04:37:12 -0700 (PDT) Received: from Pali-EliteBook.kolej.mff.cuni.cz (rohar.kolej.mff.cuni.cz [78.128.193.202]) by mx.google.com with ESMTPS id a17sm159596bku.56.2011.09.01.04.37.10 (version=SSLv3 cipher=OTHER); Thu, 01 Sep 2011 04:37:11 -0700 (PDT) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: u-boot@lists.denx.de Date: Thu, 1 Sep 2011 13:34:41 +0200 Message-Id: <1314876881-9669-15-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1314876881-9669-1-git-send-email-pali.rohar@gmail.com> References: <201109011304.46581.marek.vasut@gmail.com> <1314876881-9669-1-git-send-email-pali.rohar@gmail.com> Subject: [U-Boot] [PATCH 15/15] RX-51: Add support for bootmenu X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de --- include/configs/nokia_rx51.h | 54 +++++++++++++++++++++++++++++++----------- 1 files changed, 40 insertions(+), 14 deletions(-) diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h index 6d93146..1c599e2 100644 --- a/include/configs/nokia_rx51.h +++ b/include/configs/nokia_rx51.h @@ -130,6 +130,8 @@ #define CONFIG_CMD_MMC /* MMC support */ #define CONFIG_CMD_ONENAND /* NAND support */ +#define CONFIG_CMD_BOOTMENU /* ANSI terminal Boot Menu */ + #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */ #undef CONFIG_CMD_FPGA /* FPGA configuration Support */ #undef CONFIG_CMD_IMI /* iminfo */ @@ -176,7 +178,7 @@ int rx51_kp_getc(void); #endif /* Environment information */ -#define CONFIG_BOOTDELAY 3 +#define CONFIG_MENU #define CONFIG_EXTRA_ENV_SETTINGS \ "usbtty=cdc_acm\0" \ @@ -191,29 +193,42 @@ int rx51_kp_getc(void); "meegoargs=setenv bootargs\0" \ "loadbootscript=fatload mmc 0:3 ${loadaddr} boot.scr\0" \ "loadibootscript=fatload mmc 2:1 ${loadaddr} boot.scr\0" \ - "bootscript=echo Running bootscript from mmc ...; " \ + "bootscript=echo Running bootscript ...; " \ "source ${loadaddr}\0" \ "loaduimage=fatload mmc 0:3 ${loadaddr} uImage\0" \ "loadiuimage=fatload mmc 2:1 ${loadaddr} uImage\0" \ - "mmcboot=echo Booting from mmc ...; " \ - "run meegoargs; " \ - "bootm ${loadaddr}\0" \ "noloboot=echo Booting NOLO supplied kernel ...; " \ "setenv atags ${nolo_atagaddr};" \ "bootm ${nolo_kernaddr}\0" \ - "mmciboot=echo Booting from internal mmc ...; " \ - "fatload mmc 2:1 ${loadaddr} uImage;" \ + "mmcboot=echo Booting from external SD card ...; " \ + "loaduimage; " \ "run meegoargs; " \ - "bootm ${loadaddr}\0" + "bootm ${loadaddr}\0" \ + "mmciboot=echo Booting from internal eMMC memory ...; " \ + "loadiuimage; " \ + "run meegoargs; " \ + "bootm ${loadaddr}\0" \ + "menucmd=bootmenu\0" \ + "bootmenu_0=Maemo 5 kernel (Internal flash): run noloboot\0" \ + "bootmenu_1=Boot script (Internal eMMC, partition 1): if run loadibootscript; then run bootscript; fi\0" \ + "bootmenu_2=Boot script (External SD card, partition 3): if run loadbootscript; then run bootscript; fi\0" \ + "bootmenu_3=uImage kernel (Internal eMMC, partition 1): run mmciboot\0" \ + "bootmenu_4=uImage kernel (External SD card, partition 3): run mmcboot\0" \ + "bootmenu_5=Follow 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 bootmenu_delay 0; fi" + +#define CONFIG_PREMONITOR \ "echo Extra commands:;" \ "echo run sercon - Use serial port for control.;" \ "echo run usbcon - Use usbtty for control.;" \ "echo run vgacon - Use framebuffer/keyboard.;" \ + "echo run noloboot - Boot kernel loaded by NOLO.;" \ + "echo run mmciboot - Boot from internal eMMC.;" \ "echo run mmcboot - Boot from SD card slot.;" \ - "echo run noloboot - Boot kernel loaded by NOLO." + "echo" #define CONFIG_BOOTCOMMAND \ "if mmc init; then " \ @@ -225,13 +240,24 @@ int rx51_kp_getc(void); "echo Found boot.scr on mmc 0:3; " \ "run bootscript; " \ "else " \ - "if run loaduimage; then " \ - "run mmcboot; " \ - "else run noloboot; " \ + "if run loadiuimage; then " \ + "echo Found uImage on mmc 2:1; " \ + "run mmciboot; " \ + "else " \ + "if run loaduimage; then " \ + "echo Found uImage on mmc 0:3; " \ + "run mmcboot; " \ + "else " \ + "echo Not found boot.scr or uImage on mmc 2:1 or 0:3; " \ + "run noloboot; " \ + "fi; " \ "fi; " \ "fi; " \ "fi; " \ - "else run noloboot; fi" + "else " \ + "echo Initializing eMMC and/or SD card failed; " \ + "run noloboot; " \ + "fi" #define CONFIG_AUTO_COMPLETE 1 /*