hostapd: update to 2.10
[openadk.git] / scripts / flash.sh
blobd5343a7fbc2f95304f78d7cbadcd1ce015cc17dd
1 #!/bin/bash
3 OUTPUT_DIR=$1
4 BOARD_NAME=${2:-stm32f429disc1}
6 if ! test -d "${OUTPUT_DIR}" ; then
7 echo "ERROR: no output directory specified."
8 echo "Usage: $0 OUTPUT_DIR BOARD_NAME"
9 echo ""
10 echo "Arguments:"
11 echo " OUTPUT_DIR The OpenADK output directory."
12 echo " BOARD_NAME One of the available boards among:"
13 echo " stm32f429discovery, stm32f429disc1"
14 exit 1
17 ./host_x86_64-linux-gnu/usr/bin/openocd -f board/${BOARD_NAME}.cfg \
18 -c "init" \
19 -c "reset init" \
20 -c "flash probe 0" \
21 -c "flash info 0" \
22 -c "flash write_image erase ${OUTPUT_DIR}/stm32f429i-disco.bin 0x08000000" \
23 -c "flash write_image erase ${OUTPUT_DIR}/stm32f429-disco.dtb 0x08004000" \
24 -c "flash write_image erase ${OUTPUT_DIR}/st-stm32f429-initramfspiggyback-kernel 0x08008000" \
25 -c "reset run" \
26 -c "shutdown"