summaryrefslogtreecommitdiff
path: root/recipes/u-boot/u-boot-git/beagleboard/0040-BeagleBoard-Check-for-ramdisk-on-boot.patch
blob: c3ba38fc38a286a4a8c3cb71cba030db6b170945 (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
From bfeec530621dd8b30d81917abe94c3c55eed0fba Mon Sep 17 00:00:00 2001
From: Jason Kridner <jkridner@beagleboard.org>
Date: Wed, 2 Jun 2010 18:27:38 -0500
Subject: [PATCH] BeagleBoard: Check for ramdisk on boot

To simplify booting into various boot configurations, there is now a
test for an existing ramdisk.gz image if loading the boot script fails.

Adding additional boot arguments can also be done using optargs.

(cherry picked from commit e96988f27cfa51f353ae4f678c59445deb161c5e)

Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
---
 include/configs/omap3_beagle.h |   29 ++++++++++++++++++++++++++---
 1 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index acca697..c2fc6ba 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -181,9 +181,12 @@
 #define CONFIG_BOOTDELAY		3
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
-	"loadaddr=0x82000000\0" \
+	"loadaddr=0x80200000\0" \
+	"rdaddr=0x81600000\0" \
 	"usbtty=cdc_acm\0" \
 	"console=ttyS2,115200n8\0" \
+	"optargs=\0" \
+	"bootscr=boot.scr\0" \
 	"mpurate=500\0" \
 	"buddy=none\0" \
 	"vram=12M\0" \
@@ -195,6 +198,7 @@
 	"nandroot=/dev/mtdblock4 rw\0" \
 	"nandrootfstype=jffs2\0" \
 	"mmcargs=setenv bootargs console=${console} " \
+		"${optargs} " \
 		"mpurate=${mpurate} " \
 		"buddy=${buddy} "\
 		"vram=${vram} " \
@@ -203,6 +207,7 @@
 		"root=${mmcroot} " \
 		"rootfstype=${mmcrootfstype}\0" \
 	"nandargs=setenv bootargs console=${console} " \
+		"${optargs} " \
 		"mpurate=${mpurate} " \
 		"buddy=${buddy} "\
 		"vram=${vram} " \
@@ -210,7 +215,18 @@
 		"omapdss.def_disp=${defaultdisplay} " \
 		"root=${nandroot} " \
 		"rootfstype=${nandrootfstype}\0" \
-	"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
+	"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} ${bootscr}\0" \
+	"ramargs=setenv bootargs console=${console} " \
+		"${optargs} " \
+		"mpurate=${mpurate} " \
+		"buddy=${buddy} "\
+		"vram=${vram} " \
+		"omapfb.mode=dvi:${dvimode} " \
+		"omapdss.def_disp=${defaultdisplay} " \
+		"root=/dev/ram0 rw ramdisk_size=65536 " \
+		"initrd=${rdaddr},64M " \
+		"rootfstype=\0" \
+	"loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
 	"bootscript=echo Running bootscript from mmc ...; " \
 		"source ${loadaddr}\0" \
 	"loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
@@ -221,6 +237,9 @@
 		"run nandargs; " \
 		"nand read ${loadaddr} 280000 400000; " \
 		"bootm ${loadaddr}\0" \
+	"ramboot=echo Booting from ramdisk ...; " \
+		"run ramargs; " \
+		"bootm ${loadaddr}\0" \
 
 #define CONFIG_BOOTCOMMAND \
 	"if mmc init ${mmcdev}; then " \
@@ -228,7 +247,11 @@
 			"run bootscript; " \
 		"else " \
 			"if run loaduimage; then " \
-				"run mmcboot; " \
+				"if run loadramdisk; then " \
+					"run ramboot; " \
+				"else " \
+					"run mmcboot; " \
+				"fi; " \
 			"else run nandboot; " \
 			"fi; " \
 		"fi; " \
-- 
1.5.6.4