[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] hw/arm: remove exit(1) in case of missing ROM
From: |
Pavel Dovgalyuk |
Subject: |
[PATCH 2/2] hw/arm: remove exit(1) in case of missing ROM |
Date: |
Wed, 15 Jul 2020 13:19:17 +0300 |
User-agent: |
StGit/0.17.1-dirty |
This patch updates ARM-based machines to allow starting them without ROM.
In this case CPU starts to execute instructions from the empty memory,
but QEMU allows introspecting the machine configuration.
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
---
0 files changed
diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c
index b6452d918c..dbad63ffa2 100644
--- a/hw/arm/digic_boards.c
+++ b/hw/arm/digic_boards.c
@@ -102,8 +102,12 @@ static void digic_load_rom(DigicState *s, hwaddr addr,
char *fn = qemu_find_file(QEMU_FILE_TYPE_BIOS, filename);
if (!fn) {
- error_report("Couldn't find rom image '%s'.", filename);
- exit(1);
+ if (bios_name) {
+ error_report("Couldn't find rom image '%s'.", filename);
+ exit(1);
+ } else {
+ return;
+ }
}
rom_size = load_image_targphys(fn, addr, max_size);
diff --git a/hw/arm/gumstix.c b/hw/arm/gumstix.c
index 3a4bc332c4..a74bb5e27c 100644
--- a/hw/arm/gumstix.c
+++ b/hw/arm/gumstix.c
@@ -60,9 +60,8 @@ static void connex_init(MachineState *machine)
dinfo = drive_get(IF_PFLASH, 0, 0);
if (!dinfo && !qtest_enabled()) {
- error_report("A flash image must be given with the "
- "'pflash' parameter");
- exit(1);
+ warn_report("A flash image must be given with the "
+ "'pflash' parameter");
}
if (!pflash_cfi01_register(0x00000000, "connext.rom", connex_rom,
@@ -90,9 +89,8 @@ static void verdex_init(MachineState *machine)
dinfo = drive_get(IF_PFLASH, 0, 0);
if (!dinfo && !qtest_enabled()) {
- error_report("A flash image must be given with the "
- "'pflash' parameter");
- exit(1);
+ warn_report("A flash image must be given with the "
+ "'pflash' parameter");
}
if (!pflash_cfi01_register(0x00000000, "verdex.rom", verdex_rom,
diff --git a/hw/arm/omap_sx1.c b/hw/arm/omap_sx1.c
index 57829b3744..c0ed3d93e9 100644
--- a/hw/arm/omap_sx1.c
+++ b/hw/arm/omap_sx1.c
@@ -191,13 +191,12 @@ static void sx1_init(MachineState *machine, const int
version)
}
if (!machine->kernel_filename && !fl_idx && !qtest_enabled()) {
- error_report("Kernel or Flash image must be specified");
- exit(1);
+ warn_report("Kernel or Flash image must be specified");
+ } else {
+ /* Load the kernel. */
+ arm_load_kernel(mpu->cpu, machine, &sx1_binfo);
}
- /* Load the kernel. */
- arm_load_kernel(mpu->cpu, machine, &sx1_binfo);
-
/* TODO: fix next line */
//~ qemu_console_resize(ds, 640, 480);
}
diff --git a/hw/arm/palm.c b/hw/arm/palm.c
index 97ca105d29..d4f4a8d07a 100644
--- a/hw/arm/palm.c
+++ b/hw/arm/palm.c
@@ -257,12 +257,11 @@ static void palmte_init(MachineState *machine)
}
if (!rom_loaded && !machine->kernel_filename && !qtest_enabled()) {
- fprintf(stderr, "Kernel or ROM image must be specified\n");
- exit(1);
+ warn_report("Kernel or ROM image must be specified");
+ } else {
+ /* Load the kernel. */
+ arm_load_kernel(mpu->cpu, machine, &palmte_binfo);
}
-
- /* Load the kernel. */
- arm_load_kernel(mpu->cpu, machine, &palmte_binfo);
}
static void palmte_machine_init(MachineClass *mc)