@@ -28,6 +28,37 @@ Get Boot Menu Construction
28
28
# ENTER to select boot device
29
29
# ESC to exit
30
30
${construction } = Parse Menu Snapshot Into Construction ${menu } 1 3
31
+ # The maximum number of entries in boot menu is 11 right now. When we have
32
+ # more, the list can be scrolled.
33
+ # TODO: Is there a better way of checking if the list can be scrolled?
34
+ # The UP/DOWN arrows are not drawn on serial on the first readout of
35
+ # the menu, it seems.
36
+ ${no_entries } = Get Length ${construction }
37
+ IF ${no_entries } == 11
38
+ # 1. Remember first and last entries (last entry in the first screen)
39
+ ${first_entry } = Get From List ${construction } 0
40
+
41
+ # 2. Go down by 10 entries
42
+ Press Key N Times 10 ${ARROW_DOWN }
43
+ Sleep 1s
44
+ Read From Terminal
45
+ # 3. Keep going down one by one, until we reach the first_entry again
46
+ FOR ${iter } IN RANGE 0 100
47
+ Press Key N Times 1 ${ARROW_DOWN }
48
+ ${out } = Read From Terminal Until Regexp > .*
49
+ Log ${out }
50
+ ${lines } = Split To Lines ${out }
51
+ ${entry } = Get From List ${lines } -1
52
+ ${entry } = Strip String ${entry }
53
+ ${entry } = Strip String ${entry } characters=>
54
+ ${entry } = Strip String ${entry }
55
+ IF '${entry } ' != '${first_entry } '
56
+ Append To List ${construction } ${entry }
57
+ ELSE
58
+ BREAK
59
+ END
60
+ END
61
+ END
31
62
RETURN ${construction }
32
63
33
64
Enter Boot Menu Tianocore And Return Construction
0 commit comments