From: Alistair Francis <alistair23@gmail.com>
To: Bin Meng <bmeng.cn@gmail.com>
Cc: "open list:RISC-V" <qemu-riscv@nongnu.org>,
Sagar Karandikar <sagark@eecs.berkeley.edu>,
Bastian Koppelmann <kbastian@mail.uni-paderborn.de>,
Palmer Dabbelt <palmer@sifive.com>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
Alistair Francis <Alistair.Francis@wdc.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] riscv: Resolve full path of the given bios image
Date: Tue, 20 Aug 2019 11:40:26 -0700 [thread overview]
Message-ID: <CAKmqyKMBLdPrcvFvR5x=1d=tkDYmhV7uLeXq18F7jPrQHXOUYg@mail.gmail.com> (raw)
In-Reply-To: <1565960976-6693-3-git-send-email-bmeng.cn@gmail.com>
On Fri, Aug 16, 2019 at 6:11 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> At present when "-bios image" is supplied, we just use the straight
> path without searching for the configured data directories. Like
> "-bios default", we add the same logic so that "-L" actually works.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
>
> ---
>
> hw/riscv/boot.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/riscv/boot.c b/hw/riscv/boot.c
> index a122846..15002d3 100644
> --- a/hw/riscv/boot.c
> +++ b/hw/riscv/boot.c
> @@ -72,14 +72,14 @@ void riscv_find_and_load_firmware(MachineState *machine,
> firmware_filename = riscv_find_firmware(default_machine_firmware);
> } else {
> firmware_filename = machine->firmware;
> + if (strcmp(firmware_filename, "none")) {
> + firmware_filename = riscv_find_firmware(firmware_filename);
> + }
> }
>
> if (strcmp(firmware_filename, "none")) {
> /* If not "none" load the firmware */
> riscv_load_firmware(firmware_filename, firmware_load_addr);
> - }
> -
> - if (!strcmp(machine->firmware, "default")) {
> g_free(firmware_filename);
> }
> }
> --
> 2.7.4
>
>
next prev parent reply other threads:[~2019-08-20 18:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-16 13:09 [Qemu-devel] [PATCH 0/2] riscv: Fix "-L" not working for bios image search path Bin Meng
2019-08-16 13:09 ` [Qemu-devel] [PATCH 1/2] riscv: Add a helper routine for finding firmware Bin Meng
2019-08-16 13:09 ` [Qemu-devel] [PATCH 2/2] riscv: Resolve full path of the given bios image Bin Meng
2019-08-20 18:40 ` Alistair Francis [this message]
2019-08-26 23:48 ` [Qemu-devel] [PATCH 0/2] riscv: Fix "-L" not working for bios image search path Palmer Dabbelt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKmqyKMBLdPrcvFvR5x=1d=tkDYmhV7uLeXq18F7jPrQHXOUYg@mail.gmail.com' \
--to=alistair23@gmail.com \
--cc=Alistair.Francis@wdc.com \
--cc=bmeng.cn@gmail.com \
--cc=kbastian@mail.uni-paderborn.de \
--cc=palmer@sifive.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=sagark@eecs.berkeley.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).