From patchwork Mon Apr 6 21:02:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sjoerd Simons X-Patchwork-Id: 458429 X-Patchwork-Delegate: sjg@chromium.org 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 1E1AD140213 for ; Tue, 7 Apr 2015 07:03:04 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7974EB37DF; Mon, 6 Apr 2015 23:02:56 +0200 (CEST) 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 w2hijRVS0CfW; Mon, 6 Apr 2015 23:02:56 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DAA41B37D7; Mon, 6 Apr 2015 23:02:47 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4A2E34B632 for ; Mon, 6 Apr 2015 23:02:39 +0200 (CEST) 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 DjkTQ9iXkY3s for ; Mon, 6 Apr 2015 23:02:39 +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 bhuna.collabora.co.uk (bhuna.collabora.co.uk [93.93.135.160]) by theia.denx.de (Postfix) with ESMTPS id 261964B62B for ; Mon, 6 Apr 2015 23:02:39 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sjoerd) with ESMTPSA id D37D1600F10 Received: by dusk.luon.net (Postfix, from userid 1000) id E2F9125F23; Mon, 6 Apr 2015 23:02:28 +0200 (CEST) From: Sjoerd Simons To: Simon Glass Date: Mon, 6 Apr 2015 23:02:28 +0200 Message-Id: <1428354148-1511-9-git-send-email-sjoerd.simons@collabora.co.uk> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1428354148-1511-1-git-send-email-sjoerd.simons@collabora.co.uk> References: <1428354148-1511-1-git-send-email-sjoerd.simons@collabora.co.uk> Cc: u-boot@lists.denx.de, Tom Rini Subject: [U-Boot] [PATCH v2 8/8] sandbox: add config_distro_defaults and config_distro_bootcmd X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Make the sandbox setup more generic/examplary by including config_distro_defaults.h and config_distro_bootcmd.h. Among other things this makes it easy to test whether images will boot though with the standard distro bootcmds by running e.g: u-boot -c 'host bind 0 myimage.img ; boot' By default there are 2 target host devices to emulate device with multiple storage devices (e.g. internal ("host 0") and external ("host 1") and verify that the prioritization and fallbacks do work correctly. Signed-off-by: Sjoerd Simons Reviewed by: Simon Glass Acked-by: Simon Glass --- Changes in v2: None include/configs/sandbox.h | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index febbfb6..02c83cd 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -75,7 +75,6 @@ #define CONFIG_CMDLINE_EDITING #define CONFIG_COMMAND_HISTORY #define CONFIG_AUTO_COMPLETE -#define CONFIG_BOOTDELAY 3 #define CONFIG_ENV_SIZE 8192 #define CONFIG_ENV_IS_NOWHERE @@ -125,10 +124,21 @@ /* include default commands */ #include +#include + +#define BOOT_TARGET_DEVICES(func) \ + func(HOST, host, 1) \ + func(HOST, host, 0) + +#include /* We don't have networking support yet */ #undef CONFIG_CMD_NET #undef CONFIG_CMD_NFS +#undef CONFIG_CMD_PING + +/* Can't boot elf images */ +#undef CONFIG_CMD_ELF #define CONFIG_CMD_HASH #define CONFIG_HASH_VERIFY @@ -165,16 +175,29 @@ #define CONFIG_KEYBOARD -#define CONFIG_EXTRA_ENV_SETTINGS "stdin=serial,cros-ec-keyb\0" \ +#define EXTRA_ENV_SETTINGS "stdin=serial,cros-ec-keyb\0" \ "stdout=serial,lcd\0" \ "stderr=serial,lcd\0" #else -#define CONFIG_EXTRA_ENV_SETTINGS "stdin=serial\0" \ +#define EXTRA_ENV_SETTINGS "stdin=serial\0" \ "stdout=serial,lcd\0" \ "stderr=serial,lcd\0" #endif +#define MEM_LAYOUT_ENV_SETTINGS \ + "bootm_size=0x10000000\0" \ + "kernel_addr_r=0x1000000\0" \ + "fdt_addr_r=0xc00000\0" \ + "ramdisk_addr_r=0x2000000\0" \ + "scriptaddr=0x1000\0" \ + "pxefile_addr_r=0x2000\0" + +#define CONFIG_EXTRA_ENV_SETTINGS \ + BOOTENV \ + MEM_LAYOUT_ENV_SETTINGS \ + EXTRA_ENV_SETTINGS + #define CONFIG_GZIP_COMPRESSED #define CONFIG_BZIP2 #define CONFIG_LZO