mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 10:11:17 +00:00
juno: use bootargs on hard_reset with u-boot
This commit is contained in:
parent
95c3f049fb
commit
205934d55b
@ -126,8 +126,11 @@ class AndroidDevice(BaseLinuxDevice): # pylint: disable=W0223
|
||||
self._is_ready = False
|
||||
self._just_rebooted = True
|
||||
|
||||
def boot(self, **kwargs):
|
||||
self.reset()
|
||||
def boot(self, hard=False, **kwargs):
|
||||
if hard:
|
||||
self.hard_reset()
|
||||
else:
|
||||
self.reset()
|
||||
|
||||
def connect(self): # NOQA pylint: disable=R0912
|
||||
iteration_number = 0
|
||||
|
@ -563,8 +563,11 @@ class LinuxDevice(BaseLinuxDevice):
|
||||
super(LinuxDevice, self).hard_reset()
|
||||
self._is_ready = False
|
||||
|
||||
def boot(self, **kwargs):
|
||||
self.reset()
|
||||
def boot(self, hard=False, **kwargs):
|
||||
if hard:
|
||||
self.hard_reset()
|
||||
else:
|
||||
self.reset()
|
||||
self.logger.debug('Waiting for device...')
|
||||
start_time = time.time()
|
||||
while (time.time() - start_time) < self.boot_timeout:
|
||||
|
@ -495,7 +495,7 @@ class Runner(object):
|
||||
if self.context.reboot_policy.can_reboot and self.device.can('reset_power'):
|
||||
self.logger.info('Attempting to hard-reset the device...')
|
||||
try:
|
||||
self.device.hard_reset()
|
||||
self.device.boot(hard=True)
|
||||
self.device.connect()
|
||||
except DeviceError: # hard_boot not implemented for the device.
|
||||
raise e
|
||||
@ -553,7 +553,7 @@ class Runner(object):
|
||||
except DeviceError: # device may be offline
|
||||
if self.device.can('reset_power'):
|
||||
with self._signal_wrap('INITIAL_BOOT'):
|
||||
self.device.hard_reset()
|
||||
self.device.boot(hard=True)
|
||||
else:
|
||||
raise DeviceError('Cannot connect to device for initial reboot; '
|
||||
'and device does not support hard reset.')
|
||||
|
@ -77,26 +77,36 @@ class Juno(BigLittleDevice):
|
||||
used, when flashing new images.''',
|
||||
default={
|
||||
'image_name': 'Image',
|
||||
'image_args': 'console=ttyAMA0,115200 '
|
||||
'earlyprintk=pl011,0x7ff80000 '
|
||||
'verbose debug init=/init '
|
||||
'root=/dev/sda1 rw ip=dhcp rootwait '
|
||||
'video=DVI-D-1:1920x1080R@60',
|
||||
'image_args': None, # populated from bootargs if not specified
|
||||
'fdt_support': True,
|
||||
}
|
||||
),
|
||||
Parameter('bootargs', default='console=ttyAMA0,115200 earlyprintk=pl011,0x7ff80000 '
|
||||
'verbose debug init=/init root=/dev/sda1 rw ip=dhcp '
|
||||
'rootwait video=DVI-D-1:1920x1080R@60',
|
||||
description='''Default boot arguments to use when boot_arguments were not.'''),
|
||||
]
|
||||
|
||||
short_delay = 1
|
||||
firmware_prompt = 'Cmd>'
|
||||
|
||||
def boot(self, **kwargs):
|
||||
self.logger.debug('Resetting the device.')
|
||||
self.reset()
|
||||
def validate(self):
|
||||
if not self.uefi_config.image_args:
|
||||
self.uefi_config.image_args = self.bootargs
|
||||
|
||||
def boot(self, hard=False, **kwargs):
|
||||
if kwargs:
|
||||
self.bootargs = kwargs # pylint: disable=attribute-defined-outside-init
|
||||
if hard:
|
||||
self.logger.debug('Performing a hard reset.')
|
||||
self.hard_reset()
|
||||
else:
|
||||
self.logger.debug('Resetting the device.')
|
||||
self.reset()
|
||||
if self.bootloader == 'uefi':
|
||||
self._boot_via_uefi()
|
||||
else:
|
||||
self._boot_via_uboot(**kwargs)
|
||||
self._boot_via_uboot(**self.bootargs)
|
||||
|
||||
def _boot_via_uboot(self, **kwargs):
|
||||
if not kwargs:
|
||||
|
Loading…
x
Reference in New Issue
Block a user