uboot-tools/0001-wandboard-add-support-for-generic-distro-boot.patch
2015-09-29 09:52:11 +01:00

102 lines
2.8 KiB
Diff

From 4546255d8c19441cd1fb0724c94865c7549344bc Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Tue, 4 Aug 2015 09:35:43 +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 f4e9cf2..1e346c1 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
@@ -84,17 +81,29 @@
#define CONFIG_IMX_HDMI
#define CONFIG_IMX_VIDEO_SKIP
+#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" \
@@ -113,7 +122,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; " \
@@ -162,7 +171,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 ...; " \
@@ -197,9 +206,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; " \
@@ -211,6 +222,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.5.0