16 lines
407 B
Bash
Executable File
16 lines
407 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
TFTP_SERIAL=${TTY_SERIAL:-/dev/ttyUSB0}
|
|
TFTP_CLIENT=172.16.7.99
|
|
TFTP_SERVER=172.16.7.7
|
|
|
|
image="ifs-h3-orangepi.bin"
|
|
|
|
tftp -R 6969:6969 $TFTP_SERVER -c put $image $image
|
|
echo "setenv ipaddr $TFTP_CLIENT" > $TFTP_SERIAL
|
|
echo "setenv serverip $TFTP_SERVER" > $TFTP_SERIAL
|
|
echo "setenv gatewayip $TFTP_SERVER" > $TFTP_SERIAL
|
|
echo "tftpboot 0x41000000 $image; go 0x41000000" > $TFTP_SERIAL
|