Signed-off-by: Wayne Xia xiawenc@linux.vnet.ibm.com --- src/boot.c | 26 +++++++++++++++++++++++++- 1 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/src/boot.c b/src/boot.c index 9a67916..cca60bc 100644 --- a/src/boot.c +++ b/src/boot.c @@ -372,8 +372,32 @@ boot_add_cbfs(void *data, const char *desc, int prio) static void interactive_bootmenu(void) { - if (! CONFIG_BOOTMENU || ! qemu_cfg_show_boot_menu()) + int filecfg_size; + u8 *filecfg_p = romfile_loadfile("qemu_extra_params_fw.cfg", &filecfg_size); + u16 splash_time = 0; + + if (filecfg_p != NULL && filecfg_size >= 2) { + splash_time = *(filecfg_p+0)+(*(filecfg_p+1)<<8); /* little endian */ + free(filecfg_p); + } + + /* the user do not want to show the menu, so normally bootup */ + if (!qemu_cfg_show_boot_menu()) { + if (splash_time > 0) { + while (get_keystroke(0) >= 0) + ; + enable_bootsplash(); + get_keystroke(splash_time); + disable_bootsplash(); + } return; + } else { + /* user want to show menu, check the if the bios config allow it */ + if (!CONFIG_BOOTMENU) { + return; + } + } +
while (get_keystroke(0) >= 0) ;