udpu.bootscript 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Bootscript for Methode uDPU device
  2. # Device and variables may vary between different revisions
  3. # of device, so we need to make sure everything is set correctly.
  4. # Set the LED's correctly
  5. gpio clear 12; gpio clear 40; gpio clear 45;
  6. # Find eMMC device,
  7. if mmc dev 0; then
  8. setenv mmcdev 0
  9. setenv rootdev 'root=/dev/mmcblk0p3'
  10. elif mmc dev 1; then
  11. setenv mmcdev 1
  12. setenv rootdev 'root=/dev/mmcblk1p3'
  13. fi
  14. # Set the variables if necessary
  15. if test ${kernel_addr_r}; then
  16. setenv kernel_addr_r 0x5000000
  17. fi
  18. if test ${fdt_add_r}; then
  19. setenv fdt_addr_r 0x4f00000
  20. fi
  21. setenv console 'console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000 rootfs_mount_options.compress_algorithm=zstd'
  22. setenv bootargs ${console} $rootdev rw rootwait
  23. load mmc ${mmcdev}:1 ${fdt_addr_r} @[email protected]
  24. load mmc ${mmcdev}:1 ${kernel_addr_r} Image
  25. booti ${kernel_addr_r} - ${fdt_addr_r}
  26. # If the boot command fails, fallback to recovery image
  27. echo '-- Boot failed, falling back to the recovery image --'
  28. setenv bootargs $console
  29. load mmc ${mmcdev}:2 ${kernel_addr_r} recovery.itb
  30. bootm ${kernel_addr_r}