RISC-V: Don't add NULL bootargs to device-tree
Signed-off-by: Michael Clark <mjc@sifive.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Palmer Dabbelt <palmer@sifive.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
This commit is contained in:
parent
b6aa6cedf4
commit
7c28f4da20
@ -230,7 +230,9 @@ static void create_fdt(SiFiveUState *s, const struct MemmapEntry *memmap,
|
|||||||
|
|
||||||
qemu_fdt_add_subnode(fdt, "/chosen");
|
qemu_fdt_add_subnode(fdt, "/chosen");
|
||||||
qemu_fdt_setprop_string(fdt, "/chosen", "stdout-path", nodename);
|
qemu_fdt_setprop_string(fdt, "/chosen", "stdout-path", nodename);
|
||||||
|
if (cmdline) {
|
||||||
qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", cmdline);
|
qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", cmdline);
|
||||||
|
}
|
||||||
g_free(nodename);
|
g_free(nodename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,9 +156,11 @@ static void create_fdt(SpikeState *s, const struct MemmapEntry *memmap,
|
|||||||
g_free(cells);
|
g_free(cells);
|
||||||
g_free(nodename);
|
g_free(nodename);
|
||||||
|
|
||||||
|
if (cmdline) {
|
||||||
qemu_fdt_add_subnode(fdt, "/chosen");
|
qemu_fdt_add_subnode(fdt, "/chosen");
|
||||||
qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", cmdline);
|
qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", cmdline);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void spike_v1_10_0_board_init(MachineState *machine)
|
static void spike_v1_10_0_board_init(MachineState *machine)
|
||||||
{
|
{
|
||||||
|
@ -254,7 +254,9 @@ static void *create_fdt(RISCVVirtState *s, const struct MemmapEntry *memmap,
|
|||||||
|
|
||||||
qemu_fdt_add_subnode(fdt, "/chosen");
|
qemu_fdt_add_subnode(fdt, "/chosen");
|
||||||
qemu_fdt_setprop_string(fdt, "/chosen", "stdout-path", nodename);
|
qemu_fdt_setprop_string(fdt, "/chosen", "stdout-path", nodename);
|
||||||
|
if (cmdline) {
|
||||||
qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", cmdline);
|
qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", cmdline);
|
||||||
|
}
|
||||||
g_free(nodename);
|
g_free(nodename);
|
||||||
|
|
||||||
return fdt;
|
return fdt;
|
||||||
|
Loading…
Reference in New Issue
Block a user