[PATCH 1/4] hw/ppc/pegasos2: Add /chosen/stdin node with VOF

BALATON Zoltan posted 4 patches 3 months, 2 weeks ago
Maintainers: BALATON Zoltan <balaton@eik.bme.hu>, Paolo Bonzini <pbonzini@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Chinmay Rath <rathc@linux.ibm.com>
[PATCH 1/4] hw/ppc/pegasos2: Add /chosen/stdin node with VOF
Posted by BALATON Zoltan 3 months, 2 weeks ago
Some very old Linux kernels fail to start if /chosen/stdin is not
found so add it to the device tree when using VOF.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
 hw/ppc/pegasos2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c
index 93696ed381..21299dde3c 100644
--- a/hw/ppc/pegasos2.c
+++ b/hw/ppc/pegasos2.c
@@ -565,6 +565,7 @@ static void pegasos_machine_reset(MachineState *machine, ResetType type)
     qemu_fdt_setprop(fdt, "/chosen", "qemu,boot-kernel", d, sizeof(d));
 
     vof_build_dt(fdt, pm->vof);
+    vof_client_open_store(fdt, pm->vof, "/chosen", "stdin", "/failsafe");
     vof_client_open_store(fdt, pm->vof, "/chosen", "stdout", "/failsafe");
 
     /* Set machine->fdt for 'dumpdtb' QMP/HMP command */
-- 
2.41.3
Re: [PATCH 1/4] hw/ppc/pegasos2: Add /chosen/stdin node with VOF
Posted by Harsh Prateek Bora 3 months, 1 week ago

On 10/25/25 05:01, BALATON Zoltan wrote:
> Some very old Linux kernels fail to start if /chosen/stdin is not
> found so add it to the device tree when using VOF.
> 
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---
>   hw/ppc/pegasos2.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c
> index 93696ed381..21299dde3c 100644
> --- a/hw/ppc/pegasos2.c
> +++ b/hw/ppc/pegasos2.c
> @@ -565,6 +565,7 @@ static void pegasos_machine_reset(MachineState *machine, ResetType type)
>       qemu_fdt_setprop(fdt, "/chosen", "qemu,boot-kernel", d, sizeof(d));
>   
>       vof_build_dt(fdt, pm->vof);
> +    vof_client_open_store(fdt, pm->vof, "/chosen", "stdin", "/failsafe");

Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>

>       vof_client_open_store(fdt, pm->vof, "/chosen", "stdout", "/failsafe");
>   
>       /* Set machine->fdt for 'dumpdtb' QMP/HMP command */