tftp-mmc-boot.txt 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # This is the default TFTP and MMC u-boot boot script
  2. # The order is as follows:
  3. # 1. TFTP load a uEnv.txt
  4. # 2. TFTP boot a fitImage
  5. # 3. MMC load a uEnv.txt
  6. # 4. MMC load a fitImage
  7. # 5. TFTP load a uImage
  8. # 6. MMC load a fitImage
  9. # Setup the DHCP for a TFTP boot
  10. setenv serverip @SERVERIP@
  11. dhcp
  12. # See if we have a TFTP uEnv.txt file
  13. if tftpboot ${scriptaddr} uEnv.txt; then
  14. env import -t ${scriptaddr} ${filesize}
  15. run bootcmd
  16. fi;
  17. # Try to boot a fitImage from the TFTP server
  18. if tftpboot ${ramdisk_addr_r} fitImage; then
  19. bootm ${ramdisk_addr_r}
  20. fi;
  21. # See if we have a MMC uEnv.txt file
  22. if fatload ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} /uEnv.txt; then
  23. env import -t ${scriptaddr} ${filesize}
  24. run bootcmd
  25. fi;
  26. # Try to boot a fitImage from the MMC
  27. if load ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} fitImage; then
  28. bootm ${ramdisk_addr_r}
  29. fi;
  30. # Fallback to a TFTP uImage
  31. if tftpboot ${kernel_addr_r} uImage; then
  32. bootm ${kernel_addr_r} - ${fdt_addr_r}
  33. fi;
  34. # Finally fallback to a MMC uImage
  35. if load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} uImage; then
  36. bootm ${kernel_addr_r} - ${fdt_addr_r}
  37. fi;