summaryrefslogtreecommitdiffstats
path: root/0008-move-pandaboard-over-to-use-the-generic-distro-confi.patch
blob: 0c12a076cc61c3143628fc7e1c6f51cb5302b85b (plain)
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
From 25f764594b2f826b1cd90119e6d58c4e4b6f097a Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us>
Date: Mon, 21 Apr 2014 12:23:10 -0500
Subject: [PATCH 08/36] move pandaboard over to use the generic distro
 configuation and environment

port pandaboard to use the generic distro configuation.
remove duplicated config options, clean up the environment, include new
environment.
---
 include/configs/omap4_panda.h     |  4 ----
 include/configs/ti_omap4_common.h | 46 +++++++++++++++++----------------------
 2 files changed, 20 insertions(+), 30 deletions(-)

diff --git a/include/configs/omap4_panda.h b/include/configs/omap4_panda.h
index 7378acd..9c5f6e1 100644
--- a/include/configs/omap4_panda.h
+++ b/include/configs/omap4_panda.h
@@ -33,11 +33,7 @@
 
 #define CONFIG_UBOOT_ENABLE_PADS_ALL
 
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_DHCP
-
 #include <configs/ti_omap4_common.h>
-#define CONFIG_CMD_NET
 
 /* GPIO */
 #define CONFIG_CMD_GPIO
diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h
index 387f570..88b0264 100644
--- a/include/configs/ti_omap4_common.h
+++ b/include/configs/ti_omap4_common.h
@@ -56,6 +56,15 @@
 #include <configs/ti_armv7_common.h>
 
 /*
+ *  * Include the generic config options and boot environment when not
+ *   * building our SPL
+ *    */
+#ifndef CONFIG_SPL_BUILD
+#include <config_distro_defaults.h>
+#include <config_distro_bootcmd.h>
+#endif
+
+/*
  * Hardware drivers
  */
 #define CONFIG_SYS_NS16550
@@ -86,6 +95,7 @@
 /*
  * Environment setup
  */
+#ifndef CONFIG_SPL_BUILD
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	DEFAULT_LINUX_BOOT_ENV \
 	"console=ttyO2,115200n8\0" \
@@ -102,16 +112,16 @@
 		"vram=${vram} " \
 		"root=${mmcroot} " \
 		"rootfstype=${mmcrootfstype}\0" \
-	"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
+	"loadbootscript=load mmc ${mmcdev} ${kernel_addr_r} boot.scr\0" \
 	"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
-		"source ${loadaddr}\0" \
-	"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \
+		"source ${kernel_addr_r}\0" \
+	"loadbootenv=load mmc ${mmcdev} ${kernel_addr_r} uEnv.txt\0" \
 	"importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
-		"env import -t ${loadaddr} ${filesize}\0" \
-	"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
+		"env import -t ${kernel_addr_r} ${filesize}\0" \
+	"loadimage=load mmc ${bootpart} ${kernel_addr_r} ${bootdir}/${bootfile}\0" \
 	"mmcboot=echo Booting from mmc${mmcdev} ...; " \
 		"run mmcargs; " \
-		"bootz ${loadaddr} - ${fdtaddr}\0" \
+		"bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
 	"findfdt="\
 		"if test $board_name = sdp4430; then " \
 			"setenv fdtfile omap4-sdp.dtb; fi; " \
@@ -123,29 +133,13 @@
 			"setenv fdtfile omap4-panda-es.dtb; fi;" \
 		"if test $fdtfile = undefined; then " \
 			"echo WARNING: Could not determine device tree to use; fi; \0" \
-	"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
+	"loadfdt=load mmc ${bootpart} ${fdt_addr_r} ${bootdir}/${fdtfile}\0" \
+	BOOTCMDS_COMMON
+#endif
 
 #define CONFIG_BOOTCOMMAND \
 	"run findfdt; " \
-	"mmc dev ${mmcdev}; if mmc rescan; then " \
-		"echo SD/MMC found on device ${mmcdev};" \
-		"if run loadbootscript; then " \
-			"run bootscript; " \
-		"else " \
-			"if run loadbootenv; then " \
-				"run importbootenv; " \
-			"fi;" \
-			"if test -n ${uenvcmd}; then " \
-				"echo Running uenvcmd ...;" \
-				"run uenvcmd;" \
-			"fi;" \
-		"fi;" \
-		"if run loadimage; then " \
-			"run loadfdt;" \
-			"run mmcboot; " \
-		"fi; " \
-	"fi"
-
+	"for target in ${boot_targets}; do run bootcmd_${target}; done "
 /*
  * Defines for SPL
  * It is known that this will break HS devices. Since the current size of
-- 
1.9.0