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