motion: update to 4.6.0
[openadk.git] / scripts / flash-uboot.sh
blobe519d6a586a45ae47324e026df98de7dc1617816
1 #!/bin/bash
3 OUTPUT_DIR=$1
5 if ! test -d "${OUTPUT_DIR}" ; then
6 echo "ERROR: no output directory specified."
7 echo "Usage: $0 OUTPUT_DIR"
8 echo ""
9 echo "Arguments:"
10 echo " OUTPUT_DIR The OpenADK output directory."
11 exit 1
14 ./host_x86_64-linux-gnu/usr/bin/openocd \
15 -f interface/stlink.cfg -f board/stm32f7discovery.cfg \
16 -c "init" \
17 -c "reset init" \
18 -c "flash probe 0" \
19 -c "flash info 0" \
20 -c "flash write_image erase ${OUTPUT_DIR}/u-boot-dtb.bin 0x08000000" \
21 -c "reset run" \
22 -c "shutdown"