aboutsummaryrefslogtreecommitdiffstats
path: root/android/main.c
Commit message (Collapse)AuthorAgeFilesLines
* Always use dynamic skinHEADreplicant-4.2-0004replicant-4.2-0003replicant-4.2-0002replicant-4.2-0001replicant-4.2Paul Kocialkowski2013-11-091-0/+2
| | | | | Change-Id: Ifd6415be1ac9596e1b8f8bf5cff33ec294b39fc7 Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
* [MIPS] Add Goldfish target supportBhanu Chetlapalli2012-06-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | Basic Goldfish support for MIPS. Also, Fix host CPU consumption when guest is idle When the CPU is in wait state, do not wake-up if an interrupt can't be taken. This avoid host CPU running at 100% if a device (e.g. timer) has an interrupt line left enabled. Also factorize code to check if interrupts are enabled in cpu_mips_hw_interrupts_pending(). CPU consumption based on a patch from Edgar E. Iglesias <edgar.iglesias@gmail.com> Change-Id: Ie8371c8d0c9af1e0c8ba4cac419979350de0f5d9 Signed-off-by: yajin <yajin@mips.com.cm> Signed-off-by: Douglas Leung <douglas@mips.com> Signed-off-by: Bhanu Chetlapalli <bhanu@mips.com> Signed-off-by: Chris Dearman <chris@mips.com>
* Add an option to set custom size for cache partitionVladimir Chtchetkine2012-04-301-0/+12
| | | | Change-Id: I1be43697ee04f46c5839c4d23e461d54eefc450f
* Merge "Fix skin issue when launching emulator from tree."Xavier Ducrohet2012-04-191-0/+3
|\
| * Fix skin issue when launching emulator from tree.Xavier Ducrohet2012-04-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | When launching the emulator with just -skin from the dev tree the fake AVD was not using the hardware.ini config from the skin due to creating it before resolving skinDir and skinName from the command line options. This change updates the AVD after doing so. Change-Id: Ia0912d72775e26f080f763b29629a3691c253c43
* | Increate default partition size to 200MBVladimir Chtchetkine2012-04-191-1/+1
|/ | | | Change-Id: I2996197e7ec4c36c7e46b35edab5b10d7f103c10
* Refactor HW config to use hw.camera_back, and hw.camera_front properties.Vladimir Chtchetkine2012-03-191-137/+24
| | | | | | | | | | This is a continuation of an effort to simplify HW config, and make the UI for it clearer. This CL gets rid of multiple camera emulation properties, combining everything into just two properties: - hw.camera_back that controls emulation of a camera facing back, and - hw.camera_front that controls emulation of a camera facing front. Change-Id: Ia114ae4caf2053685cbff00f39088e5b5be2952c
* Cleanup harware properties.Vladimir Chtchetkine2012-03-191-18/+8
| | | | | | | 1. Remove unused hw.camera.maxHorizontalPixels, and hw.camera.maxVerticalPixels parameters. 2. Combine hw.touchScreen, and hw.multiTouch under one property: hw.screen Change-Id: I3cdf64f7d7e46486110cbc0769f9d98a61f0bea5
* Merge "64-bit emulator"Andrew Hsieh2012-03-161-1/+1
|\
| * 64-bit emulatorAndrew Hsieh2012-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch to allow emulator searches for emulator64-${ARCH} first on 64-bit OS. If none is found, the original behavior which searchs for 32-bit emulator-${ARCH} is performed as usual. 64-bit emulator (which still emulates Android built in 32-bit) offers up to 20% speedup compared to its 32-bit counterpart. Details: android/main-emulator.c 1) search emulator64 based on the OS 2) dlopen lib64OpenglRender in 64-bit Makefile.* 1) Rules to build 64-bit executable emulator64-{x86,arm} and libraries emulator64-{libui,libqemu,target-i386,target-arm,libelff,common} 2) remove -Wa,-32 3) Changes prebuit toolchain path android-configure.h android/build/common.h 1) no longer force 32-bit build (because now prebuilts/tools/gcc-sdk/gcc can now handle 64-bit 2) set ANDROID_PREBUILTS to correctly locate ccache android/config/*/config-host.h 1) Detect HOST_X86_64 and HOST_X86_64/HOST_I386 Misc 64-bit porting clean-up 1) use %zx to print variable of type size_t in hex 2) use %zu to print variable of type size_t in dec 3) Initialize query_parm to NULL 4) use PRIu64 to replace PDUd64 5) use PRId64/PRIu64/PRIX64 to print 64-bit 6) drop PRUx64 because PRIx64 does the same 7) cast pointer arith to intptr_t before casting to int 8) fixed 1ULL<<63 Change-Id: Ife62a20063a6ec38d4a9b23977e840af1fce149a
* | Merge "Fix snapshot autoconfig"Vladimir Chtchetkine2012-03-141-1/+1
|\ \ | |/ |/|
| * Fix snapshot autoconfigVladimir Chtchetkine2012-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | This CL should fix external issue 26839, where system gets loaded from a snapshot even it is explicitly disabled in config.ini. The reason for that was a bug in autoconfig generator that didn't respect config.ini settings for snapshot. Change-Id: I617e9de7f7472f8d5b75d544f81c5b160f81c2f8
* | Increase default partition size, and fix data partition size calculation.Vladimir Chtchetkine2012-03-081-2/+2
|/ | | | | | | | | | | There is a (reasonable) demand from android development comunity to increase default data partition size. It seems that 66MB doesn't match anymore user needs. So, with this CL default data partition size will be increased to 12MB. This CL also fixes a bug where data partition size set by the AVD manager has been wrongly treated as an MB value, while it was a byte value. Change-Id: I27c456a71299aff42bd4ca573d3660292a7d1d44
* Multi-touch emulation supportVladimir Chtchetkine2012-03-051-0/+24
| | | | Change-Id: I311dc55fe10f41637775baa330a7c732ff317f51
* Stop emulator when both, gpu and snapshots are on.Vladimir Chtchetkine2012-02-101-0/+9
| | | | | | | This is a temporary solution fixing emulator crash due to the difficulties in implementing GPU state save to and reload from snapshot. Change-Id: Id62830d3447538472d3c7a83ade97f4f09dfaa06
* Respect HW configs when loading VM from snapshots.Vladimir Chtchetkine2012-01-131-1/+5
| | | | | | | | | | | | | | Changing HW configuration properties may cause emulator / guest system crash on condition that VM has been loaded from a snapshot. This CL addresses this issue in the following way: 1. Each time a snapshot is saved, a backup copy of HW config is saved with it. 2. Each time a snapshot is loaded, emulator finds an appropriate HW config backup, and compares current HW config with the one that was saved in the backup, and if configs are different, emulator exits with an appropriate error. Change-Id: I730bec0afbe166e88189fdcc4804b76e109e4422
* Respect 'camera' flag in AVDVladimir Chtchetkine2012-01-061-1/+13
| | | | | | | | Turns of webcam emulation on condition that 'camera' AVD property is set to 'false'. Note that command line options (-webcam) will enable webcam emulation even if 'camera' AVD property is set to 'false' Change-Id: I493446f1d12b732ed49f9a5a9967b87b31b180f6
* Fix CPU architecture reported in HW configVladimir Chtchetkine2011-09-281-0/+11
| | | | Change-Id: I9221916514a39435d2710fa9dada92a87bdc4dab
* Add -webcam commandline option to control webcam emulationVladimir Chtchetkine2011-09-201-0/+120
| | | | | | -webcam name=<name>[,dir=<direction>] options controls web cameras to use for emulation. Change-Id: I961fd399c7e041541adda040dd24f194cc383cb9
* Add cmdline param to control fake camera emulationVladimir Chtchetkine2011-09-131-2/+15
| | | | | | | - Enable / Disable fake camera - Set fake camera facing direction: back, or front Change-Id: Iab741a694daf2bf752e91e23df566a83ac7a97e7
* Add -gpu <mode> option to force GPU emulationDavid Turner2011-09-131-0/+15
| | | | | | | | | By default, GPU emulation is still disabled. You can still try to force it with '-gpu on' for experimentation purpose (alternatively, you can define hw.gpu.enabled to 'true' in your AVD config.ini) Change-Id: I87efdf45337a80aeadd94b3922312b3f564c1608
* Fix -ramdisk option handling.David 'Digit' Turner2011-09-131-2/+9
| | | | | | | For some reason, there was a bug, where the option was being ignored if set from the command-line. Change-Id: I61c6e3127b469f4ec661b834b15c4da0841551af
* Revert "Revert "Merge c80340 from master to r13: Move charmap to hardware ↵Xavier Ducrohet2011-08-221-2/+23
| | | | | | | | | | | | | properties"..." This reverts commit cccd28ca5064a7bd14282cd774ee5bb7126d5845. c80340 add a CL to tools_r13 that broken the build. It was therefore reverted with cccd28. This revert was merged into tools_r13 but shouldn't have been. This reverts the revert to put back the CL in master. Change-Id: I95fcefedb77596cfdf76269f248b2ae80c85c830
* merge from tools_r13The Android Open-Source Project2011-08-111-23/+2
|\ | | | | | | Change-Id: Iabd0b49a5c3ad991da1b4f636ecdf881b1c271aa
| * Revert "Merge c80340 from master to r13: Move charmap to hardware ↵Xavier Ducrohet2011-08-111-23/+2
| | | | | | | | | | | | | | | | properties". do not merge. This reverts commit f490aee025b3bab5bcdb065e5fc1b1abecf16b97. Change-Id: I59a0b2aebc8ab2b788a820a206c6eb4fc6e6e6d2
| * Merge c80340 from master to r13: Move charmap to hardware propertiesDavid 'Digit' Turner2011-08-051-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The name of the emulated charmap must be passed to the guest kernel because it is used by the guest input handling code to load the proper charmap files from the system partition. This mandates that the name becomes a hardware property for the sake of supporting proper snapshotting and ui/core separation. From now on, the charmap name found in a skin will be ignored completely. This shouldn't be a problem in practice because all skins used the default name (qwerty2) anyway. The only reason to change the default value would be if emulating a guest system image that depends on a different charmap during emulation. Change-Id: If571684000b159ae9e9849661c9ff18e19b4cc75
| * Fix -sysdir handling.David 'Digit' Turner2011-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a back-port from master to tools_r13 This patch fixes the processing of the -sysdir option. Previously, using -sysdir <path> would imply that the -system <path>/<path>/system.img is used, which is incorrect. Also fixes the skin search for the case where we are using the emulator without a pre-existing AVD outside of platform builds (e.g. when running tests). This happens with stuff like: emulator -sysdir /path/to/known/sdk/platforms/<name>/images The patch ensures that the /path/to/known/sdk/platforms/<name>/skins directory is probed (this was the behaviour of the Tools R11 emulator). Change-Id: Ibf7ad97de8e1da375f1049600807e0b3d30bfaaa Orig-Change-Id: I32398bec0d7a28ead234f63c847d3ec95ed14b63 Orig-Change-Id: Id77ea9bdc55bb99c1bfbd2ade291ec41f31ec65d
| * Fixes dataPartition size problemMaciek Molerus2011-08-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | This is a back-port from master to tools_r13 Fixes the problem when disk.systemPartition.size avd setting gets overrided by default 66 MBytes hardcoded in qEmu. Change-Id: Ie15a820c60f48320ee8ca2ea60e4dcb65b762cf9 Orig-Change-Id: Ideb7ca172cb72076c83037f823b86ede2442d6f9
* | Fix a small bug in the -sysdir handling.David 'Digit' Turner2011-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | The issue was that auto-configuration would set the value of -system to point to the full path of the system image (e.g. <sysdir>/system.img). Later, the emulator would try to load the <sysdir>/<sysdir>/system.img due to this. Change-Id: Id77ea9bdc55bb99c1bfbd2ade291ec41f31ec65d
* | Move charmap to hardware propertiesDavid 'Digit' Turner2011-07-071-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The name of the emulated charmap must be passed to the guest kernel because it is used by the guest input handling code to load the proper charmap files from the system partition. This mandates that the name becomes a hardware property for the sake of supporting proper snapshotting and ui/core separation. From now on, the charmap name found in a skin will be ignored completely. This shouldn't be a problem in practice because all skins used the default name (qwerty2) anyway. The only reason to change the default value would be if emulating a guest system image that depends on a different charmap during emulation. Change-Id: If571684000b159ae9e9849661c9ff18e19b4cc75
* | Fixes dataPartition size problemMaciek Molerus2011-06-171-1/+4
| | | | | | | | | | | | | | | | Fixes the problem when disk.systemPartition.size avd setting gets overrided by default 66 MBytes hardcoded in qEmu. Change-Id: Ideb7ca172cb72076c83037f823b86ede2442d6f9
* | arm: Automic ARMv7-A support for platform builds.David 'Digit' Turner2011-06-161-2/+24
|/ | | | | | | | | | | | | | | | | This patches forces the emulator-arm program to emulate a Cortex A8 when it detects that it is launching a platform build that was built for the ARMv7-A architecture. This is done by parsing the build.prop file and comparing the target ABI to the value 'armeabi-v7a'. When this is the case, this will also automatically adjust which prebuilt kernel image is selected from the Android tree. Note that nothing is changed for SDK AVDs in this change. They will still need to define 'hw.cpu.model = cortex-a8' in their config.ini to enable ARMv7-A support. Change-Id: Ibba2a9a4bafbea3c33cb2dd365a881d488de15a9
* Dump hardware config. with -verbose option.David 'Digit' Turner2011-05-141-0/+20
| | | | | | | | | | | This patch dumps the content of the hardware configuration file when the -verbose option (or equivalent -debug-init) is used. This is useful to determine exactly what is launched when debugging emulator issues. Change-Id: I101b87cddb12c603b43420ea72bb357fc33f327d
* Fix -snapshot-list option.David 'Digit' Turner2011-05-051-0/+15
| | | | | | | | | | | | | | | | | This patch makes -snapshot-list work properly. More specifically: - If the AVD has snapshotting enabled, the emulator will find the appropriate file if you don't use -snapstorage. - If the AVD has no snapshot support, the emulator will print a user-friendly message to explain that. - If you're in the Android build, the emulator indicates that -snapstorage <file> is mandatory. Bug 4384430 Change-Id: I472b12f50b7f7da5a282b24036083c7598fe48eb
* Set hw.keyboard.lid default value to false for API level >= 12David 'Digit' Turner2011-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | This patch modifies the emulator to extract the target API level for the AVD or the current platform release, and use it to set the default value of hw.keyboard.lid. This will *not* affect any existing AVD/platform that sets the value explicitely in its config.ini (for AVDs) or hardware.ini (for platform builds). The change is beneficial for platform builds targetting API level >= 12, because the input framework changed its the window orientation behaviour depending on the availability of a hardware lid. In short, this allows platform builds to be correctly oriented, even if they don't provide a custom hardware.ini. Fix for bug 4128604 Change-Id: I195135aae6f3c4cc11d2f01e1293f3cd6cad2f58
* Fix -shell and -logcat options.David 'Digit' Turner2011-03-181-1/+5
| | | | | | They didn't work because the guest was trying to write to the wrong serial port. Change-Id: Ibd68c4b63d0808afcb0cfaffa07c35898e21df9a
* Move AVD name initialization to the core.David 'Digit' Turner2011-03-011-2/+1
| | | | | | | Use a hardware property to send the AVD name to the core. The -android-avdname core option is still supported though. Change-Id: I4daac5c9fb65ed5261b5c04c1e1a18daed057a3f
* Move some serial ports initialization to the core.David 'Digit' Turner2011-03-011-56/+11
| | | | | | | | | | | This moves the initialization of the ports used by qemud and the "kmsg" component to the core. + Gets rid of the -old-system option used to suppot pre-1.4 Android system. We don't officially support anything before 1.5 anyway. Change-Id: Ied7e284d952adfd3419d96c39a7c48761f1b3f5c
* Move data partition initialization to core.David 'Digit' Turner2011-03-011-9/+63
| | | | Change-Id: I3c2b4668593391026da028194503fc87246e44ba
* Move system image initialization to core.David 'Digit' Turner2011-03-011-9/+151
| | | | Change-Id: Ic8da3ccaed9bab7dbb44c0bb341b0dba20b90980
* Move snapshot storage initialization to the core.David 'Digit' Turner2011-03-011-39/+71
| | | | Change-Id: I2c2b782fe4711cc8c323433e7976222b878cf679
* Move the SD Card initialization to the core.David 'Digit' Turner2011-03-011-11/+40
| | | | Change-Id: I2c8fa2a7df3d79ed4222296a93b787994a8ee11d
* Move cache partition initialization to core.David 'Digit' Turner2011-03-011-20/+30
| | | | Change-Id: I1f887e6f8fc38e43b1fff3f7bab3814b52542762
* Move kernel/ramdisk initialization to the core.David 'Digit' Turner2011-03-011-21/+20
| | | | | | | The QEMU -kernel, -initrd and -append options are still supported for overriding the hardware configuration. Change-Id: I034d9e25d0a23341086aa052f449db5de50b2c8d
* Rework AvdInfo processing.David 'Digit' Turner2011-03-011-26/+21
| | | | | | | | | | | | | | | | | | | | | This patch changes the code in android/avd/info.c to prepare for future patches that will move initialization disk images to the core (including locking and creating temporary files). + Remove AvdInfo structure dependencies on many of the functions, to make them more generic/usable. + Remove skin-related processing from avdInfo_new() and avdInfo_newFromBuild(). + Remove avdInfo_getSkinName() and avdInfo_getSkinDir(), and replace them with a single avdInfo_getSkinInfo(). + Rename 'qemu-hardware.ini' to 'hardware-qemu.ini' to follow the same naming convention than the one used for disk images (e.g. "userdata-qemu.img" and "system-qemu.img") Change-Id: I32cb0a5850f8c0b9df93d2630552941fd2b461c1
* Remove CONFIG_ANDROID_SNAPSHOTS macro.David 'Digit' Turner2011-03-011-2/+0
| | | | | | The feature is no longer optional. Change-Id: I4558f12e3804e42069e8a3e6bcf0837d350206ed
* Remove un-needed "-netspeed full" and "-netdelay none".David 'Digit' Turner2011-03-011-9/+11
| | | | | | | | | This patch removes the use of "-netspeed full" and "-netdelay none" when starting a core, since these values correspond to the default. Usually, these were triggered by the values found in the skin files. Change-Id: I88944c6736dc721a8645b1c7d87bc0cb949feec4
* Remove un-needed -clock unix core option.David 'Digit' Turner2011-03-011-9/+0
| | | | | | | | | | | | Remove the '-clock unix' used to start the core on Linux. We do that by moving the problematic 'dynticks' clock to the end of the list in qemu-timer.c. The effect is that the unix clock will become the default for normal usage. You can still use the dynticks one for experimentation with -qemu -clock dynticks though. Change-Id: Ia7a8b2b262c62e8b80a82d6dbadec25964774b57
* Prevent hardware-qemu.ini overwrites.David 'Digit' Turner2011-03-011-2/+12
| | | | | | | | | | | When launching two instances of the same AVD, we need to ensure that we don't end-up overwriting the hardware-qemu.ini in the content directory. Note that this case is supported at the moment. Both the system and data partition will be backed by a temporary file when this is detected. Change-Id: I2c5d9195edc4c5be3b889c8da38cb1c7cae3662a
* Quote concatenated QEMU options when -verbose is used.David 'Digit' Turner2011-03-011-1/+8
| | | | Change-Id: I2d95fa0aa9a5f679372dfd1ae7c7cec906c3049d