def populate(self, parameters): self.expect_shell = parameters.get('expect_shell', True) self.internal_pipeline = Pipeline(parent=self, job=self.job, parameters=parameters) self.internal_pipeline.add_action(BootloaderSecondaryMedia()) self.internal_pipeline.add_action(BootloaderCommandOverlay()) self.internal_pipeline.add_action(ConnectDevice()) # FIXME: reset_device is a hikey hack due to fastboot/OTG issues # remove as part of LAVA-940 - convert to use fastboot-sequence reset_device = self.job.device['actions']['boot']['methods'].get( 'grub-efi', {}).get('reset_device', True) if parameters['method'] == 'grub-efi' and reset_device: # added unless the device specifies not to reset the device in grub. self.internal_pipeline.add_action(ResetDevice()) elif parameters['method'] == 'grub': self.internal_pipeline.add_action(ResetDevice()) if parameters['method'] == 'grub-efi': self.internal_pipeline.add_action(UEFIMenuInterrupt()) self.internal_pipeline.add_action(GrubMenuSelector()) self.internal_pipeline.add_action(BootloaderInterrupt()) self.internal_pipeline.add_action(BootloaderCommandsAction()) 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()) else: if self.has_boot_finished(parameters): self.logger.debug("Doing a boot without a shell (installer)") self.internal_pipeline.add_action(InstallerWait()) self.internal_pipeline.add_action(PowerOff())
def populate(self, parameters): super(GrubSequenceAction, self).populate(parameters) self.internal_pipeline = Pipeline(parent=self, job=self.job, parameters=parameters) sequences = self.job.device['actions']['boot']['methods']['grub'].get( 'sequence', []) for sequence in sequences: mapped = _grub_sequence_map(sequence) if mapped[1]: self.internal_pipeline.add_action(mapped[0](type=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()) else: if self.has_boot_finished(parameters): self.logger.debug("Doing a boot without a shell (installer)") self.internal_pipeline.add_action(InstallerWait()) self.internal_pipeline.add_action(PowerOff())
def populate(self, parameters): self.expect_shell = parameters.get('expect_shell', True) self.internal_pipeline = Pipeline(parent=self, job=self.job, parameters=parameters) self.internal_pipeline.add_action(BootloaderCommandOverlay()) self.internal_pipeline.add_action(ConnectDevice()) self.internal_pipeline.add_action(ResetDevice()) if parameters['method'] == 'grub-efi': self.internal_pipeline.add_action(UEFIMenuInterrupt()) self.internal_pipeline.add_action(GrubMenuSelector()) self.internal_pipeline.add_action(BootloaderInterrupt()) self.internal_pipeline.add_action(BootloaderCommandsAction()) 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()) else: if self.has_boot_finished(parameters): self.logger.debug("Doing a boot without a shell (installer)") self.internal_pipeline.add_action(InstallerWait()) self.internal_pipeline.add_action(PowerOff())
def populate(self, parameters): self.internal_pipeline = Pipeline(parent=self, job=self.job, parameters=parameters) self.internal_pipeline.add_action(BootQemuRetry()) 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())
def populate(self, parameters): self.internal_pipeline = Pipeline(parent=self, job=self.job, parameters=parameters) # establish a new connection before trying the reset self.internal_pipeline.add_action(ResetDevice()) self.internal_pipeline.add_action(UBootInterrupt()) self.internal_pipeline.add_action(BootloaderCommandsAction()) 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())
def populate(self, parameters): self.internal_pipeline = Pipeline(parent=self, job=self.job, parameters=parameters) self.internal_pipeline.add_action(BootloaderCommandOverlay()) self.internal_pipeline.add_action(MenuConnect()) self.internal_pipeline.add_action(ResetDevice()) # Newer firmware often needs no menu interaction, just press to drop to shell if not self._skip_menu(parameters): # Some older firmware, UEFI Shell has to be selected from a menu. self.internal_pipeline.add_action(UefiShellMenuInterrupt()) self.internal_pipeline.add_action(UefiShellMenuSelector()) self.internal_pipeline.add_action(UefiShellInterrupt()) self.internal_pipeline.add_action(UefiBootloaderCommandsAction()) 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())