flash-uboot.sh 525 B

12345678910111213141516171819202122
  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-dtb.bin 0x08000000" \
  18. -c "reset run" \
  19. -c "shutdown"