diff options
author | Michael Clark <mjc@sifive.com> | 2018-05-22 13:33:28 +1200 |
---|---|---|
committer | Palmer Dabbelt <palmer@sifive.com> | 2018-10-17 13:02:30 -0700 |
commit | 7c28f4da20e5585dce7d575691dac5392b7c6f78 (patch) | |
tree | 2163ddc62dbdfcb5e0fa6d341441a7629d7b3652 /hw/riscv/spike.c | |
parent | b6aa6cedf481b46beb7e49c85ab52fdbb3abcf8e (diff) |
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>
Diffstat (limited to 'hw/riscv/spike.c')
-rw-r--r-- | hw/riscv/spike.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c index be5ef85e81..8a712ed490 100644 --- a/hw/riscv/spike.c +++ b/hw/riscv/spike.c @@ -156,8 +156,10 @@ static void create_fdt(SpikeState *s, const struct MemmapEntry *memmap, g_free(cells); g_free(nodename); - qemu_fdt_add_subnode(fdt, "/chosen"); - qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", cmdline); + if (cmdline) { + qemu_fdt_add_subnode(fdt, "/chosen"); + qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", cmdline); + } } static void spike_v1_10_0_board_init(MachineState *machine) |