blob: f827c60d281aa7385155eb053c1282a3de3e44db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
load_base_board_description "cygmon";
set_board_info testcase_timeout 30;
proc ${board}_init { dest } {
global usparc_init_count;
set shell_prompt [board_info $dest shell_prompt];
if ![info exists usparc_init_count] {
set usparc_init_count 0;
} else {
incr usparc_init_count;
if { $usparc_init_count == 3 } {
return -1;
}
}
remote_close $dest;
set shell_id [remote_open $dest];
if { $shell_id == "" || $shell_id < 0 } {
return [remote_reboot $dest];
} else {
remote_binary $dest;
remote_send $dest "\n";
set got_one 0;
remote_expect $dest 5 {
-re "$shell_prompt" { set got_one 1; exp_continue; }
default {
if { ! $got_one } {
remote_close $dest;
return [remote_reboot $dest];
}
}
}
remote_send $dest "m \[15\]1fff1001f00 32\n";
remote_expect $dest 5 {
-re "$shell_prompt" {
unset usparc_init_count;
remote_close $dest;
return 0;
}
default {
remote_close $dest;
return [remote_reboot $dest];
}
}
}
}
|