Commit a3fb0095 authored by Neil Williams's avatar Neil Williams 💬 Committed by Senthil Kumaran S

Reorganize for hikey 960 AOSP support

Change-Id: Ia89b3a4b5cbd529db16051f5f253c8b15d875e73
parent 7d78da6e
......@@ -121,6 +121,13 @@ class BootFastbootAction(BootAction):
mapped[0](device_actions=mapped[1]))
elif mapped[0]:
self.internal_pipeline.add_action(mapped[0]())
if self.has_prompts(parameters):
self.internal_pipeline.add_action(AutoLoginAction())
if self.test_has_shell(parameters):
self.internal_pipeline.add_action(ExpectShellSession())
if 'transfer_overlay' in parameters:
self.internal_pipeline.add_action(OverlayUnpack())
self.internal_pipeline.add_action(ExportDeviceEnvironment())
class WaitFastBootInterrupt(Action):
......
......@@ -153,6 +153,7 @@ class FastbootFlashOrderAction(DeployAction):
self.sleep = 10
self.interrupt_prompt = None
self.interrupt_string = None
self.reboot = None
def populate(self, parameters):
self.internal_pipeline = Pipeline(parent=self, job=self.job, parameters=parameters)
......@@ -166,19 +167,22 @@ class FastbootFlashOrderAction(DeployAction):
if flash_cmd not in parameters['images']:
continue
self.internal_pipeline.add_action(FastbootFlashAction(cmd=flash_cmd))
reboot = parameters['images'][flash_cmd].get('reboot', None)
if reboot == 'fastboot-reboot':
self.reboot = parameters['images'][flash_cmd].get('reboot', None)
if self.reboot == 'fastboot-reboot':
self.internal_pipeline.add_action(FastbootReboot())
self.internal_pipeline.add_action(ReadFeedback(repeat=True))
elif reboot == 'fastboot-reboot-bootloader':
elif self.reboot == 'fastboot-reboot-bootloader':
self.internal_pipeline.add_action(FastbootRebootBootloader())
self.internal_pipeline.add_action(ReadFeedback(repeat=True))
elif reboot == 'hard-reset':
elif self.reboot == 'hard-reset':
self.internal_pipeline.add_action(PDUReboot())
self.internal_pipeline.add_action(ReadFeedback(repeat=True))
def validate(self):
super(FastbootFlashOrderAction, self).validate()
self.set_namespace_data(
action=FastbootFlashAction.name, label='interrupt',
key='reboot', value=self.reboot)
if 'fastboot_serial_number' not in self.job.device:
self.errors = "device fastboot serial number missing"
elif self.job.device['fastboot_serial_number'] == '0000000000':
......@@ -236,7 +240,11 @@ class FastbootFlashAction(Action):
if 'no-flash-boot' in sequence and self.command in ['boot']:
return connection
if self.interrupt_prompt:
# if a reboot is requested, will need to wait for the prompt
# if not, continue in the existing mode.
reboot = self.get_namespace_data(
action=self.name, label='interrupt', key='reboot')
if self.interrupt_prompt and reboot:
connection.prompt_str = self.interrupt_prompt
self.logger.debug("Changing prompt to '%s'", connection.prompt_str)
self.wait(connection)
......
......@@ -44,9 +44,6 @@ actions:
- no-flash-boot
- wait-usb-remove
- lxc-add-device
- auto-login
- shell-session
- export-env
timeouts:
actions:
......
......@@ -69,7 +69,7 @@ actions:
lxc:
methods:
lxc:
fastboot: ['boot', 'wait-usb-add', 'lxc-add-device']
fastboot: ['boot']
grub:
sequence:
- wait-fastboot-interrupt
......
......@@ -119,7 +119,7 @@ actions:
methods:
minimal:
ssh:
fastboot: ['reboot', 'auto-login', 'shell-session', 'export-env']
fastboot: ['reboot']
u-boot:
parameters:
mkimage_arch: arm
......
......@@ -63,6 +63,7 @@
pipeline:
- {class: actions.boot.fastboot.EnterFastbootAction, name: enter-fastboot-action}
- {class: actions.boot.fastboot.FastbootRebootAction, name: fastboot-reboot}
- {class: actions.boot.AutoLoginAction, name: auto-login-action}
- class: actions.test.shell.TestShellRetry
name: lava-test-retry
pipeline:
......
......@@ -69,6 +69,7 @@
pipeline:
- {class: actions.boot.fastboot.EnterFastbootAction, name: enter-fastboot-action}
- {class: actions.boot.fastboot.FastbootRebootAction, name: fastboot-reboot}
- {class: actions.boot.AutoLoginAction, name: auto-login-action}
- class: actions.test.shell.TestShellRetry
name: lava-test-retry
pipeline:
......
......@@ -69,6 +69,7 @@
pipeline:
- {class: actions.boot.fastboot.EnterFastbootAction, name: enter-fastboot-action}
- {class: actions.boot.fastboot.FastbootRebootAction, name: fastboot-reboot}
- {class: actions.boot.AutoLoginAction, name: auto-login-action}
- class: actions.test.shell.TestShellRetry
name: lava-test-retry
pipeline:
......
......@@ -88,8 +88,6 @@
- {class: connections.lxc.ConnectLxc, name: connect-lxc}
- {class: actions.boot.fastboot.FastbootRebootAction, name: fastboot-reboot}
- {class: actions.boot.AutoLoginAction, name: auto-login-action}
- {class: shell.ExpectShellSession, name: expect-shell-connection}
- {class: actions.boot.environment.ExportDeviceEnvironment, name: export-device-env}
- class: actions.test.shell.TestShellRetry
name: lava-test-retry
pipeline:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment