aboutsummaryrefslogtreecommitdiffstats
path: root/android/main.c
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Moved nand and netspeed initialization from main to core.Vladimir Chtchetkine2010-08-261-129/+19
| | | | Change-Id: Ide3914fa52f62f618d39ac20f02bce8185a6805a
* Cleaned up build script from rebuilding locally generated sourcesVladimir Chtchetkine2010-08-251-1/+3
| | | | | | Also passed along -show-kernel option to the emulator core Change-Id: Ic606a7a9cdac677cbd5ce9ca1a9f1a2b16da4dfa
* Moved radio, gps and audio setup entirely into the coreVladimir Chtchetkine2010-08-241-99/+28
| | | | Change-Id: I9d76bb3cd892b7b2b0713a27ff5477195c93ff36
* Cleanup stuff for the UI buildVladimir Chtchetkine2010-08-241-85/+6
| | | | | | | | 1. Move DNS server registration entirely to the core. 2. Move -memcheck option initialization entirely to the core. 3. Move qemu_help routine (used by both, Core and UI) to common qemu-help.c file. Change-Id: I5e47e94bdc375f0e037ccc6bd88daeb5fa06d1cf
* Move memchecker initialization from main.c to vl-android.c (core)Vladimir Chtchetkine2010-08-091-9/+5
| | | | | | Also move qemu-malloc.c to common CORE and UI sources Change-Id: Ifd62ae247cc03700d85b5fc35072d73ac37cc570
* Better separation of UI and Core sources for framebuffer emulation.David 'Digit' Turner2010-07-271-311/+5
| | | | | | + new document under docs/DISPLAY-STATE.TXT to explain what's happening. Change-Id: Ia0d233377266212da49af932c7528f46f5feb92d
* Remove UI dependency from goldfish_event_device.cVladimir Chtchetkine2010-07-221-0/+5
| | | | Change-Id: Iea5edfbae0caff45161c814d631d35d2e6d61d1c
* Moved dependency on android_ui_set_window_scale to ui-core-protocol.hVladimir Chtchetkine2010-07-161-2/+0
| | | | | | Also cleaned up dependency on android_base_port variable Change-Id: I8c1675a859e3d24e9bb174471dd03556c696aff1
* Move net-related routines from main.c to net-android.cVladimir Chtchetkine2010-07-151-106/+0
| | | | Change-Id: If102220e6db913f4a51bb1809ce60f4bf24bdd6a
* Finished shuffling files.Vladimir Chtchetkine2010-07-141-1/+0
| | | | Change-Id: Ifb0a1458fa9aa5c5143e876242e03e1eee2044b9
* Removed hw-control dependency from the UI.Vladimir Chtchetkine2010-07-081-1/+0
| | | | | | | qemulator_setup has been setting brighness callback via direct call to hw-control. After the change callback is set via call to ui-core-protocol Change-Id: Ib96887d47cf765f38f4a7ad39f4f39963d9fb90d
* Pass core-specific options to emulator core as cmd-line options.Vladimir Chtchetkine2010-06-151-0/+20
| | | | Change-Id: I7ed897ca92c1344505f982897e2f59cc68c42d89
* Inter-emulator networking: add interfaces in the correct orderDries Harnie2010-06-091-5/+6
| | | | Change-Id: I9cab6f47bbde9f4dacdb2a426064af63eb4709c4
* Add small user-event abstraction interface.David 'Digit' Turner2010-05-251-12/+3
| | | | | | | | | | | | | | | | Preparation for future UI frontend/backend separation. This is done to ensure that the code under android/skin/ does not depend on any QEMU-specific header. We achieve this by adding a new abstract header "user-events.h" and one QEMU-specific implementations for the functions defined here. This also modifies console.h and vl-android.c to make them closer to upstream (by removing Android-specific changes). + fix Makefile.android to always build SDL from sources in standalone mode. Change-Id: I0d152741e7bb2c9cd283f5c35bd054385c7c1eb3
* Build SDL from sources directly.David 'Digit' Turner2010-05-181-3/+0
| | | | | | | | | | | | | | | | This removes the requirement to build the SDL library before the rest of the emulator. The prebuilt SDL library and installation is now optional and is only kept for the full Android build on Linux (mainly to avoid having to install many dev libraries on build servers). This patch affects both the Android and standalone build systems. The script android-configure.sh will not use a prebuilt SDL installation unless you explicitely use --sdl-config=<script>. Tested for linux-x86 / darwin-x86 / cygwin / linux-mingw builds. Change-Id: If973b2ad199f06aeeff43aec387d1ac629487529
* Enable interconnection of emulatorsDries Harnie2010-05-181-0/+29
| | | | | | | | | | | This patch adds a -shared-net-id option to the emulator which joins the emulator in a shared network. If the option is given the emulator is started with an additional network interface bound to a multicast socket. This multicast socket emulates a network hub, interconnecting emulators. If the -shared-net-id option is not given, nothing changes. Change-Id: I0ea70a073cdbd34f804161300240fafca34080d0