Use linux,stdout-path to find the console

Currently the hvterm code just picks an arbitrary vty to use as the
console. It would be preferable under QEMU if we could use
linux,stdout-path.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
This commit is contained in:
Michael Ellerman 2011-11-29 11:49:46 +11:00 committed by Thomas Huth
parent f7504aec1b
commit 4516a322be
1 changed files with 13 additions and 3 deletions

View File

@ -158,6 +158,16 @@ s" /mmu" open-dev encode-int s" mmu" set-chosen
#include <term-io.fs>
" hvterm" find-alias IF drop
" hvterm" io
THEN
: set-default-console
s" linux,stdout-path" get-chosen IF
decode-string
." Using default console: " 2dup type cr
io
2drop
ELSE
" hvterm" find-alias IF drop
" hvterm" io
THEN
THEN
;
set-default-console