URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc
- from Rev 489 to Rev 490
- ↔ Reverse comparison
Rev 489 → Rev 490
/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.dg/c99-stdint-7.c
3,6 → 3,7
conditions. */ |
/* { dg-do compile } */ |
/* { dg-options "-std=iso9899:1999 -fhosted" } */ |
/* { dg-xfail-if "" { ! wchar } { "*" } { "" } } */ |
|
#include <stdint.h> |
|
/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.dg/glibc-uclibc-1.c
3,4 → 3,5
/* { dg-do link { target *-*-linux* } } */ |
/* { dg-options "-mglibc -muclibc" } */ |
|
/* { dg-message "-mglibc and -muclibc used together" "" { target *-*-* } 0 } */ |
/* { dg-message "-mglibc and -muclibc used together" "" { ! target or32-*-* } 0 } */ |
/* { dg-message "unrecognized command line option" "" { target or32-*-* } 0 } */ |
/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.dg/c99-init-1.c
2,7 → 2,6
/* Origin: Jakub Jelinek <jakub@redhat.com> */ |
/* { dg-do run } */ |
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */ |
/* { dg-xfail-if "" { target { ! wchar } } { "*" } { "" } } */ |
|
typedef __SIZE_TYPE__ size_t; |
typedef __WCHAR_TYPE__ wchar_t; |
/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.dg/c99-stdint-1.c
9,6 → 9,7
version). */ |
/* { dg-do compile } */ |
/* { dg-options "-std=iso9899:1999 -pedantic-errors -fhosted" } */ |
/* { dg-xfail-if "" { ! wchar } { "*" } { "" } } */ |
|
#include <limits.h> |
#include <stdint.h> |
/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.dg/glibc-uclibc-2.c
3,4 → 3,5
/* { dg-do link { target *-*-linux* } } */ |
/* { dg-options "-muclibc -mglibc" } */ |
|
/* { dg-message "-mglibc and -muclibc used together" "" { target *-*-* } 0 } */ |
/* { dg-message "-mglibc and -muclibc used together" "" { ! target or32-*-* } 0 } */ |
/* { dg-message "unrecognized command line option" "" { target or32-*-* } 0 } */ |
/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/gcc.dg/c99-stdint-2.c
3,6 → 3,7
/* { dg-do compile } */ |
/* { dg-options "-std=iso9899:1999 -pedantic-errors -ffreestanding" } */ |
/* { dg-xfail-if "ptrdiff size is 16bits" { avr-*-* } } */ |
/* { dg-xfail-if "" { ! wchar } { "*" } { "" } } */ |
/* The test is that there are no diagnostics, so just include the |
hosted version. */ |
#include "c99-stdint-1.c" |
/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/lib/target-supports.exp
2886,7 → 2886,7
proc check_missing_uclibc_feature {feature} { |
return [check_no_compiler_messages $feature object " |
#include <features.h> |
#if !defined (__UCLIBC) || defined (__${feature}__) |
#if !defined (__UCLIBC__) || defined (__${feature}__) |
#error FOO |
#endif |
"] |
/trunk/gnu-src/gcc-4.5.1/gcc/testsuite/ChangeLog.or32
1,5 → 1,19
2011-02-04 Joern Rennecke <joern.rennecke@embecosm.com> |
|
* lib/target-supports.exp (check_missing_uclibc_feature): |
Fix __UCLIBC__ spelling. |
|
2011-02-03 Joern Rennecke <joern.rennecke@embecosm.com> |
|
* gcc.dg/c99-init-1.c: Don't xfail for ! wchar. |
* gcc.dg/c99-stdint-1.c: xfail for ! wchar. |
* gcc.dg/c99-stdint-2.c, gcc.dg/c99-stdint-7.c: Likewise. |
|
* gcc.dg/glibc-uclibc-1.c: Expect different message for or32-*-*. |
* gcc.dg/glibc-uclibc-2.c: Likewise. |
|
2011-02-03 Joern Rennecke <joern.rennecke@embecosm.com> |
|
* gcc.dg/c99-init-1.c: Xfail for target { ! wchar } . |
|
2010-10-29 Joern Rennecke <joern.rennecke@embecosm.com> |
/trunk/gnu-src/gcc-4.5.1/gcc/ChangeLog.or32
1,3 → 1,14
2011-02-15 Joern Rennecke <joern.rennecke@embecosm.com> |
|
* config/or32/or32.md (frame_alloc_fp): New pattern. |
* config/or32/or32.c (or32_expand_prologue): Use it if a frame pointer |
is used. |
|
2011-02-03 Joern Rennecke <joern.rennecke@embecosm.com> |
|
* config/uclibc-stdint.h: New file. |
* config.gcc (or32-*linux*): Add uclibc-stdint.h to tm_file. |
|
2011-02-03 Jonas Bonn <jonas@southpole.se> |
|
* config/or32/or32.h (CALL_USED_REGS): Include r12. |
/trunk/gnu-src/gcc-4.5.1/gcc/config.gcc
1917,7 → 1917,7
tm_defines="${tm_defines} OR32_LIBC_DEFAULT=or32_libc_newlib" |
;; |
or32-*linux*) |
tm_file="${tm_file} dbxelf.h elfos.h or32/elf.h or32/linux-gas.h or32/linux-elf.h" |
tm_file="${tm_file} dbxelf.h elfos.h or32/elf.h or32/linux-gas.h or32/linux-elf.h uclibc-stdint.h" |
tmake_file="${cpu_type}/t-${cpu_type} or32/t-linux" |
tm_defines="`echo $tm_defines|sed -e s/UCLIBC_DEFAULT=.//g`" |
tm_defines="${tm_defines} UCLIBC_DEFAULT=1 OR32_LIBC_DEFAULT=or32_libc_uclibc" |
/trunk/gnu-src/gcc-4.5.1/gcc/config/uclibc-stdint.h
0,0 → 1,70
/* Definitions for <stdint.h> types on systems using uClibc. |
Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc. |
|
This file is part of GCC. |
|
GCC 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, or (at your option) |
any later version. |
|
GCC 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 GCC; see the file COPYING3. If not see |
<http://www.gnu.org/licenses/>. */ |
|
#define SIG_ATOMIC_TYPE "int" |
|
/* The newlib logic actually checks for sizes greater than 32 rather |
than equal to 64 for various 64-bit types. */ |
|
#define INT8_TYPE (CHAR_TYPE_SIZE == 8 ? "signed char" : 0) |
#define INT16_TYPE (SHORT_TYPE_SIZE == 16 ? "short int" : 0) |
#define INT32_TYPE (INT_TYPE_SIZE == 32 ? "int" : 0) |
#define INT64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : LONG_LONG_TYPE_SIZE == 64 ? "long long int" : 0) |
#define UINT8_TYPE (CHAR_TYPE_SIZE == 8 ? "unsigned char" : 0) |
/* uclibc-0.9.31/include/stdint.h has the 'unsigned' keyword first, |
but GCC needs the length keyword first. */ |
#define UINT16_TYPE (SHORT_TYPE_SIZE == 16 ? "short unsigned int" : 0) |
#define UINT32_TYPE (INT_TYPE_SIZE == 32 ? "unsigned int" : 0) |
#define UINT64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : LONG_LONG_TYPE_SIZE == 64 ? "long long unsigned int" : 0) |
|
#define INT_LEAST8_TYPE (INT8_TYPE ? INT8_TYPE : INT16_TYPE ? INT16_TYPE : INT32_TYPE ? INT32_TYPE : INT64_TYPE ? INT64_TYPE : 0) |
#define INT_LEAST16_TYPE (INT16_TYPE ? INT16_TYPE : INT32_TYPE ? INT32_TYPE : INT64_TYPE ? INT64_TYPE : 0) |
#define INT_LEAST32_TYPE (INT32_TYPE ? INT32_TYPE : INT64_TYPE ? INT64_TYPE : 0) |
#define INT_LEAST64_TYPE INT64_TYPE |
#define UINT_LEAST8_TYPE (UINT8_TYPE ? UINT8_TYPE : UINT16_TYPE ? UINT16_TYPE : UINT32_TYPE ? UINT32_TYPE : UINT64_TYPE ? UINT64_TYPE : 0) |
#define UINT_LEAST16_TYPE (UINT16_TYPE ? UINT16_TYPE : UINT32_TYPE ? UINT32_TYPE : UINT64_TYPE ? UINT64_TYPE : 0) |
#define UINT_LEAST32_TYPE (UINT32_TYPE ? UINT32_TYPE : UINT64_TYPE ? UINT64_TYPE : 0) |
#define UINT_LEAST64_TYPE UINT64_TYPE |
|
#define INT_FAST8_TYPE INT8_TYPE |
#define UINT_FAST8_TYPE UINT8_TYPE |
|
#if LONG_TYPE_SIZE == 64 |
#define INT_FAST16_TYPE "long int" |
#define INT_FAST32_TYPE "long int" |
#define INT_FAST64_TYPE "long int" |
#define UINT_FAST16_TYPE "long unsigned int" |
#define UINT_FAST32_TYPE "long unsigned int" |
#define UINT_FAST64_TYPE "long unsigned int" |
#else |
#define INT_FAST16_TYPE "int" |
#define INT_FAST32_TYPE "int" |
#define INT_FAST64_TYPE "long long int" |
#define UINT_FAST16_TYPE "unsigned int" |
#define UINT_FAST32_TYPE "unsigned int" |
#define UINT_FAST64_TYPE "long long unsigned int" |
#endif |
|
#if LONG_TYPE_SIZE == 64 |
#define INTPTR_TYPE "long int" |
#define UINTPTR_TYPE "long unsigned int" |
#else |
#define INTPTR_TYPE "int" |
#define UINTPTR_TYPE "unsigned int" |
#endif |
trunk/gnu-src/gcc-4.5.1/gcc/config/uclibc-stdint.h
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: trunk/gnu-src/gcc-4.5.1/gcc/config/or32/or32.md
===================================================================
--- trunk/gnu-src/gcc-4.5.1/gcc/config/or32/or32.md (revision 489)
+++ trunk/gnu-src/gcc-4.5.1/gcc/config/or32/or32.md (revision 490)
@@ -108,6 +108,19 @@
DONE;
})
+(define_insn "frame_alloc_fp"
+ [(set (reg:SI SP_REG)
+ (plus:SI (reg:SI SP_REG)
+ (match_operand:SI 0 "nonmemory_operand" "r,I")))
+ (clobber (mem:QI (plus:SI (reg:SI FP_REG)
+ (unspec:SI [(const_int FP_REG)] UNSPEC_FRAME))))]
+ ""
+ "@
+ l.add\tr1,r1,%0\t# allocate frame
+ l.addi\tr1,r1,%0\t# allocate frame"
+ [(set_attr "type" "add")
+ (set_attr "length" "1")])
+
(define_insn "frame_dealloc_fp"
[(set (reg:SI SP_REG) (reg:SI FP_REG))
(clobber (mem:QI (plus:SI (reg:SI FP_REG)
/trunk/gnu-src/gcc-4.5.1/gcc/config/or32/or32.c
689,11 → 689,20
rtx value_rtx = gen_rtx_REG (Pmode, PROLOGUE_TMP); |
|
or32_emit_set_const32 (value_rtx, GEN_INT (-total_size)); |
insn = emit_frame_insn (gen_add2_insn (stack_pointer_rtx, value_rtx)); |
if (frame_info.save_fp_p) |
insn = gen_frame_alloc_fp (value_rtx); |
else |
insn = gen_add2_insn (stack_pointer_rtx, value_rtx); |
insn = emit_frame_insn (insn); |
add_reg_note (insn, REG_FRAME_RELATED_EXPR, note); |
} |
else if (total_size) |
emit_frame_insn (insn); |
{ |
if (frame_info.save_fp_p) |
emit_frame_insn (gen_frame_alloc_fp (GEN_INT (-total_size))); |
else |
emit_frame_insn (insn); |
} |
|
} /* or32_expand_prologue () */ |
|
/trunk/gnu-src/gcc-4.5.1/libstdc++-v3/ChangeLog.or32
0,0 → 1,3
2011-02-04 Joern Rennecke <joern.rennecke@embecosm.com> |
|
* testsuite/18_support/numeric_limits/lowest.cc: xfail for ! wchar. |
/trunk/gnu-src/gcc-4.5.1/libstdc++-v3/testsuite/18_support/numeric_limits/lowest.cc
1,5 → 1,6
// { dg-options "-std=gnu++0x" } |
// { dg-add-options ieee } |
// { dg-xfail-if "" { ! wchar } { "*" } { "" } } |
|
// 2010-02-25 Ed Smith-Rowland |
|
/trunk/gnu-src/site.exp
3,21 → 3,36
set boards_dir {} |
} |
|
send_user "tool_root_dir = $tool_root_dir\n" |
send_user "target_triplet = $target_triplet\n" |
# Add our local boards directory if we don't have it |
if ![info exists boards_dir] { |
lappend boards_dir "[file dirname $env(DEJAGNU)]/boards" |
} else { |
set boards_dir "[file dirname $env(DEJAGNU)]/boards" |
} |
|
# Crude way of finding the boards directory |
lappend boards_dir "${tool_root_dir}/../boards" |
lappend boards_dir "${tool_root_dir}/../../boards" |
lappend boards_dir "${tool_root_dir}/../../../boards" |
lappend boards_dir "${tool_root_dir}/../../../../boards" |
# We don't get a good mapping of the target triplet here. target_alias will |
# remain as we gave it. We'd like to use config.guess, but we need to find one |
# that knows about or32, so for now, we do things by steam. |
|
# This change is needed, since the dg- directives in tests look at the full |
# triplet, while we use target_alias to select the tool name prefix. |
global target_list |
case "$target_triplet" in { |
{ "or32-*-elf" } { |
case "$target_triplet" in { |
{ "or32-*elf" } { |
set target_triplet "or32-unknown-elf" |
set target_list { "or32-elf-sim" } |
} |
{ "or32-*-linux*" } { |
{ "or32-*linux*" } { |
set target_triplet "or32-unknown-gnu-linux" |
set target_list { "or32-linux-sim" } |
} |
} |
|
verbose "OR32 boards_dir = $boards_dir" |
verbose "OR32 target_triplet = $target_triplet" |
|
if [info exists target_list] { |
verbose "OR32 target_list = $target_list" |
} else { |
verbose "OR32 target_list UNDEFINED" |
} |
/trunk/gnu-src/bld-all.sh
179,7 → 179,7
newlib_dir="newlib-1.18.0" |
uclibc_dir="uclibc-0.9.31" |
gdb_dir="gdb-7.2" |
linux_dir="linux-2.6.36" |
linux_dir="linux-2.6.37" |
or32_elf_flag="true" |
or32_linux_flag="true" |
link_flag="true" |
357,55 → 357,55
recreated. Only build directories of targets being built are removed. |
|
--languages <str> |
Specify the languages to be built (default ${languages}) |
Specify the languages to be built (default c,c++). |
|
--prefix <dir> |
Specify the install directory (default ${prefix}) |
Specify the install directory (default /opt/or32-new) |
|
--prefix-tmp <dir> |
Specify the temporary install directory (default ${prefix_tmp}) |
Specify the temporary install directory (default /tmp/or32-tmp-${USER}). |
Incorporating the user name avoid name clashes with other users |
|
--unisrc-dir <dir> |
Specify the unified source directory (default ${unisrc_dir}) |
Specify the unified source directory (default unisrc) |
|
--build-dir-elf <dir> |
Specify the build directory for the newlib (or32-elf) tool chain |
(default ${bd_elf}). |
(default bd-elf). |
|
--build-dir-elf-gdb <dir> |
Specify the build directory for the newlib (or32-elf) GDB (default |
${bd_elf_gdb}). |
bd-elf-gdb). |
|
--build-dir-linux <dir> |
Specify the build directory for the uClibc (or32-linux) tool chain |
(default ${bd_linux}) |
(default bd-linux) |
|
--build-dir-linux-gdb <dir> |
Specify the build directory for the uClibc (or32-linux) GDB (default |
${bd_linux_gdb}) |
bd-linux-gdb) |
|
--or1ksim-dir <dir> |
Specify the Or1ksim installation directory. Used by GDB, which links in |
the Or1ksim simulator (default ${or1ksim_dir}) |
the Or1ksim simulator (default /opt/or1ksim-new) |
|
--binutils-dir |
Source directory for binutils (default ${binutils_dir}) |
Source directory for binutils (default binutils-2.20.1) |
|
--gcc-dir |
Source directory for gcc (default ${gcc_dir}) |
Source directory for gcc (default gcc-4.5.1') |
|
--newlib-dir |
Source directory for newlib (default ${newlib_dir}) |
Source directory for newlib (default newlib-1.18.0) |
|
--uclibc-dir |
Source directory for uClibc (default ${uclibc_dir}) |
Source directory for uClibc (default uclibc-0.9.31) |
|
--gdb-dir |
Source directory for gdb (default ${gdb_dir}) |
Source directory for gdb (default gdb-7.2) |
|
--linux-dir |
Source directory for Linux (default $linux_dir)) |
Source directory for Linux (default linux-2.6.35) |
|
--no-or32-elf |
Don't configure, build and install the newlib (or32-elf) tool chain. |
534,6 → 534,14
|
for srcdir in ${component_dirs} |
do |
case `dirname $0` in |
'.') ;; |
*) |
case srcdir in |
/* | [A-Za-z]:[\\/]*) ;; |
*) srcdir="`dirname $0`/${srcdir}" ;; |
esac ;; |
esac |
echo "Component: $srcdir" |
case srcdir |
in |
675,6 → 683,16
|
|
# ------------------------------------------------------------------------------ |
# Change directory to $1 as seen from $0. |
|
function cd_0rel { |
case "$1" in |
/*) cd "$1" ;; |
*) cd "`dirname $0`/$1" ;; |
esac |
} |
|
# ------------------------------------------------------------------------------ |
# Conditionally configure and install the Linux headers |
|
# @param[in] $1 The prefix to use for installation. |
681,7 → 699,7
function install_linux_headers { |
this_prefix=$1 |
|
cd $linux_dir |
cd_0rel $linux_dir |
|
if [ "true" == "${config_flag}" ] |
then |
729,7 → 747,7
this_prefix=$1 |
echo "bld-all.sh: Configuring uClibc" |
|
cd ${uclibc_dir} |
cd_0rel ${uclibc_dir} |
|
kheaders="KERNEL_HEADERS=\\\"${this_prefix}\\/or32-linux\\/include\\\"" |
devprefix="DEVEL_PREFIX=\\\"${this_prefix}\\/or32-linux\\\"" |
775,7 → 793,7
# ------------------------------------------------------------------------------ |
# Conditionally build and install uClibc |
function uclibc_build_install { |
cd ${uclibc_dir} |
cd_0rel ${uclibc_dir} |
|
if [ "true" == "${build_flag}" ] |
then |
840,8 → 858,9
# Configure all |
gnu_config ${config_flag} ${prefix} ${bd_elf} ../${unisrc_dir} \ |
"${languages}" "${newlib_config}" |
gnu_config ${config_flag} ${prefix} ${bd_elf_gdb} ../${gdb_dir} \ |
"${languages}" |
# ??? should handle absolute pathnames. |
gnu_config ${config_flag} ${prefix} ${bd_elf_gdb} \ |
../`dirname $0`/${gdb_dir} "${languages}" |
|
# Build all |
gnu_make ${build_flag} ${bd_elf} all-build all-binutils all-gas all-ld |
951,8 → 970,9
|
# Configure, build and install GDB (note we need to reconfigure in case |
# only stage1 has been run previously). |
gnu_config ${config_flag} ${prefix} ${bd_linux_gdb} ../${gdb_dir} \ |
"${languages}" |
# ??? should handle absolute pathnames. |
gnu_config ${config_flag} ${prefix} ${bd_linux_gdb} \ |
../`dirname $0`/${gdb_dir} "${languages}" |
gnu_make ${build_flag} ${bd_linux_gdb} all-build all-sim all-gdb |
gnu_make ${install_flag} ${bd_linux_gdb} install-sim install-gdb |
fi |
/trunk/gnu-src/boards/or32-linux-sim.exp
29,20 → 29,18
|
# @param[in] boardname The board being closed. |
# ----------------------------------------------------------------------------- |
proc telnet_close {boardname} { |
proc telnet_close {hostname} { |
|
# Make the telnet process associated with this board the current process |
set spawn_id [board_info $boardname fileid] |
verbose "Closing $boardname:$spawn_id" |
# Get the connected host name, if it exists (actually, we think this can |
# never be set, but it is for consistency with telnet_open |
if {[board_info $hostname exists name]} { |
set connhost [board_info $hostname name] |
} else { |
set connhost $hostname |
} |
|
# If we have a process, close it. |
if { $spawn_id >= 0 } { |
catch close |
catch wait |
set spawn_id -1 |
|
set_board_info $boardname,fileid $spawn_id |
} |
# Use the standard close proc from remote.exp |
standard_close $hostname |
} |
|
|
54,18 → 52,18
# We seem to set the timeout to 30, no matter what. Not sure that is right |
# here. |
|
# @param[in] boardname The board we are telnetting to |
# @param[in] hostname The board we are telnetting to |
# @param[in] cmd The command to run |
# @param[in] args Arguments to the command |
|
# @return A list of the return code (-1 on failure) and any error message. |
# ----------------------------------------------------------------------------- |
proc telnet_exec {boardname cmd args} { |
proc telnet_exec {hostname cmd args} { |
global timeout |
global verbose |
set output "(no output)" |
|
verbose "Executing $boardname:$cmd $args" |
verbose "Executing $hostname $cmd $args" |
|
# Get the first argument, if any. |
if { [llength $args] > 0 } { |
75,8 → 73,8
} |
|
# Set the shell prompt |
if [board_info $boardname exists shell_prompt] { |
set shell_prompt [board_info $boardname shell_prompt] |
if [board_info $hostname exists shell_prompt] { |
set shell_prompt [board_info $hostname shell_prompt] |
} |
if ![info exists shell_prompt] { # if no prompt, then set it to |
something generic |
84,18 → 82,17
} |
|
# Start a new telnet session if one doesn't already exist. If sucessful |
# the fileid field associated with $boardname 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. |
if ![board_info $boardname exists fileid] { |
if {[telnet_open $boardname] == -1} { |
if ![board_info $hostname exists fileid] { |
if {[telnet_open $hostname] == -1} { |
return [list -1 |
"telnet to $boardname 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. |
set spawn_id [board_info $boardname fileid] |
set spawn_id [board_info $hostname fileid] |
set old_timeout $timeout |
set timeout 30 |
|
109,15 → 106,15
} |
default { |
# No response try closing the connection and reopening. |
telnet_close $boardname |
if {[telnet_open $boardname] != -1} { |
telnet_close $hostname |
if {[telnet_open $hostname] != -1} { |
verbose "started new telnet session, spawn_id is [board_info |
$boardname fileid]" |
$hostname fileid]" |
send -- "\r" |
exp_continue |
} else { |
set timeout $old_timeout |
return [list -1 "telnet to $boardname failed for $cmd, couldn't get |
return [list -1 "telnet to $hostname failed for $cmd, couldn't get |
a shell prompt"] |
} |
# I don't think we can get here. Comment out the old code and |
129,9 → 126,9
} |
} |
|
# Shorter timeout for commands. Not sure why we only use the first of the |
# Restore timeout for commands. Not sure why we only use the first of the |
# arguments. |
set timeout 10 |
set timeout $old_timeout |
send "$cmd $pargs\r" |
|
expect { |
141,10 → 138,9
if [info exists expect_out(buffer)] { |
set execute_output_string $expect_out(buffer) |
} |
telnet_close $boardname |
set timeout $old_timeout |
return [list -1 "telnet to $boardname for $cmd $pargs failed (timeout)" |
} |
telnet_close $hostname |
return [list -1 "telnet to $hostname for $cmd $pargs failed (timeout)"] |
} |
} |
|
#Remove unnecessary strings from the output string |
156,7 → 152,7
regsub $shell_prompt $output {} output |
regsub -all "\[\r\n\]" $output {} output |
|
#Check the return status |
#Check the return status. Use a short timeout for this. |
set timeout 30 |
send -- "echo \$?\r" |
expect -re "$shell_prompt.*$" |
172,6 → 168,7
set status 1 |
} |
|
# Restore timeout |
set timeout $old_timeout |
if {$status == 0} { |
return [list "0" "$output"] |
180,6 → 177,84
} |
} |
|
|
# ----------------------------------------------------------------------------- |
# For FTP we need to redefine some existing functions to add additional |
# features. |
|
# ----------------------------------------------------------------------------- |
# Download LOCALFILE to HOST as REMOTEFILE by FTP |
# |
# This version takes a user specified timeout, which we need for our slow |
# simulated connection. |
|
# @param[in] host The host we are connected to. |
# @param[in] localfile The local file to send |
# @param[in] remotefile Name of file at remote end. |
# ----------------------------------------------------------------------------- |
proc ftp_download {host localfile remotefile} { |
set prompt "ftp>" |
|
verbose "putting $localfile $remotefile" |
|
if [board_info $host exists hostname] { |
set remotehost [board_info $host hostname] |
} else { |
set remotehost $host |
} |
|
set spawn_id [ftp_open $host] |
if {$spawn_id < 0} { |
return "" |
} |
set loop 1 |
|
# JPB to set custom timeout (not marked global, so we don't need to save |
# and restore) |
if [board_info $host exists ftp_download_timeout] { |
set timeout [board_info $host ftp_download_timeout] |
verbose "FTP download timeout set to $timeout" |
} |
|
while {$loop} { |
send -i $spawn_id "put $localfile $remotefile\n" |
expect { |
-i $spawn_id -re ".*Too many open files.*$prompt" { |
ftp_close $host |
} |
-i $spawn_id -re ".*No such file or directory.*$prompt" { |
set loop 0 |
set remotefile "" |
} |
-re "(^|\[\r\n\])150.*connection for (.*) \[(\]\[0-9.,\]+\\)\[\r\n\]" { |
set remotefile $expect_out(2,string) |
exp_continue |
} |
-i $spawn_id -re "(^|\[\r\n\])226.*$prompt" { |
set loop 0 |
} |
-i $spawn_id -re "Timeout.*$prompt" { |
ftp_close $host |
} |
-i $spawn_id -re "(^|\[\r\n\])\[0-9\]\[0-9\]\[0-9\].*$prompt" { |
set loop 0 |
set remotefile "" |
} |
-i $spawn_id default { |
ftp_close $host |
} |
} |
if {$loop} { |
set spawn_id [ftp_open $host] |
if {$spawn_id < 0} { |
return "" |
} |
} |
} |
return $remotefile |
} |
|
|
# This is a list of toolchains that are supported on this board. |
set_board_info target_install {or32-linux} |
|
190,8 → 265,12
# of routines needed by the tool to communicate with the board. |
load_generic_config "unix" |
|
# Set up remote target info |
set_board_info hostname "192.168.0.3" |
# Set up remote target info. We select the IP address using an external |
# program which knows about all available Linuxes. |
set linux_hostname [exec [file dirname $env(DEJAGNU)]/get-ip.sh] |
set_board_info hostname $linux_hostname |
send_user "OR32 target hostname is $linux_hostname" |
|
set_board_info username root |
|
# Use the installed compilers to ensure we get search paths that will find |
206,25 → 285,26
set target_alias "or32-linux" |
|
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_password "" |
|
set_board_info file_transfer ftp |
set_board_info ftp_username root |
set_board_info ftp_password "" |
set_board_info file_transfer ftp |
set_board_info ftp_username root |
set_board_info ftp_password "" |
set_board_info ftp_download_timeout 120 |
|
# Options for the simulator |
# 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 |
# have been specified before we get here. |
# set_board_info compiler "[find_gcc]" |
#set_board_info compiler "[find_gcc]" |
|
# We need to define the right flags if pthreads is to work. |
set_board_info cflags "-D_XOPEN_SOURCE=600" |
set_board_info cxxflags "-D_XOPEN_SOURCE=600" |
# set_board_info cflags "-D_XOPEN_SOURCE=600" |
# set_board_info cxxflags "-D_XOPEN_SOURCE=600" |
|
# No linker script needed. |
set_board_info ldscript "" |
/trunk/gnu-src/bld-bb.sh
20,7 → 20,7
# with this program. If not, see <http://www.gnu.org/licenses/>. |
|
bb_dir=busybox-1.17.3 |
linux_dir=linux-2.6.36 |
linux_dir=linux-2.6.37 |
|
# Clean, build and install BusyBox |
echo "bld-bb.sh: Rebuilding BusyBox" |