hw/arm/virt: add linux, stdout-path to /chosen DT node
PATCH 1/1 hw/arm/virt: add linux, stdout-path to /chosen DT node
Add a property "linux,stdout-path" to the /chosen DT node and make it point to the emulated UART. This allows users such as the Linux kernel to produce console output without the need to pass console= or earlycon=pl011,0x... command line arguments.
--- hw/arm/virt.c | 2 ++ 1 file changed, 2 insertions(+)
hw/arm/virt.c +2 -0
@@ -377,6 +377,8 @@ static void create_uart(const VirtBoardInfo *vbi, qemu_irq *pic) vbi->clock_phandle, vbi->clock_phandle);qemu_fdt_setprop (vbi->fdt, nodename,"clock-names" , clocknames,sizeof (clocknames)); + +qemu_fdt_setprop_string (vbi->fdt,"/chosen" ,"linux,stdout-path" , nodename);g_free (nodename); }
Signature · 1 line
1.8.3.2
Quoted 6 lines · Ard Biesheuvel
Add a property "linux,stdout-path" to the /chosen DT node and make it point to the emulated UART. This allows users such as the Linux kernel to produce console output without the need to pass console= or earlycon=pl011,0x... command line arguments.
Signed-off-by Ard Biesheuvel <[email protected]>
I have this same patch in my tree. BTW, you do still need just "earlycon" on the command-line to get an early console.
Rob
Quoted 20 lines
--- hw/arm/virt.c | 2 ++ 1 file changed, 2 insertions(+)hw/arm/virt.c +2
-1@@ -377,6 +377,8 @@ static void create_uart(const VirtBoardInfo *vbi, qemu_irq *pic) vbi->clock_phandle, vbi->clock_phandle);qemu_fdt_setprop (vbi->fdt, nodename,"clock-names" , clocknames,sizeof (clocknames)); + +qemu_fdt_setprop_string (vbi->fdt,"/chosen" ,"linux,stdout-path" , nodename);g_free (nodename); } --1.8.3.2
Peter Maydell
AppliedQuoted 15 lines · Ard Biesheuvel
Add a property "linux,stdout-path" to the /chosen DT node and make it point to the emulated UART. This allows users such as the Linux kernel to produce console output without the need to pass console= or earlycon=pl011,0x... command line arguments.
Signed-off-by Ard Biesheuvel <[email protected]>--- hw/arm/virt.c | 2 ++ 1 file changed, 2 insertions(+)hw/arm/virt.c +0
-0
hw/arm/virt.c static void create_uart(const VirtBoardInfo *vbi, qemu_irq *pic) · line 383
Quoted 7 lines
hw/arm/virt.c +2
-0@@ -377,6 +377,8 @@ static void create_uart(const VirtBoardInfo *vbi, qemu_irq *pic) vbi->clock_phandle, vbi->clock_phandle);qemu_fdt_setprop (vbi->fdt, nodename,"clock-names" , clocknames,sizeof (clocknames)); + +qemu_fdt_setprop_string (vbi->fdt,"/chosen" ,"linux,stdout-path" , nodename);g_free (nodename); }
Applied to target-arm.next, thanks.
-- PMM