flash-uboot.sh 596 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. OUTPUT_DIR=$1
  3. if ! test -d "${OUTPUT_DIR}" ; then
  4. echo "ERROR: no output directory specified."
  5. echo "Usage: $0 OUTPUT_DIR"
  6. echo ""
  7. echo "Arguments:"
  8. echo " OUTPUT_DIR The OpenADK output directory."
  9. exit 1
  10. fi
  11. ./host_x86_64-linux-gnu/usr/bin/openocd \
  12. -f interface/stlink.cfg -f board/stm32f7discovery.cfg \
  13. -c "init" \
  14. -c "reset init" \
  15. -c "flash probe 0" \
  16. -c "flash info 0" \
  17. -c "flash write_image erase ${OUTPUT_DIR}/u-boot-spl.bin 0x08000000" \
  18. -c "flash write_image erase ${OUTPUT_DIR}/u-boot-dtb.bin 0x08008000" \
  19. -c "reset run" \
  20. -c "shutdown"