1
2
3
4
5
6
7
8#ifndef __TI_MMC_H
9#define __TI_MMC_H
10
11#define DEFAULT_MMC_TI_ARGS \
12 "mmcdev=0\0" \
13 "mmcrootfstype=ext4 rootwait\0" \
14 "finduuid=part uuid ${boot} ${bootpart} uuid\0" \
15 "args_mmc=run finduuid;setenv bootargs console=${console} " \
16 "${optargs} " \
17 "root=PARTUUID=${uuid} rw " \
18 "rootfstype=${mmcrootfstype}\0" \
19 "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
20 "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
21 "source ${loadaddr}\0" \
22 "bootenvfile=uEnv.txt\0" \
23 "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
24 "env import -t ${loadaddr} ${filesize}\0" \
25 "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \
26 "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
27 "loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
28 "envboot=mmc dev ${mmcdev}; " \
29 "if mmc rescan; then " \
30 "echo SD/MMC found on device ${mmcdev};" \
31 "if run loadbootscript; then " \
32 "run bootscript;" \
33 "else " \
34 "if run loadbootenv; then " \
35 "echo Loaded env from ${bootenvfile};" \
36 "run importbootenv;" \
37 "fi;" \
38 "if test -n $uenvcmd; then " \
39 "echo Running uenvcmd ...;" \
40 "run uenvcmd;" \
41 "fi;" \
42 "fi;" \
43 "fi;\0" \
44 "mmcloados=" \
45 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
46 "if run loadfdt; then " \
47 "bootz ${loadaddr} - ${fdtaddr}; " \
48 "else " \
49 "if test ${boot_fdt} = try; then " \
50 "bootz; " \
51 "else " \
52 "echo WARN: Cannot load the DT; " \
53 "fi; " \
54 "fi; " \
55 "else " \
56 "bootz; " \
57 "fi;\0" \
58 "mmcboot=mmc dev ${mmcdev}; " \
59 "devnum=${mmcdev}; " \
60 "devtype=mmc; " \
61 "if mmc rescan; then " \
62 "echo SD/MMC found on device ${mmcdev};" \
63 "if run loadimage; then " \
64 "run args_mmc; " \
65 "if test ${boot_fit} -eq 1; then " \
66 "run run_fit; " \
67 "else " \
68 "run mmcloados;" \
69 "fi;" \
70 "fi;" \
71 "fi;\0"
72
73#endif
74