Index: autoupdate.py |
diff --git a/autoupdate.py b/autoupdate.py |
index b997ca39902e85a2e29aa2f34165a56d75e5f4f2..351b451b94555ba37d8f5a67c1c20a92bdd54dc9 100644 |
--- a/autoupdate.py |
+++ b/autoupdate.py |
@@ -31,7 +31,7 @@ class Autoupdate(BuildObject): |
def __init__(self, serve_only=None, test_image=False, urlbase=None, |
factory_config_path=None, client_prefix=None, forced_image=None, |
- use_cached=False, port=8080, *args, **kwargs): |
+ use_cached=False, port=8080, src_image='', *args, **kwargs): |
super(Autoupdate, self).__init__(*args, **kwargs) |
self.serve_only = serve_only |
self.factory_config = factory_config_path |
@@ -44,6 +44,7 @@ class Autoupdate(BuildObject): |
self.client_prefix = client_prefix |
self.forced_image = forced_image |
self.use_cached = use_cached |
+ self.src_image = src_image |
def _GetSecondsSinceMidnight(self): |
"""Returns the seconds since midnight as a decimal value.""" |
@@ -220,8 +221,11 @@ class Autoupdate(BuildObject): |
_LogMessage('Generating update image %s' % update_path) |
mkupdate_command = ( |
- '%s/cros_generate_update_payload --image=%s --output=%s ' |
- '--patch_kernel' % (self.scripts_dir, image_path, update_path)) |
+ '%s/cros_generate_update_payload --image="%s" --output="%s" ' |
+ '--patch_kernel --noold_style --src_image="%s"' % ( |
+ self.scripts_dir, image_path, |
+ update_path, self.src_image)) |
+ _LogMessage(mkupdate_command) |
if os.system(mkupdate_command) != 0: |
_LogMessage('Failed to create base update file') |
return None |