diff --git a/hw/riscv/esp32_c3.c b/hw/riscv/esp32_c3.c index 28564da058f45ebe666a615256465913a2dda1fa..5dc308703c12360e1c99bbf9ff4b85d5eef0cd56 100644 --- a/hw/riscv/esp32_c3.c +++ b/hw/riscv/esp32_c3.c @@ -73,6 +73,24 @@ static void esp32_c3_machine_state_init(MachineState *mstate) error_report("This board can't load firmware"); exit(1); } + + if (mstate->kernel_filename) { + // Can't load a Linux-style kernel on an MCU + error_report("-device loader,file=<filename> must be used instead of -kernel"); + exit(1); + } + + if (mstate->fdt) { + // Can't load a device tree on an MCU + error_report("-dtb is not supported on this board"); + exit(1); + } + + if (mstate->initrd_filename) { + // Can't load an initrd on an MCU + error_report("-initrd is not supported on this board"); + exit(1); + } } static void esp32_c3_machine_instance_init(Object *obj)