aboutsummaryrefslogtreecommitdiffstats
path: root/android/main.c
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2010-09-08 11:09:23 -0700
committerVladimir Chtchetkine <vchtchetkine@google.com>2010-09-08 11:09:23 -0700
commitb25bf2a7477595aa54181874921086d4c0071c03 (patch)
tree44dbe610846ea9f19caf70178713925b0fe159ec /android/main.c
parente92bc56ef89ab8b51c4c89d4d9779b64e9491b9b (diff)
downloadexternal_qemu-b25bf2a7477595aa54181874921086d4c0071c03.zip
external_qemu-b25bf2a7477595aa54181874921086d4c0071c03.tar.gz
external_qemu-b25bf2a7477595aa54181874921086d4c0071c03.tar.bz2
Passed boot properties from main to core as -boot-property parameters.
Change-Id: I56955fb13a073b15ee2a41fdfbd6845bfe65edc5
Diffstat (limited to 'android/main.c')
-rw-r--r--android/main.c54
1 files changed, 26 insertions, 28 deletions
diff --git a/android/main.c b/android/main.c
index 5b9475c..c5dc899 100644
--- a/android/main.c
+++ b/android/main.c
@@ -44,8 +44,6 @@
#include "android/skin/window.h"
#include "android/skin/keyset.h"
-#include "android/hw-lcd.h"
-#include "android/boot-properties.h"
#include "android/user-config.h"
#include "android/utils/bufprint.h"
#include "android/utils/dirscanner.h"
@@ -734,7 +732,6 @@ _adjustPartitionSize( const char* description,
return convertMBToBytes(imageMB);
}
-
int main(int argc, char **argv)
{
char tmp[MAX_PATH];
@@ -761,6 +758,11 @@ int main(int argc, char **argv)
char* android_build_out = NULL;
AndroidOptions opts[1];
+ /* LCD density value to pass to the core. */
+ char lcd_density[16];
+ /* net.shared_net_ip boot property value. */
+ char boot_prop_ip[64];
+ boot_prop_ip[0] = '\0';
args[0] = argv[0];
@@ -1112,9 +1114,8 @@ int main(int argc, char **argv)
fprintf(stderr, "option -shared-net-id must be an integer between 1 and 255\n");
exit(1);
}
- char ip[11];
- snprintf(ip, 11, "10.1.2.%ld", shared_net_id);
- boot_property_add("net.shared_net_ip",ip);
+ snprintf(boot_prop_ip, sizeof(boot_prop_ip),
+ "net.shared_net_ip=10.1.2.%ld", shared_net_id);
}
@@ -1179,6 +1180,11 @@ int main(int argc, char **argv)
}
}
+ if (boot_prop_ip[0]) {
+ args[n++] = "-boot-property";
+ args[n++] = boot_prop_ip;
+ }
+
if (opts->tcpdump) {
args[n++] = "-tcpdump";
args[n++] = opts->tcpdump;
@@ -1470,6 +1476,20 @@ int main(int argc, char **argv)
args[n++] = "off";
}
+ /* Pass LCD density value to the core. */
+ snprintf(lcd_density, sizeof(lcd_density), "%d", get_device_dpi(opts));
+ args[n++] = "-lcd-density";
+ args[n++] = lcd_density;
+
+ /* Pass boot properties to the core. */
+ if (opts->prop != NULL) {
+ ParamList* pl = opts->prop;
+ for ( ; pl != NULL; pl = pl->next ) {
+ args[n++] = "-boot-property";
+ args[n++] = pl->param;
+ }
+ }
+
args[n++] = "-append";
if (opts->bootchart) {
@@ -1484,28 +1504,6 @@ int main(int argc, char **argv)
}
}
- /* start the 'boot-properties service, and parse the -prop
- * options, if any.
- */
- boot_property_init_service();
-
- hwLcd_setBootProperty(get_device_dpi(opts));
-
- /* Set the VM's max heap size, passed as a boot property */
- if (hw->vm_heapSize > 0) {
- char tmp[32], *p=tmp, *end=p + sizeof(tmp);
- p = bufprint(p, end, "%dm", hw->vm_heapSize);
-
- boot_property_add("dalvik.vm.heapsize",tmp);
- }
-
- if (opts->prop != NULL) {
- ParamList* pl = opts->prop;
- for ( ; pl != NULL; pl = pl->next ) {
- boot_property_parse_option(pl->param);
- }
- }
-
/* Setup the kernel init options
*/
{