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

Side by Side Diff: remote_access.sh

Issue 6031005: update_kernel: first cut at arm support (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: trying to diagnose churn Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | update_kernel.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # Library for setting up remote access and running remote commands. 5 # Library for setting up remote access and running remote commands.
6 6
7 DEFAULT_PRIVATE_KEY="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts/\ 7 DEFAULT_PRIVATE_KEY="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts/\
8 ssh_keys/testing_rsa" 8 ssh_keys/testing_rsa"
9 9
10 DEFINE_string remote "" "remote hostname/IP of running Chromium OS instance" 10 DEFINE_string remote "" "remote hostname/IP of running Chromium OS instance"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 [ -n "${FLAGS_board}" ] && return 59 [ -n "${FLAGS_board}" ] && return
60 remote_sh grep CHROMEOS_RELEASE_BOARD /etc/lsb-release 60 remote_sh grep CHROMEOS_RELEASE_BOARD /etc/lsb-release
61 FLAGS_board=$(echo "${REMOTE_OUT}" | cut -d '=' -f 2) 61 FLAGS_board=$(echo "${REMOTE_OUT}" | cut -d '=' -f 2)
62 if [ -z "${FLAGS_board}" ]; then 62 if [ -z "${FLAGS_board}" ]; then
63 error "Board required" 63 error "Board required"
64 exit 1 64 exit 1
65 fi 65 fi
66 info "Target reports board is ${FLAGS_board}" 66 info "Target reports board is ${FLAGS_board}"
67 } 67 }
68 68
69 function learn_arch() {
70 [ -n "${FLAGS_arch}" ] && return
71 remote_sh uname -m
72 FLAGS_arch=$(echo "${REMOTE_OUT}" | sed s/armv7l/arm/g)
73 if [ -z "${FLAGS_arch}" ]; then
74 error "Arch required"
75 exit 1
76 fi
77 info "Target reports arch is ${FLAGS_arch}"
78 }
79
69 function remote_reboot { 80 function remote_reboot {
70 info "Rebooting." 81 info "Rebooting."
71 remote_sh "touch /tmp/awaiting_reboot; reboot" 82 remote_sh "touch /tmp/awaiting_reboot; reboot"
72 local output_file 83 local output_file
73 output_file="${TMP}/output" 84 output_file="${TMP}/output"
74 85
75 while true; do 86 while true; do
76 REMOTE_OUT="" 87 REMOTE_OUT=""
77 # This may fail while the machine is down so generate output and a 88 # This may fail while the machine is down so generate output and a
78 # boolean result to distinguish between down/timeout and real failure 89 # boolean result to distinguish between down/timeout and real failure
(...skipping 20 matching lines...) Expand all
99 110
100 function remote_access_init() { 111 function remote_access_init() {
101 TMP_PRIVATE_KEY=$TMP/private_key 112 TMP_PRIVATE_KEY=$TMP/private_key
102 TMP_KNOWN_HOSTS=$TMP/known_hosts 113 TMP_KNOWN_HOSTS=$TMP/known_hosts
103 if [ -z "$FLAGS_remote" ]; then 114 if [ -z "$FLAGS_remote" ]; then
104 echo "Please specify --remote=<IP-or-hostname> of the Chromium OS instance" 115 echo "Please specify --remote=<IP-or-hostname> of the Chromium OS instance"
105 exit 1 116 exit 1
106 fi 117 fi
107 set_up_remote_access 118 set_up_remote_access
108 } 119 }
OLDNEW
« no previous file with comments | « no previous file | update_kernel.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698