From patchwork Sat Dec 17 17:03:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 132017 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 3EACF1007DB for ; Sun, 18 Dec 2011 04:20:00 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8D64B284D3; Sat, 17 Dec 2011 18:19:00 +0100 (CET) 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 JMgyVv2vk0hH; Sat, 17 Dec 2011 18:19:00 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2F87728393; Sat, 17 Dec 2011 18:17:26 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EB1AC28088 for ; Sat, 17 Dec 2011 18:05:11 +0100 (CET) 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 gKBt5KGX8jvi for ; Sat, 17 Dec 2011 18:05:11 +0100 (CET) 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-ee0-f44.google.com (mail-ee0-f44.google.com [74.125.83.44]) by theia.denx.de (Postfix) with ESMTPS id 9F55828083 for ; Sat, 17 Dec 2011 18:05:11 +0100 (CET) Received: by mail-ee0-f44.google.com with SMTP id c14so2998501eek.3 for ; Sat, 17 Dec 2011 09:05:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=oxzyu5dFt+h6yM9R8AjBQCkYk8/PNBGM136qy4maUSE=; b=dv86Hh3Y3YHYE/YAMCXaxVL2KPUiROSazW8Hez6J7wpFt1pTRABR4L8s2jbiHmnxi1 uXAEh2wVYzxlWZDDMNv6TsPwx8J9K2tzV6H/2oZ5sfuYMkJICBAATCFU4C4be8dW1VWi RmZqNqRaNaOjEo8/aTai1hxI9T+pAoPfCwv9w= Received: by 10.213.19.19 with SMTP id y19mr1291753eba.140.1324141511482; Sat, 17 Dec 2011 09:05:11 -0800 (PST) Received: from Pali-EliteBook.kolej.mff.cuni.cz (pali.kolej.mff.cuni.cz. [78.128.193.202]) by mx.google.com with ESMTPS id a60sm17652568eeb.4.2011.12.17.09.05.09 (version=SSLv3 cipher=OTHER); Sat, 17 Dec 2011 09:05:10 -0800 (PST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: u-boot@lists.denx.de Date: Sat, 17 Dec 2011 18:03:18 +0100 Message-Id: <1324141398-14859-16-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1324141398-14859-1-git-send-email-pali.rohar@gmail.com> References: <2772527.Czs1Sl5aoH@pali-elitebook> <1324141398-14859-1-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 17 Dec 2011 18:17:05 +0100 Cc: Sebastian Reichel , Marcel Mol , Martin Jansa , =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [U-Boot] [PATCH 16/16] RX-51: Add support for bootmenu X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de * default bootmenu contains: NOLO kernel, internal eMMC memory, external SD card, u-boot boot order * when keyboard is closed always boot NOLO kernel * when keyborad is open in CONFIG_PREBOOT try load bootmenu.scr from first FAT partition of internal eMMC memory (know as MyDocs) which (should) overwrite default bootmenu Signed-off-by: Pali Rohár --- include/configs/nokia_rx51.h | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h index bb77d5c..ddb4ea4 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_CLR /* 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,21 @@ 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 +263,10 @@ int rx51_kp_getc(void); "run noloboot;" \ "echo" +#define CONFIG_MENUCMD + #define CONFIG_AUTO_COMPLETE + /* * Miscellaneous configurable options */