diff options
author | Denis Nikitin <denik@google.com> | 2019-07-20 20:25:16 -0700 |
---|---|---|
committer | Denis Nikitin <denik@chromium.org> | 2019-08-02 03:14:16 +0000 |
commit | 144f699298c58ad7f141ca8bd38071a6b970a92a (patch) | |
tree | c4b54d95340995c2cf8a1212da49b342797bdf82 /image_chromeos.py | |
parent | 2493f134145c4102a37f8df2113af945f37e5b06 (diff) | |
download | toolchain-utils-144f699298c58ad7f141ca8bd38071a6b970a92a.tar.gz |
crosperf: Setup intel_pstate
Setup intel_pstate in kernel command line to a value from global
settings "intel_pstate" argument (default '').
Added crosperf "--no_hwp" argument for a shortcut change.
Kernel command line will be updated only if hwp is supported by CPU.
Intel_pstate HWP feature can be disabled via kernel command line argument
intel_pstate=no_hwp. See
https://www.kernel.org/doc/html/v4.12/admin-guide/pm/
intel_pstate.html#kernel-command-line-options-for-intel-pstate
BUG=chromium:966514
TEST=tested on eve, rammus (supported), kefka, samus (not supported),
scarlet (arm).
Change-Id: Id6b7cf7e230e17788c1024da2aacbc9a16b7ac8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1711517
Commit-Queue: Denis Nikitin <denik@chromium.org>
Tested-by: Denis Nikitin <denik@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Denis Nikitin <denik@chromium.org>
Diffstat (limited to 'image_chromeos.py')
-rwxr-xr-x | image_chromeos.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/image_chromeos.py b/image_chromeos.py index 11836ce9..726b5659 100755 --- a/image_chromeos.py +++ b/image_chromeos.py @@ -288,7 +288,7 @@ def DoImage(argv): # If this is a non-local image, then the ret returned from # EnsureMachineUp is the one that will be returned by this function; # in that case, make sure the value in 'ret' is appropriate. - if not local_image and ret is True: + if not local_image and ret: ret = 0 else: ret = 1 @@ -311,23 +311,25 @@ def DoImage(argv): TryRemountPartitionAsRW(options.chromeos_root, options.remote, log_level) - if found is False: + if not found: temp_dir = os.path.dirname(located_image) l.LogOutput('Deleting temp image dir: %s' % temp_dir) shutil.rmtree(temp_dir) + l.LogOutput('Image updated.') else: - l.LogOutput('Checksums match. Skipping reimage, doing a reboot.') + l.LogOutput('Checksums match, skip image update and reboot.') command = 'reboot && exit' _ = cmd_executer.CrosRunCommand( command, chromeos_root=options.chromeos_root, machine=options.remote) # Wait 30s after reboot. time.sleep(30) - return ret finally: if should_unlock: locks.ReleaseLock(list(options.remote.split()), options.chromeos_root) + return ret + def LocateOrCopyImage(chromeos_root, image, board=None): l = logger.GetLogger() |