OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # | 2 # |
3 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 3 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 set -o nounset | 7 set -o nounset |
8 set -o errexit | 8 set -o errexit |
9 | 9 |
10 #@ Various commands to emulate arm code using qemu | 10 #@ Various commands to emulate arm code using qemu |
11 #@ | 11 #@ |
12 #@ Note: this script is not meant to be run as | 12 #@ Note: this script is not meant to be run as |
13 #@ tools/llvm/qemu_tool.sh | 13 #@ tools/trusted_cross_toolchains/qemu_tool_arm.sh |
14 #@ but rather as: | 14 #@ but rather as: |
15 #@ toolchain/linux_arm-trusted/qemu_tool.sh | 15 #@ toolchain/linux_arm-trusted/qemu_tool_arm.sh |
16 | 16 |
17 # From a qemu build based on qemu-0.10.1.tar.gz | 17 # From a qemu build based on qemu-0.10.1.tar.gz |
18 readonly SDK_ROOT=$(dirname $0) | 18 readonly SDK_ROOT=$(dirname $0) |
19 readonly QEMU=${SDK_ROOT}/qemu-arm | 19 readonly QEMU=${SDK_ROOT}/qemu-arm |
20 readonly QEMU_STOCK=/usr/bin/qemu-arm | 20 readonly QEMU_STOCK=/usr/bin/qemu-arm |
21 readonly QEMU_JAIL=${SDK_ROOT} | 21 readonly QEMU_JAIL=${SDK_ROOT} |
22 # NOTE: some useful debugging options for qemu: | 22 # NOTE: some useful debugging options for qemu: |
23 # env vars: | 23 # env vars: |
24 # QEMU_STRACE=1 | 24 # QEMU_STRACE=1 |
25 # args: | 25 # args: |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 Usage | 124 Usage |
125 exit -1 | 125 exit -1 |
126 elif [[ "$(type -t $1)" != "function" ]]; then | 126 elif [[ "$(type -t $1)" != "function" ]]; then |
127 echo "ERROR: unknown function '$1'." >&2 | 127 echo "ERROR: unknown function '$1'." >&2 |
128 echo "For help, try:" | 128 echo "For help, try:" |
129 echo " $0 help" | 129 echo " $0 help" |
130 exit 1 | 130 exit 1 |
131 else | 131 else |
132 "$@" | 132 "$@" |
133 fi | 133 fi |
OLD | NEW |