kvm:showing a splash picture when start, code change
PATCH v2 1/3 kvm:showing a splash picture when start, code change
Signed-off-by Wayne Xia <[email protected]>
--- Makefile | 3 +- hw/fw_cfg.c | 131 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- qemu-config.c | 27 ++++++++++++ sysemu.h | 3 + vl.c | 17 +++++++- 5 files changed, 178 insertions(+), 3 deletions(-)
Makefile +2 -1
@@ -188,7 +188,8 @@ bamboo.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \ mpc8544ds.dtb \ multiboot.bin linuxboot.bin \ s390-zipl.rom \ -spapr-rtas.bin slof.bin +spapr-rtas.bin slof.bin \ +bootsplash.bmp BLOBS += extboot.bin BLOBS += vapic.bin else
hw/fw_cfg.c +130 -1
149 lines not on this page · raw message
qemu-config.c +27 -0
@@ -473,6 +473,32 @@ static QemuOptsList qemu_machine_opts = { }, }; +QemuOptsList qemu_bootsplash_opts = { + .name ="bootsplash" , + .head =QTAILQ_HEAD_INITIALIZER (qemu_bootsplash_opts.head), + .desc = { +/* the three names below is not used now */ + { + .name ="order" , + .type =QEMU_OPT_STRING , + }, { + .name ="once" , + .type =QEMU_OPT_STRING , + }, { + .name ="menu" , + .type =QEMU_OPT_STRING , +/* following are really used */ + }, { + .name ="splash_time" , + .type =QEMU_OPT_STRING , + }, { + .name ="splash_filename" , + .type =QEMU_OPT_STRING , + }, + {/*End of list */ } + }, +}; +static QemuOptsList *vm_config_groups[32 ] = { &qemu_drive_opts, &qemu_chardev_opts,
@@ -488,6 +514,7 @@ static QemuOptsList *vm_config_groups[32] = {#endif &qemu_option_rom_opts, &qemu_machine_opts, + &qemu_bootsplash_opts, NULL, };
sysemu.h +3 -0
@@ -119,6 +119,9 @@ extern int no_shutdown;extern int semihosting_enabled;extern int old_param;extern int boot_menu; +extern uint8_t *boot_splash_filedata; +extern int boot_splash_filedata_size; +extern uint8_t qemu_extra_params_fw[4 ];extern QEMUClock *rtc_clock;extern long hpagesize;
vl.c +16 -1
@@ -231,6 +231,9 @@ unsigned int nb_prom_envs = 0;const char *prom_envs[MAX_PROM_ENVS ];const char *nvram =NULL ;int boot_menu; +uint8_t *boot_splash_filedata; +int boot_splash_filedata_size; +uint8_t qemu_extra_params_fw[4 ];typedef struct FWBootEntry FWBootEntry ;
@@ -296,6 +299,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" );
@@ -2309,7 +2320,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_time" ,"splash_filename" ,NULL };char buf[sizeof (boot_devices)];char *standard_boot_devices;
@@ -2352,6 +2364,8 @@ int main(int argc, char **argv, char **envp)exit (1 ); } } +qemu_opts_parse (qemu_find_opts ("bootsplash" ), + optarg,0 ); } }break ;
@@ -3333,6 +3347,7 @@ int main(int argc, char **argv, char **envp)main_loop ();quit_timers ();net_cleanup (); +res_free ();return 0 ; }
Signature · 1 line
1.7.6-rc1
Am 23.06.2011 um 11:21 schrieb Wayne Xia:
Quoted 16 lines
Signed-off-by Wayne Xia <[email protected]>---
Makefile| 3 +-hw/fw_cfg.c| 131 ++++++++++++++++++++++++++++++++++++++++++++++++
++++++++-qemu-config.c | 27 ++++++++++++ sysemu.h | 3 + vl.c | 17 +++++++- 5 files changed, 178 insertions(+), 3 deletions(-)Makefile +0
-0
Makefile bamboo.dtb petalogix-s3adsp1800.dtb petalogix- · line 193
Quoted 7 lines
Makefile +2
-1@@ -188,7 +188,8 @@ bamboo.dtb petalogix-s3adsp1800.dtb petalogix- ml605.dtb \ mpc8544ds.dtb \ multiboot.bin linuxboot.bin \ s390-zipl.rom \ -spapr-rtas.bin slof.bin +spapr-rtas.bin slof.bin \ +bootsplash.bmp
This will break `make install' since it depends on a file added with 2/3. Better divide into logical changes or reorder the patches.
Andreas