mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 13:26:27 +00:00
tool/run/load/fastboot: detect fastboot driver
Replace the unconditional sleep "until the board comes up" by the detection of the fastboot-driver message. This shortens the total boot time and reveals U-boots initial output, e.g., messages reporting trouble with bringing up the fastboot driver.
This commit is contained in:
parent
9e5e648073
commit
3bb894370a
@ -34,8 +34,27 @@ proc run_load { } {
|
|||||||
set device [load_fastboot_device]
|
set device [load_fastboot_device]
|
||||||
set uimg [file join [run_dir] boot uImage]
|
set uimg [file join [run_dir] boot uImage]
|
||||||
|
|
||||||
# sleep a bit, board might need some time to come up
|
# show boot log up to the life sign of U-boot's fastboot driver
|
||||||
sleep 8
|
puts stderr "Waiting for U-boot's fastboot driver message"
|
||||||
|
spawn /bin/sh -c "[log_serial_cmd]"
|
||||||
|
set timeout 60
|
||||||
|
set boot_loader_failed false
|
||||||
|
expect {
|
||||||
|
-re {.*musb-hdrc.*\n} { }
|
||||||
|
eof {
|
||||||
|
puts stderr "Aborting, boot log received EOF"
|
||||||
|
set boot_loader_failed true
|
||||||
|
}
|
||||||
|
timeout {
|
||||||
|
puts stderr "Loading of boot loader timed out"
|
||||||
|
set boot_loader_failed true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close
|
||||||
|
if {$boot_loader_failed} {
|
||||||
|
return false }
|
||||||
|
|
||||||
|
puts stderr "U-boot fastboot driver is up"
|
||||||
|
|
||||||
set fastboot_cmd [list fastboot]
|
set fastboot_cmd [list fastboot]
|
||||||
if {$device != ""} {
|
if {$device != ""} {
|
||||||
|
Loading…
Reference in New Issue
Block a user