diff options
author | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2020-04-02 15:36:56 +0100 |
---|---|---|
committer | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2020-04-02 15:36:56 +0100 |
commit | 19a01a42b09be28f1f1f1a49e1090485bb016eee (patch) | |
tree | db7ec990ca30b99db44971aca0a7e00c65b159c2 | |
parent | 2600e03ab233cd81587f69116f5310d4f1ce0808 (diff) |
u-boot_fastboot: set expect to send characters slowersd-card
Signed-off-by: Milosz Wasilewski <milosz.wasilewski@linaro.org>
-rwxr-xr-x | u-boot_fastboot_serial.expect | 19 | ||||
-rwxr-xr-x | u-boot_fastboot_telnet.expect | 19 |
2 files changed, 20 insertions, 18 deletions
diff --git a/u-boot_fastboot_serial.expect b/u-boot_fastboot_serial.expect index 7e23f0b..ab4c99f 100755 --- a/u-boot_fastboot_serial.expect +++ b/u-boot_fastboot_serial.expect @@ -1,38 +1,39 @@ #!/usr/bin/expect set tty [lindex $argv 0] +set send_human {.1 .3 1 .05 2} send_user "interact with u-boot, ctrl-C to exit\n" spawn -open [open $tty w+] -send "\r" +send -h "\r" sleep 0.1 expect "=>" -send "mmc dev 1\r" +send -h "mmc dev 1\r" sleep 0.1 expect "mmc1(part 0) is current device" sleep 0.1 -send "mmc rescan\r" +send -h "mmc rescan\r" sleep 0.1 expect "=>" sleep 0.1 -send "mmc erase 0 0x400000\r" +send -h "mmc erase 0 0x400000\r" sleep 0.1 expect "4194304 blocks erased: OK" sleep 0.1 -send "env default -f -a\r" +send -h "env default -f -a\r" sleep 0.1 expect "=>" sleep 0.1 -send "setenv partitions \$partitions_android\r" +send -h "setenv partitions \$partitions_android\r" sleep 0.1 expect "=>" sleep 0.1 -send "setenv bootdelay 15\r" +send -h "setenv bootdelay 15\r" sleep 0.1 expect "=>" -send "env save\r" +send -h "env save\r" sleep 0.1 expect "=>" sleep 0.1 -send "fastboot 1\r" +send -h "fastboot 1\r" expect { timeout { puts "Fastboot Running..." diff --git a/u-boot_fastboot_telnet.expect b/u-boot_fastboot_telnet.expect index 0f7b72c..bdeaa2d 100755 --- a/u-boot_fastboot_telnet.expect +++ b/u-boot_fastboot_telnet.expect @@ -2,39 +2,40 @@ set telnet [lindex $argv 0] set host [lindex $argv 1] set port [lindex $argv 2] +set send_human {.1 .3 1 .05 2} send_user "interact with u-boot over telnet, ctrl-C to exit\n" spawn $telnet $host $port -send "\r" +send -h "\r" sleep 0.1 expect "=>" -send "mmc dev 1\r" +send -h "mmc dev 1\r" sleep 0.1 expect "mmc1(part 0) is current device" sleep 0.1 -send "mmc rescan\r" +send -h "mmc rescan\r" sleep 0.1 expect "=>" sleep 0.1 -send "mmc erase 0 0x400000\r" +send -h "mmc erase 0 0x400000\r" sleep 0.1 expect "4194304 blocks erased: OK" sleep 0.1 -send "env default -f -a\r" +send -h "env default -f -a\r" sleep 0.1 expect "=>" sleep 0.1 -send "setenv partitions \$partitions_android\r" +send -h "setenv partitions \$partitions_android\r" sleep 0.1 expect "=>" sleep 0.1 -send "setenv bootdelay 15\r" +send -h "setenv bootdelay 15\r" sleep 0.1 expect "=>" -send "env save\r" +send -h "env save\r" sleep 0.1 expect "=>" sleep 0.1 -send "fastboot 1\r" +send -h "fastboot 1\r" expect { timeout { puts "Fastboot Running..." |