aboutsummaryrefslogtreecommitdiffstats
path: root/vl-android.c
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2010-08-06 09:29:50 -0700
committerVladimir Chtchetkine <vchtchetkine@google.com>2010-08-06 09:29:50 -0700
commit074d1f955a15c19214cee92c627c8c4697e98cd3 (patch)
tree3920b6218b409dd5c3e96d28982ffbda01a87dc5 /vl-android.c
parent3b08fe7c858bcd4c2492e7195ff85878413d39ea (diff)
downloadexternal_qemu-074d1f955a15c19214cee92c627c8c4697e98cd3.zip
external_qemu-074d1f955a15c19214cee92c627c8c4697e98cd3.tar.gz
external_qemu-074d1f955a15c19214cee92c627c8c4697e98cd3.tar.bz2
Added -android-hw option
Change-Id: I8dac387cd43c5eff7e9b6adf0d718261d0ab8d81
Diffstat (limited to 'vl-android.c')
-rw-r--r--vl-android.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/vl-android.c b/vl-android.c
index c09d8a7..fa32b79 100644
--- a/vl-android.c
+++ b/vl-android.c
@@ -54,6 +54,7 @@
#include "android/hw-qemud.h"
#include "android/hw-kmsg.h"
#include "android/charmap.h"
+#include "android/globals.h"
#include "targphys.h"
#include <unistd.h>
@@ -340,6 +341,9 @@ char* op_charmap_file = NULL;
/* Framebuffer dimensions, passed with -android-gui option. */
char* android_op_gui = NULL;
+/* Path to hardware initialization file passed with -android-hw option. */
+char* android_op_hwini = NULL;
+
extern int android_display_width;
extern int android_display_height;
extern int android_display_bpp;
@@ -5010,6 +5014,9 @@ int main(int argc, char **argv, char **envp)
#endif
CPUState *env;
int show_vnc_port = 0;
+#ifdef CONFIG_STANDALONE_CORE
+ IniFile* hw_ini = NULL;
+#endif // CONFIG_STANDALONE_CORE
init_clocks();
@@ -5802,6 +5809,10 @@ int main(int argc, char **argv, char **envp)
case QEMU_OPTION_android_gui:
android_op_gui = (char*)optarg;
break;
+
+ case QEMU_OPTION_android_hw:
+ android_op_hwini = (char*)optarg;
+ break;
}
}
}
@@ -5829,6 +5840,22 @@ int main(int argc, char **argv, char **envp)
data_dir = CONFIG_QEMU_SHAREDIR;
}
+#ifdef CONFIG_STANDALONE_CORE
+ /* Initialize hardware configuration. */
+ if (android_op_hwini) {
+ hw_ini = iniFile_newFromFile(android_op_hwini);
+ if (hw_ini == NULL) {
+ fprintf(stderr, "Could not find %s file.\n", android_op_hwini);
+ exit(1);
+ }
+ } else {
+ hw_ini = iniFile_newFromMemory("", 0);
+ }
+
+ androidHwConfig_read(android_hw, hw_ini);
+ iniFile_free(hw_ini);
+#endif // CONFIG_STANDALONE_CORE
+
#if defined(CONFIG_KVM) && defined(CONFIG_KQEMU)
if (kvm_allowed && kqemu_allowed) {
fprintf(stderr,