aboutsummaryrefslogtreecommitdiffstats
path: root/android/main.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Remove android/main-ui.cDavid 'Digit' Turner2011-02-231-12/+20
| | | | | | | | | | | | 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
* Minor cleanups for core/ui Makefile separation.David 'Digit' Turner2011-02-231-2/+2
| | | | | | | | | | | | | | | | This patch contains minor cleanups that will be needed by a few future patches that will improve the way core and ui sources are separated and built. - remove a few compiler warnings - formatting - remove the memcheck CONFIG_MEMCHECK checks (they later get in the way) - refine hw/hw.h inclusion's of cpu.h (this comes from upstream) - add missing definitions for PRUd64 and PRUx64 (used later) - remove CONFIG_SHAPER test, replace with CONFIG_ANDROID instead. - add missing strdup() calls. Change-Id: Ic7d6681a51af718c298f0ee4bd884b1d8750f28e
* Stuff hardware configuration with paths to image / partition filesVladimir Chtchetkine2011-02-221-446/+13
| | | | Change-Id: Id26cd578fc3faf1fee1a55f4999c3613e47c0e96
* merge from tools_r10The Android Open Source Project2011-02-171-0/+3
|\ | | | | | | Change-Id: I8730ebf34c07bf1a5167970ee1fdce4fb3094c54
| * Fix "avd name" bug.David 'Digit' Turner2011-02-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The console's 'avd name' command returned "unknown" incorrectly. This was due to a missing option when invoking the core, even in the standalone case. Fixes bug 3454261 Change-Id: I7efcfc50792231f57dc76d3c11e7968faf057e12 NOTE: This is a quick fix for tools_r10. A proper fix should instead move the AVD name to auto-generated qemu-hardware.ini instead of using a core command-line option.
* | Correct auto-detection of default VM heap size.David 'Digit' Turner2011-02-101-14/+27
| | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | 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
* | Write the core hardware configuration file to AVD's content directory.David 'Digit' Turner2011-02-101-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Do not write the core's hardware configuration file to a temporary file. Instead, stored it under the AVD's content directory with the name qemu-hardware.ini. For platform builds, use $ANDROID_PRODUCT_OUT/qemu-hardware.ini The purpose of this auto-generated file is to contain all hardware configuration required to properly launch a core from the UI. Further patches will get rid of special core command-line options (e.g. -android-gui) and rely on the content of this file, by adding new hw properties. Change-Id: Id761151c8c8990f1cfa7380779b720080f49469f
* | Revert "Build arm and x86 binaries at the same time."Xavier Ducrohet2011-02-091-8/+3
| | | | | | | | | | | | 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-3/+8
|/ | | | Change-Id: I105c5a097c988cb964b47b40b71c7a08af0d9210
* Rename emulator_config_xxx to user_config_xxxDavid 'Digit' Turner2011-02-091-1/+1
| | | | Change-Id: Icfcef72a02e388f2aa87b97f004ed43715fc9f30
* Fixing aborts caused by compute_fb_update_rect_linear() when the framebuffersJun Nakajima2011-02-081-0/+1
| | | | | | | | are large. Also, added a boot parameter for the goldfish kernel to use PIT, rather than TSC. Change-Id: I5824c7248e0c1a4c487aeb52da112d870846ae62 Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
* x86: Add x86 support. Rebase the change (20906/1) due to a minor conflict.Jun Nakajima2011-02-021-0/+8
| | | | | | | Change-Id: Ic73cca0fc6c6e5cf74f63daa6080d00aa7c392bb Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com> Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com> Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
* Move framebuffer.h to android/David 'Digit' Turner2011-02-021-1/+1
| | | | | | | The QFrameBuffer is no used by QEMU-specific code anymore so it's more logical to move it here. Change-Id: Id49ff53dd49648000e7543652d66f7c03881a8cb
* Separate init_skinned_ui() into two functions.David 'Digit' Turner2011-02-021-13/+16
| | | | | | | | | | | | | | | 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-476/+1
| | | | | | This is a first step towards cleaning-up our initialization/startup code. Change-Id: I2d4fbc5c2cd0181fb39a1a97a15650945038c3b9
* Generate temporary hardware.ini from configuration settings.David 'Digit' Turner2011-02-011-0/+26
| | | | | | | | | This patch generates a temporary hardware.ini from the hardware configuration. The idea is to move as much hw config info as possible to a single file that the core can read. Other patches will change how various config info is passed to the core, from command-line options to the generated hardware.ini.
* Compute default memory size from screen size.David 'Digit' Turner2011-01-191-1/+29
| | | | | | | | This change is used when using a magic skin (e.g. -skin 800x600) or when using the full Android build system, in order to determine a good default for the RAM size. Change-Id: I900e28146592cdd3f0df9b3f1828b119309eea85
* Print concatenated QEMU options with -verbose.David 'Digit' Turner2011-01-191-1/+8
| | | | | | | This makes it easier to launch the core (qemu-android) with the same set of options than the stand-alone emulator. Change-Id: I55d0007f83280ffc5b9a26adc1300472013ff93d
* Add support for 32-bit framebuffers.David 'Digit' Turner2011-01-181-4/+9
| | | | | | | | | | | | | | | This modifies the emulator so support 32-bit framebuffers. You can create such a frame-buffer using one of these methods: - Add a "bpp 32" line to the "display" element of your skin - Use the new 'magic' skin option format: e.g. -skin 320x480x32 Note that the result will be hideous since the kernel driver still thinks the hardware is only 16-bits. This will be addressed in a later patch to hw/goldfish_fb.c and to the kernel driver ($KERNEL/drivers/video/goldfishfb.c) Change-Id: I0fc700c4a4cb8521076605324e15ed34e5d01136
* Refining main-ui.c to better separate UI and core related initializationVladimir Chtchetkine2011-01-131-6/+1
| | | | | | | | | | | The main reason for this is to clarify initialization for UI that starts core, and UI that attaches to an existing core. In this CL I did: - Removed -initdata option that seems obsolete (doesn't affect anything in the code) - Passed through -timezone option that doesn't affect anything in the UI, and is needed only in the core. - Removed dependency on AVD info from the core (core needed only virtual device name) Change-Id: Ie631249848a1b5b8d837c0c7b201a40ee7e4a367
* Remove obsolete -audio-in and -audio-out options.David 'Digit' Turner2011-01-021-9/+0
| | | | | | Use -audio <backend> to select the audio driver. Change-Id: I71c837e4c78241711be5f38ef9b03294a69145bd
* Send unsolicited time response to first signal strength query after loadvmTim Baverstock2010-12-141-0/+3
| | | | Change-Id: I9c6260493d42564ee3aa34799313368bb2de7d4d
* Add -no-snapshot-load option to permit reboot.Tim Baverstock2010-12-021-2/+6
| | | | | | | | | This is a workaround for the emulator not being able to detect the guest's power-down situation, and simply lingering like a zombie: on exit it's saved as a zombie, and is restored as a zombie which isn't useful. Denying autoload forces a reboot. Change-Id: I48f32600f5ce18cd5c71aa01d1b71b382102f227
* Augment the auto-loadvm behaviour with corresponding auto-savevm-on-exit ↵Tim Baverstock2010-12-011-5/+6
| | | | | | | | | | | | behaviour. Autosave fires when loadvm would have been tried - whether it succeeded or not - in order to bootstrap from an empty snapshot file. - New autosave behaviour inhibited with -no_snapshot_save flag. - Underlying behaviour implemented with a new qemu option -savevm_on_exit Change-Id: If64d89f004565ecbb431bc7e96ecc37e27876d67
* Separate main.c used to build the emulator from main-ui.c used to build the UIVladimir Chtchetkine2010-11-241-108/+0
| | | | Change-Id: I1c7baeaa8447fe1df895869bfb6b74631b765845
* Parallelize -list-cores implementation.David 'Digit' Turner2010-11-191-97/+63
| | | | | | | | | | | Modify the implementation of list_cores() to perform all 16 connection requests in parallel, using a generic looper and and asyncConsoleConnector per probed port, with a global timeout of half a second. This is also a demonstration of the new asynchronous helpers. Change-Id: Ib09adf44b00d0694ec29d7ed0b26b44eef77f88a
* Implement -list-cores UI optionVladimir Chtchetkine2010-11-101-0/+143
| | | | | | | Also fixed a bug in iolooper-select.c (io_looper_del_write was buggy) Also switched iolooper-select.c to use malloc/free instead of qemu_xxx Change-Id: Ief47608f30a863d624af6363620e93e903cbdadc
* Add command line flag to show list of snapshots.Ot ten Thije2010-10-281-3/+9
| | | | | | | | | | | | | | This patch introduces the flag '-snapshot-list', which causes the emulator to output a table of snapshots in the currently mounted snapshot storage file. The snapshot file is accessed with a very simple driver for the Qcow2 file system, independent of Qemu's block driver framework. This way, the flag is available in the emulator-ui builds as well. Using Qemu's framework would have resulted in adding a lot of Qemu dependencies to the UI build, which we are explicitly trying to avoid. Change-Id: I059b9ac53e2f8e051757a5c637761eccf8ea17cb
* Load state snapshot rather than booting to start emulator.Ot ten Thije2010-10-221-6/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for an optional file "snapshots.img" in the data directory of an AVD. This file should be an image formatted with the qcow2 file system and will be mounted on -hdb when the emulator starts up. If present, the emulator will attempt to load the snapshot named "default-boot" from this image, rather than going through the full boot procedure. To control the behaviour of this functionality, this patch introduces the following new command line options for the emulator: -snapstorage <file>: override the default location of the snapshot storage file. -no-snapstorage: do not load the snapshots file, even if an explicit path is given. -snapshot <name>: instead of loading "default-boot", load the state snapshot with the given name. -no-snapshot: do not load a snapshot, but force a full boot sequence, even if a snapshots file is mounted. Useful for creating snapshots. Note that this functionality is experimental and will be enabled only if the constant CONFIG_ANDROID_SNAPSHOTS in android/config/config.h is set to "1" before building. It is turned off by default. Change-Id: Iee2e9096a27f3414bacfc271f90ef93a98730c82
* emulator-ui: Remove dependencies from qemu sources.David 'Digit' Turner2010-10-191-6/+6
| | | | | | This change removes some QEMU-specifics that crept into the UI code. Change-Id: Ib1974dc64e54a35dc0cd01aec1eb547a9263a0c8
* Passed boot properties from main to core as -boot-property parameters.Vladimir Chtchetkine2010-09-081-28/+26
| | | | Change-Id: I56955fb13a073b15ee2a41fdfbd6845bfe65edc5
* Add android_port initialization in the core.Vladimir Chtchetkine2010-09-011-8/+0
| | | | | | Also some minor cleanups to the ui <-> core stuff. Change-Id: I7d64ec1aa694c027851b7e262b6e1b80bb6cef08
* Fixed dependency ob core data in android/help.cVladimir Chtchetkine2010-09-011-7/+5
| | | | | | Also moved along -tcpdump option Change-Id: I9fc53e0dc6a86e9a880d6127bf2da3ac1d7ec58a