aboutsummaryrefslogtreecommitdiffstats
path: root/vl-android.c
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2011-02-10 16:52:19 +0100
committerDavid 'Digit' Turner <digit@android.com>2011-02-10 17:52:56 +0100
commit5377c5bfde6ba62490417bb0a7d7c1be1151692e (patch)
treee8d1af24005c5fe9de2397fbd13cfe6f71c29f80 /vl-android.c
parent2507cab8a78fb609461a2b9cc4708bab60fc53a4 (diff)
downloadexternal_qemu-5377c5bfde6ba62490417bb0a7d7c1be1151692e.zip
external_qemu-5377c5bfde6ba62490417bb0a7d7c1be1151692e.tar.gz
external_qemu-5377c5bfde6ba62490417bb0a7d7c1be1151692e.tar.bz2
Correct auto-detection of default VM heap size.
This patch removes the need for the -m <memory> core option. Instead, the RAM size is taken by default from qemu-hardware.ini. Also, the default value of vm.heapSize is no longer 16MB, it is now adjusted based on the RAM size (16/32/48 values) + Get rid of core -lcd-density option (use .ini file instead) Change-Id: I93919926b61a132c7943a1bb2c41f7a3ab7f2d2f
Diffstat (limited to 'vl-android.c')
-rw-r--r--vl-android.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/vl-android.c b/vl-android.c
index 3b71469..a35f351 100644
--- a/vl-android.c
+++ b/vl-android.c
@@ -4646,11 +4646,10 @@ int main(int argc, char **argv, char **envp)
}
/* Initialize LCD density */
- if (android_op_lcd_density) {
- char* end;
- long density = strtol(android_op_lcd_density, &end, 0);
- if (end == NULL || *end || density < 0) {
- PANIC("option -lcd-density must be a positive integer");
+ if (android_hw->hw_lcd_density) {
+ long density = android_hw->hw_lcd_density;
+ if (density <= 0) {
+ PANIC("Invalid hw.lcd.density value: %ld", density);
}
hwLcd_setBootProperty(density);
}
@@ -4925,8 +4924,12 @@ int main(int argc, char **argv, char **envp)
}
/* init the memory */
- if (ram_size == 0)
- ram_size = DEFAULT_RAM_SIZE * 1024 * 1024;
+ if (ram_size == 0) {
+ ram_size = android_hw->hw_ramSize * 1024LL * 1024;
+ if (ram_size == 0) {
+ ram_size = DEFAULT_RAM_SIZE * 1024 * 1024;
+ }
+ }
#ifdef CONFIG_KQEMU
/* FIXME: This is a nasty hack because kqemu can't cope with dynamic