uboot-tools/0001-wandboard-add-support-...

102 lines
2.8 KiB
Diff

From ee628ad871f52c14be04116280457fb0990cd143 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Wed, 15 Jul 2015 11:30:24 +0100
Subject: [PATCH 1/5] wandboard: add support for generic distro boot
---
include/configs/wandboard.h | 33 ++++++++++++++++++++++++---------
1 file changed, 24 insertions(+), 9 deletions(-)
diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
index f05b55a..b3ad82a 100644
--- a/include/configs/wandboard.h
+++ b/include/configs/wandboard.h
@@ -54,9 +54,6 @@
#define CONFIG_MXC_USB_FLAGS 0
/* Ethernet Configuration */
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_MII
#define CONFIG_FEC_MXC
#define CONFIG_MII
#define IMX_FEC_BASE ENET_BASE_ADDR
@@ -89,17 +86,29 @@
#define CONFIG_MXC_OCOTP
#endif
+#ifndef CONFIG_SPL_BUILD
+#include <config_distro_defaults.h>
+#include <config_distro_bootcmd.h>
+
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 0) \
+ func(PXE, pxe, na) \
+ func(DHCP, dhcp, na)
+
#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
#define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
"image=zImage\0" \
- "console=ttymxc0\0" \
+ "console=ttymxc0,115200\0" \
"splashpos=m,m\0" \
"fdtfile=undefined\0" \
- "fdt_high=0xffffffff\0" \
- "initrd_high=0xffffffff\0" \
- "fdt_addr=0x18000000\0" \
+ "fdt_addr_r=0x18000000\0" \
"boot_fdt=try\0" \
+ "pxefile_addr_r=0x17f00000\0" \
+ "scriptaddr=0x17e00000\0" \
+ "kernel_addr_r=0x11000000\0" \
+ "ramdisk_addr_r=0x18100000\0" \
+ "bootm_size=0x20000000\0" \
"ip_dyn=yes\0" \
"mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
"mmcpart=1\0" \
@@ -118,7 +127,7 @@
"mmc write ${loadaddr} 0x2 ${fw_sz}; " \
"fi; " \
"fi\0" \
- "mmcargs=setenv bootargs console=${console},${baudrate} " \
+ "mmcargs=setenv bootargs console=${console} " \
"root=${mmcroot}; run videoargs\0" \
"videoargs=" \
"setenv nextcon 0; " \
@@ -167,7 +176,7 @@
"else " \
"bootz; " \
"fi;\0" \
- "netargs=setenv bootargs console=${console},${baudrate} " \
+ "netargs=setenv bootargs console=${console} " \
"root=/dev/nfs " \
"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
"netboot=echo Booting from net ...; " \
@@ -202,9 +211,11 @@
"setenv fdtfile imx6dl-wandboard-revb1.dtb; fi; " \
"if test $fdtfile = undefined; then " \
"echo WARNING: Could not determine dtb to use; fi; \0" \
+ BOOTENV \
#define CONFIG_BOOTCOMMAND \
"run findfdt; " \
+ "run distro_bootcmd;" \
"mmc dev ${mmcdev}; if mmc rescan; then " \
"if run loadbootscript; then " \
"run bootscript; " \
@@ -216,6 +227,10 @@
"fi; " \
"else run netboot; fi"
+#else
+#define BOOT_TARGET_DEVICES
+#endif
+
/* Physical Memory Map */
#define CONFIG_NR_DRAM_BANKS 1
#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
--
2.4.5