aboutsummaryrefslogtreecommitdiffstats
path: root/android/main.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Moved android_emulation_setup from android/main.c to android/qemu-setup.cVladimir Chtchetkine2010-05-141-477/+0
| | | | Change-Id: Ic66bb0d07e28088ae02055c88d37bfd00edea592
* Moved QEmulator out of main.cVladimir Chtchetkine2010-05-111-335/+18
| | | | Change-Id: I20964bb5d7fbef5ea22d265427793a2a7fce2017
* Upstream: HOST_WORDS_ALIGNED -> WORDS_ALIGNEDDavid 'Digit' Turner2010-05-101-1/+1
| | | | Change-Id: Ica9022695d83fb48a8c25fdb1e1f0dc1c63747ff
* merge from tools_r6The Android Open Source Project2010-04-191-34/+2
|\ | | | | | | Change-Id: I860d4b338cba9ea749797d6607b262c8072dd1f6
| * Revert previous patch to fix SD Card emulationDavid 'Digit' Turner2010-04-151-34/+2
| | | | | | | | | | | | | | | | | | | | | | The previous patch modifies SD Card hardware emulation in a way that is not backwards compatible with previous SDK platform releases. This has the unfortunate effect of making SD Card emulation not work properly when running existing AVDs. Reverting the patch until we get a better one. Change-Id: I82dac87709d88aa3bd292bf2ed0008ae74d95853
* | Making the port where adb is expected configurable.Stefan Hilzinger2010-03-311-2/+17
|/ | | | | | | Environment variable ANDROID_ADB_SERVER_PORT allows to control the port the emulator expects adb to be listening on. Change-Id: Ibe52c02829ac9a0308f2cf5da32a57ab773110f8
* Merge memory checking from sandboxVladimir Chtchetkine2010-02-181-6/+23
| | | | Change-id: Ibce845d0
* qemu: android: Add support for multiple SD cardsSan Mehat2009-12-071-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | Add commandline support for an additional SD card, and plumb support to the MMC emulation layer. This patch also reworks the way the hw emulation layer registers devices. Previously, the mmc virtual hardware was only created if the sdcard image existed. Now, two virtual MMC controllers are *always* created as on real hardware. When a request is made to one of our controllers which has no image file bound to it, a new interrupt status indicating a command timeout is sent to the guest driver, as is standard with MMC controllers. This patch also sets the stage for supporting hot-add / hot-remove. Signed-off-by: San Mehat <san@google.com> qemu: android: Integrate card detect into the virtual mmc hardware and wire it up to the STATE_CHANGE irq status Signed-off-by: San Mehat <san@google.com> fixups from review - mmc now works with legacy drivers Signed-off-by: San Mehat <san@google.com>
* Extract emulator major version number from SDK Tools package revision.David 'Digit' Turner2009-12-031-1/+5
| | | | | The minor version number is now always 0, this makes the next version number "5.0" currently in the eclair branch.
* Fix a crash when using an 8MB SD Card image file.David 'Digit' Turner2009-12-011-2/+5
| | | | | The minimum size is now 9MB. This appears to be a limitation of the emulated MMC hardware code and/or kernel device driver.
* Fix typo which prevented the computation of the default /data partition sizeDavid 'Digit' Turner2009-10-291-1/+1
| | | | from working properly.
* Remove the disk partition size hardware properties.David 'Digit' Turner2009-10-291-7/+4
| | | | | Also remove the error/abort message in case an AVD's image files are larger than the default.
* Add a new hardware property: vm.heapSizeDavid 'Digit' Turner2009-10-071-0/+8
| | | | | Allows to control the maximum heap size of Dalvik applications when running under emulation.
* Ensure android/avd/hw-config-defs.h is properly regenerated as needed.David 'Digit' Turner2009-10-071-1/+1
| | | | | | | | This modifies the emulator's build system to ensure that the file at android/avd/hw-config-defs.h is regenerated automatically each time that android/avd/hardware-properties.ini is itself changed. Tested with both the Android build system, and the standalone one.
* Finally fix ARMv7 NEON emulation.David 'Digit' Turner2009-10-061-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The real problem was the size of the static intermediate TCG opcode buffer. Due to its SIMD nature, a single Neon instruction can generate a very large number of corresponding TCG opcodes. Using lots of Neon instructions in a big looop like the one we have in our ARMv7-optimized memcpy did generate enough opcodes to overwrite the static gen_opc_buf buffer, resulting in overwrites into the following global buffer (gen_opparam_buf) corresponding to opcode parameters. The end result was generation of really broken host machine code, and completely unreliable emulation, including potential assertion failure in the liveness analysis pass. This patch does the following: - bumps the buffer size from 512 to 2048 - adds sanity checks that will abort the emulator if another similar overwrite is detected before machine code is generated. - remove the previous hack where we disabled the liveness analysis pass for ARMv7 Note that fixing the code generator to not use a static buffer is not trivial at this point, and that we much prefer to stay true to the upstream sources at the moment. Keep in mind that a previous patch also fixed a bug in the ARM->TCG translator (typo required changing a 0 into a 1) which affected Neon instructions too. I can't believe I just lost 2 weeks of my life on that bug :-(
* Workaround ARMv7 emulation issues.David 'Digit' Turner2009-10-051-0/+10
| | | | | | | | | | | | | | This patch is used to disable the code generator's liveness analysis pass when we emulate an ARMv7 CPU. This is required to properly run the dex preoptimization pass during the build of -user system images. Also includes: - a fix for a sad typo in target-arm/translate.c related to NEON instruction emulation - upstream improvements to the x86 and x86_64 backends to generate better goto branches at runtime - upstream fixes for 64-bit swap and shift operations in TCG After this patch is applied, re-enabling the ARMv7 memcpy should allow to run the dex preopt pass succesfully. Anything else is untested though. WE STILL NEED TO FIX THE CODE GENERATOR.
* Implementation for dynamic charmap option in emulator.vchtchetkine2009-09-211-4/+16
| | | | | Created .kcm parser and added -charmap option to the emulator, so user can specify keyboard layout for emulator session.
* Fix ARMv7 emulation by disabling CPU alignment exceptionsDavid 'Digit' Turner2009-09-201-2/+25
| | | | | | | | | | | | | | | Disable alignment CPU exceptions to be able to boot an ARMv7 system image. This is because 4.4.0 emits a machine code sequence that stores an 8-bytes double on a 4-byte aligned address on the stack in the implementation of cvt() in the C library (see the disassembly for bionic/libc/stdio/vfprintf.c). It is uncertain that this is a compiler bug at this point, but the upstream QEMU sources don't have alignment exceptions enabled for any ARM target anyway. Also, add a check to force CPU emulation to "cortex-a8" if the kernel file name ends in "-armv7". This is a poor man's approach to hardware configuration that will be replaced by a more sophisticated solution in the future. Right now, we just want to be able to build -user system images with the dex preopt pass running in the emulator with the minimum amount of fuss.
* Allow skins to provide a "dpad-rotation" field for each layout.David 'Digit' Turner2009-09-191-34/+2
| | | | | | | | | | This is used to deal with the fact that the framework *always* assumes that the physical DPad is rotated in landscaped mode, while the default skin no longer does that. NOTE: tested on old skin files for backwards compatibility. (Upcoming skin fixes coming in another patch)
* Merge upstream QEMU 10.0.50 into the Android source tree.David 'Digit' Turner2009-09-141-15/+48
| | | | | | | | | | | | | | | | | | | This change integrates many changes from the upstream QEMU sources. Its main purpose is to enable correct ARMv6 and ARMv7 support to the Android emulator. Due to the nature of the upstream code base, this unfortunately also required changes to many other parts of the source. Note that to ensure easier integrations in the future, some source files and directories that have heavy Android-specific customization have been renamed with an -android suffix. The original files are still there for easier integration tracking, but *never* compiled. For example: net.c net-android.c qemu-char.c qemu-char-android.c slirp/ slirp-android/ etc... Tested on linux-x86, darwin-x86 and windows host machines.
* Added two new hardware properties to control AVD partition sizes.David 'Digit' Turner2009-08-281-21/+123
| | | | | | | | | | | | | | | | | | | | | | | disk.systemPartition.size (default 66MB) disk.dataPartition.size (default 66MB) If the emulator detects that an image file is larger than the corresponding setting, it will do the following: - for AVDs running from the SDK, an error message will be printed and the emulator aborts. Note that this can only happen if there are some serious mis-configuration of AVDs anyway. - when launching the emulator from the Android build system, a warning will be printed, and the partition size will be automatically adjusted at launch. Previously, trying to launch an over-sized system image would result in the emulated system booting, but then failing to find certain files, depending on how the yaffs2 disk images are built. This caused hard-to-debug issues. Note that the option -partition-size <size> can be used to override the AVD's setting at runtime.
* Shorten the title of the emulator to only contain very relevant info.Xavier Ducrohet2009-08-111-3/+3
| | | | BUG: 2044596
* Add a new hw.lcd.density hardware property to AVD configuration files.David 'Digit' Turner2009-06-191-1/+4
| | | | | | | | | | | This value can be overriden with the already existing -dpi-device <value> option. The value is mapped to one of 120,160 and 240, then set to the boot-time property named qemu.sf.lcd_density used by the framework to properly select assets and/or resize them at runtime. This means that "emulator -dpi-device 130" will select 120 lcd_density, or "emulator -dpi-device 220" will select a 240 one.
* Add our modified SDL sources under distrib/sdl-1.2.12David 'Digit' Turner2009-06-081-2/+1
| | | | | | Fix distrib/make-distrib.sh script to work with git Fix distrib/build-emulator.sh to accomodate for new SDL configure script Handle Tiger SDK usage in SDL configure script
* This adds the '-prop <name>=<value>' option which is used to setDavid 'Digit' Turner2009-05-261-0/+15
| | | | | | | | | | boot-time system properties from the command line. This is done by implementing a new 'boot-properties' qemud service in the emulator. This is to be used by the 'qemu-props' helper program that will be invoked by /system/etc/init.goldfish.rc to read a list of system properties from the emulator and set them in the emulated system during boot.
* AI 145976: am: CL 145806 Add qemud-version auto-detection logic to ↵David Turner2009-04-131-4/+31
| | | | | | | | | | | | | | | | android/hw-qemud.c Document the supported QEMUD services in known Android systems Print "Press F6 to exit trackball mode..." in the window title bar when one activates the persistent trackball mode. The actual text depends on your key binding configuration. Refine the skin directory auto-search paths when an AVD name is not given on the command line. This makes the following work correctly: tools/emulator -sysdir platforms/android-1.5/images -data foo.img Original author: digit Merged from: //branches/cupcake/... Automated import of CL 145976
* Automated import from //branches/donutburger/...@142528,142528David Turner2009-03-251-22/+10
|
* auto import from //branches/cupcake_rel/...@140373The Android Open Source Project2009-03-181-2/+6
|
* auto import from //branches/cupcake_rel/...@138607The Android Open Source Project2009-03-131-2/+22
|
* auto import from //branches/cupcake/...@137873The Android Open Source Project2009-03-111-0/+1
|
* auto import from //depot/cupcake/@136594The Android Open Source Project2009-03-051-5/+15
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+2836
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-2889/+0
|
* auto import from //depot/cupcake/@132589The Android Open Source Project2009-03-031-115/+168
|
* auto import from //depot/cupcake/@137055The Android Open Source Project2009-03-021-168/+115
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-101-0/+2889