[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH] Workaround to bypass default qemu boot devices pa
From: |
Alexander Graf |
Subject: |
Re: [Qemu-ppc] [PATCH] Workaround to bypass default qemu boot devices passed to SLOF |
Date: |
Fri, 5 Oct 2012 12:24:47 +0200 |
On 05.10.2012, at 10:29, Avik Sil <address@hidden> wrote:
> Hi David,
>
> Please find below the patch for working around the default boot device issue
> currently being discussed on the list.
>
> Regards,
> Avik
> ---
>
> The default qemu boot_devices string passed to firmware is "cad"
> which creates a confusion whether -boot oprion is specified or
> not. This patch handles this issue by setting a global flag when
> no -boot option is specified.
Hrm. How does x86 distinguish between -boot and bootindex=?
Also, we could just map -boot c to "nvram given boot device or first
automatically found disk". Then there's no need to know whether a default was
given. If you specify -boot you most likely want to force cd-rom or network
boot anyway and there is no way to tell which disk 'c' would reflect.
Alex
>
> Signed-off-by: Avik Sil <address@hidden>
> ---
> hw/spapr.c | 3 ++-
> sysemu.h | 1 +
> vl.c | 2 ++
> 3 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/hw/spapr.c b/hw/spapr.c
> index e6bf522..673bcc8 100644
> --- a/hw/spapr.c
> +++ b/hw/spapr.c
> @@ -284,7 +284,8 @@ static void *spapr_create_fdt_skel(const char *cpu_model,
>
> _FDT((fdt_property(fdt, "qemu,boot-kernel", &kprop, sizeof(kprop))));
> }
> - _FDT((fdt_property_string(fdt, "qemu,boot-device", boot_device)));
> + if (!default_boot_order)
> + _FDT((fdt_property_string(fdt, "qemu,boot-device", boot_device)));
> _FDT((fdt_property_cell(fdt, "qemu,graphic-width", graphic_width)));
> _FDT((fdt_property_cell(fdt, "qemu,graphic-height", graphic_height)));
> _FDT((fdt_property_cell(fdt, "qemu,graphic-depth", graphic_depth)));
> diff --git a/sysemu.h b/sysemu.h
> index 65552ac..f0822b4 100644
> --- a/sysemu.h
> +++ b/sysemu.h
> @@ -129,6 +129,7 @@ extern int no_shutdown;
> extern int semihosting_enabled;
> extern int old_param;
> extern int boot_menu;
> +extern int default_boot_order;
> extern uint8_t *boot_splash_filedata;
> extern int boot_splash_filedata_size;
> extern uint8_t qemu_extra_params_fw[2];
> diff --git a/vl.c b/vl.c
> index 48049ef..bf369e6 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -230,6 +230,7 @@ int ctrl_grab = 0;
> unsigned int nb_prom_envs = 0;
> const char *prom_envs[MAX_PROM_ENVS];
> int boot_menu;
> +int default_boot_order = 1;
> uint8_t *boot_splash_filedata;
> int boot_splash_filedata_size;
> uint8_t qemu_extra_params_fw[2];
> @@ -2668,6 +2669,7 @@ int main(int argc, char **argv, char **envp)
> qemu_opts_parse(qemu_find_opts("boot-opts"),
> optarg, 0);
> }
> + default_boot_order = 0;
> }
> break;
> case QEMU_OPTION_fda:
> --
> 1.7.11.4
>
>
- [Qemu-ppc] [PATCH] Workaround to bypass default qemu boot devices passed to SLOF, Avik Sil, 2012/10/05
- Re: [Qemu-ppc] [PATCH] Workaround to bypass default qemu boot devices passed to SLOF,
Alexander Graf <=
- Re: [Qemu-ppc] [PATCH] Workaround to bypass default qemu boot devices passed to SLOF, Nikunj A Dadhania, 2012/10/05
- Re: [Qemu-ppc] [PATCH] Workaround to bypass default qemu boot devices passed to SLOF, Alexander Graf, 2012/10/05
- Re: [Qemu-ppc] [PATCH] Workaround to bypass default qemu boot devices passed to SLOF, Avik Sil, 2012/10/05
- Re: [Qemu-ppc] [PATCH] Workaround to bypass default qemu boot devices passed to SLOF, Alexander Graf, 2012/10/05
- Re: [Qemu-ppc] [Qemu-devel] [PATCH] Workaround to bypass default qemu boot devices passed to SLOF, Anthony Liguori, 2012/10/05
- Re: [Qemu-ppc] [Qemu-devel] [PATCH] Workaround to bypass default qemu boot devices passed to SLOF, Alexander Graf, 2012/10/05
- Re: [Qemu-ppc] [Qemu-devel] [PATCH] Workaround to bypass default qemu boot devices passed to SLOF, Nikunj A Dadhania, 2012/10/05
- Re: [Qemu-ppc] [PATCH] Workaround to bypass default qemu boot devices passed to SLOF, Nikunj A Dadhania, 2012/10/05
- Re: [Qemu-ppc] [PATCH] Workaround to bypass default qemu boot devices passed to SLOF, Nikunj A Dadhania, 2012/10/05