Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to reboot Juno board when using uboot #151

Closed
credp opened this issue Apr 27, 2016 · 8 comments
Closed

Unable to reboot Juno board when using uboot #151

credp opened this issue Apr 27, 2016 · 8 comments

Comments

@credp
Copy link
Contributor

credp commented Apr 27, 2016

This has been a persistent issue for me recently, but mostly I have been able to fix it by forcing pexpect==3.3 after installing a WA update. However, on my new desktop this doesn't help things.

I have temporarily hacked out all the driver parts which send empty lines, as they were dropping into the board firmware and the uboot command doesn't come up.

It's not ideal - I need to reboot manually just after starting WA to be sure to see the android login come up.

Is there anything I can do to find out what is so different on my setup?

@ep1cman
Copy link
Contributor

ep1cman commented Apr 27, 2016

What versions of the firmware/u-boot are you running?

@credp
Copy link
Contributor Author

credp commented Apr 27, 2016

Hi, This is what my board says.

ARM V2M-Juno Boot loader v1.0.0
HBI0262 build 1794

ARM V2M_Juno r2 Firmware v1.3.9
Build Date: Nov 11 2015

Configuring motherboard (rev D, var A)...
IOFPGA image \MB\HBI0262D\io_b118.bit

Testing motherboard interfaces (FPGA build 118)...

NOTICE: Booting Trusted Firmware
NOTICE: BL1: v1.2(debug):55a8565
NOTICE: BL1: Built : 09:44:40, Mar 24 2016

NOTICE: BL2: v1.2(debug):55a8565
NOTICE: BL2: Built : 09:44:40, Mar 24 2016

NOTICE: BL31: v1.2(debug):55a8565
NOTICE: BL31: Built : 09:44:40, Mar 24 2016

U-Boot 2016.03-gb319c0f (Mar 24 2016 - 09:54:32 +0000) vexpress_aemv8a, Build: jenkins-armlt-platforms-release-23

@credp
Copy link
Contributor Author

credp commented Apr 27, 2016

It's all from linaro sd card image from this link

Plus my custom kernel on top, obviously.

@credp
Copy link
Contributor Author

credp commented Apr 27, 2016

I've just restored the master version again so I could get a log of the failure. This is the interesting bit.

