X-Git-Url: https://repo.jachan.dev/qemu.git/blobdiff_plain/e9acb8cea9b11679cab8cb3c20c4348803bbb58a..f214530f56b99be507e40cc261c9616ec84b72d3:/hw/unicore32/puv3.c diff --git a/hw/unicore32/puv3.c b/hw/unicore32/puv3.c index 5ff0dc9a07..42913b6a5a 100644 --- a/hw/unicore32/puv3.c +++ b/hw/unicore32/puv3.c @@ -17,6 +17,7 @@ #include "hw/boards.h" #include "hw/loader.h" #include "hw/i386/pc.h" +#include "sysemu/qtest.h" #undef DEBUG_PUV3 #include "hw/unicore32/puv3.h" @@ -84,6 +85,9 @@ static void puv3_load_kernel(const char *kernel_filename) { int size; + if (kernel_filename == NULL && qtest_enabled()) { + return; + } assert(kernel_filename != NULL); /* only zImage format supported */ @@ -94,7 +98,7 @@ static void puv3_load_kernel(const char *kernel_filename) } /* cheat curses that we have a graphic console, only under ocd console */ - graphic_console_init(NULL, &no_ops, NULL); + graphic_console_init(NULL, 0, &no_ops, NULL); } static void puv3_init(QEMUMachineInitArgs *args) @@ -128,7 +132,6 @@ static QEMUMachine puv3_machine = { .desc = "PKUnity Version-3 based on UniCore32", .init = puv3_init, .is_default = 1, - DEFAULT_MACHINE_OPTIONS, }; static void puv3_machine_init(void)