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