aboutsummaryrefslogtreecommitdiff
path: root/board-qemu
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2016-11-10 13:38:23 +0100
committerAlexey Kardashevskiy <aik@ozlabs.ru>2016-11-14 19:13:43 +1100
commit9b8945ecbde65b06ea2ab9e28a6178024b0420fb (patch)
tree30381ce578bed6aea6a6d8481d00717a4d7bfc63 /board-qemu
parent38bf852e73ce6f0ac801dfe8ef1545c4cd0b5ddb (diff)
downloadSLOF-9b8945ecbde65b06ea2ab9e28a6178024b0420fb.zip
SLOF-9b8945ecbde65b06ea2ab9e28a6178024b0420fb.tar.gz
SLOF-9b8945ecbde65b06ea2ab9e28a6178024b0420fb.tar.bz2
board-qemu: Add a possibility to use hvterm input instead of USB keyboard
SLOF automatically switches to USB keyboard input when it detects that a graphics card and USB keyboard are available. However, for debugging VGA or USB related issues, or running QEMU with the "-nographic" parameter, it's more convenient to continue using the hvterm as input. This patch adds the possibility to continue using hvterm if the user sets the "direct-serial?" NVRAM variable to true. "direct-serial?" is currently unused for board-qemu -- it's only used on board-js2x so far for switching the serial ports there, so using this variable for selecting the serial input on board-qemu seems to be a good fit, too. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'board-qemu')
-rw-r--r--board-qemu/slof/OF.fs13
1 files changed, 10 insertions, 3 deletions
diff --git a/board-qemu/slof/OF.fs b/board-qemu/slof/OF.fs
index 1406506..5959003 100644
--- a/board-qemu/slof/OF.fs
+++ b/board-qemu/slof/OF.fs
@@ -231,9 +231,16 @@ romfs-base 400000 0 ' claim CATCH IF ." claim failed!" cr 2drop THEN drop
" screen" find-alias dup IF nip THEN
" keyboard" find-alias dup IF nip THEN
AND IF
- ." using screen & keyboard" cr
- " screen" output
- " keyboard" input
+ ." using screen "
+ s" direct-serial?" evaluate IF
+ ." & hvterm"
+ s" hvterm" input
+ ELSE
+ ." & keyboard"
+ s" keyboard" input
+ THEN
+ cr
+ s" screen" output
ELSE
" hvterm" find-alias IF
drop