1#!/usr/bin/env python 2# Copyright 2015 The Chromium OS Authors. All rights reserved. 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6"""Install an initial test image on a set of new DUTs. 7 8This command is meant for deploying newly installed DUTs after 9completing these steps: 10 * Removing the write-protect screw. 11 * Switching the DUT to dev mode. 12 * Configuring the DUT to allow dev-mode boot from USB. 13 * Installing the DUT on its shelf, fully cabled and ready to go. 14 15The command will use servo to install dev-signed RO firmware on the 16selected DUTs. Then it forces the DUTs through the standard repair 17flow, as in `repair.py`. 18 19""" 20 21import sys 22 23import common 24from autotest_lib.site_utils.deployment import install 25 26 27def main(argv): 28 """Standard main routine. 29 30 @param argv Command line arguments including `sys.argv[0]`. 31 """ 32 install.install_duts(argv, full_deploy=True) 33 34 35if __name__ == '__main__': 36 try: 37 main(sys.argv) 38 except KeyboardInterrupt: 39 pass 40 except EnvironmentError as e: 41 sys.stderr.write('Unexpected OS error:\n %s\n' % e) 42 except Exception as e: 43 sys.stderr.write('Unexpected exception:\n %s\n' % e) 44