mirror of
https://git.proxmox.com/git/qemu
synced 2025-06-14 12:49:16 +00:00
armv7m: Don't enforce use of kernel for qtest
Adopt error_report(). Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
4bd2f93ff9
commit
5633b90ad4
@ -11,6 +11,8 @@
|
|||||||
#include "hw/arm/arm.h"
|
#include "hw/arm/arm.h"
|
||||||
#include "hw/loader.h"
|
#include "hw/loader.h"
|
||||||
#include "elf.h"
|
#include "elf.h"
|
||||||
|
#include "sysemu/qtest.h"
|
||||||
|
#include "qemu/error-report.h"
|
||||||
|
|
||||||
/* Bitbanded IO. Each word corresponds to a single bit. */
|
/* Bitbanded IO. Each word corresponds to a single bit. */
|
||||||
|
|
||||||
@ -232,21 +234,22 @@ qemu_irq *armv7m_init(MemoryRegion *address_space_mem,
|
|||||||
big_endian = 0;
|
big_endian = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!kernel_filename) {
|
if (!kernel_filename && !qtest_enabled()) {
|
||||||
fprintf(stderr, "Guest image must be specified (using -kernel)\n");
|
fprintf(stderr, "Guest image must be specified (using -kernel)\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
image_size = load_elf(kernel_filename, NULL, NULL, &entry, &lowaddr,
|
if (kernel_filename) {
|
||||||
NULL, big_endian, ELF_MACHINE, 1);
|
image_size = load_elf(kernel_filename, NULL, NULL, &entry, &lowaddr,
|
||||||
if (image_size < 0) {
|
NULL, big_endian, ELF_MACHINE, 1);
|
||||||
image_size = load_image_targphys(kernel_filename, 0, flash_size);
|
if (image_size < 0) {
|
||||||
lowaddr = 0;
|
image_size = load_image_targphys(kernel_filename, 0, flash_size);
|
||||||
}
|
lowaddr = 0;
|
||||||
if (image_size < 0) {
|
}
|
||||||
fprintf(stderr, "qemu: could not load kernel '%s'\n",
|
if (image_size < 0) {
|
||||||
kernel_filename);
|
error_report("Could not load kernel '%s'", kernel_filename);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hack to map an additional page of ram at the top of the address
|
/* Hack to map an additional page of ram at the top of the address
|
||||||
|
Loading…
Reference in New Issue
Block a user