flash-ap: Use standardized config names. [chromiumos/chromite : master]

22 views
Skip to first unread message

Alex Klein (Gerrit)

unread,
Apr 7, 2020, 8:46:57 AM4/7/20
to Mike Frysinger

Alex Klein has uploaded this change for review.

View Change

flash-ap: Use standardized config names.

BUG=chromium:1045508
TEST=run_tests

Change-Id: I7b5b0a25a747e5d934e59c4f1448048466657299
---
M lib/firmware/ap_firmware.py
M lib/firmware/flash_ap.py
2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/lib/firmware/ap_firmware.py b/lib/firmware/ap_firmware.py
index ff4c261..c485917 100644
--- a/lib/firmware/ap_firmware.py
+++ b/lib/firmware/ap_firmware.py
@@ -276,11 +276,13 @@
force_fast = module.is_fast_required

servo_force_command = None
- if hasattr(module, '__use_flashrom__') and module.__use_flashrom__:
+ if (hasattr(module, 'DEPLOY_SERVO_FORCE_FLASHROM') and
+ module.DEPLOY_SERVO_FORCE_FLASHROM):
servo_force_command = DeployConfig.FORCE_FLASHROM

ssh_force_command = None
- if hasattr(module, 'use_futility_ssh') and module.use_futility_ssh:
+ if (hasattr(module, 'DEPLOY_SSH_FORCE_FUTILITY') and
+ module.DEPLOY_SSH_FORCE_FUTILITY):
ssh_force_command = DeployConfig.FORCE_FUTILITY

