def populate(self, parameters): self.internal_pipeline = Pipeline(parent=self, job=self.job, parameters=parameters) self.method_params = self.job.device['actions']['boot']['methods'][ 'u-boot']['parameters'] self.usb_mass_device = self.method_params.get( 'uboot_mass_storage_device') # establish a new connection before trying the reset self.internal_pipeline.add_action(ResetDevice()) self.internal_pipeline.add_action(BootloaderInterruptAction()) if self.method_params.get('uboot_ums_flash', False): self.internal_pipeline.add_action( BootloaderCommandsAction(expect_final=False)) self.internal_pipeline.add_action( WaitDevicePathAction(self.usb_mass_device)) self.internal_pipeline.add_action( FlashUBootUMSAction(self.usb_mass_device)) self.internal_pipeline.add_action(ResetDevice()) else: 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.pipeline = Pipeline(parent=self, job=self.job, parameters=parameters) self.method_params = self.job.device["actions"]["boot"]["methods"][ "u-boot"]["parameters"] self.usb_mass_device = self.method_params.get( "uboot_mass_storage_device") # establish a new connection before trying the reset self.pipeline.add_action(ResetDevice()) self.pipeline.add_action(BootloaderInterruptAction()) if self.method_params.get("uboot_ums_flash", False): self.pipeline.add_action( BootloaderCommandsAction(expect_final=False)) self.pipeline.add_action(WaitDevicePathAction( self.usb_mass_device)) self.pipeline.add_action(FlashUBootUMSAction(self.usb_mass_device)) self.pipeline.add_action(ResetDevice()) elif self.method_params.get("uboot_altbank", False): self.pipeline.add_action( BootloaderCommandsActionAltBank(expect_final=False)) self.pipeline.add_action(BootloaderInterruptAction()) self.pipeline.add_action(BootloaderCommandsAction()) else: self.pipeline.add_action(BootloaderCommandsAction()) if self.has_prompts(parameters): self.pipeline.add_action(AutoLoginAction()) if self.test_has_shell(parameters): self.pipeline.add_action(ExpectShellSession()) if "transfer_overlay" in parameters: self.pipeline.add_action(OverlayUnpack()) self.pipeline.add_action(ExportDeviceEnvironment())
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(BootloaderInterruptAction()) 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(ResetDevice()) self.internal_pipeline.add_action( BootloaderInterruptAction(method=parameters["bootloader"])) self.internal_pipeline.add_action( BootloaderCommandsAction(expect_final=False, method=parameters["bootloader"]))
def populate(self, parameters): self.pipeline = Pipeline(parent=self, job=self.job, parameters=parameters) self.pipeline.add_action(ResetDevice()) self.pipeline.add_action(DepthchargeStart()) self.pipeline.add_action(BootloaderCommandsAction()) if self.has_prompts(parameters): self.pipeline.add_action(AutoLoginAction()) if self.test_has_shell(parameters): self.pipeline.add_action(ExpectShellSession()) if "transfer_overlay" in parameters: self.pipeline.add_action(OverlayUnpack()) self.pipeline.add_action(ExportDeviceEnvironment())
def populate(self, parameters): self.pipeline = Pipeline(parent=self, job=self.job, parameters=parameters) # establish a new connection before trying the reset self.pipeline.add_action(ResetDevice()) self.pipeline.add_action(BootloaderInterruptAction()) self.pipeline.add_action(BootloaderCommandsAction()) if self.has_prompts(parameters): self.pipeline.add_action(AutoLoginAction()) if self.test_has_shell(parameters): self.pipeline.add_action(ExpectShellSession()) if "transfer_overlay" in parameters: self.pipeline.add_action(OverlayUnpack()) self.pipeline.add_action(ExportDeviceEnvironment())