If no display device has been installed in the DT e.g. passing -vga none into the QEMU command line then fall back to using the serial console as already occurs when launching QEMU in -nographic mode.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- arch/sparc32/openbios.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/arch/sparc32/openbios.c b/arch/sparc32/openbios.c index 78005e0..9ec28bf 100644 --- a/arch/sparc32/openbios.c +++ b/arch/sparc32/openbios.c @@ -758,8 +758,16 @@ static void setup_stdio(void) { char nographic; const char *stdin, *stdout; + phandle_t display_ph;
fw_cfg_read(FW_CFG_NOGRAPHIC, &nographic, 1); + + /* Check to see if any framebuffer present */ + display_ph = dt_iterate_type(0, "display"); + if (display_ph == 0) { + nographic = 1; + } + if (nographic) { obp_stdin = PROMDEV_TTYA; obp_stdout = PROMDEV_TTYA;