return DeployConfig(
diff --git a/lib/firmware/flash_ap.py b/lib/firmware/flash_ap.py
index 904bee9..b3d6532 100755
--- a/lib/firmware/flash_ap.py
+++ b/lib/firmware/flash_ap.py
@@ -297,7 +297,8 @@
logging.notice('There is a known error with the board and servo type being '
'used, enabling --fast to bypass this problem.')
fast = True
- if hasattr(module, '__use_flashrom__') and module.__use_flashrom__:
+ if (hasattr(module, 'DEPLOY_SERVO_FORCE_FLASHROM') and
+ module.DEPLOY_SERVO_FORCE_FLASHROM):
# Futility needs VBoot to flash so boards without functioning VBoot
# can set this attribute to True to force the use of flashrom.
flashrom = True
@@ -334,8 +335,8 @@
"""
logging.info('Attempting to flash via ssh.')
# TODO(b/143241417): Can't use flashrom over ssh on wilco.
- if (hasattr(module, 'use_futility_ssh') and module.use_futility_ssh and
- flashrom):
+ if (hasattr(module, 'DEPLOY_SSH_FORCE_FUTILITY') and
+ module.DEPLOY_SSH_FORCE_FUTILITY and flashrom):
logging.warning('Flashing with flashrom over ssh on this device fails '
'consistently, flashing with futility instead.')
flashrom = False

To view, visit change 2139780. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromiumos/chromite
Gerrit-Branch: master
Gerrit-Change-Id: I7b5b0a25a747e5d934e59c4f1448048466657299
Gerrit-Change-Number: 2139780
Gerrit-PatchSet: 1
Gerrit-Owner: Alex Klein <sak...@chromium.org>
Gerrit-MessageType: newchange

Alex Klein (Gerrit)

unread,
Apr 7, 2020, 8:53:12 AM4/7/20
to chromium-...@chromium.org

Alex Klein uploaded patch set #2 to this change.

View Change

flash-ap: Use standardized config names.

BUG=chromium:1045508
TEST=run_tests

Change-Id: I7b5b0a25a747e5d934e59c4f1448048466657299
---
M lib/firmware/ap_firmware.py
M lib/firmware/flash_ap.py
2 files changed, 8 insertions(+), 5 deletions(-)

To view, visit change 2139780. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromiumos/chromite
Gerrit-Branch: master
Gerrit-Change-Id: I7b5b0a25a747e5d934e59c4f1448048466657299
Gerrit-Change-Number: 2139780
Gerrit-PatchSet: 2
Gerrit-Owner: Alex Klein <sak...@chromium.org>
Gerrit-MessageType: newpatchset

Alex Klein (Gerrit)

unread,
Apr 8, 2020, 12:00:01 PM4/8/20
to Jacob Rasmussen

Patch set 2:Verified +1

View Change

    To view, visit change 2139780. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromiumos/chromite
    Gerrit-Branch: master
    Gerrit-Change-Id: I7b5b0a25a747e5d934e59c4f1448048466657299
    Gerrit-Change-Number: 2139780
    Gerrit-PatchSet: 2
    Gerrit-Owner: Alex Klein <sak...@chromium.org>
    Gerrit-Reviewer: Alex Klein <sak...@chromium.org>
    Gerrit-Reviewer: Jacob Rasmussen <jaco...@google.com>
    Gerrit-Comment-Date: Wed, 08 Apr 2020 15:59:58 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Jacob Rasmussen (Gerrit)

    unread,
    Apr 8, 2020, 12:33:12 PM4/8/20
    to Alex Klein

    Patch set 2:Code-Review +2

    View Change

      To view, visit change 2139780. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromiumos/chromite
      Gerrit-Branch: master
      Gerrit-Change-Id: I7b5b0a25a747e5d934e59c4f1448048466657299
      Gerrit-Change-Number: 2139780
      Gerrit-PatchSet: 2
      Gerrit-Owner: Alex Klein <sak...@chromium.org>
      Gerrit-Reviewer: Alex Klein <sak...@chromium.org>
      Gerrit-Reviewer: Jacob Rasmussen <jaco...@google.com>
      Gerrit-Comment-Date: Wed, 08 Apr 2020 16:33:08 +0000

      Alex Klein (Gerrit)

      unread,
      Apr 8, 2020, 12:43:59 PM4/8/20
      to Jacob Rasmussen

      Patch set 2:Code-Review +2

      View Change

        To view, visit change 2139780. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromiumos/chromite
        Gerrit-Branch: master
        Gerrit-Change-Id: I7b5b0a25a747e5d934e59c4f1448048466657299
        Gerrit-Change-Number: 2139780
        Gerrit-PatchSet: 2
        Gerrit-Owner: Alex Klein <sak...@chromium.org>
        Gerrit-Reviewer: Alex Klein <sak...@chromium.org>
        Gerrit-Reviewer: Jacob Rasmussen <jaco...@google.com>
        Gerrit-Comment-Date: Wed, 08 Apr 2020 16:43:55 +0000

        Alex Klein (Gerrit)

        unread,
        Apr 8, 2020, 12:44:02 PM4/8/20
        to Jacob Rasmussen

        Alex Klein removed a vote from this change.

        View Change

        Removed Code-Review+2 by Alex Klein <sak...@chromium.org>

        To view, visit change 2139780. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromiumos/chromite
        Gerrit-Branch: master
        Gerrit-Change-Id: I7b5b0a25a747e5d934e59c4f1448048466657299
        Gerrit-Change-Number: 2139780
        Gerrit-PatchSet: 2
        Gerrit-Owner: Alex Klein <sak...@chromium.org>
        Gerrit-Reviewer: Alex Klein <sak...@chromium.org>
        Gerrit-Reviewer: Jacob Rasmussen <jaco...@google.com>
        Gerrit-MessageType: deleteVote

        Alex Klein (Gerrit)

        unread,
        Apr 8, 2020, 12:44:07 PM4/8/20
        to Jacob Rasmussen

        Patch set 2:Commit-Queue +2

        View Change

          To view, visit change 2139780. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromiumos/chromite
          Gerrit-Branch: master
          Gerrit-Change-Id: I7b5b0a25a747e5d934e59c4f1448048466657299
          Gerrit-Change-Number: 2139780
          Gerrit-PatchSet: 2
          Gerrit-Owner: Alex Klein <sak...@chromium.org>
          Gerrit-Reviewer: Alex Klein <sak...@chromium.org>
          Gerrit-Reviewer: Jacob Rasmussen <jaco...@google.com>
          Gerrit-Comment-Date: Wed, 08 Apr 2020 16:44:03 +0000
          Reply all
          Reply to author
          Forward
          0 new messages