From patchwork Tue Jan 24 14:28:11 2012 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: 137571 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 613D2B6EF7 for ; Wed, 25 Jan 2012 01:32:22 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F10C828190; Tue, 24 Jan 2012 15:31:09 +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 BXkY9BGHJOeB; Tue, 24 Jan 2012 15:31:09 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7FA9F28199; Tue, 24 Jan 2012 15:30:06 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7E3BC281B9 for ; Tue, 24 Jan 2012 15:29:45 +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 Xc3z38cCbDzl for ; Tue, 24 Jan 2012 15:29:44 +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-we0-f172.google.com (mail-we0-f172.google.com [74.125.82.172]) by theia.denx.de (Postfix) with ESMTPS id 55E2A28191 for ; Tue, 24 Jan 2012 15:29:12 +0100 (CET) Received: by mail-we0-f172.google.com with SMTP id p11so2877561wer.3 for ; Tue, 24 Jan 2012 06:29:12 -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=Q4WA5wp2DWY0DinOjXj6iu0WgRGnDm/OYNPpzShxeEQ=; b=kouJX0Po8Jt75DwdjnfAA7O7M2IalztaHySYQgbRJOjLlzpLgIATIBFtsIV+WyooBS k1MyeBcCYRQyXyT9SL3uH0SOzz8CjzP0URVY9KmaGYQ+XsB9e/dh4v/pqboUbJ5ZLNxv 909XvOAmL6wBAu2qMKM/MAzgjihNshE6j4f1s= Received: by 10.216.131.234 with SMTP id m84mr6728135wei.24.1327415352122; Tue, 24 Jan 2012 06:29:12 -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 n3sm52913728wiz.9.2012.01.24.06.29.10 (version=SSLv3 cipher=OTHER); Tue, 24 Jan 2012 06:29:11 -0800 (PST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: u-boot@lists.denx.de Date: Tue, 24 Jan 2012 15:28:11 +0100 Message-Id: <1327415291-13260-15-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1327415291-13260-1-git-send-email-pali.rohar@gmail.com> References: <1327415291-13260-1-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.0 Cc: =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [U-Boot] [PATCH 14/14] 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 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 Acked-by: Tom Rini --- Changes since original version: - Fixed name of env variables 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 9045535..8d6596b 100644 --- a/include/configs/nokia_rx51.h +++ b/include/configs/nokia_rx51.h @@ -137,6 +137,7 @@ #define CONFIG_CMD_I2C /* I2C serial bus support */ #define CONFIG_CMD_MMC /* MMC support */ +#define CONFIG_CMD_BOOTMENU /* ANSI terminal Boot Menu */ #define CONFIG_CMD_CLEAR /* ANSI terminal clear screen command */ #ifdef ONENAND_SUPPORT @@ -212,8 +213,6 @@ int rx51_kp_getc(void); #endif /* Environment information */ -#define CONFIG_BOOTDELAY 3 - #define CONFIG_EXTRA_ENV_SETTINGS \ "mtdparts=" MTDPARTS_DEFAULT "\0" \ "usbtty=cdc_acm\0" \ @@ -280,10 +279,22 @@ int rx51_kp_getc(void); "run trymmcallpartboot;" \ "fi\0" \ "emmcboot=setenv mmcnum 1; run trymmcboot\0" \ - "sdboot=setenv mmcnum 0; run trymmcboot\0" + "sdboot=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 mmcscriptfile bootmenu.scr;" \ + "run trymmcscriptboot;" \ + "else " \ + "setenv bootmenu_delay 0;" \ + "fi" #define CONFIG_PREMONITOR \ "echo Extra commands:;" \ @@ -301,6 +312,8 @@ int rx51_kp_getc(void); "run noloboot;" \ "echo" +#define CONFIG_MENUCMD + #define CONFIG_AUTO_COMPLETE /*