summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2015-04-13 22:54:27 +0200
committerSimon Glass <sjg@chromium.org>2015-04-19 14:45:58 -0600
commit791a9f67f4f8db512cf59b40f47544fb335cd8db (patch)
treeabc2c8a706d6650257ccbe89c0d04dc56785986f
parentf96d0b81495e89e3848d923db8f5e2b3888d47c0 (diff)
downloadu-boot-imx-791a9f67f4f8db512cf59b40f47544fb335cd8db.zip
u-boot-imx-791a9f67f4f8db512cf59b40f47544fb335cd8db.tar.gz
u-boot-imx-791a9f67f4f8db512cf59b40f47544fb335cd8db.tar.bz2
sandbox: add config_distro_defaults and config_distro_bootcmd
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 <sjoerd.simons@collabora.co.uk> Reviewed by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
-rw-r--r--include/configs/sandbox.h31
1 files changed, 23 insertions, 8 deletions
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index 0a36719..3bf45a2 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -73,7 +73,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
@@ -120,26 +119,31 @@
/* include default commands */
#include <config_cmd_default.h>
+#include <config_distro_defaults.h>
+
+#define BOOT_TARGET_DEVICES(func) \
+ func(HOST, host, 1) \
+ func(HOST, host, 0)
+
+#include <config_distro_bootcmd.h>
#define CONFIG_KEEP_SERVERADDR
#define CONFIG_UDP_CHECKSUM
#define CONFIG_CMD_LINK_LOCAL
#define CONFIG_CMD_CDP
#define CONFIG_CMD_DNS
-#define CONFIG_CMD_NFS
#define CONFIG_CMD_SNTP
#define CONFIG_TIMESTAMP
#define CONFIG_CMD_RARP
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_DHCP
#define CONFIG_BOOTP_DNS
#define CONFIG_BOOTP_DNS2
-#define CONFIG_BOOTP_GATEWAY
#define CONFIG_BOOTP_SEND_HOSTNAME
#define CONFIG_BOOTP_SERVERIP
-#define CONFIG_BOOTP_SUBNETMASK
#define CONFIG_IP_DEFRAG
+/* Can't boot elf images */
+#undef CONFIG_CMD_ELF
+
#define CONFIG_CMD_HASH
#define CONFIG_HASH_VERIFY
#define CONFIG_SHA1
@@ -182,8 +186,19 @@
"eth5addr=00:00:11:22:33:46\0" \
"ipaddr=1.2.3.4\0"
-#define CONFIG_EXTRA_ENV_SETTINGS SANDBOX_SERIAL_SETTINGS \
- SANDBOX_ETH_SETTINGS
+#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 \
+ SANDBOX_SERIAL_SETTINGS \
+ SANDBOX_ETH_SETTINGS \
+ BOOTENV \
+ MEM_LAYOUT_ENV_SETTINGS
#define CONFIG_GZIP_COMPRESSED
#define CONFIG_BZIP2