| Index: tools/trusted_cross_toolchains/qemu_tool_mips32.sh
|
| diff --git a/tools/trusted_cross_toolchains/qemu_tool_arm.sh b/tools/trusted_cross_toolchains/qemu_tool_mips32.sh
|
| similarity index 69%
|
| copy from tools/trusted_cross_toolchains/qemu_tool_arm.sh
|
| copy to tools/trusted_cross_toolchains/qemu_tool_mips32.sh
|
| index 84a8d10852dbd5c47d9d8da1d0c90a646d2500d4..3cfb963df7b3d7b115bc402a07732397cd5b5029 100755
|
| --- a/tools/trusted_cross_toolchains/qemu_tool_arm.sh
|
| +++ b/tools/trusted_cross_toolchains/qemu_tool_mips32.sh
|
| @@ -1,24 +1,23 @@
|
| #!/bin/bash
|
| #
|
| -# Copyright (c) 2012 The Native Client Authors. All rights reserved.
|
| -# Use of this source code is governed by a BSD-style license that can be
|
| -# found in the LICENSE file.
|
| +# Copyright 2012 The Native Client Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can
|
| +# be found in the LICENSE file.
|
|
|
| set -o nounset
|
| set -o errexit
|
|
|
| -#@ Various commands to emulate arm code using qemu
|
| +#@ Various commands to emulate mips32 code using qemu
|
| #@
|
| #@ Note: this script is not meant to be run as
|
| -#@ tools/trusted_cross_toolchains/qemu_tool_arm.sh
|
| +#@ tools/llvm/qemu_tool.sh
|
| #@ but rather as:
|
| -#@ toolchain/linux_arm-trusted/qemu_tool_arm.sh
|
| +#@ toolchain/linux_mips-trusted/qemu-mips32
|
|
|
| -# From a qemu build based on qemu-0.10.1.tar.gz
|
| +# From a qemu build based on qemu-0.12.5.tar.gz
|
| readonly SDK_ROOT=$(dirname $0)
|
| -readonly QEMU=${SDK_ROOT}/qemu-arm
|
| -readonly QEMU_STOCK=/usr/bin/qemu-arm
|
| -readonly QEMU_JAIL=${SDK_ROOT}
|
| +readonly QEMU=${SDK_ROOT}/qemu-mips32
|
| +readonly QEMU_JAIL=${SDK_ROOT}/mips-release/mips-linux-gnu/libc/el
|
| # NOTE: some useful debugging options for qemu:
|
| # env vars:
|
| # QEMU_STRACE=1
|
| @@ -26,7 +25,7 @@ readonly QEMU_JAIL=${SDK_ROOT}
|
| # -strace
|
| # -d out_asm,in_asm,op,int,exec,cpu
|
| # c.f. cpu_log_items in qemu-XXX/exec.c
|
| -readonly QEMU_ARGS="-cpu cortex-a8"
|
| +readonly QEMU_ARGS=""
|
| readonly QEMU_ARGS_DEBUG="-d in_asm,int,exec,cpu"
|
| readonly QEMU_ARGS_DEBUG_SR="-d in_asm,int,exec,cpu,service_runtime"
|
|
|
| @@ -73,24 +72,16 @@ help () {
|
| #@
|
| #@ run
|
| #@
|
| -#@ run emulation using a locally patched qemu
|
| +#@ run stuff
|
| run() {
|
| CheckPrerequisites
|
| exec ${QEMU} -L ${QEMU_JAIL} ${QEMU_ARGS} "$@"
|
| }
|
|
|
| #@
|
| -#@ run_stock
|
| -#@
|
| -#@ run emulation using the stock qemu
|
| -run_stock() {
|
| - exec ${QEMU_STOCK} -L ${QEMU_JAIL} ${QEMU_ARGS} "$@"
|
| -}
|
| -
|
| -#@
|
| #@ run_debug
|
| #@
|
| -#@ run emulation but also generate trace in /tmp
|
| +#@ run stuff but also generate trace in /tmp
|
| run_debug() {
|
| Hints
|
| CheckPrerequisites
|
| @@ -100,23 +91,15 @@ run_debug() {
|
| #@
|
| #@ run_debug_service_runtime
|
| #@
|
| -#@ run emulation but also generate trace in /tmp even for service_runtime
|
| +#@ run stuff but also generate trace in /tmp even for service_runtime
|
| run_debug_service_runtime() {
|
| Hints
|
| CheckPrerequisites
|
| exec ${QEMU} -L ${QEMU_JAIL} ${QEMU_ARGS} ${QEMU_ARGS_DEBUG_SR} "$@"
|
| }
|
|
|
| -#@
|
| -#@ install_stock
|
| -#@
|
| -#@ install stock qemu emulator (for user mode)
|
| -install_stock_qemu() {
|
| - sudo apt-get install qemu-user
|
| -}
|
| -
|
| ######################################################################
|
| -if [[ "$0" == *run_under_qemu_arm ]] ; then
|
| +if [[ "$0" == *run_under_qemu_mips32 ]] ; then
|
| run "$@"
|
| elif [[ $# -eq 0 ]] ; then
|
| echo "you must specify a mode on the commandline:"
|
|
|