@@ -284,6 +284,8 @@ static void create_fdt(VirtMachineState *vms)
}
}
+ qemu_fdt_add_subnode(fdt, "/aliases");
+
/* Clock node, for the benefit of the UART. The kernel device tree
* binding documentation claims the PL011 node clock properties are
* optional but in practice if you omit them the kernel refuses to
@@ -939,7 +941,9 @@ static void create_uart(const VirtMachineState *vms, int uart,
if (uart == VIRT_UART) {
qemu_fdt_setprop_string(ms->fdt, "/chosen", "stdout-path", nodename);
+ qemu_fdt_setprop_string(ms->fdt, "/aliases", "serial0", nodename);
} else {
+ qemu_fdt_setprop_string(ms->fdt, "/aliases", "serial1", nodename);
/* Mark as not usable by the normal world */
qemu_fdt_setprop_string(ms->fdt, nodename, "status", "disabled");
qemu_fdt_setprop_string(ms->fdt, nodename, "secure-status", "okay");