mirror of
https://github.com/ARM-software/devlib.git
synced 2025-02-07 13:40:48 +00:00
module/vexpress: fix reboot for Juno
- The autoboot message in the firmware has changed; detect both the old and the new messages. - Depending on where exactly the boot was interrupted, either a "reboot" or a "reset" may be required; so send both.
This commit is contained in:
parent
b368acb755
commit
0e017ddf9f
@ -25,7 +25,8 @@ from devlib.utils.uefi import UefiMenu, UefiConfig
|
|||||||
from devlib.utils.uboot import UbootMenu
|
from devlib.utils.uboot import UbootMenu
|
||||||
|
|
||||||
|
|
||||||
AUTOSTART_MESSAGE = 'Press Enter to stop auto boot...'
|
OLD_AUTOSTART_MESSAGE = 'Press Enter to stop auto boot...'
|
||||||
|
AUTOSTART_MESSAGE = 'Hit any key to stop autoboot:'
|
||||||
POWERUP_MESSAGE = 'Powering up system...'
|
POWERUP_MESSAGE = 'Powering up system...'
|
||||||
DEFAULT_MCC_PROMPT = 'Cmd>'
|
DEFAULT_MCC_PROMPT = 'Cmd>'
|
||||||
|
|
||||||
@ -136,18 +137,20 @@ class VexpressBootModule(BootModule):
|
|||||||
def get_through_early_boot(self, tty):
|
def get_through_early_boot(self, tty):
|
||||||
self.logger.debug('Establishing initial state...')
|
self.logger.debug('Establishing initial state...')
|
||||||
tty.sendline('')
|
tty.sendline('')
|
||||||
i = tty.expect([AUTOSTART_MESSAGE, POWERUP_MESSAGE, self.mcc_prompt])
|
i = tty.expect([AUTOSTART_MESSAGE, OLD_AUTOSTART_MESSAGE, POWERUP_MESSAGE, self.mcc_prompt])
|
||||||
if i == 2:
|
if i == 3:
|
||||||
self.logger.debug('Saw MCC prompt.')
|
self.logger.debug('Saw MCC prompt.')
|
||||||
time.sleep(self.short_delay)
|
time.sleep(self.short_delay)
|
||||||
tty.sendline('reboot')
|
tty.sendline('reboot')
|
||||||
elif i == 1:
|
elif i == 2:
|
||||||
self.logger.debug('Saw powering up message (assuming soft reboot).')
|
self.logger.debug('Saw powering up message (assuming soft reboot).')
|
||||||
else:
|
else:
|
||||||
self.logger.debug('Saw auto boot message.')
|
self.logger.debug('Saw auto boot message.')
|
||||||
tty.sendline('')
|
tty.sendline('')
|
||||||
time.sleep(self.short_delay)
|
time.sleep(self.short_delay)
|
||||||
|
# could be either depending on where in the boot we are
|
||||||
tty.sendline('reboot')
|
tty.sendline('reboot')
|
||||||
|
tty.sendline('reset')
|
||||||
|
|
||||||
def get_uefi_menu(self, tty):
|
def get_uefi_menu(self, tty):
|
||||||
menu = UefiMenu(tty)
|
menu = UefiMenu(tty)
|
||||||
@ -324,7 +327,7 @@ class VersatileExpressFlashModule(FlashModule):
|
|||||||
baudrate=self.target.platform.baudrate,
|
baudrate=self.target.platform.baudrate,
|
||||||
timeout=self.timeout,
|
timeout=self.timeout,
|
||||||
init_dtr=0) as tty:
|
init_dtr=0) as tty:
|
||||||
i = tty.expect([self.mcc_prompt, AUTOSTART_MESSAGE])
|
i = tty.expect([self.mcc_prompt, AUTOSTART_MESSAGE, OLD_AUTOSTART_MESSAGE])
|
||||||
if i:
|
if i:
|
||||||
tty.sendline('')
|
tty.sendline('')
|
||||||
wait_for_vemsd(self.vemsd_mount, tty, self.mcc_prompt, self.short_delay)
|
wait_for_vemsd(self.vemsd_mount, tty, self.mcc_prompt, self.short_delay)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user