[U-Boot] [PATCH 2/5] port wandboards to use the generic distro configs

Dennis Gilmore dennis at ausil.us
Fri Dec 6 03:18:12 CET 2013


Signed-off-by: Dennis Gilmore <dennis at ausil.us>
---
 include/configs/wandboard.h | 40 +++++++++++++++++++++++++++++++++++-----
 1 file changed, 35 insertions(+), 5 deletions(-)

diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
index e9c7e64..02d8968 100644
--- a/include/configs/wandboard.h
+++ b/include/configs/wandboard.h
@@ -40,6 +40,9 @@
 #define CONFIG_CONS_INDEX		1
 #define CONFIG_BAUDRATE			115200
 
+/* enable generic distro config */
+#define DISTRO_DEFAULTS 1
+
 /* Command definition */
 #include <config_cmd_default.h>
 
@@ -48,7 +51,6 @@
 #define CONFIG_CMD_BMODE
 #define CONFIG_CMD_SETEXPR
 
-#define CONFIG_BOOTDELAY		5
 
 #define CONFIG_SYS_MEMTEST_START	0x10000000
 #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
@@ -65,6 +67,9 @@
 #define CONFIG_CMD_MMC
 #define CONFIG_GENERIC_MMC
 #define CONFIG_BOUNCE_BUFFER
+
+#define CONFIG_BOOTDELAY		5
+
 #define CONFIG_CMD_EXT2
 #define CONFIG_CMD_FAT
 #define CONFIG_DOS_PARTITION
@@ -74,6 +79,11 @@
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_NET
+
+#define CONFIG_OF_LIBFDT
+#define CONFIG_CMD_BOOTZ
+
+/* Ethernet Configuration */
 #define CONFIG_FEC_MXC
 #define CONFIG_MII
 #define IMX_FEC_BASE			ENET_BASE_ADDR
@@ -113,8 +123,30 @@
 	"fdt_high=0xffffffff\0" \
 	"initrd_high=0xffffffff\0" \
 	"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
-	"fdt_addr=0x11000000\0" \
+	"fdt_addr=0x11100000\0" \
+	"fdt_addr_r=0x11200000\0" \
+	"pxefile_addr_r=0x11300000\0" \
+	"scr_addr_r=0x11400000\0" \
+	"kernel_addr_r=0x11500000\0" \
+	"ramdisk_addr_r=0x13500000\0" \
 	"boot_fdt=try\0" \
+	"bootcmd_setup=mmc rescan\0" \
+	"bootcmd_pxe=setenv bootfile \"\" ;dhcp; tftp ${fdt_addr} /dtb/${fdt_file}; pxe get; pxe boot\0" \
+	"bootcmd_disk_scr=ext2load ${boot_ifc} ${bootdevice} ${scr_addr_r} boot.scr && source ${scr_addr_r}\0" \
+	"bootcmd_disk_sysboot1=setenv bootfile /boot/extlinux/extlinux.conf; sysboot ${boot_ifc} ${bootdevice} ext2\0" \
+	"bootcmd_disk_sysboot2=setenv bootfile /extlinux/extlinux.conf; sysboot ${boot_ifc} ${bootdevice} ext2\0" \
+	"bootcmd_disk_uenv=ext2load ${boot_ifc} ${bootdevice} ${uenv_addr_r} uEnv.txt; env import -t ${uenv_addr_r} ${filesize}; run bootcmd_uenv\0" \
+	"bootcmd_disk_kernel=ext2load ${boot_ifc} ${bootdevice} ${kernel_addr_r} vmlinuz && ext2load ${boot_ifc} ${bootdevice} ${ramdisk_addr_r} initrd.img && bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr}\0" \
+	"bootcmd_disk=ext2load ${boot_ifc} ${bootdevice} ${fdt_addr} /boot/dtb/${fdt_file}; ext2load ${boot_ifc} ${bootdevice} ${fdt_addr} /dtb/${fdt_file};run bootcmd_disk_sysboot1; run bootcmd_disk_sysboot2; run bootcmd_disk_uenv; run bootcmd_disk_scr; run bootcmd_disk_kernel\0" \
+	"bootcmd_sata=setenv boot_ifc scsi; scsi scan && run bootcmd_disk\0" \
+	"bootcmd_mmc=setenv boot_ifc mmc; mmc rescan && run bootcmd_disk\0" \
+	"bootcmd_default=run bootcmd_mmc; run bootcmd_sata; run bootcmd_pxe\0" \
+	"localcmd=run bootcmd_mmc\0" \
+	"bootdevice=0\0" \
+	"bootargs=console=ttymxc0 root=LABEL=rootfs\0" \
+	"bootdelay=2\0" \
+	"bootretry=90\0" \
+	"netretry=once\0" \
 	"ip_dyn=yes\0" \
 	"mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
 	"mmcpart=1\0" \
@@ -183,6 +215,7 @@
 
 #define CONFIG_BOOTCOMMAND \
 	   "mmc dev ${mmcdev}; if mmc rescan; then " \
+                   "run bootcmd_default; " \
 		   "if run loadbootscript; then " \
 			   "run bootscript; " \
 		   "else " \
@@ -230,9 +263,6 @@
 #define CONFIG_ENV_OFFSET		(6 * 64 * 1024)
 #define CONFIG_SYS_MMC_ENV_DEV		0
 
-#define CONFIG_OF_LIBFDT
-#define CONFIG_CMD_BOOTZ
-
 #ifndef CONFIG_SYS_DCACHE_OFF
 #define CONFIG_CMD_CACHE
 #endif
-- 
1.8.4.2



More information about the U-Boot mailing list