Commit Graph

15 Commits

Author SHA1 Message Date
Jay Srinivasan
b797d74253 Upgrade cros_image_to_target.py to support Omaha v3 protocol.
As part of the efforts to support HTTP-based downloads for autoupdate,
we are upgrading update_engine from Omaha v2 to v3. So, we need to
update cros_image_to_target.py to also understand the v3 XML.

BUG=chromium-os:35930
TEST=Successfully updated my ZGB which was running the v3 update_engine.

Change-Id: I2b4831c1e87ccf064e79cd6d34205f19aedc9d57
Reviewed-on: https://gerrit.chromium.org/gerrit/37065
Reviewed-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
2012-11-01 16:14:19 -07:00
Yunlian Jiang
bd9212c1ce Set the REBOOT_WAIT_TIME to 180 for testing
BUG=chromium-os:35653
TEST=The cros_image_to_target.py works now

Change-Id: I73f00673f1169e96d3f6cfc176ff6f5f53b48383
Reviewed-on: https://gerrit.chromium.org/gerrit/37133
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
2012-11-01 15:39:43 -07:00
Paul Stewart
c8f910a860 Change default port for cros_image_to_target tunnel
Old default conflicted with a new service running on the DUT.

BUG=None
TEST=Rerun cros_image_to_target

Change-Id: I982b68500d6cb59c884a286229688ee41ff6d76d
Reviewed-on: https://gerrit.chromium.org/gerrit/17434
Reviewed-by: Ryan Cairns <rtc@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
2012-03-06 15:19:25 -08:00
Paul Stewart
195494efc0 cros_image_to_target: Fix --port option
Previously this script never honored the user --port option.

BUG=None
TEST=Manual: Run with or without --port option

Change-Id: I971ee69818a37e6706ce70327b1d243fd78d214d
Reviewed-on: https://gerrit.chromium.org/gerrit/16429
Reviewed-by: Ryan Cairns <rtc@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
2012-02-22 18:23:11 -08:00
mukesh agrawal
5aa31fe38a cros_utils: change default image type for cros_image_to_target
BUG=chromium-os:21822
TEST=manual

testing: ran with --debug, and verified that the chosen image file
is appropriate. (test image is chosen, unless --no-test is specified.
if both --test and --no-test are present, image file is chosen
according to whichever option appears last.)

Change-Id: Ia0a6d0ebac889a347d1b8989b8b2c3db8231dcae
Reviewed-on: http://gerrit.chromium.org/gerrit/10265
Tested-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: mukesh agrawal <quiche@chromium.org>
2011-10-18 19:13:53 -07:00
Zdenek Behan
908a843d78 cros_image_to_target: when in chroot, call the chroot tools relative to /
This fixes a problem with chroots named other than 'chroot', but only
when running inside the chroot.

BUG=chromium-os:19596
TEST=run it inside the chroot

Change-Id: I9532fe7762e2d7e277305fb948e5cabc242a5213
Reviewed-on: http://gerrit.chromium.org/gerrit/6597
Tested-by: Zdenek Behan <zbehan@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
2011-08-24 18:29:04 -07:00
Zdenek Behan
2811c16f55 crosutils: globally replace enter_chroot with cros_sdk
"cros_sdk" is a drop-in replacement of enter_chroot.sh. The only
important difference is in the calling path, specifically that
cros_sdk is in path but has to be called from $(pwd) being inside the
repo checkout, while enter_chroot.sh is called by explicit path.

Invariably, "./enter_chroot.sh" can be replaced, as pwd=src/scripts.
Calling by absolute path can be replaced by first changing directory
anywhere into the repo checkout, and then calling cros_sdk.

BUG=chromium-os:18750
TEST=run them

Change-Id: Ieff91a27bb419e1121361d5b3a11e4c87ff7a087
Reviewed-on: http://gerrit.chromium.org/gerrit/6273
Tested-by: Zdenek Behan <zbehan@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
2011-08-19 15:35:32 -07:00
Taylor Hutt
d6ae1ec95e CHROMIUM: build tools: Allow parallel use of cros_image_to_target.py
This change addresses a defect which prevents simultaneous use of
'cros_image_to_target.py'.

