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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
diff --git a/configs/udoo_defconfig b/configs/udoo_defconfig
index a4a17c161..88a863337 100644
--- a/configs/udoo_defconfig
+++ b/configs/udoo_defconfig
@@ -30,3 +30,4 @@ CONFIG_CMD_FS_GENERIC=y
CONFIG_DM=y
CONFIG_DM_THERMAL=y
CONFIG_OF_LIBFDT=y
+CONFIG_IDENT_STRING=" Parabola GNU/Linux-libre"
diff --git a/include/configs/udoo.h b/include/configs/udoo.h
index 0a7767c20..543993731 100644
--- a/include/configs/udoo.h
+++ b/include/configs/udoo.h
@@ -51,6 +51,9 @@
/* Command definition */
#define CONFIG_CMD_BMODE
+#define CONFIG_PARTITION_UUIDS
+#define CONFIG_CMD_PART
+#define CONFIG_SUPPORT_RAW_INITRD
#define CONFIG_SYS_MEMTEST_START 0x10000000
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
@@ -60,8 +63,13 @@
#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
+/* Enable Extlinux boot support */
+#define CONFIG_CMD_PXE
+#define CONFIG_MENU
+#define BOOT_TARGET_DEVICES(func)
+#include <config_distro_bootcmd.h>
+
#define CONFIG_EXTRA_ENV_SETTINGS \
- "script=boot.scr\0" \
"image=zImage\0" \
"console=ttymxc1\0" \
"splashpos=m,m\0" \
@@ -69,47 +77,54 @@
"initrd_high=0xffffffff\0" \
"fdt_file=undefined\0" \
"fdt_addr=0x18000000\0" \
- "boot_fdt=try\0" \
+ "rdaddr=0x12A00000\0" \
+ "rdfile=initramfs-linux.img\0" \
+ "optargs=\0" \
+ "video=\0" \
"ip_dyn=yes\0" \
+ "devtype=mmc\0" \
+ "devnum=0\0" \
"mmcdev=0\0" \
"mmcpart=1\0" \
- "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
- "update_sd_firmware_filename=u-boot.imx\0" \
- "update_sd_firmware=" \
- "if test ${ip_dyn} = yes; then " \
- "setenv get_cmd dhcp; " \
- "else " \
- "setenv get_cmd tftp; " \
- "fi; " \
- "if mmc dev ${mmcdev}; then " \
- "if ${get_cmd} ${update_sd_firmware_filename}; then " \
- "setexpr fw_sz ${filesize} / 0x200; " \
- "setexpr fw_sz ${fw_sz} + 1; " \
- "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
- "fi; " \
- "fi\0" \
"mmcargs=setenv bootargs console=${console},${baudrate} " \
- "root=${mmcroot}\0" \
- "loadbootscript=" \
- "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
- "bootscript=echo Running bootscript from mmc ...; " \
- "source\0" \
- "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
- "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
- "mmcboot=echo Booting from mmc ...; " \
- "run mmcargs; " \
- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
- "if run loadfdt; then " \
- "bootz ${loadaddr} - ${fdt_addr}; " \
- "else " \
- "if test ${boot_fdt} = try; then " \
- "bootz; " \
- "else " \
- "echo WARN: Cannot load the DT; " \
- "fi; " \
+ "${optargs} " \
+ "root=${root} " \
+ "video=${video}\0" \
+ "loadimage=echo Loading /boot/${image}..; load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/${image}\0" \
+ "loadfdt=echo Loading /boot/dtbs/${fdt_file}..; load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /boot/dtbs/${fdt_file}\0" \
+ "loadrd=load mmc ${bootpart} ${rdaddr} /boot/${rdfile}\0" \
+ "mmcboot=mmc dev ${mmcdev}; " \
+ "if mmc rescan; then " \
+ "echo SD/MMC found on device ${mmcdev};" \
+ "setenv bootpart ${mmcdev}:1; " \
+ "part uuid mmc ${bootpart} uuid;" \
+ "setenv root PARTUUID=${uuid} rw rootwait;" \
+ "echo Checking for: ${bootdir}/uEnv.txt ...;" \
+ "if test -e mmc ${bootpart} ${bootdir}/uEnv.txt; then " \
+ "load mmc ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt;" \
+ "env import -t ${loadaddr} ${filesize};" \
+ "echo Loaded environment from ${bootdir}/uEnv.txt;" \
+ "echo Checking if uenvcmd is set ...;" \
+ "if test -n ${uenvcmd}; then " \
+ "echo Running uenvcmd ...;" \
+ "run uenvcmd;" \
+ "fi;" \
"fi; " \
- "else " \
- "bootz; " \
+ "run scan_dev_for_boot;" \
+ "if run loadimage; then " \
+ "if run loadfdt; then " \
+ "run mmcargs;" \
+ "if run loadrd; then " \
+ "bootz ${loadaddr} ${rdaddr}:${filesize} ${fdt_addr};" \
+ "else " \
+ "bootz ${loadaddr} - ${fdt_addr};" \
+ "fi;" \
+ "else " \
+ "echo Kernel found, but no device tree found;" \
+ "fi;" \
+ "else " \
+ "echo No kernel found;" \
+ "fi;" \
"fi;\0" \
"netargs=setenv bootargs console=${console},${baudrate} " \
"root=/dev/nfs " \
@@ -135,26 +150,17 @@
"else " \
"bootz; " \
"fi;\0" \
- "findfdt=" \
- "if test $board_rev = MX6Q ; then " \
- "setenv fdt_file imx6q-udoo.dtb; fi; " \
- "if test $board_rev = MX6DL ; then " \
- "setenv fdt_file imx6dl-udoo.dtb; fi; " \
- "if test $fdt_file = undefined; then " \
- "echo WARNING: Could not determine dtb to use; fi; \0"
+ "findfdt=" \
+ "if test $board_rev = MX6Q ; then " \
+ "setenv fdt_file imx6q-udoo.dtb; fi; " \
+ "if test $board_rev = MX6DL ; then " \
+ "setenv fdt_file imx6dl-udoo.dtb; fi; " \
+ "if test $fdt_file = undefined; then " \
+ "echo WARNING: Could not determine dtb to use; fi; \0"
#define CONFIG_BOOTCOMMAND \
"run findfdt; " \
- "mmc dev ${mmcdev}; if mmc rescan; then " \
- "if run loadbootscript; then " \
- "run bootscript; " \
- "else " \
- "if run loadimage; then " \
- "run mmcboot; " \
- "else run netboot; " \
- "fi; " \
- "fi; " \
- "else run netboot; fi"
+ "run mmcboot; "
/* Print Buffer Size */
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
|