2016-04-27 16:49:18,049 DEBUG serial_read: INFO: SPSR = 0x3c9
2016-04-27 16:49:18,066 DEBUG serial_read:
2016-04-27 16:49:18,067 DEBUG serial_read:
2016-04-27 16:49:18,076 DEBUG serial_read: U-Boot 2016.03-gb319c0f (Mar 24 2016 - 09:54:32 +0000) vexpress_aemv8a, Build: jenkins-armlt-platforms-release-23
2016-04-27 16:49:18,077 DEBUG serial_read:
2016-04-27 16:49:18,077 DEBUG serial_read:
2016-04-27 16:49:18,078 DEBUG serial_read: DRAM: 8 GiB
2016-04-27 16:49:18,125 DEBUG serial_read: PCIe XR3 Host Bridge enabled: x4 link (Gen 2)
2016-04-27 16:49:18,126 DEBUG serial_read: Flash: 64 MiB
2016-04-27 16:49:18,167 DEBUG serial_read: In: serial_pl01x
2016-04-27 16:49:18,169 DEBUG serial_read: Out: serial_pl01x
2016-04-27 16:49:18,169 DEBUG serial_read:
2016-04-27 16:49:18,171 DEBUG serial_read: Err: serial_pl01x
2016-04-27 16:49:18,172 DEBUG serial_read: Net: smc911x-0
2016-04-27 16:49:18,275 DEBUG serial_send:
2016-04-27 16:49:19,377 DEBUG serial_read: Hit any key to stop autoboot: 1 ��� 0
2016-04-27 16:54:19,581 ERROR Runner: Error while Rebooting device
2016-04-27 16:54:19,581 ERROR Runner: TIMEOUT("Timeout exceeded.
2016-04-27 16:54:19,581 ERROR Runner: <pexpect.fdpexpect.fdspawn object at 0x7ff7a53c41d0>
2016-04-27 16:54:19,581 ERROR Runner: version: 3.3
2016-04-27 16:54:19,581 ERROR Runner: command: None
2016-04-27 16:54:19,581 ERROR Runner: args: None
2016-04-27 16:54:19,581 ERROR Runner: searcher: <pexpect.searcher_re object at 0x7ff7a53c43d0>
2016-04-27 16:54:19,581 ERROR Runner: buffer (last 100 chars): ': 1 \x08\x08\x08 0 \r\nVExpress64# '
2016-04-27 16:54:19,581 ERROR Runner: before (last 100 chars): ': 1 \x08\x08\x08 0 \r\nVExpress64# '
2016-04-27 16:54:19,581 ERROR Runner: after: <class 'pexpect.TIMEOUT'>
2016-04-27 16:54:19,581 ERROR Runner: match: None
2016-04-27 16:54:19,581 ERROR Runner: match_index: None
2016-04-27 16:54:19,581 ERROR Runner: exitstatus: None
2016-04-27 16:54:19,581 ERROR Runner: flag_eof: False
2016-04-27 16:54:19,581 ERROR Runner: pid: None
2016-04-27 16:54:19,581 ERROR Runner: child_fd: 4
2016-04-27 16:54:19,581 ERROR Runner: closed: False
2016-04-27 16:54:19,581 ERROR Runner: timeout: 300
2016-04-27 16:54:19,581 ERROR Runner: delimiter: <class 'pexpect.EOF'>
2016-04-27 16:54:19,581 ERROR Runner: logfile: None
2016-04-27 16:54:19,581 ERROR Runner: logfile_read: <wlauto.utils.serial_port.PexpectLogger object at 0x7ff7a53c4350>
2016-04-27 16:54:19,581 ERROR Runner: logfile_send: <wlauto.utils.serial_port.PexpectLogger object at 0x7ff7a53c4250>
2016-04-27 16:54:19,581 ERROR Runner: maxread: 2000
2016-04-27 16:54:19,581 ERROR Runner: ignorecase: False
2016-04-27 16:54:19,581 ERROR Runner: searchwindowsize: None
2016-04-27 16:54:19,581 ERROR Runner: delaybeforesend: 0.05
2016-04-27 16:54:19,581 ERROR Runner: delayafterclose: 0.1
2016-04-27 16:54:19,581 ERROR Runner: delayafterterminate: 0.1")
2016-04-27 16:54:19,582 ERROR Runner: File "/usr/local/lib/python2.7/dist-packages/wlauto/core/execution.py", line 739, in _handle_errors
2016-04-27 16:54:19,582 ERROR Runner: yield
2016-04-27 16:54:19,582 ERROR Runner: File "/usr/local/lib/python2.7/dist-packages/wlauto/core/execution.py", line 718, in _reboot_device
2016-04-27 16:54:19,582 ERROR Runner: self.device.boot(**self.current_job.spec.boot_parameters)
2016-04-27 16:54:19,582 ERROR Runner: File "/usr/local/lib/python2.7/dist-packages/wlauto/devices/android/juno/init.py", line 109, in boot
2016-04-27 16:54:19,582 ERROR Runner: self._boot_via_uboot(bootargs=self.bootargs)
2016-04-27 16:54:19,582 ERROR Runner: File "/usr/local/lib/python2.7/dist-packages/wlauto/devices/android/juno/init.py", line 121, in _boot_via_uboot
2016-04-27 16:54:19,582 ERROR Runner: menu.open(timeout=120)
2016-04-27 16:54:19,582 ERROR Runner: File "/usr/local/lib/python2.7/dist-packages/wlauto/utils/uboot.py", line 61, in open
2016-04-27 16:54:19,582 ERROR Runner: self.conn.readline() # garbage
2016-04-27 16:54:19,582 ERROR Runner: File "/usr/local/lib/python2.7/dist-packages/pexpect/init.py", line 1034, in readline
2016-04-27 16:54:19,582 ERROR Runner: index = self.expect([self.crlf, self.delimiter])
2016-04-27 16:54:19,582 ERROR Runner: File "/usr/local/lib/python2.7/dist-packages/pexpect/init.py", line 1451, in expect
2016-04-27 16:54:19,582 ERROR Runner: timeout, searchwindowsize)
2016-04-27 16:54:19,582 ERROR Runner: File "/usr/local/lib/python2.7/dist-packages/pexpect/init.py", line 1466, in expect_list
2016-04-27 16:54:19,582 ERROR Runner: timeout, searchwindowsize)
2016-04-27 16:54:19,582 ERROR Runner: File "/usr/local/lib/python2.7/dist-packages/pexpect/init.py", line 1568, in expect_loop
2016-04-27 16:54:19,582 ERROR Runner: raise TIMEOUT(str(err) + '\n' + str(self))
2016-04-27 16:54:19,582 ERROR Runner:
2016-04-27 16:54:19,583 INFO Runner: Retrying...
2016-04-27 16:54:19,583 DEBUG Runner: Rebooting device
2016-04-27 16:54:19,583 DEBUG Juno: Resetting the device.
2016-04-27 16:54:19,780 DEBUG serial_read: \FF

@credp
Copy link
Contributor Author

credp commented Apr 28, 2016

I found the problem - we change the crlf pair for the uboot menu with a comment as below in utils/uboot.py in UbootMenu.__init__

    self.conn.crlf = '\n\r'  # TODO: this has *got* to be a bug in U-Boot...

If we change this to \r\n (which matches the output recorded in my backtrace), then booting works correctly.

I don't know how we can manage this while we have broken and non-broken uboot versions - some version string detection at boot?

@credp
Copy link
Contributor Author

credp commented Apr 28, 2016

0001-uboot-Change-crlf-back-to-normal.patch.tar.gz

Here's my local change as a patch in case it's useful.

@ep1cman
Copy link
Contributor

ep1cman commented May 3, 2016

This should be fixed in #153 , can you give it a shot?

@setrofim
Copy link
Contributor

setrofim commented May 4, 2016

Resolved by commit 8dc24bd

@setrofim setrofim closed this as completed May 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants