-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0001-wandboard-add-support-for-generic-distro-boot.patch
101 lines (94 loc) · 2.81 KB
/
0001-wandboard-add-support-for-generic-distro-boot.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
From 4546255d8c19441cd1fb0724c94865c7549344bc Mon Sep 17 00:00:00 2001
From: Peter Robinson <[email protected]>
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