summaryrefslogtreecommitdiff
path: root/config/i386-bozo.exp
blob: a0f4ccb63d3a01f9dd3ed5c818082ec56b464b2d (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
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
# DejaGnu is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# DejaGnu is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with DejaGnu; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.

load_generic_config "gdb-comm"

proc ${board}_init { args } {
    set linux_box [target_info linux_box]
    set bozo_server [target_info bozo_server]
    remote_spawn $linux_box "$bozo_server unknown"
    remote_expect $linux_box 60 {
	-re "port is (\[0-9\]+)" {
	    set_currtarget_info netport "${linux_box}:$expect_out(1,string)"
	}
    }
}

proc ${board}_close { board } {
    set linux_box [board_info $board linux_box]
    if {[board_info $linux_box exists fileid]} {
	remote_send $linux_box "\003"
	remote_close $linux_box
    }
    standard_close $board
}

proc ${board}_reboot { board args } {
    remote_close $board
    unset_currtarget_info netport
    return 1
}