Skip to content

Commit d50d126

Browse files
committed
u-boot: v2019.01-rc2
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
1 parent 357520b commit d50d126

34 files changed

+10856
-0
lines changed

v2019.01-rc1/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch

+1,161
Large diffs are not rendered by default.
+252
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,252 @@
1+
From fd75494564dc83b883805781f4b5c56e2d7d9067 Mon Sep 17 00:00:00 2001
2+
From: Robert Nelson <robertcnelson@gmail.com>
3+
Date: Tue, 6 Mar 2018 10:45:57 -0600
4+
Subject: [PATCH] am43xx_evm fixes
5+
6+
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
7+
---
8+
configs/am43xx_evm_defconfig | 7 +++
9+
include/configs/am43xx_evm.h | 6 ++
10+
include/configs/ti_armv7_common.h | 126 ++++++++++++++++++++++++++++++++++++++
11+
include/environment/ti/mmc.h | 43 ++++++++++---
12+
4 files changed, 172 insertions(+), 10 deletions(-)
13+
14+
diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig
15+
index 172b292c3f..b2792396dc 100644
16+
--- a/configs/am43xx_evm_defconfig
17+
+++ b/configs/am43xx_evm_defconfig
18+
@@ -56,3 +56,10 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
19+
CONFIG_USB_GADGET_VENDOR_NUM=0x0403
20+
CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00
21+
CONFIG_USB_GADGET_DOWNLOAD=y
22+
+CONFIG_AUTOBOOT_KEYED=y
23+
+CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n"
24+
+CONFIG_AUTOBOOT_DELAY_STR="d"
25+
+CONFIG_AUTOBOOT_STOP_STR=" "
26+
+CONFIG_CMD_FS_GENERIC=y
27+
+CONFIG_FS_BTRFS=y
28+
+CONFIG_CMD_BTRFS=y
29+
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
30+
index 663f861706..957093b42b 100644
31+
--- a/include/configs/am43xx_evm.h
32+
+++ b/include/configs/am43xx_evm.h
33+
@@ -196,6 +196,8 @@
34+
"setenv fdtfile am437x-idk-evm.dtb; fi; " \
35+
"if test $fdtfile = undefined; then " \
36+
"echo WARNING: Could not determine device tree; fi; \0" \
37+
+ EEWIKI_BOOT \
38+
+ EEWIKI_UNAME_BOOT \
39+
NANDARGS \
40+
NETARGS \
41+
DFUARGS \
42+
@@ -205,6 +207,10 @@
43+
"run update_to_fit;" \
44+
"fi;" \
45+
"run findfdt; " \
46+
+ "setenv devtype mmc; " \
47+
+ "setenv mmcblk 0; " \
48+
+ "setenv mmcdev 0; " \
49+
+ "run boot;" \
50+
"run envboot;" \
51+
"run mmcboot;" \
52+
"run usbboot;" \
53+
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
54+
index 4771e74940..e5893ec926 100644
55+
--- a/include/configs/ti_armv7_common.h
56+
+++ b/include/configs/ti_armv7_common.h
57+
@@ -125,6 +125,132 @@
58+
/* Boot Argument Buffer Size */
59+
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
60+
61+
+#define EEWIKI_BOOT \
62+
+ "boot=${devtype} dev ${mmcdev}; " \
63+
+ "if ${devtype} rescan; then " \
64+
+ "echo SD/MMC found on device ${mmcdev};" \
65+
+ "setenv bootpart ${mmcdev}:1; " \
66+
+ "echo Checking for: /uEnv.txt ...;" \
67+
+ "if test -e ${devtype} ${bootpart} /uEnv.txt; then " \
68+
+ "load ${devtype} ${bootpart} ${loadaddr} /uEnv.txt;" \
69+
+ "env import -t ${loadaddr} ${filesize};" \
70+
+ "echo Loaded environment from /uEnv.txt;" \
71+
+ "echo Checking if uenvcmd is set ...;" \
72+
+ "if test -n ${uenvcmd}; then " \
73+
+ "echo Running uenvcmd ...;" \
74+
+ "run uenvcmd;" \
75+
+ "fi;" \
76+
+ "fi; " \
77+
+ "echo Checking for: /boot/uEnv.txt ...;" \
78+
+ "for i in 1 2 3 4 5 6 7 ; do " \
79+
+ "setenv mmcpart ${i};" \
80+
+ "setenv bootpart ${mmcdev}:${mmcpart};" \
81+
+ "if test -e ${devtype} ${bootpart} /boot/uEnv.txt; then " \
82+
+ "load ${devtype} ${bootpart} ${loadaddr} /boot/uEnv.txt;" \
83+
+ "env import -t ${loadaddr} ${filesize};" \
84+
+ "echo Loaded environment from /boot/uEnv.txt;" \
85+
+ "if test -n ${dtb}; then " \
86+
+ "setenv fdtfile ${dtb};" \
87+
+ "echo Using: dtb=${fdtfile} ...;" \
88+
+ "fi;" \
89+
+ "echo Checking if uname_r is set in /boot/uEnv.txt...;" \
90+
+ "if test -n ${uname_r}; then " \
91+
+ "setenv oldroot /dev/mmcblk${mmcblk}p${mmcpart};" \
92+
+ "echo Running uname_boot ...;" \
93+
+ "run uname_boot;" \
94+
+ "fi;" \
95+
+ "fi;" \
96+
+ "done;" \
97+
+ "fi;\0" \
98+
+
99+
+#define EEWIKI_UNAME_BOOT \
100+
+ "uname_boot="\
101+
+ "setenv bootdir /boot; " \
102+
+ "setenv bootfile vmlinuz-${uname_r}; " \
103+
+ "if test -e ${devtype} ${bootpart} ${bootdir}/${bootfile}; then " \
104+
+ "echo loading ${bootdir}/${bootfile} ...; "\
105+
+ "run loadimage;" \
106+
+ "setenv fdtdir /boot/dtbs/${uname_r}; " \
107+
+ "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \
108+
+ "run loadfdt;" \
109+
+ "else " \
110+
+ "setenv fdtdir /usr/lib/linux-image-${uname_r}; " \
111+
+ "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \
112+
+ "run loadfdt;" \
113+
+ "else " \
114+
+ "setenv fdtdir /lib/firmware/${uname_r}/device-tree; " \
115+
+ "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \
116+
+ "run loadfdt;" \
117+
+ "else " \
118+
+ "setenv fdtdir /boot/dtb-${uname_r}; " \
119+
+ "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \
120+
+ "run loadfdt;" \
121+
+ "else " \
122+
+ "setenv fdtdir /boot/dtbs; " \
123+
+ "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \
124+
+ "run loadfdt;" \
125+
+ "else " \
126+
+ "setenv fdtdir /boot/dtb; " \
127+
+ "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \
128+
+ "run loadfdt;" \
129+
+ "else " \
130+
+ "setenv fdtdir /boot; " \
131+
+ "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \
132+
+ "run loadfdt;" \
133+
+ "else " \
134+
+ "echo; echo unable to find ${fdtfile} ...; echo booting legacy ...;"\
135+
+ "run args_mmc;" \
136+
+ "echo debug: [${bootargs}] ... ;" \
137+
+ "echo debug: [bootz ${loadaddr}] ... ;" \
138+
+ "bootz ${loadaddr}; " \
139+
+ "fi;" \
140+
+ "fi;" \
141+
+ "fi;" \
142+
+ "fi;" \
143+
+ "fi;" \
144+
+ "fi;" \
145+
+ "fi; " \
146+
+ "setenv rdfile initrd.img-${uname_r}; " \
147+
+ "if test -e ${devtype} ${bootpart} ${bootdir}/${rdfile}; then " \
148+
+ "echo loading ${bootdir}/${rdfile} ...; "\
149+
+ "run loadrd;" \
150+
+ "if test -n ${netinstall_enable}; then " \
151+
+ "run args_netinstall; run message;" \
152+
+ "echo debug: [${bootargs}] ... ;" \
153+
+ "echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}] ... ;" \
154+
+ "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \
155+
+ "fi;" \
156+
+ "if test -n ${uenv_root}; then " \
157+
+ "run args_uenv_root;" \
158+
+ "echo debug: [${bootargs}] ... ;" \
159+
+ "echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}] ... ;" \
160+
+ "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \
161+
+ "fi;" \
162+
+ "if test -n ${uuid}; then " \
163+
+ "run args_mmc_uuid;" \
164+
+ "echo debug: [${bootargs}] ... ;" \
165+
+ "echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}] ... ;" \
166+
+ "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \
167+
+ "else " \
168+
+ "run args_mmc_old;" \
169+
+ "echo debug: [${bootargs}] ... ;" \
170+
+ "echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}] ... ;" \
171+
+ "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \
172+
+ "fi;" \
173+
+ "else " \
174+
+ "if test -n ${uenv_root}; then " \
175+
+ "run args_uenv_root;" \
176+
+ "echo debug: [${bootargs}] ... ;" \
177+
+ "echo debug: [bootz ${loadaddr} - ${fdtaddr}] ... ;" \
178+
+ "bootz ${loadaddr} - ${fdtaddr}; " \
179+
+ "fi;" \
180+
+ "run args_mmc_old;" \
181+
+ "echo debug: [${bootargs}] ... ;" \
182+
+ "echo debug: [bootz ${loadaddr} - ${fdtaddr}] ... ;" \
183+
+ "bootz ${loadaddr} - ${fdtaddr}; " \
184+
+ "fi;" \
185+
+ "fi;\0" \
186+
+
187+
/*
188+
* When we have SPI, NOR or NAND flash we expect to be making use of
189+
* mtdparts, both for ease of use in U-Boot and for passing information
190+
diff --git a/include/environment/ti/mmc.h b/include/environment/ti/mmc.h
191+
index 4305ebdaaf..4c7a323180 100644
192+
--- a/include/environment/ti/mmc.h
193+
+++ b/include/environment/ti/mmc.h
194+
@@ -12,22 +12,45 @@
195+
#define DEFAULT_MMC_TI_ARGS \
196+
"mmcdev=0\0" \
197+
"mmcrootfstype=ext4 rootwait\0" \
198+
- "finduuid=part uuid mmc ${bootpart} uuid\0" \
199+
+ "finduuid=part uuid ${devtype} ${bootpart} uuid\0" \
200+
"args_mmc=run finduuid;setenv bootargs console=${console} " \
201+
"${optargs} " \
202+
- "root=PARTUUID=${uuid} rw " \
203+
- "rootfstype=${mmcrootfstype}\0" \
204+
- "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
205+
- "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
206+
+ "root=PARTUUID=${uuid} ro " \
207+
+ "rootfstype=${mmcrootfstype} " \
208+
+ "${cmdline}\0" \
209+
+ "args_mmc_old=setenv bootargs console=${console} " \
210+
+ "${optargs} " \
211+
+ "root=${oldroot} ro " \
212+
+ "rootfstype=${mmcrootfstype} " \
213+
+ "${cmdline}\0" \
214+
+ "args_mmc_uuid=setenv bootargs console=${console} " \
215+
+ "${optargs} " \
216+
+ "root=UUID=${uuid} ro " \
217+
+ "rootfstype=${mmcrootfstype} " \
218+
+ "${cmdline}\0" \
219+
+ "args_uenv_root=setenv bootargs console=${console} " \
220+
+ "${optargs} " \
221+
+ "root=${uenv_root} ro " \
222+
+ "rootfstype=${mmcrootfstype} " \
223+
+ "${musb} ${cmdline}\0" \
224+
+ "args_netinstall=setenv bootargs ${netinstall_bootargs} " \
225+
+ "${optargs} " \
226+
+ "${cape_disable} " \
227+
+ "${cape_enable} " \
228+
+ "root=/dev/ram rw " \
229+
+ "${cmdline}\0" \
230+
+ "loadbootscript=load ${devtype} ${mmcdev} ${loadaddr} boot.scr\0" \
231+
+ "bootscript=echo Running bootscript from ${devtype}${mmcdev} ...; " \
232+
"source ${loadaddr}\0" \
233+
"bootenvfile=uEnv.txt\0" \
234+
- "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
235+
+ "importbootenv=echo Importing environment from ${devtype}${mmcdev} ...; " \
236+
"env import -t ${loadaddr} ${filesize}\0" \
237+
- "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \
238+
+ "loadbootenv=fatload ${devtype} ${mmcdev} ${loadaddr} ${bootenvfile}\0" \
239+
"loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
240+
- "loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
241+
- "envboot=mmc dev ${mmcdev}; " \
242+
- "if mmc rescan; then " \
243+
+ "loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}; setenv rdsize ${filesize}\0" \
244+
+ "loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}\0" \
245+
+ "envboot=${devtype} dev ${mmcdev}; " \
246+
+ "if ${devtype} rescan; then " \
247+
"echo SD/MMC found on device ${mmcdev};" \
248+
"if run loadbootscript; then " \
249+
"run bootscript;" \
250+
--
251+
2.16.1
252+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
From 97c520eba0a05a4d627930282f786a4074b72a20 Mon Sep 17 00:00:00 2001
2+
From: Robert Nelson <robertcnelson@gmail.com>
3+
Date: Tue, 30 Oct 2018 14:29:00 -0500
4+
Subject: [PATCH] at91sam9x5ek: uEnv.txt, bootz, n fixes
5+
6+
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
7+
---
8+
configs/at91sam9x5ek_mmc_defconfig | 6 ++--
9+
include/configs/at91sam9x5ek.h | 46 ++++++++++++++++++++++++++++++
10+
2 files changed, 50 insertions(+), 2 deletions(-)
11+
12+
diff --git a/configs/at91sam9x5ek_mmc_defconfig b/configs/at91sam9x5ek_mmc_defconfig
13+
index a44ab6bd90..29318f2f27 100644
14+
--- a/configs/at91sam9x5ek_mmc_defconfig
15+
+++ b/configs/at91sam9x5ek_mmc_defconfig
16+
@@ -11,8 +11,7 @@ CONFIG_NR_DRAM_BANKS=1
17+
CONFIG_FIT=y
18+
CONFIG_SD_BOOT=y
19+
CONFIG_BOOTDELAY=3
20+
-CONFIG_USE_BOOTARGS=y
21+
-CONFIG_BOOTARGS="mem=128M console=ttyS0,115200 mtdparts=atmel_nand:8M(bootstrap/uboot/kernel)ro,-(rootfs) root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait"
22+
+# CONFIG_USE_BOOTARGS is not set
23+
# CONFIG_CONSOLE_MUX is not set
24+
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
25+
# CONFIG_DISPLAY_BOARDINFO is not set
26+
@@ -63,3 +62,6 @@ CONFIG_USB_EHCI_HCD=y
27+
CONFIG_USB_STORAGE=y
28+
CONFIG_DM_VIDEO=y
29+
CONFIG_ATMEL_HLCD=y
30+
+CONFIG_CMD_EXT2=y
31+
+CONFIG_CMD_EXT4=y
32+
+CONFIG_CMD_FS_GENERIC=y
33+
diff --git a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h
34+
index d48b7d0785..985539826a 100644
35+
--- a/include/configs/at91sam9x5ek.h
36+
+++ b/include/configs/at91sam9x5ek.h
37+
@@ -108,6 +108,52 @@
38+
#else /* CONFIG_SD_BOOT */
39+
/* bootstrap + u-boot + env + linux in mmc */
40+
#define CONFIG_ENV_SIZE 0x4000
41+
+#define CONFIG_SUPPORT_RAW_INITRD
42+
+#define CONFIG_EXTRA_ENV_SETTINGS \
43+
+ "initrd_high=0xffffffff\0" \
44+
+ "fdt_high=0xffffffff\0" \
45+
+ "loadaddr=0x22000000\0" \
46+
+ "fdtaddr=0x27FF0000\0" \
47+
+ "fdtfile=/dtbs/at91sam9g25ek.dtb\0" \
48+
+ "console=ttyS0,115200n8\0" \
49+
+ "optargs=\0" \
50+
+ "video=\0" \
51+
+ "mmcdev=0\0" \
52+
+ "mmcpart=1\0" \
53+
+ "mmcroot=/dev/mmcblk0p2 ro\0" \
54+
+ "mmcrootfstype=ext4 rootwait\0" \
55+
+ "mmcargs=setenv bootargs console=${console} " \
56+
+ "${optargs} " \
57+
+ "root=${mmcroot} " \
58+
+ "rootfstype=${mmcrootfstype} " \
59+
+ "video=${video}\0" \
60+
+ "loadbootenv=load mmc ${mmcdev}:${mmcpart} ${loadaddr} uEnv.txt\0" \
61+
+ "importbootenv=echo Importing environment from mmc (uEnv.txt)...; " \
62+
+ "env import -t ${loadaddr} ${filesize}\0" \
63+
+ "loadzimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} zImage\0" \
64+
+ "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdtaddr} ${fdtfile}\0" \
65+
+ "mmcboot=echo Booting from mmc ...; " \
66+
+ "run mmcargs; " \
67+
+ "bootz ${loadaddr} - ${fdtaddr}\0"
68+
+
69+
+#define CONFIG_BOOTCOMMAND \
70+
+ "mmc dev ${mmcdev};" \
71+
+ "if mmc rescan; then " \
72+
+ "echo SD/MMC found on device ${mmcdev};" \
73+
+ "if run loadbootenv; then " \
74+
+ "run importbootenv;" \
75+
+ "fi;" \
76+
+ "echo Checking if uenvcmd is set ...;" \
77+
+ "if test -n $uenvcmd; then " \
78+
+ "echo Running uenvcmd ...;" \
79+
+ "run uenvcmd;" \
80+
+ "fi;" \
81+
+ "echo Running default loadzimage ...;" \
82+
+ "if run loadzimage; then " \
83+
+ "run loadfdt;" \
84+
+ "run mmcboot;" \
85+
+ "fi;" \
86+
+ "fi;"
87+
#endif
88+
89+
/*
90+
--
91+
2.19.1
92+

0 commit comments

Comments
 (0)