_FDT(fdt_setprop_string(fdt, chosen, "qemu,boot-device", boot_device));
}
- if (!spapr->has_graphics && stdout_path) {
+ if (spapr->want_stdout_path && stdout_path) {
/*
* "linux,stdout-path" and "stdout" properties are
* deprecated by linux kernel. New platforms should only
const char *kernel_filename = machine->kernel_filename;
const char *initrd_filename = machine->initrd_filename;
PCIHostState *phb;
+ bool has_vga;
int i;
MemoryRegion *sysmem = get_system_memory();
long load_limit, fw_size;
}
/* Graphics */
- if (spapr_vga_init(phb->bus, &error_fatal)) {
- spapr->has_graphics = true;
+ has_vga = spapr_vga_init(phb->bus, &error_fatal);
+ if (has_vga) {
+ spapr->want_stdout_path = !machine->enable_graphics;
machine->usb |= defaults_enabled() && !machine->usb_disabled;
+ } else {
+ spapr->want_stdout_path = true;
}
if (machine->usb) {
pci_create_simple(phb->bus, -1, "nec-usb-xhci");
}
- if (spapr->has_graphics) {
+ if (has_vga) {
USBBus *usb_bus = usb_bus_find(-1);
usb_create_simple(usb_bus, "usb-kbd");