blob: fdfceec263d2cab1925cbdf720a44feab9a5aaee [file] [log] [blame]
Alice Guoeb3ad862020-12-18 14:50:08 +08001setenv bootargs console=${console} root=${mmcroot};
2
3for boot_target in ${boot_targets};
4do
5 if test "${boot_target}" = "mmc1" ; then
6 if fatload mmc 1:${mmcpart} ${kernel_addr_r} ${image}; then
7 if fatload mmc 1:${mmcpart} ${fdt_addr} ${fdt_file}; then
8 echo Load image and .dtb from SD card(mmc1);
9 booti ${kernel_addr_r} - ${fdt_addr};
10 exit;
11 fi
12 fi
13 fi
14
15 if test "${boot_target}" = "mmc2" ; then
16 if fatload mmc 2:${mmcpart} ${kernel_addr_r} ${image}; then
17 if fatload mmc 2:${mmcpart} ${fdt_addr} ${fdt_file}; then
18 echo Load image and .dtb from eMMC(mmc2);
19 booti ${kernel_addr_r} - ${fdt_addr};
20 exit;
21 fi
22 fi
23 fi
24
25 if test "${boot_target}" = "dhcp" ; then
26 if dhcp ${kernel_addr_r} ${serverip}:${image}; then
27 if dhcp ${fdt_addr} ${serverip}:${fdt_file}; then
28 echo Load image and .dtb from net(dhcp);
29 booti ${kernel_addr_r} - ${fdt_addr};
30 exit;
31 fi
32 fi
33 fi
34
35done