Message ID | 1409317439-29349-1-git-send-email-ard.biesheuvel@linaro.org |
---|---|
State | Superseded |
Headers | show |
On Fri, Aug 29, 2014 at 8:03 AM, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote: > 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 <ard.biesheuvel@linaro.org> I have this same patch in my tree. BTW, you do still need just "earlycon" on the command-line to get an early console. Reviewed-by: Rob Herring <rob.herring@linaro.org> Rob > --- > hw/arm/virt.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/arm/virt.c b/hw/arm/virt.c > index 0edc1fa6cb22..619660a011b0 100644 > --- a/hw/arm/virt.c > +++ b/hw/arm/virt.c > @@ -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 >
On 29 August 2014 14:03, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote: > 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 <ard.biesheuvel@linaro.org> > --- > hw/arm/virt.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/arm/virt.c b/hw/arm/virt.c > index 0edc1fa6cb22..619660a011b0 100644 > --- a/hw/arm/virt.c > +++ b/hw/arm/virt.c > @@ -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
diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 0edc1fa6cb22..619660a011b0 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -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); }
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 <ard.biesheuvel@linaro.org> --- hw/arm/virt.c | 2 ++ 1 file changed, 2 insertions(+)