emulator: some jobs prepared after device init
authorSooyoung Ha <yoosah.ha@samsung.com>
Tue, 23 Jun 2015 14:59:17 +0000 (23:59 +0900)
committerSooyoung Ha <yoosah.ha@samsung.com>
Thu, 20 Aug 2015 07:57:45 +0000 (16:57 +0900)
This commit is come from tizen_2.4,
copied from 925800b7607bc96a021078d2659ba7bd7c0d3ed7.

Change-Id: I3927b9f9c68cc298f4ee7f228a7c82ac4598bc12
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
tizen/src/emulator.c
tizen/src/emulator.h
vl.c

index f5c38e5de29eceb9e84ce37e1e2394b3c67b0ff4..fd32e4023a0e29d408a4b9b673e6db8ae3deb50a 100644 (file)
@@ -211,16 +211,6 @@ static void prepare_basic_features(gchar * const kernel_cmdline)
     clean_websocket_port(SIGKILL);
 #endif
 
-    check_vm_lock();
-    make_vm_lock();
-
-    maru_device_hotplug_init();
-
-    start_ecs();
-
-    start_sdb_noti_server(get_device_serial_number() + SDB_UDP_SENSOR_INDEX);
-
-    sdb_setup();
 
     get_host_proxy(http_proxy, https_proxy, ftp_proxy, socks_proxy);
     /* using "DNS" provided by default QEMU */
@@ -312,6 +302,16 @@ const char *prepare_maru(const gchar * const kernel_cmdline)
     return maru_kernel_cmdline;
 }
 
+void prepare_maru_after_device_init(void)
+{
+    check_vm_lock();
+    make_vm_lock();
+    maru_device_hotplug_init();
+    start_ecs();
+    start_sdb_noti_server(get_device_serial_number() + SDB_UDP_SENSOR_INDEX);
+    sdb_setup();
+}
+
 #if defined(CONFIG_SDL) || defined(CONFIG_USE_SHM)
 void start_skin(void)
 {
index a264473dc4510f5ba70633599c28385b6644f090..9d387dc1223aeeffb41f25726ff97d6f2755da41 100644 (file)
@@ -45,6 +45,7 @@
 #define MAXLEN  512
 
 const char *prepare_maru(const gchar * const kernel_cmdline);
+void prepare_maru_after_device_init(void);
 void start_skin(void);
 
 void emulator_add_exit_notifier(Notifier *notify);
diff --git a/vl.c b/vl.c
index 62558a71b8bc89851c8f8e53551142447749dd77..7d427441f85da8bf450ca749383d0a7d83b7cbaa 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -4551,6 +4551,10 @@ int main(int argc, char **argv, char **envp)
     if (qemu_opts_foreach(qemu_find_opts("device"), device_init_func, NULL, 1) != 0)
         exit(1);
 
+#if defined(CONFIG_MARU)
+    prepare_maru_after_device_init();
+#endif
+
 #ifdef CONFIG_VIGS
     // To support legacy VIGS options
     if (enable_vigs) {