Commit de3d524
committed
UBootDriver: add strip_timestamp option
Some U-Boot configurations may prepend timestamps to the beginning of
every line during early boot, and at the prompt, e.g.:
|[ 2.397] Failed to get fastboot key config: -19
|[ 2.402] sdh@d4280000: 74 clk wait timeout(100)
|[ 2.405] MMC: no card present
|[ 2.408] mmc_init: -123, time 7
|[ 2.412] Net: RGMII interface
|[ 2.414] eth0: ethernet@cac80000
|[ 2.420] Autoboot in 5 seconds
|=>
|=> [ 4.878] <INTERRUPT>
|=> [ 5.920] <INTERRUPT>
|=> [ 503.743] d<INTERRUPT>
|=> [ 505.712] <INTERRUPT>
Unfortunately, this means that strategies may not behave as expected
when trying to run commands, as labgrid's console.expect() function will
always find the timestamp in addition to the check strings it sends.
Handle this by adding a strip_timestamp boolean option to the
UBootDriver, which if enabled strips timestamps from received lines when
found.
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>1 parent 38d41d5 commit de3d524
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | | - | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| 49 | + | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
| |||
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
82 | 91 | | |
83 | 92 | | |
84 | 93 | | |
| |||
0 commit comments