The issue is that the default invocation will always use the same port
number of HTTP communication.  This change, with default parameters,
will now start at the same port number, but will now instead iterate
through a number of ports (the number of ports is set to 10).

If no available port can be found, the script will fail with an
appropriate message.

If the user specifies a specific port, then only that port number will
be used; if the port is not available, the script will fail with an
approrpriate message.

BUG=chromium-os:17558
TEST=Uploaded two images simultaneously to different boards.

Change-Id: Icbbea12468fd766897daeecb0b7f1d3929f52a1c
Signed-off-by: Taylor Hutt <thutt@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/4110
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Terry Lambert <tlambert@chromium.org>
2011-07-15 11:33:31 -07:00
Paul Stewart
99e580e21e Learn board type for package_to_live and image_to_target
In both cases move making contact with the remote board to
an earlier step and default the "board" option to whatever
is reported by the remote.

BUG=n0ne
TEST=Run without board flag or .default_board

Change-Id: I53330ce5ab05b4cff92ac3a384ae0202fc156953
Reviewed-on: http://gerrit.chromium.org/gerrit/433
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
2011-05-06 11:27:07 -07:00
Zdenek Behan
99f7a5397d scripts: call devserver/payload generators from chroot & delete moved scripts
BUG=chromium-os:5246

TEST=below, During all tests, the directory platform/dev was manually removed
1) Ran cros_au_test_harness.py and saw it succeed
2) Ran generate_au_zip.py, compared the generated .zip with one before this
patch - they were identical
3) Ran cros_image_to_target.py and saw it succeed

Change-Id: Iab2620245a45442b79ee8369f3af1a3990f4644e

Review URL: http://codereview.chromium.org/6576023
2011-03-01 22:57:33 +01:00
Zdenek Behan
a400b3f5fa cros_image_to_target: use newstyle updates, followup after switching --nooldstyle to be the default
BUG=n0ne
TEST=run the script and see the update go

Change-Id: Ie767edf85876b7864f6425efed1ac554026ecdff

Review URL: http://codereview.chromium.org/6596062
2011-03-01 01:42:55 +01:00
Simon Glass
d73ec0e2a8 cros_image_to_target handles test images, less verbose
added --test option
removed superfluous output (e.g. from dd) unless --verbose given
added --debug option for when you really want that output
added use of pv for a nice progress bar

TEST=(run script several times)
BUG=chromium-os:9563

Change-Id: Ib9d89ad5649b6cb6d5db35f66f6a3fda1ada0c53

Review URL: http://codereview.chromium.org/5176002
2010-11-23 15:30:50 -08:00
Paul Stewart
f7597abb17 Use new stateful image builder
Also change download filenames

BUG=chromium-os:9308
TEST=Run script

Review URL: http://codereview.chromium.org/5149002

Change-Id: Id9ed150184559ab31274dc3b4f58bf9fe0a0f76c
2010-11-17 16:22:28 -08:00
Paul Stewart
48d7d8bb7f Add sha256 to devserver clone updater output
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/3572006
2010-09-30 18:16:21 -07:00
Paul Stewart
b0d5cf28e5 New application cros_image_to_target.py for ssh_tunnel upgrade
The RF testbed has hosts behind a one-way firewall, so the
conventional "image_to_live" script does not work.  My initial
attempt at solving this, 'cros_copy_upgrade_server', while
sometimes functional, was always quite brittle since it had
widely ranging dependencies which often changed in ways that
the authors could not predict would break our setup.

I've written from scratch a new script in python which uses
ssh tunnels to get around the problem of the firewall issue.
It also has retlatively minimal dependencies (stateful_update,
cros_generate_update_paylod, cgpt, get_latest_image.sh and
the testing keys) so hopefully it won't get blown away too
often.

BUG=none
TEST=Ran under chroot -- Need help testing

Review URL: http://codereview.chromium.org/3391008
2010-09-21 15:13:59 -07:00