Blame config/aarch64-fv8.exp

Packit 62fe53
# Copyright (C) 2016 Free Software Foundation, Inc.
Packit 62fe53
#
Packit 62fe53
# This file is part of DejaGnu.
Packit 62fe53
#
Packit 62fe53
# DejaGnu is free software; you can redistribute it and/or modify it
Packit 62fe53
# under the terms of the GNU General Public License as published by
Packit 62fe53
# the Free Software Foundation; either version 3 of the License, or
Packit 62fe53
# (at your option) any later version.
Packit 62fe53
#
Packit 62fe53
# DejaGnu is distributed in the hope that it will be useful, but
Packit 62fe53
# WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 62fe53
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 62fe53
# General Public License for more details.
Packit 62fe53
#
Packit 62fe53
# You should have received a copy of the GNU General Public License
Packit 62fe53
# along with DejaGnu; if not, write to the Free Software Foundation,
Packit 62fe53
# Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
Packit 62fe53
Packit 62fe53
# This initializes the path to the Foundation Model
Packit 62fe53
proc ${board}_init { hostname } {
Packit 62fe53
    global model
Packit 62fe53
Packit 62fe53
    # Get the full path to the Foundation Model
Packit 62fe53
    if {[board_info $hostname exists model]} {
Packit 62fe53
	set model "[board_info $hostname model]"
Packit 62fe53
    }
Packit 62fe53
}
Packit 62fe53
Packit 62fe53
proc ${board}_download { dest file args } {
Packit 62fe53
    global model timeout
Packit 62fe53
Packit 62fe53
    # Extract the endianess of the executable
Packit 62fe53
    set status [catch "exec od -An -v -j5 -N1 -t x1 $file" bigendian]
Packit 62fe53
    set args "--quiet"
Packit 62fe53
    if { $bigendian == "02"} {
Packit 62fe53
	set args "$args --bigendian"
Packit 62fe53
    }
Packit 62fe53
Packit 62fe53
    set result [local_exec "$model --image $file $args" "" "" $timeout]
Packit 62fe53
    set status [lindex $result 0]
Packit 62fe53
    set output [lindex $result 1]
Packit 62fe53
    if { $status == 0 } {
Packit 62fe53
	verbose "Executed $file on $model" 2
Packit 62fe53
	return $file
Packit 62fe53
    } else {
Packit 62fe53
	verbose "Download to $model failed, $output."
Packit 62fe53
	return ""
Packit 62fe53
    }
Packit 62fe53
}
Packit 62fe53
Packit 62fe53
Packit 62fe53
proc ${board}_exec { dest file args } {
Packit 62fe53
    # This is a stub, since we can't execute remote commands on bare metal
Packit 62fe53
    return 0
Packit 62fe53
}