[SeaBIOS] [PATCH v2 2/2] Boot up with a splash picture configurable, make the showing time configurable
Wayne Xia
xiawenc at linux.vnet.ibm.com
Fri Jun 24 14:00:29 CEST 2011
Signed-off-by: Wayne Xia <xiawenc at linux.vnet.ibm.com>
---
src/boot.c | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/src/boot.c b/src/boot.c
index f3c165c..a76da4f 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -381,8 +381,31 @@ 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)
;
--
1.7.6.rc1.1.g2c162b
More information about the SeaBIOS
mailing list