Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Unified Diff: tools/llvm/qemu_tool.sh

Issue 10736073: Rename tools/llvm to tools/trusted_cross_toolchains (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/llvm/packagelist.precise.armel.extra ('k') | tools/llvm/trusted-toolchain-creator.armel.lucid.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/llvm/qemu_tool.sh
===================================================================
--- tools/llvm/qemu_tool.sh (revision 9137)
+++ tools/llvm/qemu_tool.sh (working copy)
@@ -1,133 +0,0 @@
-#!/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.
-
-set -o nounset
-set -o errexit
-
-#@ Various commands to emulate arm code using qemu
-#@
-#@ Note: this script is not meant to be run as
-#@ tools/llvm/qemu_tool.sh
-#@ but rather as:
-#@ toolchain/linux_arm-trusted/qemu_tool.sh
-
-# From a qemu build based on qemu-0.10.1.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}
-# NOTE: some useful debugging options for qemu:
-# env vars:
-# QEMU_STRACE=1
-# args:
-# -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_DEBUG="-d in_asm,int,exec,cpu"
-readonly QEMU_ARGS_DEBUG_SR="-d in_asm,int,exec,cpu,service_runtime"
-
-######################################################################
-# Helpers
-######################################################################
-
-Banner() {
- echo "######################################################################"
- echo $*
- echo "######################################################################"
-}
-
-Usage() {
- egrep "^#@" $0 | cut --bytes=3-
-}
-
-
-CheckPrerequisites () {
- if [[ ! -d ${QEMU_JAIL} ]] ; then
- echo "ERROR: no proper root-jail directory found"
- exit -1
- fi
-}
-
-
-Hints() {
- echo
- echo "traces can be found in /tmp/qemu.log"
- echo "for faster execution disable sel_ldr validation"
- echo
-}
-
-######################################################################
-
-#@
-#@ help
-#@
-#@ print help for all modes
-help () {
- Usage
-}
-
-#@
-#@ run
-#@
-#@ run emulation using a locally patched qemu
-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_debug() {
- Hints
- CheckPrerequisites
- exec ${QEMU} -L ${QEMU_JAIL} ${QEMU_ARGS} ${QEMU_ARGS_DEBUG} "$@"
-}
-
-#@
-#@ run_debug_service_runtime
-#@
-#@ run emulation 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
- run "$@"
-elif [[ $# -eq 0 ]] ; then
- echo "you must specify a mode on the commandline:"
- echo
- Usage
- exit -1
-elif [[ "$(type -t $1)" != "function" ]]; then
- echo "ERROR: unknown function '$1'." >&2
- echo "For help, try:"
- echo " $0 help"
- exit 1
-else
- "$@"
-fi
« no previous file with comments | « tools/llvm/packagelist.precise.armel.extra ('k') | tools/llvm/trusted-toolchain-creator.armel.lucid.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698