diff options
author | wayne <xiawenc@linux.vnet.ibm.com> | 2011-07-27 18:04:55 +0800 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-07-29 08:25:44 -0500 |
commit | 3d3b8303c6f83b9b245bc774af530a6403cc4ce6 (patch) | |
tree | 3c5dabbe00cf7422abe75a0c8bc2b00a536530e4 /vl.c | |
parent | 6da48311bbd884da4d0a4ae03b0fc7a78981a5f4 (diff) |
showing a splash picture when start
Added options to let qemu transfer two configuration files to bios:
"bootsplash.bmp" and "etc/boot-menu-wait", which could be specified by command
-boot splash=P,splash-time=T
P is jpg/bmp file name or an absolute path, T have a max value of 0xffff, unit
is ms. With these two options, if user invoke qemu with menu=on option, then
a splash picture would be showed in a given time. For example:
qemu -boot menu=on,splash=/root/boot.bmp,splash-time=5000
would make boot.bmp shown as a brand with 5 seconds in the booting up process.
This feature need the new seabios's support, which could be got from git.
Signed-off-by: Wayne Xia <xiawenc@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -228,6 +228,9 @@ int ctrl_grab = 0; unsigned int nb_prom_envs = 0; const char *prom_envs[MAX_PROM_ENVS]; int boot_menu; +uint8_t *boot_splash_filedata; +int boot_splash_filedata_size; +uint8_t qemu_extra_params_fw[2]; typedef struct FWBootEntry FWBootEntry; @@ -293,6 +296,14 @@ static struct { { .driver = "qxl-vga", .flag = &default_vga }, }; +static void res_free(void) +{ + if (boot_splash_filedata != NULL) { + qemu_free(boot_splash_filedata); + boot_splash_filedata = NULL; + } +} + static int default_driver_check(QemuOpts *opts, void *opaque) { const char *driver = qemu_opt_get(opts, "driver"); @@ -2330,7 +2341,8 @@ int main(int argc, char **argv, char **envp) case QEMU_OPTION_boot: { static const char * const params[] = { - "order", "once", "menu", NULL + "order", "once", "menu", + "splash", "splash-time", NULL }; char buf[sizeof(boot_devices)]; char *standard_boot_devices; @@ -2373,6 +2385,8 @@ int main(int argc, char **argv, char **envp) exit(1); } } + qemu_opts_parse(qemu_find_opts("boot-opts"), + optarg, 0); } } break; @@ -3335,6 +3349,7 @@ int main(int argc, char **argv, char **envp) main_loop(); quit_timers(); net_cleanup(); + res_free(); return 0; } |