summaryrefslogtreecommitdiffstats
path: root/0006-beaglebone-try-to-load-uEnv-uImage-from-eMMC-first.patch
blob: ef38d67722f8de024eb39b0b16759366a03aefcd (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
From 41a2805057a24940731b7299af711a49ab64b0c4 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Wed, 3 Apr 2013 08:44:03 +0200
Subject: [PATCH 06/15] beaglebone: try to load uEnv/uImage from eMMC first

If u-boot detects the eMMC, try to load from there, if that fails fall back to uSD. Due to linux "features" rootdev can remain mmcblk0p1.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 include/configs/am335x_evm.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 7a9628e..2547a87 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -154,6 +154,24 @@
 #define CONFIG_BOOTCOMMAND \
 	"i2c mw 0x24 1 0x3e; " \
 	"run findfdt; " \
+	"mmc dev 1; if mmc rescan; then " \
+		"echo SD/MMC found on device ${mmcdev};" \
+		"setenv mmcdev 1;"\
+		"if run loadbootenv; then " \
+			"echo Loaded environment from ${bootenv};" \
+			"run importbootenv;" \
+		"fi;" \
+		"if test -n $uenvcmd; then " \
+			"echo Running uenvcmd ...;" \
+			"run uenvcmd;" \
+		"fi;" \
+		"if run loaduimage; then " \
+			"run loadfdt;" \
+			"run mmcboot;" \
+		"fi;" \
+	"else " \
+		"echo No SD/MMC found on device ${mmcdev};" \
+	"fi;" \
 	"mmc dev ${mmcdev}; if mmc rescan; then " \
 		"echo SD/MMC found on device ${mmcdev};" \
 		"if run loadbootenv; then " \
-- 
1.8.3.1