aboutsummaryrefslogtreecommitdiffstats
path: root/android/main-common.c
Commit message (Collapse)AuthorAgeFilesLines
* Obtain path to dynamic skin layout folder from sdk rootSiva Velusamy2013-03-281-7/+15
| | | | Change-Id: Id83e082238f696aaa0c330020e3310b20ebe5a32
* Support dynamic skin layoutSiva Velusamy2013-03-281-2/+213
| | | | | | | This CL adds support for a skin whose layout section is generated at runtime based on the hardware configuration. Change-Id: I5f81f665b49ce0f3ec5795d922a08b30c1f34b98
* Fixed compilation error with new x86_64-w64-mingw32 compilerAndrew Hsieh2012-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | Fixed the following for the new compiler 1. android/camera/camera-capture-windows.c: Added "#include <windows.h>" 2. SetClassLong() is deprecated. GCL_HICON doesn't exist in _WIN64. Replacted it with SetClassLongPtr(h, GCLP_HICON, icon) 3. [v]asprintf now actually exisit in libray. Changed the prototype to match the standard ones but will remove them later for GCC 4.5 and up. 4. Renamed _set_errno to set_errno because it exists in stdlib.h. Renamed _fix_errno to fix_errno for consistency. 5. EAI_NODATA and EAI_NONAME become the same things. 6. ddk/*h don't exisit. tap-win32.c actually only needs winioctl.h which provide constants. I have make sure they got the same constants in both old and new mingw compilers 7. #undef DELETE before redefining it for KEY_CODE in hw-events.h because DELETE is defined to be a constant in standard header. The above don't break the old one (ie. /usr/bin/i586-mingw32msvc-*) Change-Id: Ic7d13fd0fd237d433f923ee01c6ce50f5c02f095
* Explicitly use the top of the source tree to find the kernel.Jean-Baptiste Queru2012-01-051-6/+9
| | | | | | | | This way, we don't rely on the relative position of the source directory and the out directory, and the emulator works when using OUT_DIR_COMMON_BASE Change-Id: I319f4fffc9ffee676d8040ebbb017831db08f6b6
* Revert "Revert "Merge c80340 from master to r13: Move charmap to hardware ↵Xavier Ducrohet2011-08-221-5/+0
| | | | | | | | | | | | | 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-0/+5
|\ | | | | | | Change-Id: Iabd0b49a5c3ad991da1b4f636ecdf881b1c271aa
| * Revert "Merge c80340 from master to r13: Move charmap to hardware ↵Xavier Ducrohet2011-08-111-0/+5
| | | | | | | | | | | | | | | | 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-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Move charmap to hardware propertiesDavid 'Digit' Turner2011-07-071-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 -audio <name> and -no-audio processing.David 'Digit' Turner2011-06-271-1/+1
| | | | | | | | | | | | | | | | | | Turns out that the string passed to putenv() must not be modified :-/ We provide our own win32 implementation for emulator-ui that doesn't embed the os-win32.c QEMU-specific file. Change-Id: I7260fbc37d23a5340dab589dfde577ef5eb10005
* | Fix -sysdir handling.David 'Digit' Turner2011-06-231-1/+1
|/ | | | | | | | | | | | | | | | | | 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: I32398bec0d7a28ead234f63c847d3ec95ed14b63
* Simplify async utils by removing extra LoopIo parameter.David 'Digit' Turner2011-04-111-1/+1
| | | | | | | | | | | | | | | This patch removes the LoopIo parameter from asyncReader_run() by storing the initial pointer passed to asyncReader_init() inside the object itself. Same treatment is performed for: - AsyncReader - AsyncWriter - AsyncLineReader - AsyncConnector - AsyncConsoleConnect Change-Id: Ic74b817e4c326230ca1d38b3a5d8c4790c4f90c1
* Fix framebuffer width/height computation.David 'Digit' Turner2011-03-251-2/+2
| | | | | | | | | | | | | | | This patch fixes a bug in the skin parsing code that computes the dimensions of the emulated framebuffer. The bug had the following symptoms: - The vertical framebuffer size reported by the 'events' device was always 640 (the default), independent of the skin's dimensions and emulated 'framebuffer' device dimensions. As such, all touch event Y coordinates were scaled by the system by 480/640 when running inside a HVGA screen. Change-Id: I8c67f011ee3929ef25cbf2c858ee800f277c516c
* Move data partition initialization to core.David 'Digit' Turner2011-03-011-144/+0
| | | | Change-Id: I3c2b4668593391026da028194503fc87246e44ba
* Move system image initialization to core.David 'Digit' Turner2011-03-011-25/+0
| | | | Change-Id: Ic8da3ccaed9bab7dbb44c0bb341b0dba20b90980
* Move snapshot storage initialization to the core.David 'Digit' Turner2011-03-011-1/+0
| | | | Change-Id: I2c2b782fe4711cc8c323433e7976222b878cf679
* Move the SD Card initialization to the core.David 'Digit' Turner2011-03-011-10/+0
| | | | Change-Id: I2c8fa2a7df3d79ed4222296a93b787994a8ee11d
* Move cache partition initialization to core.David 'Digit' Turner2011-03-011-2/+0
| | | | Change-Id: I1f887e6f8fc38e43b1fff3f7bab3814b52542762
* Move kernel/ramdisk initialization to the core.David 'Digit' Turner2011-03-011-12/+12
| | | | | | | 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-33/+68
| | | | | | | | | | | | | | | | | | | | | 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-8/+0
| | | | | | The feature is no longer optional. Change-Id: I4558f12e3804e42069e8a3e6bcf0837d350206ed
* Remove android/main-ui.cDavid 'Digit' Turner2011-02-231-0/+239
| | | | | | | | | | | | The differences between android/main.c and android/main-ui.c are now minimal, so remove the latter source file by moving the corresponding code into android/main-common.c Also add a -snapshot-no-time-update core option to implement the emulator-ui -no-snapshot-update-time option. We're probably going to clean this up a little in the future, but this is enough for now. Change-Id: I868bb4e47c3d106ae7436ee3f5b2c0ff5fb6ea5c
* Stuff hardware configuration with paths to image / partition filesVladimir Chtchetkine2011-02-221-0/+505
| | | | Change-Id: Id26cd578fc3faf1fee1a55f4999c3613e47c0e96
* Correct auto-detection of default VM heap size.David 'Digit' Turner2011-02-101-19/+0
| | | | | | | | | | | | 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
* Get rid of -android-gui core option.David 'Digit' Turner2011-02-101-0/+48
| | | | | | | | | Instead, pass all LCD configuration in qemu-hardware.ini. + Make the latter file mandatory to launch a core. You can easily generate one by launching "emulator <options>" though. Change-Id: I81a1938217562517e4c2bbb828aef934033c29a5
* Revert "Build arm and x86 binaries at the same time."Xavier Ducrohet2011-02-091-54/+8
| | | | | | This fails to build on MacOS X This reverts commit a39b10bd2574825a815d6ad854499dd127cfa9cb.
* Build arm and x86 binaries at the same time.David 'Digit' Turner2011-02-101-8/+54
| | | | Change-Id: I105c5a097c988cb964b47b40b71c7a08af0d9210
* Rename emulator_config_xxx to user_config_xxxDavid 'Digit' Turner2011-02-091-5/+5
| | | | Change-Id: Icfcef72a02e388f2aa87b97f004ed43715fc9f30
* Simplify UI-only sources.David 'Digit' Turner2011-02-021-0/+2
| | | | | | | | | | Get rid of console-ui.c, qemu-timer-ui.c and modify vl-android-ui.c to use a generic Looper object instead of a crummy event loop. We still need to implement qemu_set_fd_handler for two sources under android/protocol/ but this will be cleaned up later. Change-Id: Icd0762675ca2f54e720a9cec40f96caea500b52f
* Separate init_skinned_ui() into two functions.David 'Digit' Turner2011-02-021-125/+147
| | | | | | | | | | | | | | | This removes init_skinned_ui() and adds parse_skin_files() and init_sdl_ui(). The first function only parses skin files and options, and doesn't do anything related to the UI. The second function does setup the SDL UI after all options/skin processing has been performed. We also modify main.c and main-ui.c to move the call to init_sdl_ui() as far as possible after the options parsing. + Move core attachment code to the end of qemu_main() in main-ui.c Change-Id: I2bf5f0a096d827ae1fee070a8fa45cbd4629d54f
* Move common main routines from into android-common.[hc]David 'Digit' Turner2011-02-021-0/+533
This is a first step towards cleaning-up our initialization/startup code. Change-Id: I2d4fbc5c2cd0181fb39a1a97a15650945038c3b9