aboutsummaryrefslogtreecommitdiffstats
path: root/vl-android.c
Commit message (Collapse)AuthorAgeFilesLines
* trace: simplify code and avoid conflictsDavid 'Digit' Turner2011-06-011-8/+0
| | | | Change-Id: I8f93e06038bd6e35a2972e3fef351046c247e4ee
* qemu-timer.c: rename qemu_timer_new_scale()David 'Digit' Turner2011-06-011-6/+6
| | | | | | | | | | | Get rid of qemu_timer_new() implementation, and update all callers to use qemu_timer_new_ms() or qemu_timer_new_ns() instead. Rename qemu_new_timer_scale() to qemu_new_timer() to follow upstream conventions. Change-Id: Id2c04f8597ec5026e02f87b3e2c5507920eb688e
* qemu-timer.c: upstream integrateDavid 'Digit' Turner2011-06-011-1/+1
| | | | Change-Id: I6856ded73b4dcd10fe4831697c8518f958aeffbb
* os-posix.c + os-win32.c and dependenciesDavid 'Digit' Turner2011-06-011-4/+12
| | | | | | + Generate qemu-options.def instead of qemu-options.h Change-Id: I043e6b0c1c58e5cc2e96d05465f39b42f9054b5a
* qemu-common.h: other intergratesDavid 'Digit' Turner2011-06-011-27/+0
| | | | Change-Id: Iaf5221814247d7686ec3d57abeab097b09c6a5dd
* vl-android.c: Fix PC Bios search order.David 'Digit' Turner2011-06-011-46/+30
| | | | | | | | This fixes the algorithm used to search the PC Bios files. Moreover, this makes standalone builds under external/qemu just work by looking under prebuilt/common/pc-bios Change-Id: I4619565d57dc5a5b75333f6459f5bfc32b81e918
* x86: kvm: fix KVM build + enable auto-detection.David 'Digit' Turner2011-05-261-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the build of KVM support in the x86 emulator by copying official Ubuntu Lucid KVM headers into android/config/linux-*/ This removes the need to rely on the build machine's versions of these headers, which caused various issues. Also, by default, the emulator will now probe the system to see if it can start in KVM mode automatically. See android-kvm.c for details. You can see the result of the probing with the -verbose option. IMPORTANT NOTE: It looks like there is a bug in the KVM code when the emulator is built as a 32-bit binary, running on a 64-bit kernel, so we explicitely disable KVM when we detect this case. It's hard to tell whether this is a bug in QEMU or some versions of the KVM driver. As such, KVM only works when building the emulator as a 64-bit program. For now, this is only possible with "android-configure.sh --try-64", not the Android build system. + Add a new QEMU option (-disable-kvm) to explicitely disable KVM if needed. This is an addition to -enable-kvm which already exists (and forces usage of KVM). Change-Id: I6a397cae29ab62b1c56fce95c1ee75a4664d6688
* fix audio backend handlingDavid 'Digit' Turner2011-05-211-0/+3
| | | | | | | | | | This patch fixes a small bug where the audio backend given with the -audio <name> option was ignored. The bug was introduced during a previous integration of upstream audio changes. The old code always used the same default backend (PulseAudio). Change-Id: I7bc68df3fd3025f8a8bd1f0fd868872b7eee2017
* Fix the pc-bios search path for build trees.David 'Digit' Turner2011-05-141-2/+2
| | | | | | | | | | | This patch fixes the routine that looks for the x86 BIOS file(s) when running from the build tree (i.e. typing 'emulator' just after building the full_x86-eng product). Turns out that the files are installed under out/host/<system>/usr/share/pc-bios by our build scripts. Change-Id: I51ae849d5cdf130558d05f2386c4175dfea1e054
* Fix SDCard speed issues too.David 'Digit' Turner2011-05-121-4/+8
| | | | | | | | | It looks like we also need to set the 'cache' property to 'unsafe' when initializing the SDCard block device. Otherwise it will be mounted as O_DIRECT, making all i/o operations on the SD Card extremely slow. Change-Id: Id1a72f926c73dc6981a568f005f19cfc50f724d5
* Correct fix for snapshot saving speedDavid 'Digit' Turner2011-05-041-2/+2
| | | | | | | | | | | | | | | QEMU is a weird animal. The "snapshot" property speeds-up snapshot saving but also redirect all stores to a temporary file which is deleted when the emulator exit. Use a different property to get the desired speed-up. Note that using "writeback" instead of "unsafe" forces the use of fdatasync() which will still be horribly slow. + Argument checking in avd snapshot commands in the console. (trying to load a name-less snapshot actually crashes the emulator). Change-Id: Ie61f110f037bbb3539c7f9892cb03bee8bfec6bd
* Fix snapshot save pathetic speed.David 'Digit' Turner2011-05-041-1/+6
| | | | | | | | | | | | | | It turns out that the 'snapshot' property must be turned on on the block device corresponding to the snapshot storage file. Otherwise, the file is mounted O_DIRECT, which on my speedy machine limits the operation to a max of about 2.5 MB/s. This explains why saving snapshots was so pathetic. With this change, the save throughput is up to 278 MB/s on the same machine! Change-Id: I77c792114171a4ecaf3e3f08f64d8b3a30709f23
* Document new QEMU pipe implementation.David 'Digit' Turner2011-05-041-2/+2
| | | | | | + Rename android/pipe-net.c to android/hw-pipe-net.c Change-Id: Ia2e2466c3bf3ea812f36639420fad7ce2e0cb61d
* Add 'emulator' launcher program.David 'Digit' Turner2011-05-021-0/+23
| | | | | | | | | | | | | | | | | | | | | | | This patch renames the current ARM-specific emulator binary to 'emulator-arm' and introduces a new tiny (less than 20KB) 'emulator' launcher program. The role of 'emulator' is to launch either 'emulator-arm' or 'emulator-x86' based on the target AVD or platform build being used. This program will be replaced in the future by what is currently known as 'emulator-ui', but is a good placeholder until this work is completed. + Move some utility functions from android/avd/info.[hc] to android/avd/util.[hc] so that 'emulator' can use them directly. IMPORTANT: For platform builds, the target architecture is detected automatically by parsing the build.prop file. For SDK AVDs however, there is no easy way to determine the target architecture, so the patch adds a new hw.cpu.arch property which can have value 'arm' or 'x86' Change-Id: I0084c196695a75c8b9230ba716b3cd2e12610ded
* New goldfish_pipe virtual device.David 'Digit' Turner2011-04-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new virtual hardware device named "goldfish_pipe" used to implement a very fast communication channel between the guest system and the emulator. IMPORTANT: This depends on a special kernel driver, see: https://review.source.android.com/#change,22496 Usage from the guest is simply the following: fd = open("/dev/qemu_pipe", O_RDWR); const char* pipename = "pipe:<name>"; ret = write(fd, pipename, strlen(pipename)+1); if (ret < 0) { /* could not connect to service named <name> */ } /* now you can read()/write()/close() as a normal * file descriptor to exchange data with the service. */ In addition, this implements the following pipe services in the emulator: tcp:<port> tcp:<hostname>:<port> unix:<path> opengles The 'tcp:' and 'unix:' services simply redirect to a TCP or Unix socket on the host with minimal The 'opengles' service simply connects to tcp:locahost:22468 for now. We may change this to be more configurable in the future, but that's the port number used by the current experimental OpenGL ES hardware emulation host libraries / programs. Benchmarking with a simple ping-pong program shows that the guest <-> emulator can achieve a roundtrip bandwidth of 192 MB/s (on a 2.7 Ghz Xeon PC). Using the tcp: service to talk to a ping-pong server listening on localhost reaches 102 MB/s on the same machine, using a Unix socket reaches 140 MB/s. By contrast, using standard sockets in the guest reaches only 3.8 MB/s on the same machine (and requires special privileges from the application anyway).
* Fix -qemu -vnc startup.David 'Digit' Turner2011-04-271-0/+2
| | | | | | | | | | | | Starting the emulator with something like "-qemu -vnc :1" didn't result in a valid boot sequence, due to the way our "hw-control" service is initialized. This patch fixes the issue. Note however that since a VNC client cannot send proper touch events, it can only be used as a viewer at the moment. Change-Id: Ib9b60ff7028892368547bff89b84f580344c2edd
* vl-android.c: Init opengles pipe on startupDavid 'Digit' Turner2011-04-111-0/+4
| | | | Change-Id: I14c03c193166c214ce406a3dc524b8dfa16fa733
* Set hw.keyboard.lid default value to false for API level >= 12David 'Digit' Turner2011-03-221-0/+3
| | | | | | | | | | | | | | | | | | | | | 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 a crash that happened when the content directory didn't have a cache.img ↵David 'Digit' Turner2011-03-151-11/+21
| | | | | | | | | file. This only happened for fresh newly-created AVDs. Existing ones used for testing the emulator already had a cache.img and booted properly. Change-Id: I87901ea5fb1dc6aa7d2bb3dd191de58d972c386f
* Always prepend a space before kernel parameters.David 'Digit' Turner2011-03-081-0/+1
| | | | | | | It has been reported that in certain cases, qemud would think that the serial device is /dev/ttyS1android.checkjni=1. Change-Id: I977456ef23fb708b284cfe026da07ecce8d03bf1
* x86: Enable KVM mode for Android x86 emulator (update/rebase)Jun Nakajima2011-03-041-0/+2
| | | | | | | | | | This patch enables KVM mode on x86 Linux to boost performance of x86 emulaiton if the hardware-based virtualization feature is present on the host machine. Change-Id: I4b24474b3ec115a3b9a7bf017801f4f610253b09 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>
* look for the pc-bios files in the SDK tools/lib/pc-bios directoryBruce Beare2011-03-021-11/+19
| | | | | Change-Id: I6d546f79617032dea0d72d8d38dab3016e6bd4a0 Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
* qemu logging extensionsrich cannings2011-03-011-2/+86
| | | | | | | | | (1) Clear the logs upon receiving a SIGUSR1 signal (2) Add logging timestamps for network connections (3) Extended TCP redirect logs to include local src ip/port and fixed byte-ordering in log files Change-Id: I51e7293c8eeb5979a92e67f52f1c6416400d83c6
* Move AVD name initialization to the core.David 'Digit' Turner2011-03-011-0/+8
| | | | | | | 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-10/+66
| | | | | | | | | | | 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-0/+34
| | | | Change-Id: I3c2b4668593391026da028194503fc87246e44ba
* Move system image initialization to core.David 'Digit' Turner2011-03-011-0/+36
| | | | Change-Id: Ic8da3ccaed9bab7dbb44c0bb341b0dba20b90980
* Move snapshot storage initialization to the core.David 'Digit' Turner2011-03-011-0/+17
| | | | Change-Id: I2c2b782fe4711cc8c323433e7976222b878cf679
* Move the SD Card initialization to the core.David 'Digit' Turner2011-03-011-0/+18
| | | | Change-Id: I2c8fa2a7df3d79ed4222296a93b787994a8ee11d
* Move cache partition initialization to core.David 'Digit' Turner2011-03-011-0/+19
| | | | Change-Id: I1f887e6f8fc38e43b1fff3f7bab3814b52542762
* Move kernel/ramdisk initialization to the core.David 'Digit' Turner2011-03-011-0/+12
| | | | | | | The QEMU -kernel, -initrd and -append options are still supported for overriding the hardware configuration. Change-Id: I034d9e25d0a23341086aa052f449db5de50b2c8d
* Simplify kernel parameters processing.David 'Digit' Turner2011-03-011-46/+36
| | | | | | | This change simplifies the code that deals with kernel parameters in the core by using a stralloc_t (dynamic strings). Change-Id: I73cf2d1461a3cb1aa4511d74fd34249f0f8b58a2
* Remove CONFIG_ANDROID_SNAPSHOTS macro.David 'Digit' Turner2011-03-011-6/+0
| | | | | | The feature is no longer optional. Change-Id: I4558f12e3804e42069e8a3e6bcf0837d350206ed
* Remove android/main-ui.cDavid 'Digit' Turner2011-02-231-0/+5
| | | | | | | | | | | | 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
* Add user mode networking restrictions: a firewallrich cannings2011-02-161-0/+241
| | | | | | | | | | | | | | | | | Command line options added and code is supported for: QEMU_OPTION_drop_udp QEMU_OPTION_drop_tcp QEMU_OPTION_allow_tcp QEMU_OPTION_drop_log QEMU_OPTION_net_forward QEMU_OPTION_max_dns_conns QEMU_OPTION_allow_udp QEMU_OPTION_dns_log Also, this change makes the default max DNS connections unlimited. Change-Id: I887213149956dda155ef514418365bd80d8f1236
* Correct auto-detection of default VM heap size.David 'Digit' Turner2011-02-101-7/+10
| | | | | | | | | | | | 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-76/+28
| | | | | | | | | 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
* x86: Add x86 support. Rebase the change (20906/1) due to a minor conflict.Jun Nakajima2011-02-021-0/+2
| | | | | | | 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>
* Remove unnecessary calls in UI <-> Core protocols.Vladimir Chtchetkine2011-01-201-0/+11
| | | | | | | Core port related calls are no longer needed, since UI is aware of core's base port on attachment to the core Change-Id: Ic211fc9b02cb652009360f80917e90c44d941878
* Fix ui/core display depth mismatch.David 'Digit' Turner2011-01-201-18/+12
| | | | | | | | | | | | | | | | | This patch fixes a problem where the core's framebuffer was incorrectly initialized to a pitch of width*4 by default (instead of width*2 when using a 16-bit framebuffer). The reason for this was complex, but essentially, when the machine initialization was moved before the display one in vl-android.c, this changed the way the DisplayState was initialized. Also get rid of the useless and confusing "display_state" global in vl-android.c (not the same than "display_state" in console.c) Change-Id: If8e2b8baf7ccaeedcb66da0174cc529521d67a60
* Refining main-ui.c to better separate UI and core related initializationVladimir Chtchetkine2011-01-131-0/+15
| | | | | | | | | | | 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
* Hook up framebuffer changes with UI windowVladimir Chtchetkine2011-01-131-17/+14
| | | | Change-Id: Ib2dff72c808614cd6ded096d62717afc1c41e667
* upstream: integrate block changesDavid 'Digit' Turner2011-01-021-25/+55
| | | | | | | | This large patch upgrades the block support code to the upstream version available in ba5e7f82169f32ab8163c707d97c799ca09f8924 dated 2010-08-08 Change-Id: I8b24df0c287e72f6620650a4d6a62e1bb315453e
* upstream: Move bottom-half handlers to async.cDavid 'Digit' Turner2011-01-021-104/+0
| | | | Change-Id: Ibd4321edb2abe349d32483a60fdb94a282f22240
* Add -audio-test-out option to the core.David 'Digit' Turner2011-01-021-0/+5
| | | | | | | | | | | | | This option can be used to quickly check audio output (without having to boot a full AVD and launch a sound-playing application). Usage: emulator <other-options> -qemu -audio-test-out qemu-android <other-options> -audio-test-out This simply generates an ugly saw signal, but that's enough for us. Change-Id: I060300b4000b9705d181c6262de8d4d13c749e69
* Remove obsolete -audio-in and -audio-out options.David 'Digit' Turner2011-01-021-52/+0
| | | | | | Use -audio <backend> to select the audio driver. Change-Id: I71c837e4c78241711be5f38ef9b03294a69145bd
* Resubmit framebuffer service implementationVladimir Chtchetkine2010-12-201-1/+1
| | | | Change-Id: I184e27a1e8d88835bc9f0502eccfa3f64a7aaf9e
* Implement core display deriving it from android displayVladimir Chtchetkine2010-12-141-0/+5
| | | | | | | Core display is a framebuffer client that receives framebuffer updates and dispatches them to the UI attached to the core. Change-Id: Iff1e0609cbe66240031e3670934a6796a9ae3b15
* Augment the auto-loadvm behaviour with corresponding auto-savevm-on-exit ↵Tim Baverstock2010-12-011-4/+19
| | | | | | | | | | | | 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
* Allow OS X emulator to open host /dev/ devices.David 'Digit' Turner2010-10-271-1/+1
| | | | | | | Only Win32 does not allow this, so simplify the tests in the source code + Remove compiler warning Change-Id: I100dd59e4477edcd24dd94becfa3e3b83a2b92ab