summaryrefslogtreecommitdiff
path: root/dejagnu/config/m68k-emc.exp
blob: 852453ca8fc5ce39d3d392710c91a9e3cdc76db0 (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
49
50
51
52
proc ${board}_init { dest } {
    global doing_emc_init;

    if [info exists doing_emc_init] {
	return;
    }
    set doing_emc_init 1;
    remote_close $dest;
    set dos_host [board_info $dest dos_host];
    remote_reboot $dos_host;
    unset doing_emc_init;
}

proc m68k_emc_board_connect { dest } {
    global board_info;
    set tname [board_info $dest name];

    set board_info($tname,m68k_connected) 1;
    set dos_host [board_info $dest dos_host];

    for { set x 0; } { $x < 3 } { incr x; } {
	set shell_id [remote_open $dos_host];
	if { $shell_id == "" || $shell_id < 0 } {
	    remote_reboot $dos_host;
	} else {
	    break;
	}
    }
    remote_send $dos_host "c:\\symetrix.bat\n";
    remote_expect $dos_host 300 {
	-re "SymmComm.*Installed.*\033.2J.*\033.2J" { }
	default {
	    warning "Never got clear screen sequence from remote side."
	}
    }
    # Flush the buffer.
    remote_expect $dos_host 2 {
	-re ".+" { exp_continue; }
    }
    # Get past first menu.
    remote_send $dos_host "\n";
    remote_expect $dos_host 10 {
	-re "\033.07;02H" { }
	default { }
    }
    # We don't want a log file.
    remote_send $dos_host "\n";
    remote_expect $dos_host 10 {
	-re "\033.02;24H" { }
	default { }
    }
}