From patchwork Tue Nov 29 13:46:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jon Medhurst (Tixy)" X-Patchwork-Id: 128289 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 D9354B6F7F for ; Wed, 30 Nov 2011 00:46:29 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1517F28247; Tue, 29 Nov 2011 14:46:28 +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 OEDvABBkGhXG; Tue, 29 Nov 2011 14:46:27 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 528E42823C; Tue, 29 Nov 2011 14:46:25 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 18DB42823C for ; Tue, 29 Nov 2011 14:46: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 AbIJMyygewJm for ; Tue, 29 Nov 2011 14:46:19 +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 smarthost03.mail.zen.net.uk (smarthost03.mail.zen.net.uk [212.23.3.142]) by theia.denx.de (Postfix) with ESMTP id 7439628218 for ; Tue, 29 Nov 2011 14:46:17 +0100 (CET) Received: from [82.69.122.217] (helo=[192.168.2.110]) by smarthost03.mail.zen.net.uk with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1RVO0m-00044D-Tj; Tue, 29 Nov 2011 13:46:17 +0000 From: "Jon Medhurst (Tixy)" To: u-boot@lists.denx.de Date: Tue, 29 Nov 2011 13:46:16 +0000 Message-ID: <1322574376.4500.34.camel@linaro1> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 X-Originating-Smarthost03-IP: [82.69.122.217] Subject: [U-Boot] ARM: vexpress: Extend default boot sequence to load script from MMC 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 Extend the default boot sequence on Versatile Express to load a boot script from MMC. Signed-off-by: Jon Medhurst Acked-by: Ryan Harkin --- include/configs/vexpress_common.h | 20 ++++++++++++++++++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git a/include/configs/vexpress_common.h b/include/configs/vexpress_common.h index a4ae5a8..d56f19d 100644 --- a/include/configs/vexpress_common.h +++ b/include/configs/vexpress_common.h @@ -178,6 +178,8 @@ #define CONFIG_CMD_SAVEENV #define CONFIG_NET_MULTI #define CONFIG_CMD_RUN +#define CONFIG_CMD_BOOTD +#define CONFIG_CMD_ECHO #define CONFIG_CMD_FAT #define CONFIG_DOS_PARTITION 1 @@ -226,7 +228,14 @@ #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET /* Basic environment settings */ -#define CONFIG_BOOTCOMMAND "run bootflash;" +#define CONFIG_BOOTCOMMAND \ + "if mmc rescan ${mmcdev}; then " \ + "if run loadbootscript; then " \ + "run bootscript; " \ + "fi; " \ + "fi; " \ + "run bootflash;" + #ifdef CONFIG_VEXPRESS_ORIGINAL_MEMORY_MAP #define CONFIG_PLATFORM_ENV_SETTINGS \ "loadaddr=0x80008000\0" \ @@ -258,7 +267,12 @@ "devtmpfs.mount=0 vmalloc=256M\0" \ "bootflash=run flashargs; " \ "cp ${ramdisk_addr} ${ramdisk_addr_r} ${maxramdisk}; " \ - "bootm ${kernel_addr} ${ramdisk_addr_r}\0" + "bootm ${kernel_addr} ${ramdisk_addr_r}\0" \ + "mmcdev=0\0" \ + "bootscr=boot.scr\0" \ + "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} ${bootscr}\0" \ + "bootscript=echo Running bootscript from mmc ...; " \ + "source ${loadaddr}\0" /* FLASH and environment organization */ #define PHYS_FLASH_SIZE 0x04000000 /* 64MB */ @@ -305,6 +319,8 @@ #define CONFIG_SYS_PROMPT "VExpress# " #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ sizeof(CONFIG_SYS_PROMPT) + 16) +#define CONFIG_SYS_HUSH_PARSER +#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot args buffer */ #define CONFIG_CMD_SOURCE #define CONFIG_SYS_LONGHELP