forked from eewiki/u-boot-patches
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch
137 lines (122 loc) · 4.23 KB
/
0001-am335x_evm-uEnv.txt-bootz-n-fixes.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
From 5c9cbc5c8b21e5f1d47788755c0a554439b03e03 Mon Sep 17 00:00:00 2001
From: Robert Nelson <[email protected]>
Date: Fri, 15 Mar 2013 10:12:53 -0500
Subject: [PATCH] am335x_evm: uEnv.txt, bootz, n fixes
Defaults:
#define CONFIG_BOOTDELAY 1
#define CONFIG_CMD_FAT
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_EXT4
#define CONFIG_CMD_FS_GENERIC
/* bootz: zImage/initrd.img support */
#define CONFIG_CMD_BOOTZ
#define CONFIG_SUPPORT_RAW_INITRD
fatload -> load
bootm -> bootz
#define CONFIG_BOOTCOMMAND \
"mmc dev ${mmcdev};" \
"if mmc rescan; then " \
"echo SD/MMC found on device ${mmcdev};" \
"if run loadbootenv; then " \
"echo Loaded environment from uEnv.txt;" \
"run importbootenv;" \
"fi;" \
"if test -n $uenvcmd; then " \
"echo Running uenvcmd ...;" \
"run uenvcmd;" \
"fi;" \
"if run loadzimage; then " \
"run loadfdt;" \
"run mmcboot;" \
"fi;" \
"fi;"
Signed-off-by: Robert Nelson <[email protected]>
---
include/configs/am335x_evm.h | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index b7c443c..2bd0210 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -35,10 +35,13 @@
#define CONFIG_OF_LIBFDT
#define CONFIG_CMD_BOOTZ
+#define CONFIG_SUPPORT_RAW_INITRD
#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
#define CONFIG_SETUP_MEMORY_TAGS
#define CONFIG_INITRD_TAG
+#define CONFIG_SYS_CACHELINE_SIZE 64
+
/* commands to include */
#include <config_cmd_default.h>
@@ -61,8 +64,9 @@
"console=ttyO0,115200n8\0" \
"optargs=\0" \
"mmcdev=0\0" \
+ "mmcpart=1\0" \
"mmcroot=/dev/mmcblk0p2 ro\0" \
- "mmcrootfstype=ext4 rootwait\0" \
+ "mmcrootfstype=ext4 rootwait fixrtc\0" \
"bootpart=0:2\0" \
"nandroot=ubi0:rootfs rw ubi.mtd=7,2048\0" \
"nandrootfstype=ubifs rootwait=1\0" \
@@ -97,7 +101,7 @@
"nfsroot=${serverip}:${rootpath},${nfsopts} rw " \
"ip=dhcp\0" \
"bootenv=uEnv.txt\0" \
- "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
+ "loadbootenv=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootenv}\0" \
"importbootenv=echo Importing environment from mmc ...; " \
"env import -t $loadaddr $filesize\0" \
"ramargs=setenv bootargs console=${console} " \
@@ -105,11 +109,14 @@
"root=${ramroot} " \
"rootfstype=${ramrootfstype}\0" \
"loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
- "loaduimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
- "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
+ "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} zImage\0" \
+ "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdtaddr} /dtbs/${fdtfile}\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
- "bootm ${loadaddr} - ${fdtaddr}\0" \
+ "bootz ${loadaddr} - ${fdtaddr}\0" \
+ "mmc_classic_boot=echo Booting from mmc ...; " \
+ "run mmcargs; " \
+ "bootz ${loadaddr}\0" \
"nandboot=echo Booting from nand ...; " \
"run nandargs; " \
"nand read ${loadaddr} ${nandsrcaddr} ${nandimgsize}; " \
@@ -131,13 +138,13 @@
"bootm ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
"findfdt="\
"if test $board_name = A335BONE; then " \
- "setenv fdtfile am335x-bone.dtb; fi; " \
+ "setenv fdtfile am335x-bone.dtb; setenv dtb_file am335x-bone.dtb; fi; " \
"if test $board_name = A335BNLT; then " \
- "setenv fdtfile am335x-boneblack.dtb; fi; " \
+ "setenv fdtfile am335x-boneblack.dtb; setenv dtb_file am335x-boneblack.dtb; fi; " \
"if test $board_name = A33515BB; then " \
- "setenv fdtfile am335x-evm.dtb; fi; " \
+ "setenv fdtfile am335x-evm.dtb; setenv dtb_file am335x-evm.dtb; fi; " \
"if test $board_name = A335X_SK; then " \
- "setenv fdtfile am335x-evmsk.dtb; fi\0" \
+ "setenv fdtfile am335x-evmsk.dtb; setenv dtb_file am335x-evmsk.dtb; fi; " \
#endif
@@ -168,7 +175,7 @@
#define CONFIG_CMD_ECHO
/* max number of command args */
-#define CONFIG_SYS_MAXARGS 16
+#define CONFIG_SYS_MAXARGS 64
/* Console I/O Buffer Size */
#define CONFIG_SYS_CBSIZE 512
@@ -197,6 +204,7 @@
#define CONFIG_CMD_MMC
#define CONFIG_DOS_PARTITION
#define CONFIG_CMD_FAT
+#define CONFIG_FAT_WRITE
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_EXT4
#define CONFIG_CMD_FS_GENERIC
--
1.7.10.4