Neha Malcom Francis | a2e532c | 2023-03-15 10:57:43 +0530 | [diff] [blame] | 1 | mmcdev=0 |
| 2 | mmcrootfstype=ext4 rootwait |
| 3 | finduuid=part uuid ${boot} ${bootpart} uuid |
| 4 | args_mmc=run finduuid;setenv bootargs console=${console} |
| 5 | ${optargs} |
| 6 | root=PARTUUID=${uuid} rw |
| 7 | rootfstype=${mmcrootfstype} |
| 8 | loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr |
| 9 | bootscript=echo Running bootscript from mmc${mmcdev} ...; |
| 10 | source ${loadaddr} |
| 11 | bootenvfile=uEnv.txt |
| 12 | importbootenv=echo Importing environment from mmc${mmcdev} ...; |
| 13 | env import -t ${loadaddr} ${filesize} |
| 14 | loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile} |
| 15 | loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile} |
| 16 | loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile} |
| 17 | envboot=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; |
| 33 | mmcloados= |
| 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; |
| 47 | mmcboot=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; |
| 60 | fi; |
| 61 | |