Unverified Commit 49dd180e authored by Bin Meng's avatar Bin Meng Committed by Palmer Dabbelt
Browse files

riscv: Resolve full path of the given bios image



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: default avatarBin Meng <bmeng.cn@gmail.com>
Reviewed-by: default avatarAlistair Francis <alistair.francis@wdc.com>
Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
parent 751f8f41
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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);
    }
}