From patchwork Fri Feb 1 15:07:58 2013 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: 217490 X-Patchwork-Delegate: trini@ti.com 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 4CB2A2C0295 for ; Sat, 2 Feb 2013 02:15:23 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AB3344A105; Fri, 1 Feb 2013 16:15:21 +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 XIXRrgXEW+Vc; Fri, 1 Feb 2013 16:15:21 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 341694A0B5; Fri, 1 Feb 2013 16:15:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3CF224A0B5 for ; Fri, 1 Feb 2013 16:15:19 +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 Xm6uGblQyqKl for ; Fri, 1 Feb 2013 16:15:18 +0100 (CET) X-Greylist: delayed 394 seconds by postgrey-1.27 at theia; Fri, 01 Feb 2013 16:15:16 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-ea0-f182.google.com (mail-ea0-f182.google.com [209.85.215.182]) by theia.denx.de (Postfix) with ESMTPS id 05F1C4A01C for ; Fri, 1 Feb 2013 16:15:16 +0100 (CET) Received: by mail-ea0-f182.google.com with SMTP id a12so1780091eaa.27 for ; Fri, 01 Feb 2013 07:15:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=6KYadfc30YzYFa44yjJz+bxJCvdoM0pdz5n9VwM7eT0=; b=TKoKZvOyzgUmH7FrxBQgdBRUwiQD7l1PUrr6iFnzKq7Lx34q89gMPdgG9QYX685FDU GuNE9jk4O9gWB0AHvm5ZylkykGCFF00hdVZDJ85yaizf7vs8KFx587JymkAD2od6xtEt sJOnk1/3Djlz+FrKJUMpw10MHCqImktDQhvlltBu/5uGdi0MwNrTpfNrjlWpmOdXCqtu ywPqiw0QQpZqcewoM4v+Y2Sr5GyGeShVljiAxGBj5N399LN4+8mP9AGvnqiXOtjT13Cx qBngngM7OaIigXQRUNRtCJftLBOWhEmX2evdTvtjE0P7QemJ+7c8a+lP7A0LOuHKUwS2 yUVw== X-Received: by 10.14.173.196 with SMTP id v44mr39862655eel.29.1359731343329; Fri, 01 Feb 2013 07:09:03 -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 f49sm12938576eep.12.2013.02.01.07.09.02 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Feb 2013 07:09:02 -0800 (PST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: u-boot@lists.denx.de Date: Fri, 1 Feb 2013 16:07:58 +0100 Message-Id: <1359731279-22431-5-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1359731279-22431-1-git-send-email-pali.rohar@gmail.com> References: <1338136729-3907-1-git-send-email-pali.rohar@gmail.com> <1359731279-22431-1-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.0 Cc: =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [U-Boot] [PATCH v3 4/4] 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: attached kernel, internal eMMC memory, external SD card, u-boot boot order * 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 * when keyboard slide is closed boot first menu entry * when keyborad slide is open in show bootmenu Signed-off-by: Pali Rohár Acked-by: Tom Rini --- No changes in v3 This patch was in Nokia RX-51 patch series. Changes since RX-51 patch: - Rebased on last Nokia RX-51 patch v5 Changes since original version: - Fixed name of env variables include/configs/nokia_rx51.h | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h index 8506604..cd31d21 100644 --- a/include/configs/nokia_rx51.h +++ b/include/configs/nokia_rx51.h @@ -148,6 +148,7 @@ #define CONFIG_CMDLINE_EDITING /* add command line history */ #define CONFIG_AUTO_COMPLETE /* add autocompletion support */ +#define CONFIG_CMD_BOOTMENU /* ANSI terminal Boot Menu */ #define CONFIG_CMD_CLEAR /* ANSI terminal clear screen command */ #ifdef ONENAND_SUPPORT @@ -287,8 +288,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" \ @@ -360,10 +359,25 @@ int rx51_kp_getc(void); "fi\0" \ "emmcboot=setenv mmcnum 1; run trymmcboot\0" \ "sdboot=setenv mmcnum 0; run trymmcboot\0" \ + "menucmd=bootmenu\0" \ + "bootmenu_0=Attached kernel=run attachboot\0" \ + "bootmenu_1=Internal eMMC=run emmcboot\0" \ + "bootmenu_2=External SD card=run sdboot\0" \ + "bootmenu_3=U-Boot boot order=boot\0" \ + "bootmenu_delay=30\0" \ "" #define CONFIG_PREBOOT \ - "if run slide; then true; else run attachboot; fi;" \ + "setenv mmcnum 1; setenv mmcpart 1; setenv mmctype fat;" \ + "setenv mmcscriptfile bootmenu.scr;" \ + "run trymmcscriptboot;" \ + "if run slide; then true; else " \ + "setenv bootmenu_delay 0;" \ + "setenv bootdelay 0;" \ + "fi" + +#define CONFIG_POSTBOOTMENU \ + "echo;" \ "echo Extra commands:;" \ "echo run sercon - Use serial port for control.;" \ "echo run usbcon - Use usbtty for control.;" \ @@ -379,6 +393,11 @@ int rx51_kp_getc(void); "run attachboot;" \ "echo" +#define CONFIG_BOOTDELAY 30 +#define CONFIG_AUTOBOOT_KEYED +#define CONFIG_MENU +#define CONFIG_MENU_SHOW + /* * Miscellaneous configurable options */