aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.common
Commit message (Collapse)AuthorAgeFilesLines
* Fix mac buildAndrew Hsieh2012-08-241-1/+1
| | | | Change-Id: Ic80b84d7b29134c9dfad4163321f61302961d179
* Fix double optimization on buildsystem for emulatorLars Poeschel2012-08-221-13/+41
| | | | | | | | | Building the emulator was done with two optimization flags supplied to the compiler. This prevented to do debug builds with unoptimized compilation. This is fixed now. Change-Id: Ie64747fd45fa9a3e2de37ba094b223ef52ef0f19
* Enable 64-bit emulator for MacOSX hostAndrew Hsieh2012-07-251-11/+10
| | | | | | | | | | 64-bit emulator can now be enabled for MacOSX host because the newly upgraded sdl-1.2.15 no longer depends on NSQuickDrawView lacking 64-bit implementation. Also rename makefile variable MSDK to OSX_VERSION Change-Id: Ia36863f7708d281f90f5fa40a1507b52b1b68a79
* Switch to sdl 1.2.15 and build from source on osxJesse Hall2012-07-231-9/+1
| | | | Change-Id: I036eefd9789bfe346e9ee5acc15c1d9ffe995c94
* Use new SdkController communication protocol for emulation portsVladimir Chtchetkine2012-04-301-1/+0
| | | | | | | | | | | | | | android/sdk-control-socket.* has replaced android/android-device.* as the back-bone of communicating with SDK controller on the device. The major differences are: - New communication protocol uses just one (async) socket connection to communicate with the device (the old one used two sockets: one sync, and another - async). - New communication protocol connects to one TCP port (1970 in this CL) for all emulation ports. Channel multiplexing is done by using port names, and assigning a separate socket for communication inside each separate port. The old protocol had separate TCP ports for each emulation ports (1968 for sensors, and 1969 for multi-touch) Change-Id: I779fcbdfba2f9b4c433a9d76a567975708b00469
* Fix standalone emulator build.Jesse Hall2012-04-261-1/+3
| | | | | | | | | | - Allow building with OpenGL ES acceleration disabled, avoiding a dependency on stuff outside the QEMU project. - Allow the standalone configure.sh to provide the include/lib path for the OpenGL ES libraries. - Update the default OpenGL ES include path for standalone builds. Change-Id: I03f4627af4c271783b65a116ceb5934385c68cdc
* Publish and use libOpenglRender interface headerJesse Hall2012-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The emulator opengles.c file duplicated the function declarations from libOpenglRenderer's render_api.h instead of including it directly. This led to multiple bugs since the declarations didn't actually match, but there was no way for the compiler or dynamic loader to check this. This change makes opengles.c include render_api.h to get function pointer prototypes, and changes the prototypes/implementation as necessary to make both sides actually match. It should be much more difficult to introduce interface mismatch bugs now. Two bugs this change would have prevented: (a) The interface mismatch caused by inconsistent branching which led to GPU acceleration crashing on Windows. With this change, we would have caught the problem at compile time. (b) The emulator verbose log has always been printing "Can't start OpenGLES renderer?" even when the renderer started fine. This is because the renderer was returning a bool (true == success) but the emulator's declaration said it returned int, and the emulator assumed 0 meant success. This difference in return type should now be caught at compile time. Change-Id: I5b3c70c9a40854332d67e37333acd6edb6ad01f6
* Merge "Implements SDKCtlSocket that implements communication protocol wih ↵Vladimir Chtchetkine2012-04-061-0/+1
|\ | | | | | | SdkController"
| * Implements SDKCtlSocket that implements communication protocol wih SdkControllerVladimir Chtchetkine2012-04-061-0/+1
| | | | | | | | | | | | | | In addition, this CL contains some minor tweaks to async-socket, and async-socket-connector that improve tracebility. Change-Id: Ib1309b19dcd02e96379155fea7015019d93160e7
* | Move stuff from prebuilt to prebuilts/toolsXavier Ducrohet2012-04-031-1/+1
|/ | | | Change-Id: I4090d12fc173af3d11cd3e1a449425ed134c5aed
* Implements asynchronous socket APIVladimir Chtchetkine2012-03-291-0/+1
| | | | | | | | | | | This is pretty basic API that allows to asynchronously connect to a socket, and perform asynchronous read from / write to the connected socket. Since all the operations (including connection) are asynchronous, all the operation results are reported back to the client of this API via set of callbacks that client supplied to this API. Change-Id: I2a18f5b9c575ab7825c9e5a086f4cd9fb6b130ec
* Implements an asynchronous socket connector with retriesVladimir Chtchetkine2012-03-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The typical usage of the API is as such: 1. The client creates an async connector instance by calling async_socket_connector_new routine, supplying there address of the socket to connect, and a callback to invoke on connection events. 2. The client then proceeds with calling async_socket_connector_connect that would initiate connection attempts. The main job on the client side falls on the client's callback routine that serves the connection events. Once connection has been initiated, the connector will invoke that callback to report current connection status. In general, there are three connection events passed to the callback: 1. Success. 2. Failure. 3. Retry. Typically, when client's callback is called for successful connection, the client will pull connected socket's FD from the connector, and then this FD will be used by the client for I/O on the connected socket. If socket's FD is pulled by the client, it must return ASC_CB_KEEP from the callback. When client's callback is invoked with an error (ASC_CONNECTION_FAILED event), the client has an opportunity to review the error (available in 'errno'), and either abort the connection by returning ASC_CB_ABORT, or schedule a retry by returning ASC_CB_RETRY from the callback. If client returns ASC_CB_ABORT from the callback, the connector will stop connection attempts, and will self-destruct. If ASC_CB_RETRY is returned from the callback, the connector will retry connection attempt after timeout that was set by the caller in the call to async_socket_connector_new routine. When client's callback is invoked with ASC_CONNECTION_RETRY, the client has an opportunity to cancel further connection attempts by returning ASC_CB_ABORT, or it can allow another connection attempt by returning ASC_CB_RETRY. The client has no control over the lifespan of initialized connector instance. It always self-destructs after client's cllback returns with a status other than ASC_CB_RETRY. Change-Id: I39b0057013e45ee10d1ef98905b8a5210656a26c
* Re-enable Linux 64-bit emulatorAndrew Hsieh2012-03-231-5/+4
| | | | | | | Restore rules in Makefiles for Linux 64-bit emulator, now that all the dependencies are merged (toolchain, lib64*.{a,so}, etc) Change-Id: I25ecc53837ad9f10ceafb89d9e1d7a3124ce2d71
* Revert to previous prebuilt toolchain until new ones are available in AOSPAndrew Hsieh2012-03-171-4/+5
| | | | | | | | | | The new prebuilt toolchains prebuilts/tools/gcc-sdk points to aren't available in AOSP yet (*). Without it, 64-bit emulator can't be built. Revert to previous prebuilt toochain and disable 64-bit emulator for now. (*) This git auto-sync to AOSP in short-time Change-Id: I7301bcbcbc1d4505d34ad69b562d0b9e5968093a
* 64-bit emulatorAndrew Hsieh2012-03-131-49/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Multi-touch emulation supportVladimir Chtchetkine2012-03-051-1/+4
| | | | Change-Id: I311dc55fe10f41637775baa330a7c732ff317f51
* Include JPEG compression / decompression library into emulator buildVladimir Chtchetkine2012-02-011-0/+12
| | | | | | | | | | | | We are going to need JPEG compression for transferring emulator's framebuffers to the multi-touch supporting application running on an android device. The source for JPEG compressor has been copied over from external/jpeg To that I've added distrib/jpeg-6b/sources.make containing build instruction for JPEG compressor. That file gets included into Makefile.common to compile JPEG compressor sources along with the emulator sources. Change-Id: I7bfccb7a10f873f90edabab5d3b1b2ca4dd57449
* Respect HW configs when loading VM from snapshots.Vladimir Chtchetkine2012-01-131-1/+2
| | | | | | | | | | | | | | 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
* Implement ADB communication over QEMU pipeVladimir Chtchetkine2011-12-131-1/+3
| | | | Change-Id: I62ff5898c7a955aaaa8af8f7ee7ed018af860f80
* Implements sensors emulation using a connected Android deviceVladimir Chtchetkine2011-11-091-0/+2
| | | | | | | | | | | | | | There are three major things in this CL: 1. Abstract a connection with an Android device that is connected to the host via USB, and there is a TCP port forwarding to this device via 'adb forward' command. This abstraction is implemented in android/android-device.* 2. A client for android device API that talks to an app on the connected device that provides values for sensors available on the device. This is implemented in android/sensors-port.* 3. Changes to the sensor emulation code in android/hw-sensors.c to use sensors port (when available) for sensors emulation. Change-Id: I12901e8db6b6a6262fc1703ed96a9f714335d666
* Implemented Mac camera emulationVladimir Chtchetkine2011-10-121-1/+1
| | | | Change-Id: I01609e8bfcdd8ee5ef876344d0a334ecd69a2b7a
* Fix Mac buildVladimir Chtchetkine2011-09-121-0/+4
| | | | | | Add dummy rutines implementing public camera API on Mac Change-Id: Id3c9d99d863785b0e00d1bdf6deb0a1af49ce91c
* Camera service skeletonVladimir Chtchetkine2011-09-071-1/+2
| | | | | | | | | | Skeleton that implements camera emulation service over QEMU pipe. More meat will be added as the guest camera emulation develops. This is a patch taken from approved AOSP commit that didn't go through because of a merge conflict. Change-Id: I6f0a2e42be4f5f0bd86d3dbf0c2a609e74b200c2
* Avoid conflicts with SDL_CONFIG variable.David 'Digit' Turner2011-08-241-1/+2
| | | | | | | | | | Other Android.mk parsed before this one may define SDL_CONFIG in an unexpected way. We only use this variable as input when want to implement the --sdl-config option in ./android-configure.sh Use QEMU_SDL_CONFIG instead to avoid issues. Change-Id: I89d56284017c696227d7c66ea7d7b0acaa73a9ca
* Add DLL-loading head <android/utils/dll.h>David 'Digit' Turner2011-08-241-0/+1
| | | | | | | | This patch adds several functions to make loading shared libraries dynamically easier. This will be used to load the GLES emulation libraries. Change-Id: Ib401af339530bc647bfa86fb23a2840fe0a201dd
* Video capturing code for Linux, and WindowsVladimir Chtchetkine2011-08-181-2/+6
| | | | | | | Contains API that connects to a camera device, and pulls video frames from it on request from the client. Change-Id: If1d80c57611afff637a7734ce5c3a2c874cfc85a
* Fix buildDavid 'Digit' Turner2011-07-061-1/+1
| | | | Change-Id: Ic830748a627ffccfb4642cc56ea76496c6a8fb25
* hw-config-defs.h: Remove from source tree + auto-generateDavid 'Digit' Turner2011-07-051-16/+43
| | | | | | | | | | | This patch modifies the emulator's build system to place the auto-generated file android/avd/hw-config-defs.h into the build directory. Before that, the file was placed in the source tree. + Fix the standalone build system to properly deal with generated source file dependencies + LOCAL_C_INCLUDES Change-Id: I4e77cd20bf4ca21f79d5dd19f27724bd8be53a79
* qemu-char-android.c: rename to qemu-char.cDavid 'Digit' Turner2011-06-011-1/+1
| | | | | | + convert to QemuOpts* initialization functions. Change-Id: I5a245ed2de068af49fdc92de8e3e834d0f49aa27
* vl-android.c: Move code to iohandler.cDavid 'Digit' Turner2011-06-011-0/+1
| | | | Change-Id: I28d2025dfa1f7bfc1ab2318f5ff6c0fd56f4b658
* savevm: Remove OutputBuffer hack.David 'Digit' Turner2011-06-011-1/+0
| | | | | | It's easier to provide a fake Monitor object instead. Change-Id: Ia45267061d489b147497add6120d3caa9234ac11
* qemu-timer.c: upstream integrateDavid 'Digit' Turner2011-06-011-0/+1
| | | | Change-Id: I6856ded73b4dcd10fe4831697c8518f958aeffbb
* os-posix.c + os-win32.c and dependenciesDavid 'Digit' Turner2011-06-011-5/+6
| | | | | | + Generate qemu-options.def instead of qemu-options.h Change-Id: I043e6b0c1c58e5cc2e96d05465f39b42f9054b5a
* Dump hardware config. with -verbose option.David 'Digit' Turner2011-05-141-0/+1
| | | | | | | | | | | 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
* Document new QEMU pipe implementation.David 'Digit' Turner2011-05-041-1/+1
| | | | | | + Rename android/pipe-net.c to android/hw-pipe-net.c Change-Id: Ia2e2466c3bf3ea812f36639420fad7ce2e0cb61d
* Add 'emulator' launcher program.David 'Digit' Turner2011-05-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* Add OpenGLES pipe implementation.David 'Digit' Turner2011-04-111-0/+1
| | | | Change-Id: I3ad498380de8438dbf430316af2d4391876057cc
* Add <android/utils/intmap.h> which implements an integer-keyed map of pointers.David 'Digit' Turner2011-04-111-0/+1
| | | | This will be used later to support QEMUD fast pipes.
* Build arm and x86 binaries at the same time.David 'Digit' Turner2011-02-241-0/+613
| | | | | | | | | | | | This patch modifies the way we build the emulator's various programs. It reduces the number of static libraries generated, and better segregates between common, ui, qemu and target-specific code. Note that we build both the arm and x86 binaries at the same time in all build scenarios for now. This is done to catch build regressions as soon as possible. Change-Id: I6240705041e137e32f207e1e2444c614c52aaf05
* Revert "Build arm and x86 binaries at the same time."Xavier Ducrohet2011-02-091-592/+0
| | | | | | 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-0/+592
Change-Id: I105c5a097c988cb964b47b40b71c7a08af0d9210