[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 1/7] leon3: fix the error message when no bios ar
From: |
KONRAD Frederic |
Subject: |
[Qemu-devel] [PATCH v3 1/7] leon3: fix the error message when no bios are provided |
Date: |
Wed, 15 May 2019 14:31:27 +0200 |
The leon3 board is looking for u-boot.bin by default (LEON3_PROM_FILENAME)..
But in the case this file is not found and no other file are given on the
command line we get the following error:
$ ./qemu-system-sparc -M leon3_generic
qemu-system-sparc: Can't read bios image (null)
So use LEON3_PROM_FILENAME instead of filename in case it is NULL to get a
less cryptic message:
$ ./qemu-system-sparc -M leon3_generic
qemu-system-sparc: Can't read bios image 'u-boot.bin'
Suggested-by: Mark Cave-Ayland <address@hidden>
Signed-off-by: KONRAD Frederic <address@hidden>
---
hw/sparc/leon3.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
index 0383b17..f438718 100644
--- a/hw/sparc/leon3.c
+++ b/hw/sparc/leon3.c
@@ -1,7 +1,7 @@
/*
* QEMU Leon3 System Emulator
*
- * Copyright (c) 2010-2011 AdaCore
+ * Copyright (c) 2010-2019 AdaCore
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
deal
@@ -43,7 +43,7 @@
/* Default system clock. */
#define CPU_CLK (40 * 1000 * 1000)
-#define PROM_FILENAME "u-boot.bin"
+#define LEON3_PROM_FILENAME "u-boot.bin"
#define MAX_PILS 16
@@ -158,7 +158,7 @@ static void leon3_generic_hw_init(MachineState *machine)
/* Load boot prom */
if (bios_name == NULL) {
- bios_name = PROM_FILENAME;
+ bios_name = LEON3_PROM_FILENAME;
}
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
@@ -180,7 +180,9 @@ static void leon3_generic_hw_init(MachineState *machine)
exit(1);
}
} else if (kernel_filename == NULL && !qtest_enabled()) {
- error_report("Can't read bios image %s", filename);
+ error_report("Can't read bios image '%s'", filename
+ ? filename
+ : LEON3_PROM_FILENAME);
exit(1);
}
g_free(filename);
--
1.8.3.1
- [Qemu-devel] [PATCH v3 0/7] Leon3 patches, KONRAD Frederic, 2019/05/15
- [Qemu-devel] [PATCH v3 1/7] leon3: fix the error message when no bios are provided,
KONRAD Frederic <=
- [Qemu-devel] [PATCH v3 7/7] MAINTAINERS: add myself for leon3, KONRAD Frederic, 2019/05/15
- [Qemu-devel] [PATCH v3 4/7] grlib, apbuart: get rid of the old-style create function, KONRAD Frederic, 2019/05/15
- [Qemu-devel] [PATCH v3 3/7] grlib, gptimer: get rid of the old-style create function, KONRAD Frederic, 2019/05/15
- [Qemu-devel] [PATCH v3 6/7] leon3: introduce the plug and play mechanism, KONRAD Frederic, 2019/05/15
- [Qemu-devel] [PATCH v3 5/7] leon3: add a little bootloader, KONRAD Frederic, 2019/05/15
- [Qemu-devel] [PATCH v3 2/7] grlib, irqmp: get rid of the old-style create function, KONRAD Frederic, 2019/05/15
- Re: [Qemu-devel] [PATCH v3 0/7] Leon3 patches, Mark Cave-Ayland, 2019/05/17