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