#!/bin/bash
|
#!/bin/bash
|
|
|
# Copyright (C) 2010 Embecosm Limited
|
# Copyright (C) 2010 Embecosm Limited
|
|
|
# Contributor Jeremy Bennett
|
# Contributor Jeremy Bennett
|
# Contributor Joern Rennecke
|
# Contributor Joern Rennecke
|
|
|
# This file is a board description for testing OpenRISC with uClibc and
|
# This file is a board description for testing OpenRISC with uClibc and
|
# Or1ksim running Linux.
|
# Or1ksim running Linux.
|
|
|
# This program is free software; you can redistribute it and/or modify it
|
# This program 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
|
# 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)
|
# Software Foundation; either version 3 of the License, or (at your option)
|
# any later version.
|
# any later version.
|
|
|
# This program is distributed in the hope that it will be useful, but WITHOUT
|
# This program is distributed in the hope that it will be useful, but WITHOUT
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
# more details.
|
# more details.
|
|
|
# You should have received a copy of the GNU General Public License along
|
# You should have received a copy of the GNU General Public License along
|
# with this program. If not, see .
|
# with this program. If not, see .
|
|
|
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
# For telnet targets we need to define some functions.
|
# For telnet targets we need to define some functions.
|
|
|
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
# Custom proc to close a telnet session
|
# Custom proc to close a telnet session
|
|
|
# @param[in] boardname The board being closed.
|
# @param[in] boardname The board being closed.
|
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
proc telnet_close {hostname} {
|
proc telnet_close {hostname} {
|
|
|
|
verbose "telnet_close: hostname $hostname" 3
|
|
|
# Get the connected host name, if it exists (actually, we think this can
|
# Get the connected host name, if it exists (actually, we think this can
|
# never be set, but it is for consistency with telnet_open
|
# never be set, but it is for consistency with telnet_open
|
if {[board_info $hostname exists name]} {
|
if {[board_info $hostname exists name]} {
|
set connhost [board_info $hostname name]
|
set connhost [board_info $hostname name]
|
} else {
|
} else {
|
set connhost $hostname
|
set connhost $hostname
|
}
|
}
|
|
|
|
if [board_info $connhost exists hostname] {
|
|
set hostname [board_info $connhost hostname]
|
|
}
|
|
|
# Use the standard close proc from remote.exp
|
# Use the standard close proc from remote.exp
|
standard_close $hostname
|
standard_close $connhost
|
}
|
}
|
|
|
|
|
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
# Custom proc to exec programs using telnet
|
# Custom proc to exec programs using telnet
|
|
|
# We seem to only pass in the first of the arguments supplied to the command.
|
# We seem to only pass in the first of the arguments supplied to the command.
|
|
|
# The timeout is a mess. It seems to always be 10, not the timeout needed to
|
# The timeout is a mess. It seems to always be 10, not the timeout needed to
|
# execute a regression test (typicall 300 seconds). Fixed by using our onw
|
# execute a regression test (typicall 300 seconds). Fixed by using our onw
|
# timeout data.
|
# timeout data.
|
|
|
# @param[in] hostname The board we are telnetting to
|
# @param[in] hostname The board we are telnetting to
|
# @param[in] cmd The command to run
|
# @param[in] cmd The command to run
|
# @param[in] args Arguments to the command
|
# @param[in] args Arguments to the command
|
|
|
# @return A list of the return code (-1 on failure) and any error message.
|
# @return A list of the return code (-1 on failure) and any error message.
|
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
proc telnet_exec {hostname cmd args} {
|
proc telnet_exec {hostname cmd args} {
|
global timeout
|
global timeout
|
global verbos
|
global verbos
|
set output "(no output)"
|
set output "(no output)"
|
|
|
# Save the old timeout, since its global, and we'll want to restore it.
|
# Save the old timeout, since its global, and we'll want to restore it.
|
set old_timeout $timeout
|
set old_timeout $timeout
|
|
|
verbose "Executing $hostname $cmd $args"
|
verbose "Executing $hostname $cmd $args"
|
|
|
# Get the first argument, if any.
|
# Get the first argument, if any.
|
if { [llength $args] > 0 } {
|
if { [llength $args] > 0 } {
|
set pargs [lindex $args 0];
|
set pargs [lindex $args 0];
|
} else {
|
} else {
|
set pargs ""
|
set pargs ""
|
}
|
}
|
|
|
# Set the shell prompt
|
# Set the shell prompt
|
if [board_info $hostname exists shell_prompt] {
|
if [board_info $hostname exists shell_prompt] {
|
set shell_prompt [board_info $hostname shell_prompt]
|
set shell_prompt [board_info $hostname shell_prompt]
|
}
|
}
|
if ![info exists shell_prompt] { # if no prompt, then set it to
|
if ![info exists shell_prompt] { # if no prompt, then set it to
|
something generic
|
something generic
|
set shell_prompt ".*> "
|
set shell_prompt ".*> "
|
}
|
}
|
|
|
# Start a new telnet session if one doesn't already exist. If sucessful
|
# Start a new telnet session if one doesn't already exist. If sucessful
|
# the fileid field associated with $hostname will be set to the spawn_id
|
# the fileid field associated with $hostname will be set to the spawn_id
|
# of the new telnet process.
|
# of the new telnet process.
|
if ![board_info $hostname exists fileid] {
|
if ![board_info $hostname exists fileid] {
|
if {[telnet_open $hostname] == -1} {
|
if {[telnet_open $hostname] == -1} {
|
return [list -1
|
return [list -1
|
"telnet to $hostname failed for $cmd, couldn't begin telnet session"]
|
"telnet to $hostname failed for $cmd, couldn't begin telnet session"]
|
}
|
}
|
}
|
}
|
|
|
# Make the telnet session the current process. Short timeout for this.
|
# Make the telnet session the current process. Short timeout for this.
|
set spawn_id [board_info $hostname fileid]
|
set spawn_id [board_info $hostname fileid]
|
set timeout 10
|
set timeout 10
|
|
|
#Hit enter to make sure you get a shell prompt
|
#Hit enter to make sure you get a shell prompt
|
send -- "\r"
|
send -- "\r"
|
|
|
expect {
|
expect {
|
# A prompt indicates the current session is alive
|
# A prompt indicates the current session is alive
|
-re "$shell_prompt.*$" {
|
-re "$shell_prompt.*$" {
|
verbose "Got a prompt"
|
verbose "Got a prompt"
|
}
|
}
|
default {
|
default {
|
# No response try closing the connection and reopening.
|
# No response try closing the connection and reopening.
|
telnet_close $hostname
|
telnet_close $hostname
|
if {[telnet_open $hostname] != -1} {
|
if {[telnet_open $hostname] != -1} {
|
verbose "started new telnet session, spawn_id is [board_info
|
verbose "problem: hostname is \"$hostname\""
|
$hostname fileid]"
|
verbose "started new telnet session, spawn_id is [board_info $hostname fileid]"
|
send -- "\r"
|
send -- "\r"
|
exp_continue
|
exp_continue
|
} else {
|
} else {
|
set timeout $old_timeout
|
set timeout $old_timeout
|
return [list -1 "telnet to $hostname failed for $cmd, couldn't get
|
return [list -1 "telnet to $hostname failed for $cmd, couldn't get
|
a shell prompt"]
|
a shell prompt"]
|
}
|
}
|
# I don't think we can get here. Comment out the old code and
|
# I don't think we can get here. Comment out the old code and
|
# trigger an error
|
# trigger an error
|
# send -- "\r"
|
# send -- "\r"
|
# exp_continue
|
# exp_continue
|
set timeout $old_timeout
|
set timeout $old_timeout
|
error "Problem reconnecting to telnet."
|
error "Problem reconnecting to telnet."
|
}
|
}
|
}
|
}
|
|
|
# JPB to set custom timeout. Old timeout saved, so we can restore it,
|
# JPB to set custom timeout. Old timeout saved, so we can restore it,
|
# since it's global. Not sure why we only use the first of the arguments.
|
# since it's global. Not sure why we only use the first of the arguments.
|
if [board_info $hostname exists telnet_exec_timeout] {
|
if [board_info $hostname exists telnet_exec_timeout] {
|
set timeout [board_info $hostname telnet_exec_timeout]
|
set timeout [board_info $hostname telnet_exec_timeout]
|
verbose "Telnet exec timeout set to $timeout"
|
verbose "Telnet exec timeout set to $timeout"
|
} else {
|
} else {
|
# Appropriate default
|
# Appropriate default
|
set timeout 300
|
set timeout 300
|
verbose "Telnet exec timeout set to default value $timeout"
|
verbose "Telnet exec timeout set to default value $timeout"
|
}
|
}
|
|
|
send "$cmd $pargs\r"
|
send "$cmd $pargs\r"
|
|
|
expect {
|
expect {
|
-re "$shell_prompt.*$" {
|
-re "$shell_prompt.*$" {
|
}
|
}
|
timeout {
|
timeout {
|
if [info exists expect_out(buffer)] {
|
if [info exists expect_out(buffer)] {
|
set execute_output_string $expect_out(buffer)
|
set execute_output_string $expect_out(buffer)
|
}
|
}
|
set timeout $old_timeout
|
set timeout $old_timeout
|
telnet_close $hostname
|
telnet_close $hostname
|
return [list -1 "telnet to $hostname for $cmd $pargs failed (timeout)"]
|
return [list -1 "telnet to $hostname for $cmd $pargs failed (timeout)"]
|
}
|
}
|
}
|
}
|
|
|
#Remove unnecessary strings from the output string
|
#Remove unnecessary strings from the output string
|
|
|
#If the file path contains any "+" signs, it will mess things up when $cmd
|
#If the file path contains any "+" signs, it will mess things up when $cmd
|
#is used as a regsub pattern (2 lines down), so we replace all "+"s with "."
|
#is used as a regsub pattern (2 lines down), so we replace all "+"s with "."
|
regsub -all "\\+" $cmd "." cmd
|
regsub -all "\\+" $cmd "." cmd
|
regsub -all $cmd "$expect_out(buffer)" {} output
|
regsub -all $cmd "$expect_out(buffer)" {} output
|
regsub "\(~ \)?$shell_prompt" $output {} output
|
regsub "\(~ \)?$shell_prompt" $output {} output
|
regsub -all "\[\r\n\]" $output {} output
|
regsub -all "\[\r\n\]" $output {} output
|
|
|
#Check the return status. Use a short timeout for this.
|
#Check the return status. Use a short timeout for this.
|
set timeout 30
|
set timeout 30
|
send -- "echo \$?\r"
|
send -- "echo \$?\r"
|
expect -re "$shell_prompt.*$"
|
expect -re "$shell_prompt.*$"
|
|
|
#Regsub the output to get the status number
|
#Regsub the output to get the status number
|
regsub -all {echo \$\?} $expect_out(buffer) {} status
|
regsub -all {echo \$\?} $expect_out(buffer) {} status
|
regsub "\(~ \)?$shell_prompt" $status {} status
|
regsub "\(~ \)?$shell_prompt" $status {} status
|
regsub -all "\[\r\n \]" $status {} status
|
regsub -all "\[\r\n \]" $status {} status
|
|
|
#This probably isn't neccessary..
|
#This probably isn't neccessary..
|
if {[regexp {[0123456789]+} $status] != 1} {
|
if {[regexp {[0123456789]+} $status] != 1} {
|
warning "status not a number, it is <$status>, setting it to 1"
|
warning "status not a number, it is <$status>, setting it to 1"
|
set status 1
|
set status 1
|
}
|
}
|
|
|
# Restore timeout
|
# Restore timeout
|
set timeout $old_timeout
|
set timeout $old_timeout
|
if {$status == 0} {
|
if {$status == 0} {
|
return [list "0" "$output"]
|
return [list "0" "$output"]
|
} else {
|
} else {
|
return [list "1" "$output"]
|
return [list "1" "$output"]
|
}
|
}
|
}
|
}
|
|
|
|
|
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
# For FTP we need to redefine some existing functions to add additional
|
# For FTP we need to redefine some existing functions to add additional
|
# features.
|
# features.
|
|
|
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
# Upload REMOTEFILE from HOST as LOCALFILE by FTP
|
# Upload REMOTEFILE from HOST as LOCALFILE by FTP
|
|
|
# This version swaps the argument order, which is what the regression test
|
# This version swaps the argument order, which is what the regression test
|
# seems to expect.
|
# seems to expect.
|
|
|
# Also allows a custom timeout to be set.
|
# Also allows a custom timeout to be set.
|
|
|
# @param[in] host The host we are connected to.
|
# @param[in] host The host we are connected to.
|
# @param[in] localfile The local file to send
|
# @param[in] localfile The local file to send
|
# @param[in] remotefile Name of file at remote end.
|
# @param[in] remotefile Name of file at remote end.
|
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
proc ftp_upload {host localfile remotefile} {
|
proc ftp_upload {host localfile remotefile} {
|
set prompt "ftp>"
|
set prompt "ftp>"
|
|
|
verbose "ftping $remotefile from $host to $localfile"
|
verbose "ftping $remotefile from $host to $localfile"
|
|
|
# JPB to set custom timeout (not marked global, so we don't need to save
|
# JPB to set custom timeout (not marked global, so we don't need to save
|
# and restore)
|
# and restore)
|
if [board_info $host exists ftp_upload_timeout] {
|
if [board_info $host exists ftp_upload_timeout] {
|
set timeout [board_info $host ftp_upload_timeout]
|
set timeout [board_info $host ftp_upload_timeout]
|
verbose "FTP upload timeout set to $timeout"
|
verbose "FTP upload timeout set to $timeout"
|
} else {
|
} else {
|
# Appropriate default
|
# Appropriate default
|
set timeout 15
|
set timeout 15
|
verbose "FTP upload timeout set to default value $timeout"
|
verbose "FTP upload timeout set to default value $timeout"
|
}
|
}
|
|
|
set spawn_id [ftp_open $host]
|
set spawn_id [ftp_open $host]
|
if {$spawn_id < 0} {
|
if {$spawn_id < 0} {
|
return ""
|
return ""
|
}
|
}
|
set loop 1
|
set loop 1
|
|
|
while {$loop} {
|
while {$loop} {
|
send -i $spawn_id "get $remotefile $localfile\n"
|
send -i $spawn_id "get $remotefile $localfile\n"
|
expect {
|
expect {
|
-i $spawn_id -re ".*Too many open files.*$prompt" {
|
-i $spawn_id -re ".*Too many open files.*$prompt" {
|
ftp_close $host
|
ftp_close $host
|
}
|
}
|
-i $spawn_id -re ".*No such file or directory.*$prompt" {
|
-i $spawn_id -re ".*No such file or directory.*$prompt" {
|
set loop 0
|
set loop 0
|
set remotefile ""
|
set remotefile ""
|
}
|
}
|
-i $spawn_id -re "(^|\[\r\n\])226.*$prompt" {set loop 0}
|
-i $spawn_id -re "(^|\[\r\n\])226.*$prompt" {set loop 0}
|
-i $spawn_id -re "(^|\[\r\n\])\[0-9\]\[0-9\]\[0-9\].*$prompt" {
|
-i $spawn_id -re "(^|\[\r\n\])\[0-9\]\[0-9\]\[0-9\].*$prompt" {
|
set loop 0
|
set loop 0
|
set remotefile ""
|
set remotefile ""
|
}
|
}
|
-i $spawn_id default {
|
-i $spawn_id default {
|
ftp_close $host
|
ftp_close $host
|
}
|
}
|
}
|
}
|
if {$loop} {
|
if {$loop} {
|
set spawn_id [ftp_open $host]
|
set spawn_id [ftp_open $host]
|
if {$spawn_id < 0} {
|
if {$spawn_id < 0} {
|
return ""
|
return ""
|
}
|
}
|
}
|
}
|
}
|
}
|
return $localfile
|
return $localfile
|
}
|
}
|
|
|
|
|
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
# Download LOCALFILE to HOST as REMOTEFILE by FTP
|
# Download LOCALFILE to HOST as REMOTEFILE by FTP
|
|
|
# This version takes a user specified timeout, which we need for our slow
|
# This version takes a user specified timeout, which we need for our slow
|
# simulated connection.
|
# simulated connection.
|
|
|
# @param[in] host The host we are connected to.
|
# @param[in] host The host we are connected to.
|
# @param[in] localfile The local file to send
|
# @param[in] localfile The local file to send
|
# @param[in] remotefile Name of file at remote end.
|
# @param[in] remotefile Name of file at remote end.
|
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
proc ftp_download {host localfile remotefile} {
|
proc ftp_download {host localfile remotefile} {
|
set prompt "ftp>"
|
set prompt "ftp>"
|
|
|
verbose "putting $localfile $remotefile"
|
verbose "putting $localfile $remotefile"
|
|
|
if [board_info $host exists hostname] {
|
if [board_info $host exists hostname] {
|
set remotehost [board_info $host hostname]
|
set remotehost [board_info $host hostname]
|
} else {
|
} else {
|
set remotehost $host
|
set remotehost $host
|
}
|
}
|
|
|
set spawn_id [ftp_open $host]
|
set spawn_id [ftp_open $host]
|
if {$spawn_id < 0} {
|
if {$spawn_id < 0} {
|
return ""
|
return ""
|
}
|
}
|
set loop 1
|
set loop 1
|
|
|
# JPB to set custom timeout (not marked global, so we don't need to save
|
# JPB to set custom timeout (not marked global, so we don't need to save
|
# and restore)
|
# and restore)
|
if [board_info $host exists ftp_download_timeout] {
|
if [board_info $host exists ftp_download_timeout] {
|
set timeout [board_info $host ftp_download_timeout]
|
set timeout [board_info $host ftp_download_timeout]
|
verbose "FTP download timeout set to $timeout"
|
verbose "FTP download timeout set to $timeout"
|
} else {
|
} else {
|
# Appropriate default
|
# Appropriate default
|
set timeout 15
|
set timeout 15
|
verbose "FTP download timeout set to default value $timeout"
|
verbose "FTP download timeout set to default value $timeout"
|
}
|
}
|
|
|
while {$loop} {
|
while {$loop} {
|
send -i $spawn_id "put $localfile $remotefile\n"
|
send -i $spawn_id "put $localfile $remotefile\n"
|
expect {
|
expect {
|
-i $spawn_id -re ".*Too many open files.*$prompt" {
|
-i $spawn_id -re ".*Too many open files.*$prompt" {
|
ftp_close $host
|
ftp_close $host
|
}
|
}
|
-i $spawn_id -re ".*No such file or directory.*$prompt" {
|
-i $spawn_id -re ".*No such file or directory.*$prompt" {
|
set loop 0
|
set loop 0
|
set remotefile ""
|
set remotefile ""
|
}
|
}
|
-re "(^|\[\r\n\])150.*connection for (.*) \[(\]\[0-9.,\]+\\)\[\r\n\]" {
|
-re "(^|\[\r\n\])150.*connection for (.*) \[(\]\[0-9.,\]+\\)\[\r\n\]" {
|
set remotefile $expect_out(2,string)
|
set remotefile $expect_out(2,string)
|
exp_continue
|
exp_continue
|
}
|
}
|
-i $spawn_id -re "(^|\[\r\n\])226.*$prompt" {
|
-i $spawn_id -re "(^|\[\r\n\])226.*$prompt" {
|
set loop 0
|
set loop 0
|
}
|
}
|
-i $spawn_id -re "Timeout.*$prompt" {
|
-i $spawn_id -re "Timeout.*$prompt" {
|
ftp_close $host
|
ftp_close $host
|
}
|
}
|
-i $spawn_id -re "(^|\[\r\n\])\[0-9\]\[0-9\]\[0-9\].*$prompt" {
|
-i $spawn_id -re "(^|\[\r\n\])\[0-9\]\[0-9\]\[0-9\].*$prompt" {
|
set loop 0
|
set loop 0
|
set remotefile ""
|
set remotefile ""
|
}
|
}
|
-i $spawn_id default {
|
-i $spawn_id default {
|
ftp_close $host
|
ftp_close $host
|
}
|
}
|
}
|
}
|
if {$loop} {
|
if {$loop} {
|
set spawn_id [ftp_open $host]
|
set spawn_id [ftp_open $host]
|
if {$spawn_id < 0} {
|
if {$spawn_id < 0} {
|
return ""
|
return ""
|
}
|
}
|
}
|
}
|
}
|
}
|
return $remotefile
|
return $remotefile
|
}
|
}
|
|
|
|
|
# This is a list of toolchains that are supported on this board.
|
# This is a list of toolchains that are supported on this board.
|
set_board_info target_install {or32-linux}
|
set_board_info target_install {or32-linux}
|
|
|
# No multilib options needed by default.
|
# No multilib options needed by default.
|
process_multilib_options ""
|
process_multilib_options ""
|
|
|
# Load the generic configuration for this board. This will define a basic set
|
# Load the generic configuration for this board. This will define a basic set
|
# of routines needed by the tool to communicate with the board.
|
# of routines needed by the tool to communicate with the board.
|
load_generic_config "unix"
|
load_generic_config "unix"
|
|
|
# Set up remote target info. We select the IP address using an external
|
# Set up remote target info. We select the IP address using an external
|
# program which knows about all available Linuxes.
|
# program which knows about all available Linuxes.
|
set linux_hostname [exec [file dirname $env(DEJAGNU)]/get-ip.sh --rotate]
|
set linux_hostname [exec [file dirname $env(DEJAGNU)]/get-ip.sh --rotate]
|
set_board_info hostname $linux_hostname
|
set_board_info hostname $linux_hostname
|
send_user "OR32 target hostname is $linux_hostname\n"
|
send_user "OR32 target hostname is $linux_hostname\n"
|
|
|
set_board_info username root
|
set_board_info username root
|
|
|
# Use the installed compilers to ensure we get search paths that will find
|
# Use the installed compilers to ensure we get search paths that will find
|
# uClibc.
|
# uClibc.
|
send_user "set_board_info compiler /opt/or32-new/bin/or32-linux-gcc\n"
|
send_user "set_board_info compiler /opt/or32-new/bin/or32-linux-gcc\n"
|
global GCC_UNDER_TEST
|
global GCC_UNDER_TEST
|
set GCC_UNDER_TEST "/opt/or32-new/bin/or32-linux-gcc"
|
set GCC_UNDER_TEST "/opt/or32-new/bin/or32-linux-gcc"
|
global GXX_UNDER_TEST
|
global GXX_UNDER_TEST
|
set GXX_UNDER_TEST "/opt/or32-new/bin/or32-linux-g++"
|
set GXX_UNDER_TEST "/opt/or32-new/bin/or32-linux-g++"
|
set_board_info compiler /opt/or32-new/bin/or32-linux-gcc
|
set_board_info compiler /opt/or32-new/bin/or32-linux-gcc
|
set_board_info c++compiler /opt/or32-new/bin/or32-linux-g++
|
set_board_info c++compiler /opt/or32-new/bin/or32-linux-g++
|
set target_alias "or32-linux"
|
set target_alias "or32-linux"
|
|
|
set_board_info connect telnet
|
set_board_info connect telnet
|
set_board_info shell_prompt "# "
|
set_board_info shell_prompt "# "
|
set_board_info telnet_username "root"
|
set_board_info telnet_username "root"
|
set_board_info telnet_password ""
|
set_board_info telnet_password ""
|
set_board_info telnet_exec_timeout 1200
|
set_board_info telnet_exec_timeout 1200
|
|
|
set_board_info file_transfer ftp
|
set_board_info file_transfer ftp
|
set_board_info ftp_username root
|
set_board_info ftp_username root
|
set_board_info ftp_password ""
|
set_board_info ftp_password ""
|
set_board_info ftp_download_timeout 120
|
set_board_info ftp_download_timeout 120
|
set_board_info ftp_upload_timeout 120
|
set_board_info ftp_upload_timeout 120
|
|
|
# Options for the simulator
|
# Options for the simulator
|
# set cfg_file [lookfor_file ${srcdir} libgloss/or32/sim.cfg]
|
# set cfg_file [lookfor_file ${srcdir} libgloss/or32/sim.cfg]
|
#set_board_info sim,options "-a \"-f ${cfg_file}\""
|
#set_board_info sim,options "-a \"-f ${cfg_file}\""
|
|
|
# We only support uClibc on this target. We assume that all multilib options
|
# We only support uClibc on this target. We assume that all multilib options
|
# have been specified before we get here.
|
# have been specified before we get here.
|
#set_board_info compiler "[find_gcc]"
|
#set_board_info compiler "[find_gcc]"
|
|
|
# We need to define this flag to generate default .gcda files if we are using
|
# We need to define this flag to generate default .gcda files if we are using
|
# a stock compiler, without the profopt.exp changes. No problem with doubling
|
# a stock compiler, without the profopt.exp changes. No problem with doubling
|
# up the argument in normal circumstances.
|
# up the argument in normal circumstances.
|
set_board_info cflags "-fprofile-dir=."
|
set_board_info cflags "-fprofile-dir=."
|
set_board_info cxxflags "-fprofile-dir=."
|
set_board_info cxxflags "-fprofile-dir=."
|
|
|
# No linker script needed.
|
# No linker script needed.
|
set_board_info ldscript ""
|
set_board_info ldscript ""
|
|
|
# This simulator isn't slow.
|
# This simulator isn't slow.
|
set_board_info slow_simulator 0
|
set_board_info slow_simulator 0
|
|
|
# Can't pass arguments to programs on this target..
|
# Can't pass arguments to programs on this target..
|
set_board_info noargs 1
|
set_board_info noargs 1
|
|
|
# Used by a few gcc.c-torture testcases to delimit how large the stack can
|
# Used by a few gcc.c-torture testcases to delimit how large the stack can
|
# be.
|
# be.
|
set_board_info gcc,stack_size 65536
|
set_board_info gcc,stack_size 65536
|
|
|
# GDB options
|
# GDB options
|
|
|
# We can't do input in GDB (yet! HA!). It *will* do output, hurrah.
|
# We can't do input in GDB (yet! HA!). It *will* do output, hurrah.
|
set_board_info gdb,noinferiorio 1
|
set_board_info gdb,noinferiorio 1
|
# Or pass arguments.
|
# Or pass arguments.
|
set_board_info gdb,noargs 1
|
set_board_info gdb,noargs 1
|
set_board_info noargs 1
|
set_board_info noargs 1
|
# And there's no support for signals.
|
# And there's no support for signals.
|
set_board_info gdb,nosignals 1
|
set_board_info gdb,nosignals 1
|
|
|