├── .gitignore ├── Android.mk ├── CHANGES.TXT ├── COPYING ├── COPYING.LIB ├── Changelog ├── CleanSpec.mk ├── INSTALL ├── LICENSE ├── MODULE_LICENSE_GPL ├── Makefile ├── Makefile.android ├── Makefile.common ├── Makefile.qemu-launcher ├── Makefile.target ├── Makefile.tests ├── NOTICE ├── README ├── aio-android.c ├── aio.c ├── android-configure.sh ├── android-rebuild.sh ├── android ├── adb-qemud.c ├── adb-qemud.h ├── adb-server.c ├── adb-server.h ├── android-constants.c ├── android.h ├── async-console.c ├── async-console.h ├── async-io-common.h ├── async-socket-connector.c ├── async-socket-connector.h ├── async-socket.c ├── async-socket.h ├── async-utils.c ├── async-utils.h ├── audio-test.c ├── audio-test.h ├── avd │ ├── hardware-properties.ini │ ├── hw-config.c │ ├── hw-config.h │ ├── info.c │ ├── info.h │ ├── keys.h │ ├── scanner.c │ ├── scanner.h │ ├── util.c │ ├── util.h │ └── util_unittest.cpp ├── base │ ├── Compiler.h │ ├── EintrWrapper.h │ ├── EintrWrapper_unittest.cpp │ ├── Limits.h │ ├── Log.cpp │ ├── Log.h │ ├── Log_unittest.cpp │ ├── String.cpp │ ├── String.h │ ├── StringFormat.cpp │ ├── StringFormat.h │ ├── StringFormat_unittest.cpp │ ├── StringView.cpp │ ├── StringView.h │ ├── StringView_unittest.cpp │ ├── String_unittest.cpp │ ├── async │ │ ├── AsyncReader.cpp │ │ ├── AsyncReader.h │ │ ├── AsyncStatus.h │ │ ├── AsyncWriter.cpp │ │ ├── AsyncWriter.h │ │ ├── Looper.cpp │ │ ├── Looper.h │ │ ├── ThreadLooper.cpp │ │ └── ThreadLooper.h │ ├── containers │ │ ├── HashUtils.cpp │ │ ├── HashUtils.h │ │ ├── HashUtils_unittest.cpp │ │ ├── PodVector.cpp │ │ ├── PodVector.h │ │ ├── PodVector_unittest.cpp │ │ ├── PointerSet.cpp │ │ ├── PointerSet.h │ │ ├── PointerSet_unittest.cpp │ │ ├── ScopedPointerSet.h │ │ ├── ScopedPointerSet_unittest.cpp │ │ ├── StringVector.cpp │ │ ├── StringVector.h │ │ ├── StringVector_unittest.cpp │ │ ├── TailQueueList.h │ │ └── TailQueueList_unittest.cpp │ ├── files │ │ ├── PathUtils.cpp │ │ ├── PathUtils.h │ │ ├── PathUtils_unittest.cpp │ │ ├── ScopedFd.h │ │ ├── ScopedFd_unittest.cpp │ │ ├── ScopedHandle.h │ │ ├── ScopedHandle_unittest.cpp │ │ ├── ScopedStdioFile.h │ │ └── ScopedStdioFile_unittest.cpp │ ├── memory │ │ ├── LazyInstance.cpp │ │ ├── LazyInstance.h │ │ ├── LazyInstance_unittest.cpp │ │ ├── MallocUsableSize.h │ │ ├── MallocUsableSize_unittest.cpp │ │ ├── QSort.h │ │ ├── QSort_unittest.cpp │ │ ├── ScopedPtr.h │ │ └── ScopedPtr_unittest.cpp │ ├── misc │ │ ├── HttpUtils.cpp │ │ ├── HttpUtils.h │ │ ├── HttpUtils_unittest.cpp │ │ ├── StringUtils.cpp │ │ ├── StringUtils.h │ │ ├── StringUtils_unittest.cpp │ │ ├── Utf8Utils.cpp │ │ ├── Utf8Utils.h │ │ └── Utf8Utils_unittest.cpp │ ├── sockets │ │ ├── ScopedSocket.h │ │ ├── ScopedSocket_unittest.cpp │ │ ├── SocketDrainer.cpp │ │ ├── SocketDrainer.h │ │ ├── SocketDrainer_unittest.cpp │ │ ├── SocketErrors.h │ │ ├── SocketUtils.cpp │ │ ├── SocketUtils.h │ │ ├── SocketWaiter.cpp │ │ ├── SocketWaiter.h │ │ ├── SocketWaiter_unittest.cpp │ │ └── Winsock.h │ ├── synchronization │ │ ├── ConditionVariable.h │ │ ├── ConditionVariable_unittest.cpp │ │ ├── ConditionVariable_win32.cpp │ │ ├── Lock.h │ │ ├── Lock_unittest.cpp │ │ ├── MessageChannel.cpp │ │ ├── MessageChannel.h │ │ └── MessageChannel_unittest.cpp │ ├── system │ │ ├── System.cpp │ │ ├── System.h │ │ ├── System_unittest.cpp │ │ ├── Win32Utils.cpp │ │ ├── Win32Utils.h │ │ └── Win32Utils_unittest.cpp │ ├── testing │ │ ├── TestSystem.h │ │ ├── TestTempDir.h │ │ └── TestThread.h │ └── threads │ │ ├── Thread.h │ │ ├── ThreadStore.cpp │ │ ├── ThreadStore.h │ │ ├── ThreadStore_unittest.cpp │ │ ├── Thread_pthread.cpp │ │ ├── Thread_unittest.cpp │ │ └── Thread_win32.cpp ├── boot-properties.c ├── boot-properties.h ├── build │ ├── binary.make │ ├── clear_vars.make │ ├── definitions.make │ ├── getdir.make │ ├── host_executable.make │ ├── host_shared_library.make │ ├── host_static_library.make │ ├── mkdeps.sh │ └── prebuilt_static_library.make ├── camera │ ├── camera-capture-linux.c │ ├── camera-capture-mac.m │ ├── camera-capture-windows.c │ ├── camera-capture.h │ ├── camera-common.h │ ├── camera-format-converters.c │ ├── camera-format-converters.h │ ├── camera-service.c │ ├── camera-service.h │ └── camera-win.h ├── cbuffer.c ├── charpipe.c ├── cmdline-option.c ├── cmdline-option.h ├── cmdline-options.h ├── config │ ├── check-alsa.c │ ├── check-esd.c │ ├── check-pulseaudio.c │ ├── config.h │ ├── target-arm │ │ └── config.h │ ├── target-mips │ │ └── config.h │ └── target-x86 │ │ └── config.h ├── console.c ├── core-init-utils.c ├── core-init-utils.h ├── cpu_accelerator.cpp ├── cpu_accelerator.h ├── dependencies │ ├── MesaLib-10.4.2-patches.tar.xz │ ├── PACKAGES.TXT │ ├── e2fsprogs-1.42.13-patches.tar.xz │ └── glib-2.38.2-patches.tar.xz ├── display-core.c ├── display-core.h ├── display.c ├── display.h ├── emulation │ ├── CpuAccelerator.cpp │ ├── CpuAccelerator.h │ └── CpuAccelerator_unittest.cpp ├── emulator-window.c ├── emulator-window.h ├── ext4_resize.cpp ├── ext4_resize.h ├── filesystems │ ├── ext4_utils.cpp │ ├── ext4_utils.h │ ├── ext4_utils_unittest.cpp │ ├── fstab_parser.cpp │ ├── fstab_parser.h │ ├── fstab_parser_unittest.cpp │ ├── partition_types.cpp │ ├── partition_types.h │ ├── partition_types_unittest.cpp │ ├── ramdisk_extractor.cpp │ ├── ramdisk_extractor.h │ ├── ramdisk_extractor_unittest.cpp │ └── testing │ │ ├── TestExt4ImageHeader.h │ │ ├── TestRamdiskImage.h │ │ ├── TestSupport.cpp │ │ ├── TestSupport.h │ │ └── create_ramdisk_test_data.sh ├── framebuffer.c ├── framebuffer.h ├── globals.h ├── gps.c ├── gps.h ├── gpu_frame.cpp ├── gpu_frame.h ├── help.c ├── help.h ├── hw-control.c ├── hw-control.h ├── hw-events.c ├── hw-events.h ├── hw-fingerprint.c ├── hw-fingerprint.h ├── hw-kmsg.c ├── hw-kmsg.h ├── hw-lcd.c ├── hw-lcd.h ├── hw-pipe-net.c ├── hw-pipe-net.h ├── hw-qemud.c ├── hw-qemud.h ├── hw-sensors.c ├── hw-sensors.h ├── icons.h ├── iolooper.cpp ├── kernel │ ├── kernel_utils.cpp │ ├── kernel_utils.h │ ├── kernel_utils_testing.h │ ├── kernel_utils_unittest.cpp │ └── testing │ │ └── print_mock_kernel_data.sh ├── loadpng.c ├── looper-base.cpp ├── looper-base.h ├── looper-generic.cpp ├── looper-qemu.cpp ├── looper.h ├── main-common-ui.c ├── main-common.c ├── main-common.h ├── main-emulator.c ├── main.c ├── multitouch-port.c ├── multitouch-port.h ├── multitouch-screen.c ├── multitouch-screen.h ├── opengl │ ├── EmuglBackendList.cpp │ ├── EmuglBackendList.h │ ├── EmuglBackendList_unittest.cpp │ ├── EmuglBackendScanner.cpp │ ├── EmuglBackendScanner.h │ ├── EmuglBackendScanner_unittest.cpp │ ├── GpuFrameBridge.cpp │ ├── GpuFrameBridge.h │ ├── GpuFrameBridge_unittest.cpp │ ├── emugl_config.cpp │ ├── emugl_config.h │ └── emugl_config_unittest.cpp ├── opengles.c ├── opengles.h ├── qemu-launcher │ └── emulator-qemu.cpp ├── qemu-setup.c ├── qemu-tcpdump.c ├── qemu │ └── base │ │ └── async │ │ ├── Looper.cpp │ │ └── Looper.h ├── qt │ ├── qt_setup.cpp │ ├── qt_setup.h │ └── qt_setup_unittest.cpp ├── resource.c ├── resource.h ├── scripts │ ├── build-e2fsprogs.sh │ ├── build-mesa-deps.sh │ ├── build-mesa.sh │ ├── build-qemu-android-deps.sh │ ├── build-qemu-android.sh │ ├── build-qt.sh │ ├── download-sources.sh │ ├── gen-android-sdk-toolchain.sh │ ├── gen-entries.py │ ├── package-release.sh │ ├── tests │ │ └── gen-entries │ │ │ ├── run-tests.sh │ │ │ └── t.001 │ │ │ ├── test._symbols │ │ │ ├── test.def │ │ │ ├── test.entries │ │ │ ├── test.funcargs │ │ │ ├── test.functions │ │ │ ├── test.sym │ │ │ ├── test.symbols │ │ │ └── test.wrapper │ └── utils │ │ ├── aosp_dir.shi │ │ ├── aosp_prebuilts_dir.shi │ │ ├── common.shi │ │ ├── emulator_prebuilts.shi │ │ ├── install_dir.shi │ │ ├── option_parser.shi │ │ ├── package_builder.shi │ │ └── package_list_parser.shi ├── sdk-controller-socket.c ├── sdk-controller-socket.h ├── sensors-port.c ├── sensors-port.h ├── shaper.c ├── skin │ ├── argb.h │ ├── charmap.c │ ├── charmap.h │ ├── event-sdl2.c │ ├── event.h │ ├── file.c │ ├── file.h │ ├── image.c │ ├── image.h │ ├── keyboard.c │ ├── keyboard.h │ ├── keycode-buffer.c │ ├── keycode-buffer.h │ ├── keycode-buffer_unittest.cpp │ ├── keycode.c │ ├── keycode.h │ ├── keycode_unittest.cpp │ ├── keyset.c │ ├── keyset.h │ ├── linux_keycodes.h │ ├── qt │ │ ├── README │ │ ├── battery.ui │ │ ├── emulator-window.cpp │ │ ├── emulator-window.h │ │ ├── event-qt.cpp │ │ ├── images │ │ │ ├── ic_arrow_back_48px.svg │ │ │ ├── ic_battery_std_48px.svg │ │ │ ├── ic_call_48px.svg │ │ │ ├── ic_camera_enhance_48px.svg │ │ │ ├── ic_close_48px.svg │ │ │ ├── ic_crop_square_48px.svg │ │ │ ├── ic_filter_tilt_shift_48px.svg │ │ │ ├── ic_fullscreen_48px.svg │ │ │ ├── ic_hangout_video_48px.svg │ │ │ ├── ic_keyboard_arrow_down_48px.svg │ │ │ ├── ic_keyboard_arrow_left_48px.svg │ │ │ ├── ic_keyboard_arrow_right_48px.svg │ │ │ ├── ic_keyboard_arrow_up_48px.svg │ │ │ ├── ic_location_on_48px.svg │ │ │ ├── ic_menu_48px.svg │ │ │ ├── ic_mic_48px.svg │ │ │ ├── ic_panorama_fish_eye_48px.svg │ │ │ ├── ic_photo_camera_48px.svg │ │ │ ├── ic_power_settings_new_48px.svg │ │ │ ├── ic_sd_card_48px.svg │ │ │ ├── ic_signal_cellular_4_bar_48px.svg │ │ │ ├── ic_stay_current_portrait_48px.svg │ │ │ ├── ic_unfold_less_48px.svg │ │ │ ├── ic_unfold_more_48px.svg │ │ │ ├── ic_volume_down_48px.svg │ │ │ ├── ic_volume_up_48px.svg │ │ │ └── ic_zoom_in_24px.svg │ │ ├── mac-native-window.h │ │ ├── mac-native-window.mm │ │ ├── resources.qrc │ │ ├── sources.mk │ │ ├── surface-qt.cpp │ │ ├── tool-window.cpp │ │ ├── tool-window.h │ │ ├── ui_tool-window.h │ │ ├── winsys-qt.cpp │ │ └── winsys-qt.h │ ├── rect.c │ ├── rect.h │ ├── rect_unittest.cpp │ ├── region.c │ ├── region.h │ ├── region_unittest.cpp │ ├── resource.c │ ├── resource.h │ ├── resource_defaults.h │ ├── scaler.c │ ├── scaler.h │ ├── sources.mk │ ├── surface-sdl2.c │ ├── surface.h │ ├── trackball.c │ ├── trackball.h │ ├── ui.c │ ├── ui.h │ ├── window.c │ ├── window.h │ ├── winsys-sdl2.c │ └── winsys.h ├── snaphost-android.c ├── snaphost-android.h ├── snapshot.c ├── snapshot.h ├── sockets.c ├── sync-utils.c ├── sync-utils.h ├── tests │ └── test-console-drops-bad-requests.sh ├── tools │ └── gen-hw-config.py ├── user-config.c ├── user-config.h ├── user-events-qemu.c ├── utils │ ├── aconfig-file.c │ ├── aconfig-file.h │ ├── aconfig-file_unittest.cpp │ ├── assert.c │ ├── assert.h │ ├── bufprint.c │ ├── bufprint.h │ ├── bufprint_unittest.cpp │ ├── compiler.h │ ├── debug.c │ ├── debug.h │ ├── dirscanner.cpp │ ├── dirscanner.h │ ├── dirscanner_unittest.cpp │ ├── dll.c │ ├── dll.h │ ├── duff.h │ ├── eintr_wrapper.c │ ├── eintr_wrapper.h │ ├── eintr_wrapper_unittest.cpp │ ├── file_data.c │ ├── file_data.h │ ├── file_data_unittest.cpp │ ├── filelock.c │ ├── filelock.h │ ├── format.cpp │ ├── format.h │ ├── format_unittest.cpp │ ├── host_bitness.cpp │ ├── host_bitness.h │ ├── host_bitness_unittest.cpp │ ├── http_utils.cpp │ ├── http_utils.h │ ├── ini.c │ ├── ini.h │ ├── intmap.c │ ├── intmap.h │ ├── jpeg-compress.c │ ├── jpeg-compress.h │ ├── lineinput.c │ ├── lineinput.h │ ├── list.h │ ├── mapfile.c │ ├── mapfile.h │ ├── misc.c │ ├── misc.h │ ├── panic.c │ ├── panic.h │ ├── path.c │ ├── path.h │ ├── path_unittest.cpp │ ├── property_file.c │ ├── property_file.h │ ├── property_file_unittest.cpp │ ├── reflist.c │ ├── reflist.h │ ├── refset.c │ ├── refset.h │ ├── setenv.c │ ├── setenv.h │ ├── socket_drainer.cpp │ ├── socket_drainer.h │ ├── stralloc.c │ ├── stralloc.h │ ├── string.cpp │ ├── string.h │ ├── system.c │ ├── system.h │ ├── tempfile.c │ ├── tempfile.h │ ├── timezone.c │ ├── timezone.h │ ├── uncompress.cpp │ ├── uncompress.h │ ├── utf8_utils.cpp │ ├── utf8_utils.h │ ├── vector.c │ ├── vector.h │ ├── win32_cmdline_quote.cpp │ ├── win32_cmdline_quote.h │ ├── win32_cmdline_quote_unittest.cpp │ ├── x86_cpuid.c │ ├── x86_cpuid.h │ └── x86_cpuid_unittest.cpp └── wear-agent │ ├── PairUpWearPhone.cpp │ ├── PairUpWearPhone.h │ ├── PairUpWearPhone_unittest.cpp │ ├── WearAgent.cpp │ ├── WearAgent.h │ ├── WearAgent_unittest.cpp │ ├── android_wear_agent.cpp │ ├── android_wear_agent.h │ ├── main.cpp │ ├── sources.mk │ └── testing │ ├── WearAgentTestUtils.cpp │ └── WearAgentTestUtils.h ├── arch_init.c ├── async.c ├── audio ├── alsaaudio.c ├── audio.c ├── audio.h ├── audio_int.h ├── audio_pt_int.c ├── audio_pt_int.h ├── audio_template.h ├── audio_win_int.c ├── audio_win_int.h ├── coreaudio.c ├── dsound_template.h ├── dsoundaudio.c ├── esdaudio.c ├── fmodaudio.c ├── mixeng.c ├── mixeng.h ├── mixeng_template.h ├── noaudio.c ├── ossaudio.c ├── paaudio.c ├── rate_template.h ├── wavaudio.c ├── wavcapture.c ├── winaudio.c └── wrappers │ ├── alsa.c │ ├── alsa.entries │ ├── esound.c │ ├── esound.entries │ ├── pulse-audio.c │ └── pulse-audio.entries ├── backends └── msmouse.c ├── block.c ├── block ├── qcow2-cluster.c ├── qcow2-refcount.c ├── qcow2-snapshot.c ├── qcow2.c ├── qcow2.h ├── raw-posix-aio.h ├── raw-posix.c ├── raw-win32.c └── raw.c ├── blockdev.c ├── buffered_file.c ├── buffered_file.h ├── build.gradle ├── code-profile.c ├── cpu-exec.c ├── cpus.c ├── cputlb.c ├── disas.c ├── disas ├── arm.c ├── i386.c ├── mips.c └── ppc.c ├── distrib ├── README ├── android-emugl │ ├── Android.mk │ ├── DESIGN │ ├── README │ ├── common.mk │ ├── googletest.mk │ ├── host │ │ ├── include │ │ │ └── libOpenglRender │ │ │ │ └── IOStream.h │ │ ├── libs │ │ │ ├── GLESv1_dec │ │ │ │ ├── Android.mk │ │ │ │ ├── GLESv1Decoder.cpp │ │ │ │ ├── GLESv1Decoder.h │ │ │ │ ├── gles1.addon │ │ │ │ ├── gles1.attrib │ │ │ │ ├── gles1.in │ │ │ │ ├── gles1.types │ │ │ │ └── gles1_types.h │ │ │ ├── GLESv2_dec │ │ │ │ ├── Android.mk │ │ │ │ ├── GLESv2Decoder.cpp │ │ │ │ ├── GLESv2Decoder.h │ │ │ │ ├── gles2.attrib │ │ │ │ ├── gles2.in │ │ │ │ ├── gles2.types │ │ │ │ └── gles2_types.h │ │ │ ├── Translator │ │ │ │ ├── EGL │ │ │ │ │ ├── Android.mk │ │ │ │ │ ├── ClientAPIExts.cpp │ │ │ │ │ ├── ClientAPIExts.h │ │ │ │ │ ├── ClientAPIExts.in │ │ │ │ │ ├── EglConfig.cpp │ │ │ │ │ ├── EglConfig.h │ │ │ │ │ ├── EglContext.cpp │ │ │ │ │ ├── EglContext.h │ │ │ │ │ ├── EglDisplay.cpp │ │ │ │ │ ├── EglDisplay.h │ │ │ │ │ ├── EglGlobalInfo.cpp │ │ │ │ │ ├── EglGlobalInfo.h │ │ │ │ │ ├── EglImp.cpp │ │ │ │ │ ├── EglOsApi.h │ │ │ │ │ ├── EglOsApi_darwin.cpp │ │ │ │ │ ├── EglOsApi_glx.cpp │ │ │ │ │ ├── EglOsApi_wgl.cpp │ │ │ │ │ ├── EglPbufferSurface.cpp │ │ │ │ │ ├── EglPbufferSurface.h │ │ │ │ │ ├── EglSurface.cpp │ │ │ │ │ ├── EglSurface.h │ │ │ │ │ ├── EglThreadInfo.cpp │ │ │ │ │ ├── EglThreadInfo.h │ │ │ │ │ ├── EglValidate.cpp │ │ │ │ │ ├── EglValidate.h │ │ │ │ │ ├── EglWindowSurface.cpp │ │ │ │ │ ├── EglWindowSurface.h │ │ │ │ │ ├── MacNative.h │ │ │ │ │ ├── MacNative.m │ │ │ │ │ ├── MacPixelFormatsAttribs.h │ │ │ │ │ ├── MacPixelFormatsAttribs.m │ │ │ │ │ ├── ThreadInfo.cpp │ │ │ │ │ └── ThreadInfo.h │ │ │ │ ├── GLES_CM │ │ │ │ │ ├── Android.mk │ │ │ │ │ ├── GLEScmContext.cpp │ │ │ │ │ ├── GLEScmContext.h │ │ │ │ │ ├── GLEScmImp.cpp │ │ │ │ │ ├── GLEScmUtils.cpp │ │ │ │ │ ├── GLEScmUtils.h │ │ │ │ │ ├── GLEScmValidate.cpp │ │ │ │ │ └── GLEScmValidate.h │ │ │ │ ├── GLES_V2 │ │ │ │ │ ├── Android.mk │ │ │ │ │ ├── GLESv2Context.cpp │ │ │ │ │ ├── GLESv2Context.h │ │ │ │ │ ├── GLESv2Imp.cpp │ │ │ │ │ ├── GLESv2Validate.cpp │ │ │ │ │ ├── GLESv2Validate.h │ │ │ │ │ ├── ProgramData.cpp │ │ │ │ │ ├── ProgramData.h │ │ │ │ │ ├── ShaderParser.cpp │ │ │ │ │ └── ShaderParser.h │ │ │ │ ├── GLcommon │ │ │ │ │ ├── Android.mk │ │ │ │ │ ├── FramebufferData.cpp │ │ │ │ │ ├── GLDispatch.cpp │ │ │ │ │ ├── GLESbuffer.cpp │ │ │ │ │ ├── GLEScontext.cpp │ │ │ │ │ ├── GLESpointer.cpp │ │ │ │ │ ├── GLESvalidate.cpp │ │ │ │ │ ├── GLutils.cpp │ │ │ │ │ ├── PaletteTexture.cpp │ │ │ │ │ ├── RangeManip.cpp │ │ │ │ │ ├── TextureUtils.cpp │ │ │ │ │ ├── etc1.cpp │ │ │ │ │ ├── gles1_extensions.entries │ │ │ │ │ ├── gles1_only.entries │ │ │ │ │ ├── gles2_extensions.entries │ │ │ │ │ ├── gles2_only.entries │ │ │ │ │ ├── gles_common.entries │ │ │ │ │ ├── gles_extensions.entries │ │ │ │ │ └── objectNameManager.cpp │ │ │ │ └── include │ │ │ │ │ ├── EGL │ │ │ │ │ ├── egl.h │ │ │ │ │ ├── eglext.h │ │ │ │ │ └── eglplatform.h │ │ │ │ │ ├── ETC1 │ │ │ │ │ └── etc1.h │ │ │ │ │ ├── GL │ │ │ │ │ └── wglext.h │ │ │ │ │ ├── GLES │ │ │ │ │ ├── gl.h │ │ │ │ │ ├── glext.h │ │ │ │ │ └── glplatform.h │ │ │ │ │ ├── GLES2 │ │ │ │ │ ├── gl2.h │ │ │ │ │ ├── gl2ext.h │ │ │ │ │ └── gl2platform.h │ │ │ │ │ ├── GLcommon │ │ │ │ │ ├── FramebufferData.h │ │ │ │ │ ├── GLDispatch.h │ │ │ │ │ ├── GLESbuffer.h │ │ │ │ │ ├── GLEScontext.h │ │ │ │ │ ├── GLESmacros.h │ │ │ │ │ ├── GLESpointer.h │ │ │ │ │ ├── GLESvalidate.h │ │ │ │ │ ├── GLLibrary.h │ │ │ │ │ ├── GLconversion_macros.h │ │ │ │ │ ├── GLutils.h │ │ │ │ │ ├── PaletteTexture.h │ │ │ │ │ ├── RangeManip.h │ │ │ │ │ ├── TextureUtils.h │ │ │ │ │ ├── TranslatorIfaces.h │ │ │ │ │ ├── etc1.h │ │ │ │ │ ├── gldefs.h │ │ │ │ │ ├── gles1_extensions_functions.h │ │ │ │ │ ├── gles1_only_functions.h │ │ │ │ │ ├── gles2_extensions_functions.h │ │ │ │ │ ├── gles2_only_functions.h │ │ │ │ │ ├── gles_common_functions.h │ │ │ │ │ ├── gles_extensions_functions.h │ │ │ │ │ ├── gles_functions.h │ │ │ │ │ └── objectNameManager.h │ │ │ │ │ └── KHR │ │ │ │ │ └── khrplatform.h │ │ │ ├── libOpenglRender │ │ │ │ ├── Android.mk │ │ │ │ ├── ColorBuffer.cpp │ │ │ │ ├── ColorBuffer.h │ │ │ │ ├── EGLDispatch.cpp │ │ │ │ ├── EGLDispatch.h │ │ │ │ ├── FbConfig.cpp │ │ │ │ ├── FbConfig.h │ │ │ │ ├── FrameBuffer.cpp │ │ │ │ ├── FrameBuffer.h │ │ │ │ ├── GLESv1Dispatch.cpp │ │ │ │ ├── GLESv1Dispatch.h │ │ │ │ ├── GLESv2Dispatch.cpp │ │ │ │ ├── GLESv2Dispatch.h │ │ │ │ ├── NativeSubWindow.h │ │ │ │ ├── NativeSubWindow_cocoa.m │ │ │ │ ├── NativeSubWindow_win32.cpp │ │ │ │ ├── NativeSubWindow_x11.cpp │ │ │ │ ├── ReadBuffer.cpp │ │ │ │ ├── ReadBuffer.h │ │ │ │ ├── RenderContext.cpp │ │ │ │ ├── RenderContext.h │ │ │ │ ├── RenderControl.cpp │ │ │ │ ├── RenderControl.h │ │ │ │ ├── RenderEGL_extensions_functions.h │ │ │ │ ├── RenderEGL_functions.h │ │ │ │ ├── RenderServer.cpp │ │ │ │ ├── RenderServer.h │ │ │ │ ├── RenderThread.cpp │ │ │ │ ├── RenderThread.h │ │ │ │ ├── RenderThreadInfo.cpp │ │ │ │ ├── RenderThreadInfo.h │ │ │ │ ├── RenderWindow.cpp │ │ │ │ ├── RenderWindow.h │ │ │ │ ├── TextureDraw.cpp │ │ │ │ ├── TextureDraw.h │ │ │ │ ├── WindowSurface.cpp │ │ │ │ ├── WindowSurface.h │ │ │ │ ├── render_api.cpp │ │ │ │ ├── render_api.entries │ │ │ │ ├── render_api.h │ │ │ │ ├── render_api_functions.h │ │ │ │ ├── render_api_platform_types.h │ │ │ │ ├── render_egl.entries │ │ │ │ └── render_egl_extensions.entries │ │ │ └── renderControl_dec │ │ │ │ ├── Android.mk │ │ │ │ ├── renderControl.attrib │ │ │ │ ├── renderControl.in │ │ │ │ ├── renderControl.types │ │ │ │ └── renderControl_types.h │ │ └── tools │ │ │ └── emugen │ │ │ ├── Android.mk │ │ │ ├── ApiGen.cpp │ │ │ ├── ApiGen.h │ │ │ ├── EntryPoint.cpp │ │ │ ├── EntryPoint.h │ │ │ ├── Parser.cpp │ │ │ ├── Parser.h │ │ │ ├── Parser_unittest.cpp │ │ │ ├── README │ │ │ ├── TypeFactory.cpp │ │ │ ├── TypeFactory.h │ │ │ ├── Var.h │ │ │ ├── VarType.h │ │ │ ├── errors.h │ │ │ ├── getopt.c │ │ │ ├── getopt.h │ │ │ ├── main.cpp │ │ │ ├── strUtils.cpp │ │ │ ├── strUtils.h │ │ │ └── tests │ │ │ ├── run-tests.sh │ │ │ └── t.001 │ │ │ ├── expected │ │ │ ├── decoder │ │ │ │ ├── foo_dec.cpp │ │ │ │ ├── foo_dec.h │ │ │ │ ├── foo_opcodes.h │ │ │ │ ├── foo_server_base.h │ │ │ │ ├── foo_server_context.cpp │ │ │ │ ├── foo_server_context.h │ │ │ │ └── foo_server_proc.h │ │ │ ├── encoder │ │ │ │ ├── foo_client_base.h │ │ │ │ ├── foo_client_context.cpp │ │ │ │ ├── foo_client_context.h │ │ │ │ ├── foo_client_proc.h │ │ │ │ ├── foo_enc.cpp │ │ │ │ ├── foo_enc.h │ │ │ │ ├── foo_entry.cpp │ │ │ │ ├── foo_ftable.h │ │ │ │ └── foo_opcodes.h │ │ │ └── wrapper │ │ │ │ ├── foo_wrapper_base.h │ │ │ │ ├── foo_wrapper_context.cpp │ │ │ │ ├── foo_wrapper_context.h │ │ │ │ ├── foo_wrapper_entry.cpp │ │ │ │ └── foo_wrapper_proc.h │ │ │ └── input │ │ │ ├── foo.attrib │ │ │ ├── foo.in │ │ │ └── foo.types │ ├── scripts │ │ └── gen-headers.sh │ └── shared │ │ ├── OpenglCodecCommon │ │ ├── Android.mk │ │ ├── ErrorLog.h │ │ ├── FixedBuffer.h │ │ ├── GLClientState.cpp │ │ ├── GLClientState.h │ │ ├── GLDecoderContextData.h │ │ ├── GLErrorLog.h │ │ ├── GLSharedGroup.cpp │ │ ├── GLSharedGroup.h │ │ ├── Makefile │ │ ├── ProtocolUtils.h │ │ ├── SocketStream.cpp │ │ ├── SocketStream.h │ │ ├── TcpStream.cpp │ │ ├── TcpStream.h │ │ ├── TimeUtils.cpp │ │ ├── TimeUtils.h │ │ ├── UnixStream.cpp │ │ ├── UnixStream.h │ │ ├── Win32PipeStream.cpp │ │ ├── Win32PipeStream.h │ │ ├── codec_defs.h │ │ ├── glUtils.cpp │ │ ├── glUtils.h │ │ └── gl_base_types.h │ │ └── emugl │ │ └── common │ │ ├── Android.mk │ │ ├── condition_variable.h │ │ ├── condition_variable_unittest.cpp │ │ ├── condition_variable_win32.cpp │ │ ├── id_to_object_map.cpp │ │ ├── id_to_object_map.h │ │ ├── id_to_object_map_unittest.cpp │ │ ├── lazy_instance.cpp │ │ ├── lazy_instance.h │ │ ├── lazy_instance_unittest.cpp │ │ ├── message_channel.cpp │ │ ├── message_channel.h │ │ ├── message_channel_unittest.cpp │ │ ├── mutex.h │ │ ├── mutex_unittest.cpp │ │ ├── pod_vector.cpp │ │ ├── pod_vector.h │ │ ├── pod_vector_unittest.cpp │ │ ├── scoped_pointer_vector.h │ │ ├── shared_library.cpp │ │ ├── shared_library.h │ │ ├── shared_library_unittest.cpp │ │ ├── smart_ptr.cpp │ │ ├── smart_ptr.h │ │ ├── smart_ptr_unittest.cpp │ │ ├── sockets.cpp │ │ ├── sockets.h │ │ ├── testing │ │ ├── test_shared_library.cpp │ │ └── test_thread.h │ │ ├── thread.h │ │ ├── thread_pthread.cpp │ │ ├── thread_store.cpp │ │ ├── thread_store.h │ │ ├── thread_store_unittest.cpp │ │ ├── thread_unittest.cpp │ │ ├── thread_win32.cpp │ │ ├── unique_integer_map.h │ │ └── unique_integer_map_unittest.cpp ├── ext4_utils │ ├── README │ ├── include │ │ ├── make_ext4fs.h │ │ └── private │ │ │ └── android_filesystem_capability.h │ ├── sources.mk │ └── src │ │ ├── Android.mk │ │ ├── MODULE_LICENSE_APACHE2 │ │ ├── NOTICE │ │ ├── allocate.c │ │ ├── allocate.h │ │ ├── contents.c │ │ ├── contents.h │ │ ├── crc16.c │ │ ├── ext2simg.c │ │ ├── ext4.h │ │ ├── ext4_extents.h │ │ ├── ext4_kernel_headers.h │ │ ├── ext4_sb.c │ │ ├── ext4_sb.h │ │ ├── ext4_utils.c │ │ ├── ext4_utils.h │ │ ├── ext4fixup.c │ │ ├── ext4fixup.h │ │ ├── ext4fixup_main.c │ │ ├── extent.c │ │ ├── extent.h │ │ ├── indirect.c │ │ ├── indirect.h │ │ ├── jbd2.h │ │ ├── make_ext4fs.c │ │ ├── make_ext4fs_main.c │ │ ├── mkuserimg.sh │ │ ├── setup_fs.c │ │ ├── sha1.c │ │ ├── sha1.h │ │ ├── test_ext4fixup │ │ ├── uuid.c │ │ ├── uuid.h │ │ ├── wipe.c │ │ ├── wipe.h │ │ └── xattr.h ├── generate-android-icons.sh ├── googletest │ └── Android.mk ├── jpeg-6b │ ├── Android.mk │ ├── CleanSpec.mk │ ├── MODULE_LICENSE_BSD_LIKE │ ├── NOTICE │ ├── README │ ├── ThirdPartyProject.prop │ ├── ansi2knr.1 │ ├── ansi2knr.c │ ├── armv6_idct.S │ ├── cderror.h │ ├── cdjpeg.c │ ├── cdjpeg.h │ ├── change.log │ ├── cjpeg.1 │ ├── cjpeg.c │ ├── ckconfig.c │ ├── coderules.doc │ ├── config.guess │ ├── config.sub │ ├── configure │ ├── djpeg.1 │ ├── djpeg.c │ ├── example.c │ ├── filelist.doc │ ├── install-sh │ ├── install.doc │ ├── jcapimin.c │ ├── jcapistd.c │ ├── jccoefct.c │ ├── jccolor.c │ ├── jcdctmgr.c │ ├── jchuff.c │ ├── jchuff.h │ ├── jcinit.c │ ├── jcmainct.c │ ├── jcmarker.c │ ├── jcmaster.c │ ├── jcomapi.c │ ├── jconfig.bcc │ ├── jconfig.cfg │ ├── jconfig.dj │ ├── jconfig.doc │ ├── jconfig.h │ ├── jconfig.mac │ ├── jconfig.manx │ ├── jconfig.mc6 │ ├── jconfig.sas │ ├── jconfig.st │ ├── jconfig.vc │ ├── jconfig.vms │ ├── jconfig.wat │ ├── jcparam.c │ ├── jcphuff.c │ ├── jcprepct.c │ ├── jcsample.c │ ├── jctrans.c │ ├── jdapimin.c │ ├── jdapistd.c │ ├── jdatadst.c │ ├── jdatasrc.c │ ├── jdcoefct.c │ ├── jdcolor.c │ ├── jdct.h │ ├── jddctmgr.c │ ├── jdhuff.c │ ├── jdhuff.h │ ├── jdinput.c │ ├── jdmainct.c │ ├── jdmarker.c │ ├── jdmaster.c │ ├── jdmerge.c │ ├── jdphuff.c │ ├── jdpostct.c │ ├── jdsample.c │ ├── jdtrans.c │ ├── jerror.c │ ├── jerror.h │ ├── jfdctflt.c │ ├── jfdctfst.c │ ├── jfdctint.c │ ├── jidctflt.c │ ├── jidctfst.c │ ├── jidctint.c │ ├── jidctintelsse.c │ ├── jidctred.c │ ├── jinclude.h │ ├── jmem-android.c │ ├── jmem-ashmem.c │ ├── jmemansi.c │ ├── jmemdos.c │ ├── jmemdosa.asm │ ├── jmemmac.c │ ├── jmemmgr.c │ ├── jmemname.c │ ├── jmemnobs.c │ ├── jmemsys.h │ ├── jmorecfg.h │ ├── jpegint.h │ ├── jpeglib.h │ ├── jpegtran.1 │ ├── jpegtran.c │ ├── jquant1.c │ ├── jquant2.c │ ├── jutils.c │ ├── jversion.h │ ├── libjpeg.doc │ ├── ltconfig │ ├── ltmain.sh │ ├── makcjpeg.st │ ├── makdjpeg.st │ ├── makeapps.ds │ ├── makefile.ansi │ ├── makefile.bcc │ ├── makefile.cfg │ ├── makefile.dj │ ├── makefile.manx │ ├── makefile.mc6 │ ├── makefile.mms │ ├── makefile.sas │ ├── makefile.unix │ ├── makefile.vc │ ├── makefile.vms │ ├── makefile.wat │ ├── makelib.ds │ ├── makeproj.mac │ ├── makljpeg.st │ ├── maktjpeg.st │ ├── makvms.opt │ ├── rdbmp.c │ ├── rdcolmap.c │ ├── rdgif.c │ ├── rdjpgcom.1 │ ├── rdjpgcom.c │ ├── rdppm.c │ ├── rdrle.c │ ├── rdswitch.c │ ├── rdtarga.c │ ├── sources.make │ ├── structure.doc │ ├── testimg.bmp │ ├── testimg.jpg │ ├── testimg.ppm │ ├── testimgp.jpg │ ├── testorig.jpg │ ├── testprog.jpg │ ├── transupp.c │ ├── transupp.h │ ├── usage.doc │ ├── wizard.doc │ ├── wrbmp.c │ ├── wrgif.c │ ├── wrjpgcom.1 │ ├── wrjpgcom.c │ ├── wrppm.c │ ├── wrrle.c │ └── wrtarga.c ├── libpng-1.2.46 │ ├── png.c │ ├── png.h │ ├── pngconf.h │ ├── pngerror.c │ ├── pnggccrd.c │ ├── pngget.c │ ├── pngmem.c │ ├── pngpread.c │ ├── pngread.c │ ├── pngrio.c │ ├── pngrtran.c │ ├── pngrutil.c │ ├── pngset.c │ ├── pngtrans.c │ ├── pngusr.h │ ├── pngvcrd.c │ ├── pngwio.c │ ├── pngwrite.c │ ├── pngwtran.c │ ├── pngwutil.c │ └── sources.make ├── libselinux │ ├── NOTICE │ ├── README │ ├── include │ │ └── selinux │ │ │ ├── android.h │ │ │ ├── avc.h │ │ │ ├── context.h │ │ │ ├── label.h │ │ │ └── selinux.h │ ├── sources.mk │ └── src │ │ ├── android.c │ │ ├── avc.c │ │ ├── avc_internal.c │ │ ├── avc_internal.h │ │ ├── avc_sidtab.c │ │ ├── avc_sidtab.h │ │ ├── booleans.c │ │ ├── callbacks.c │ │ ├── callbacks.h │ │ ├── canonicalize_context.c │ │ ├── checkAccess.c │ │ ├── check_context.c │ │ ├── compute_av.c │ │ ├── compute_create.c │ │ ├── context.c │ │ ├── context_internal.h │ │ ├── deny_unknown.c │ │ ├── disable.c │ │ ├── dso.h │ │ ├── enabled.c │ │ ├── fgetfilecon.c │ │ ├── freecon.c │ │ ├── fsetfilecon.c │ │ ├── get_initial_context.c │ │ ├── getenforce.c │ │ ├── getfilecon.c │ │ ├── getpeercon.c │ │ ├── init.c │ │ ├── label.c │ │ ├── label_android_property.c │ │ ├── label_file.c │ │ ├── label_internal.h │ │ ├── lgetfilecon.c │ │ ├── load_policy.c │ │ ├── lsetfilecon.c │ │ ├── mapping.c │ │ ├── mapping.h │ │ ├── policy.h │ │ ├── policyvers.c │ │ ├── procattr.c │ │ ├── selinux_internal.h │ │ ├── selinux_netlink.h │ │ ├── sestatus.c │ │ ├── setenforce.c │ │ ├── setfilecon.c │ │ └── stringrep.c ├── libsparse │ ├── README │ ├── include │ │ └── sparse │ │ │ └── sparse.h │ ├── sources.mk │ └── src │ │ ├── backed_block.c │ │ ├── backed_block.h │ │ ├── defs.h │ │ ├── img2simg.c │ │ ├── output_file.c │ │ ├── output_file.h │ │ ├── simg2img.c │ │ ├── simg2simg.c │ │ ├── simg_dump.py │ │ ├── sparse.c │ │ ├── sparse_crc32.c │ │ ├── sparse_crc32.h │ │ ├── sparse_defs.h │ │ ├── sparse_err.c │ │ ├── sparse_file.h │ │ ├── sparse_format.h │ │ └── sparse_read.c ├── mini-glib │ ├── README │ ├── include │ │ └── glib.h │ ├── sources.make │ └── src │ │ ├── glib-mini-win32.c │ │ └── glib-mini.c ├── sdl2-2.0.3 │ ├── COPYING.txt │ ├── CREDITS.txt │ ├── README-SDL.txt │ ├── README.txt │ ├── config │ │ └── include │ │ │ ├── SDL_config.h │ │ │ ├── SDL_config_linux.h │ │ │ └── dynapi │ │ │ └── SDL_dynapi.h │ ├── include │ │ ├── SDL.h │ │ ├── SDL_assert.h │ │ ├── SDL_atomic.h │ │ ├── SDL_audio.h │ │ ├── SDL_bits.h │ │ ├── SDL_blendmode.h │ │ ├── SDL_clipboard.h │ │ ├── SDL_config.h.cmake │ │ ├── SDL_config.h.in │ │ ├── SDL_config_android.h │ │ ├── SDL_config_iphoneos.h │ │ ├── SDL_config_macosx.h │ │ ├── SDL_config_minimal.h │ │ ├── SDL_config_pandora.h │ │ ├── SDL_config_psp.h │ │ ├── SDL_config_windows.h │ │ ├── SDL_config_winrt.h │ │ ├── SDL_config_wiz.h │ │ ├── SDL_copying.h │ │ ├── SDL_cpuinfo.h │ │ ├── SDL_egl.h │ │ ├── SDL_endian.h │ │ ├── SDL_error.h │ │ ├── SDL_events.h │ │ ├── SDL_filesystem.h │ │ ├── SDL_gamecontroller.h │ │ ├── SDL_gesture.h │ │ ├── SDL_haptic.h │ │ ├── SDL_hints.h │ │ ├── SDL_joystick.h │ │ ├── SDL_keyboard.h │ │ ├── SDL_keycode.h │ │ ├── SDL_loadso.h │ │ ├── SDL_log.h │ │ ├── SDL_main.h │ │ ├── SDL_messagebox.h │ │ ├── SDL_mouse.h │ │ ├── SDL_mutex.h │ │ ├── SDL_name.h │ │ ├── SDL_opengl.h │ │ ├── SDL_opengles.h │ │ ├── SDL_opengles2.h │ │ ├── SDL_pixels.h │ │ ├── SDL_platform.h │ │ ├── SDL_power.h │ │ ├── SDL_quit.h │ │ ├── SDL_rect.h │ │ ├── SDL_render.h │ │ ├── SDL_revision.h │ │ ├── SDL_rwops.h │ │ ├── SDL_scancode.h │ │ ├── SDL_shape.h │ │ ├── SDL_stdinc.h │ │ ├── SDL_surface.h │ │ ├── SDL_system.h │ │ ├── SDL_syswm.h │ │ ├── SDL_test.h │ │ ├── SDL_test_assert.h │ │ ├── SDL_test_common.h │ │ ├── SDL_test_compare.h │ │ ├── SDL_test_crc32.h │ │ ├── SDL_test_font.h │ │ ├── SDL_test_fuzzer.h │ │ ├── SDL_test_harness.h │ │ ├── SDL_test_images.h │ │ ├── SDL_test_log.h │ │ ├── SDL_test_md5.h │ │ ├── SDL_test_random.h │ │ ├── SDL_thread.h │ │ ├── SDL_timer.h │ │ ├── SDL_touch.h │ │ ├── SDL_types.h │ │ ├── SDL_version.h │ │ ├── SDL_video.h │ │ ├── begin_code.h │ │ ├── close_code.h │ │ └── doxyfile │ ├── sources.make │ └── src │ │ ├── SDL.c │ │ ├── SDL_assert.c │ │ ├── SDL_assert_c.h │ │ ├── SDL_error.c │ │ ├── SDL_error_c.h │ │ ├── SDL_hints.c │ │ ├── SDL_internal.h │ │ ├── SDL_log.c │ │ ├── atomic │ │ ├── SDL_atomic.c │ │ └── SDL_spinlock.c │ │ ├── audio │ │ ├── SDL_audio.c │ │ ├── SDL_audio_c.h │ │ ├── SDL_audiocvt.c │ │ ├── SDL_audiodev.c │ │ ├── SDL_audiodev_c.h │ │ ├── SDL_audiomem.h │ │ ├── SDL_audiotypecvt.c │ │ ├── SDL_mixer.c │ │ ├── SDL_sysaudio.h │ │ ├── SDL_wave.c │ │ ├── SDL_wave.h │ │ ├── alsa │ │ │ ├── SDL_alsa_audio.c │ │ │ └── SDL_alsa_audio.h │ │ ├── android │ │ │ ├── SDL_androidaudio.c │ │ │ └── SDL_androidaudio.h │ │ ├── arts │ │ │ ├── SDL_artsaudio.c │ │ │ └── SDL_artsaudio.h │ │ ├── bsd │ │ │ ├── SDL_bsdaudio.c │ │ │ └── SDL_bsdaudio.h │ │ ├── coreaudio │ │ │ ├── SDL_coreaudio.c │ │ │ └── SDL_coreaudio.h │ │ ├── directsound │ │ │ ├── SDL_directsound.c │ │ │ ├── SDL_directsound.h │ │ │ └── directx.h │ │ ├── disk │ │ │ ├── SDL_diskaudio.c │ │ │ └── SDL_diskaudio.h │ │ ├── dsp │ │ │ ├── SDL_dspaudio.c │ │ │ └── SDL_dspaudio.h │ │ ├── dummy │ │ │ ├── SDL_dummyaudio.c │ │ │ └── SDL_dummyaudio.h │ │ ├── esd │ │ │ ├── SDL_esdaudio.c │ │ │ └── SDL_esdaudio.h │ │ ├── fusionsound │ │ │ ├── SDL_fsaudio.c │ │ │ └── SDL_fsaudio.h │ │ ├── haiku │ │ │ ├── SDL_haikuaudio.cc │ │ │ └── SDL_haikuaudio.h │ │ ├── nas │ │ │ ├── SDL_nasaudio.c │ │ │ └── SDL_nasaudio.h │ │ ├── paudio │ │ │ ├── SDL_paudio.c │ │ │ └── SDL_paudio.h │ │ ├── psp │ │ │ ├── SDL_pspaudio.c │ │ │ └── SDL_pspaudio.h │ │ ├── pulseaudio │ │ │ ├── SDL_pulseaudio.c │ │ │ └── SDL_pulseaudio.h │ │ ├── qsa │ │ │ ├── SDL_qsa_audio.c │ │ │ └── SDL_qsa_audio.h │ │ ├── sdlgenaudiocvt.pl │ │ ├── sndio │ │ │ ├── SDL_sndioaudio.c │ │ │ └── SDL_sndioaudio.h │ │ ├── sun │ │ │ ├── SDL_sunaudio.c │ │ │ └── SDL_sunaudio.h │ │ ├── winmm │ │ │ ├── SDL_winmm.c │ │ │ └── SDL_winmm.h │ │ └── xaudio2 │ │ │ ├── SDL_xaudio2.c │ │ │ ├── SDL_xaudio2_winrthelpers.cpp │ │ │ └── SDL_xaudio2_winrthelpers.h │ │ ├── core │ │ ├── android │ │ │ ├── SDL_android.c │ │ │ └── SDL_android.h │ │ ├── linux │ │ │ ├── SDL_evdev.c │ │ │ ├── SDL_evdev.h │ │ │ ├── SDL_udev.c │ │ │ └── SDL_udev.h │ │ ├── windows │ │ │ ├── SDL_windows.c │ │ │ └── SDL_windows.h │ │ └── winrt │ │ │ ├── SDL_winrtapp_common.cpp │ │ │ ├── SDL_winrtapp_common.h │ │ │ ├── SDL_winrtapp_direct3d.cpp │ │ │ ├── SDL_winrtapp_direct3d.h │ │ │ ├── SDL_winrtapp_xaml.cpp │ │ │ └── SDL_winrtapp_xaml.h │ │ ├── cpuinfo │ │ └── SDL_cpuinfo.c │ │ ├── dynapi │ │ ├── SDL_dynapi.c │ │ ├── SDL_dynapi_overrides.h │ │ ├── SDL_dynapi_procs.h │ │ └── gendynapi.pl │ │ ├── events │ │ ├── SDL_clipboardevents.c │ │ ├── SDL_clipboardevents_c.h │ │ ├── SDL_dropevents.c │ │ ├── SDL_dropevents_c.h │ │ ├── SDL_events.c │ │ ├── SDL_events_c.h │ │ ├── SDL_gesture.c │ │ ├── SDL_gesture_c.h │ │ ├── SDL_keyboard.c │ │ ├── SDL_keyboard_c.h │ │ ├── SDL_mouse.c │ │ ├── SDL_mouse_c.h │ │ ├── SDL_quit.c │ │ ├── SDL_sysevents.h │ │ ├── SDL_touch.c │ │ ├── SDL_touch_c.h │ │ ├── SDL_windowevents.c │ │ ├── SDL_windowevents_c.h │ │ ├── blank_cursor.h │ │ ├── default_cursor.h │ │ ├── scancodes_darwin.h │ │ ├── scancodes_linux.h │ │ ├── scancodes_windows.h │ │ └── scancodes_xfree86.h │ │ ├── file │ │ ├── SDL_rwops.c │ │ └── cocoa │ │ │ ├── SDL_rwopsbundlesupport.h │ │ │ └── SDL_rwopsbundlesupport.m │ │ ├── filesystem │ │ ├── cocoa │ │ │ └── SDL_sysfilesystem.m │ │ ├── dummy │ │ │ └── SDL_sysfilesystem.c │ │ ├── haiku │ │ │ └── SDL_sysfilesystem.cc │ │ ├── unix │ │ │ └── SDL_sysfilesystem.c │ │ ├── windows │ │ │ └── SDL_sysfilesystem.c │ │ └── winrt │ │ │ └── SDL_sysfilesystem.cpp │ │ ├── haptic │ │ ├── SDL_haptic.c │ │ ├── SDL_haptic_c.h │ │ ├── SDL_syshaptic.h │ │ ├── darwin │ │ │ ├── SDL_syshaptic.c │ │ │ └── SDL_syshaptic_c.h │ │ ├── dummy │ │ │ └── SDL_syshaptic.c │ │ ├── linux │ │ │ └── SDL_syshaptic.c │ │ └── windows │ │ │ ├── SDL_syshaptic.c │ │ │ └── SDL_syshaptic_c.h │ │ ├── joystick │ │ ├── SDL_gamecontroller.c │ │ ├── SDL_gamecontrollerdb.h │ │ ├── SDL_joystick.c │ │ ├── SDL_joystick_c.h │ │ ├── SDL_sysjoystick.h │ │ ├── android │ │ │ ├── SDL_sysjoystick.c │ │ │ └── SDL_sysjoystick_c.h │ │ ├── bsd │ │ │ └── SDL_sysjoystick.c │ │ ├── darwin │ │ │ ├── SDL_sysjoystick.c │ │ │ └── SDL_sysjoystick_c.h │ │ ├── dummy │ │ │ └── SDL_sysjoystick.c │ │ ├── haiku │ │ │ └── SDL_haikujoystick.cc │ │ ├── iphoneos │ │ │ ├── SDLUIAccelerationDelegate.h │ │ │ ├── SDLUIAccelerationDelegate.m │ │ │ └── SDL_sysjoystick.m │ │ ├── linux │ │ │ ├── SDL_sysjoystick.c │ │ │ └── SDL_sysjoystick_c.h │ │ ├── psp │ │ │ └── SDL_sysjoystick.c │ │ ├── sort_controllers.py │ │ ├── windows │ │ │ ├── SDL_dxjoystick.c │ │ │ ├── SDL_dxjoystick_c.h │ │ │ └── SDL_mmjoystick.c │ │ └── winrt │ │ │ └── SDL_xinputjoystick.c │ │ ├── libm │ │ ├── e_atan2.c │ │ ├── e_log.c │ │ ├── e_pow.c │ │ ├── e_rem_pio2.c │ │ ├── e_sqrt.c │ │ ├── k_cos.c │ │ ├── k_rem_pio2.c │ │ ├── k_sin.c │ │ ├── math_libm.h │ │ ├── math_private.h │ │ ├── s_atan.c │ │ ├── s_copysign.c │ │ ├── s_cos.c │ │ ├── s_fabs.c │ │ ├── s_floor.c │ │ ├── s_scalbn.c │ │ └── s_sin.c │ │ ├── loadso │ │ ├── dlopen │ │ │ └── SDL_sysloadso.c │ │ ├── dummy │ │ │ └── SDL_sysloadso.c │ │ ├── haiku │ │ │ └── SDL_sysloadso.c │ │ └── windows │ │ │ └── SDL_sysloadso.c │ │ ├── main │ │ ├── android │ │ │ └── SDL_android_main.c │ │ ├── dummy │ │ │ └── SDL_dummy_main.c │ │ ├── haiku │ │ │ ├── SDL_BApp.h │ │ │ ├── SDL_BeApp.cc │ │ │ └── SDL_BeApp.h │ │ ├── psp │ │ │ └── SDL_psp_main.c │ │ ├── windows │ │ │ ├── SDL_windows_main.c │ │ │ └── version.rc │ │ └── winrt │ │ │ └── SDL_winrt_main_NonXAML.cpp │ │ ├── power │ │ ├── SDL_power.c │ │ ├── android │ │ │ └── SDL_syspower.c │ │ ├── haiku │ │ │ └── SDL_syspower.c │ │ ├── linux │ │ │ └── SDL_syspower.c │ │ ├── macosx │ │ │ └── SDL_syspower.c │ │ ├── psp │ │ │ └── SDL_syspower.c │ │ ├── uikit │ │ │ ├── SDL_syspower.h │ │ │ └── SDL_syspower.m │ │ ├── windows │ │ │ └── SDL_syspower.c │ │ └── winrt │ │ │ └── SDL_syspower.cpp │ │ ├── render │ │ ├── SDL_d3dmath.c │ │ ├── SDL_d3dmath.h │ │ ├── SDL_render.c │ │ ├── SDL_sysrender.h │ │ ├── SDL_yuv_mmx.c │ │ ├── SDL_yuv_sw.c │ │ ├── SDL_yuv_sw_c.h │ │ ├── direct3d │ │ │ └── SDL_render_d3d.c │ │ ├── direct3d11 │ │ │ ├── SDL_render_d3d11.c │ │ │ ├── SDL_render_winrt.cpp │ │ │ └── SDL_render_winrt.h │ │ ├── mmx.h │ │ ├── opengl │ │ │ ├── SDL_glfuncs.h │ │ │ ├── SDL_render_gl.c │ │ │ ├── SDL_shaders_gl.c │ │ │ └── SDL_shaders_gl.h │ │ ├── opengles │ │ │ ├── SDL_glesfuncs.h │ │ │ └── SDL_render_gles.c │ │ ├── opengles2 │ │ │ ├── SDL_gles2funcs.h │ │ │ ├── SDL_render_gles2.c │ │ │ ├── SDL_shaders_gles2.c │ │ │ └── SDL_shaders_gles2.h │ │ ├── psp │ │ │ └── SDL_render_psp.c │ │ └── software │ │ │ ├── SDL_blendfillrect.c │ │ │ ├── SDL_blendfillrect.h │ │ │ ├── SDL_blendline.c │ │ │ ├── SDL_blendline.h │ │ │ ├── SDL_blendpoint.c │ │ │ ├── SDL_blendpoint.h │ │ │ ├── SDL_draw.h │ │ │ ├── SDL_drawline.c │ │ │ ├── SDL_drawline.h │ │ │ ├── SDL_drawpoint.c │ │ │ ├── SDL_drawpoint.h │ │ │ ├── SDL_render_sw.c │ │ │ ├── SDL_render_sw_c.h │ │ │ ├── SDL_rotate.c │ │ │ └── SDL_rotate.h │ │ ├── stdlib │ │ ├── SDL_getenv.c │ │ ├── SDL_iconv.c │ │ ├── SDL_malloc.c │ │ ├── SDL_qsort.c │ │ ├── SDL_stdlib.c │ │ └── SDL_string.c │ │ ├── test │ │ ├── SDL_test_assert.c │ │ ├── SDL_test_common.c │ │ ├── SDL_test_compare.c │ │ ├── SDL_test_crc32.c │ │ ├── SDL_test_font.c │ │ ├── SDL_test_fuzzer.c │ │ ├── SDL_test_harness.c │ │ ├── SDL_test_imageBlit.c │ │ ├── SDL_test_imageBlitBlend.c │ │ ├── SDL_test_imageFace.c │ │ ├── SDL_test_imagePrimitives.c │ │ ├── SDL_test_imagePrimitivesBlend.c │ │ ├── SDL_test_log.c │ │ ├── SDL_test_md5.c │ │ └── SDL_test_random.c │ │ ├── thread │ │ ├── SDL_systhread.h │ │ ├── SDL_thread.c │ │ ├── SDL_thread_c.h │ │ ├── generic │ │ │ ├── SDL_syscond.c │ │ │ ├── SDL_sysmutex.c │ │ │ ├── SDL_sysmutex_c.h │ │ │ ├── SDL_syssem.c │ │ │ ├── SDL_systhread.c │ │ │ ├── SDL_systhread_c.h │ │ │ └── SDL_systls.c │ │ ├── psp │ │ │ ├── SDL_syscond.c │ │ │ ├── SDL_sysmutex.c │ │ │ ├── SDL_sysmutex_c.h │ │ │ ├── SDL_syssem.c │ │ │ ├── SDL_systhread.c │ │ │ └── SDL_systhread_c.h │ │ ├── pthread │ │ │ ├── SDL_syscond.c │ │ │ ├── SDL_sysmutex.c │ │ │ ├── SDL_sysmutex_c.h │ │ │ ├── SDL_syssem.c │ │ │ ├── SDL_systhread.c │ │ │ ├── SDL_systhread_c.h │ │ │ └── SDL_systls.c │ │ ├── stdcpp │ │ │ ├── SDL_syscond.cpp │ │ │ ├── SDL_sysmutex.cpp │ │ │ ├── SDL_sysmutex_c.h │ │ │ ├── SDL_systhread.cpp │ │ │ └── SDL_systhread_c.h │ │ └── windows │ │ │ ├── SDL_sysmutex.c │ │ │ ├── SDL_syssem.c │ │ │ ├── SDL_systhread.c │ │ │ ├── SDL_systhread_c.h │ │ │ └── SDL_systls.c │ │ ├── timer │ │ ├── SDL_timer.c │ │ ├── SDL_timer_c.h │ │ ├── dummy │ │ │ └── SDL_systimer.c │ │ ├── haiku │ │ │ └── SDL_systimer.c │ │ ├── psp │ │ │ └── SDL_systimer.c │ │ ├── unix │ │ │ └── SDL_systimer.c │ │ └── windows │ │ │ └── SDL_systimer.c │ │ └── video │ │ ├── SDL_RLEaccel.c │ │ ├── SDL_RLEaccel_c.h │ │ ├── SDL_blit.c │ │ ├── SDL_blit.h │ │ ├── SDL_blit_0.c │ │ ├── SDL_blit_1.c │ │ ├── SDL_blit_A.c │ │ ├── SDL_blit_N.c │ │ ├── SDL_blit_auto.c │ │ ├── SDL_blit_auto.h │ │ ├── SDL_blit_copy.c │ │ ├── SDL_blit_copy.h │ │ ├── SDL_blit_slow.c │ │ ├── SDL_blit_slow.h │ │ ├── SDL_bmp.c │ │ ├── SDL_clipboard.c │ │ ├── SDL_egl.c │ │ ├── SDL_egl_c.h │ │ ├── SDL_fillrect.c │ │ ├── SDL_pixels.c │ │ ├── SDL_pixels_c.h │ │ ├── SDL_rect.c │ │ ├── SDL_rect_c.h │ │ ├── SDL_shape.c │ │ ├── SDL_shape_internals.h │ │ ├── SDL_stretch.c │ │ ├── SDL_surface.c │ │ ├── SDL_sysvideo.h │ │ ├── SDL_video.c │ │ ├── android │ │ ├── SDL_androidclipboard.c │ │ ├── SDL_androidclipboard.h │ │ ├── SDL_androidevents.c │ │ ├── SDL_androidevents.h │ │ ├── SDL_androidgl.c │ │ ├── SDL_androidkeyboard.c │ │ ├── SDL_androidkeyboard.h │ │ ├── SDL_androidtouch.c │ │ ├── SDL_androidtouch.h │ │ ├── SDL_androidvideo.c │ │ ├── SDL_androidvideo.h │ │ ├── SDL_androidwindow.c │ │ └── SDL_androidwindow.h │ │ ├── cocoa │ │ ├── SDL_cocoaclipboard.h │ │ ├── SDL_cocoaclipboard.m │ │ ├── SDL_cocoaevents.h │ │ ├── SDL_cocoaevents.m │ │ ├── SDL_cocoakeyboard.h │ │ ├── SDL_cocoakeyboard.m │ │ ├── SDL_cocoamessagebox.h │ │ ├── SDL_cocoamessagebox.m │ │ ├── SDL_cocoamodes.h │ │ ├── SDL_cocoamodes.m │ │ ├── SDL_cocoamouse.h │ │ ├── SDL_cocoamouse.m │ │ ├── SDL_cocoamousetap.h │ │ ├── SDL_cocoamousetap.m │ │ ├── SDL_cocoaopengl.h │ │ ├── SDL_cocoaopengl.m │ │ ├── SDL_cocoashape.h │ │ ├── SDL_cocoashape.m │ │ ├── SDL_cocoavideo.h │ │ ├── SDL_cocoavideo.m │ │ ├── SDL_cocoawindow.h │ │ └── SDL_cocoawindow.m │ │ ├── directfb │ │ ├── SDL_DirectFB_WM.c │ │ ├── SDL_DirectFB_WM.h │ │ ├── SDL_DirectFB_dyn.c │ │ ├── SDL_DirectFB_dyn.h │ │ ├── SDL_DirectFB_events.c │ │ ├── SDL_DirectFB_events.h │ │ ├── SDL_DirectFB_modes.c │ │ ├── SDL_DirectFB_modes.h │ │ ├── SDL_DirectFB_mouse.c │ │ ├── SDL_DirectFB_mouse.h │ │ ├── SDL_DirectFB_opengl.c │ │ ├── SDL_DirectFB_opengl.h │ │ ├── SDL_DirectFB_render.c │ │ ├── SDL_DirectFB_render.h │ │ ├── SDL_DirectFB_shape.c │ │ ├── SDL_DirectFB_shape.h │ │ ├── SDL_DirectFB_video.c │ │ ├── SDL_DirectFB_video.h │ │ ├── SDL_DirectFB_window.c │ │ └── SDL_DirectFB_window.h │ │ ├── dummy │ │ ├── SDL_nullevents.c │ │ ├── SDL_nullevents_c.h │ │ ├── SDL_nullframebuffer.c │ │ ├── SDL_nullframebuffer_c.h │ │ ├── SDL_nullvideo.c │ │ └── SDL_nullvideo.h │ │ ├── haiku │ │ ├── SDL_BWin.h │ │ ├── SDL_bclipboard.cc │ │ ├── SDL_bclipboard.h │ │ ├── SDL_bevents.cc │ │ ├── SDL_bevents.h │ │ ├── SDL_bframebuffer.cc │ │ ├── SDL_bframebuffer.h │ │ ├── SDL_bkeyboard.cc │ │ ├── SDL_bkeyboard.h │ │ ├── SDL_bmodes.cc │ │ ├── SDL_bmodes.h │ │ ├── SDL_bopengl.cc │ │ ├── SDL_bopengl.h │ │ ├── SDL_bvideo.cc │ │ ├── SDL_bvideo.h │ │ ├── SDL_bwindow.cc │ │ └── SDL_bwindow.h │ │ ├── mir │ │ ├── SDL_mirdyn.c │ │ ├── SDL_mirdyn.h │ │ ├── SDL_mirevents.c │ │ ├── SDL_mirevents.h │ │ ├── SDL_mirframebuffer.c │ │ ├── SDL_mirframebuffer.h │ │ ├── SDL_mirmouse.c │ │ ├── SDL_mirmouse.h │ │ ├── SDL_miropengl.c │ │ ├── SDL_miropengl.h │ │ ├── SDL_mirsym.h │ │ ├── SDL_mirvideo.c │ │ ├── SDL_mirvideo.h │ │ ├── SDL_mirwindow.c │ │ └── SDL_mirwindow.h │ │ ├── pandora │ │ ├── SDL_pandora.c │ │ ├── SDL_pandora.h │ │ ├── SDL_pandora_events.c │ │ └── SDL_pandora_events.h │ │ ├── psp │ │ ├── SDL_pspevents.c │ │ ├── SDL_pspevents_c.h │ │ ├── SDL_pspgl.c │ │ ├── SDL_pspgl_c.h │ │ ├── SDL_pspmouse.c │ │ ├── SDL_pspmouse_c.h │ │ ├── SDL_pspvideo.c │ │ └── SDL_pspvideo.h │ │ ├── raspberry │ │ ├── SDL_rpievents.c │ │ ├── SDL_rpievents_c.h │ │ ├── SDL_rpimouse.c │ │ ├── SDL_rpimouse.h │ │ ├── SDL_rpiopengles.c │ │ ├── SDL_rpiopengles.h │ │ ├── SDL_rpivideo.c │ │ └── SDL_rpivideo.h │ │ ├── sdlgenblit.pl │ │ ├── uikit │ │ ├── SDL_uikitappdelegate.h │ │ ├── SDL_uikitappdelegate.m │ │ ├── SDL_uikitevents.h │ │ ├── SDL_uikitevents.m │ │ ├── SDL_uikitmessagebox.h │ │ ├── SDL_uikitmessagebox.m │ │ ├── SDL_uikitmodes.h │ │ ├── SDL_uikitmodes.m │ │ ├── SDL_uikitopengles.h │ │ ├── SDL_uikitopengles.m │ │ ├── SDL_uikitopenglview.h │ │ ├── SDL_uikitopenglview.m │ │ ├── SDL_uikitvideo.h │ │ ├── SDL_uikitvideo.m │ │ ├── SDL_uikitview.h │ │ ├── SDL_uikitview.m │ │ ├── SDL_uikitviewcontroller.h │ │ ├── SDL_uikitviewcontroller.m │ │ ├── SDL_uikitwindow.h │ │ ├── SDL_uikitwindow.m │ │ └── keyinfotable.h │ │ ├── wayland │ │ ├── SDL_waylanddyn.c │ │ ├── SDL_waylanddyn.h │ │ ├── SDL_waylandevents.c │ │ ├── SDL_waylandevents_c.h │ │ ├── SDL_waylandmouse.c │ │ ├── SDL_waylandmouse.h │ │ ├── SDL_waylandopengles.c │ │ ├── SDL_waylandopengles.h │ │ ├── SDL_waylandsym.h │ │ ├── SDL_waylandtouch.c │ │ ├── SDL_waylandtouch.h │ │ ├── SDL_waylandvideo.c │ │ ├── SDL_waylandvideo.h │ │ ├── SDL_waylandwindow.c │ │ └── SDL_waylandwindow.h │ │ ├── windows │ │ ├── SDL_msctf.h │ │ ├── SDL_vkeys.h │ │ ├── SDL_windowsclipboard.c │ │ ├── SDL_windowsclipboard.h │ │ ├── SDL_windowsevents.c │ │ ├── SDL_windowsevents.h │ │ ├── SDL_windowsframebuffer.c │ │ ├── SDL_windowsframebuffer.h │ │ ├── SDL_windowskeyboard.c │ │ ├── SDL_windowskeyboard.h │ │ ├── SDL_windowsmessagebox.c │ │ ├── SDL_windowsmessagebox.h │ │ ├── SDL_windowsmodes.c │ │ ├── SDL_windowsmodes.h │ │ ├── SDL_windowsmouse.c │ │ ├── SDL_windowsmouse.h │ │ ├── SDL_windowsopengl.c │ │ ├── SDL_windowsopengl.h │ │ ├── SDL_windowsopengles.c │ │ ├── SDL_windowsopengles.h │ │ ├── SDL_windowsshape.c │ │ ├── SDL_windowsshape.h │ │ ├── SDL_windowsvideo.c │ │ ├── SDL_windowsvideo.h │ │ ├── SDL_windowswindow.c │ │ ├── SDL_windowswindow.h │ │ └── wmmsg.h │ │ ├── winrt │ │ ├── SDL_winrtevents.cpp │ │ ├── SDL_winrtevents_c.h │ │ ├── SDL_winrtkeyboard.cpp │ │ ├── SDL_winrtmouse.cpp │ │ ├── SDL_winrtmouse_c.h │ │ ├── SDL_winrtopengles.cpp │ │ ├── SDL_winrtopengles.h │ │ ├── SDL_winrtpointerinput.cpp │ │ ├── SDL_winrtvideo.cpp │ │ └── SDL_winrtvideo_cpp.h │ │ └── x11 │ │ ├── SDL_x11clipboard.c │ │ ├── SDL_x11clipboard.h │ │ ├── SDL_x11dyn.c │ │ ├── SDL_x11dyn.h │ │ ├── SDL_x11events.c │ │ ├── SDL_x11events.h │ │ ├── SDL_x11framebuffer.c │ │ ├── SDL_x11framebuffer.h │ │ ├── SDL_x11keyboard.c │ │ ├── SDL_x11keyboard.h │ │ ├── SDL_x11messagebox.c │ │ ├── SDL_x11messagebox.h │ │ ├── SDL_x11modes.c │ │ ├── SDL_x11modes.h │ │ ├── SDL_x11mouse.c │ │ ├── SDL_x11mouse.h │ │ ├── SDL_x11opengl.c │ │ ├── SDL_x11opengl.h │ │ ├── SDL_x11opengles.c │ │ ├── SDL_x11opengles.h │ │ ├── SDL_x11shape.c │ │ ├── SDL_x11shape.h │ │ ├── SDL_x11sym.h │ │ ├── SDL_x11touch.c │ │ ├── SDL_x11touch.h │ │ ├── SDL_x11video.c │ │ ├── SDL_x11video.h │ │ ├── SDL_x11window.c │ │ ├── SDL_x11window.h │ │ ├── SDL_x11xinput2.c │ │ ├── SDL_x11xinput2.h │ │ ├── edid-parse.c │ │ ├── edid.h │ │ ├── imKStoUCS.c │ │ └── imKStoUCS.h ├── update-emugl-sources.sh └── zlib-1.2.8 │ ├── adler32.c │ ├── compress.c │ ├── configure │ ├── crc32.c │ ├── crc32.h │ ├── deflate.c │ ├── deflate.h │ ├── gzclose.c │ ├── gzguts.h │ ├── gzlib.c │ ├── gzread.c │ ├── gzwrite.c │ ├── infback.c │ ├── inffast.c │ ├── inffast.h │ ├── inffixed.h │ ├── inflate.c │ ├── inflate.h │ ├── inftrees.c │ ├── inftrees.h │ ├── sources.make │ ├── trees.c │ ├── trees.h │ ├── uncompr.c │ ├── zconf.h │ ├── zlib.h │ ├── zutil.c │ └── zutil.h ├── dma-helpers.c ├── docs ├── ANDROID-ADB-QEMU.TXT ├── ANDROID-CONFIG-FILES.TXT ├── ANDROID-ELFF.TXT ├── ANDROID-FRAMEBUFFER.TXT ├── ANDROID-KERNEL.TXT ├── ANDROID-KEYBOARD-EMULATION.TXT ├── ANDROID-QEMU-PIPE.TXT ├── ANDROID-QEMUD-SERVICES.TXT ├── ANDROID-QEMUD.TXT ├── ANDROID-SKIN-FILES.TXT ├── AUDIO.TXT ├── CHAR-DEVICES.TXT ├── CPU-EMULATION.TXT ├── DEVELOPMENT.TXT ├── DISPLAY-STATE.TXT ├── GOLDFISH-VIRTUAL-HARDWARE.TXT ├── GPU-EMULATION.TXT ├── PREBUILT-BINARIES.TXT └── QEMU-MEMORY-MANAGEMENT.TXT ├── exec.c ├── feature_to_c.sh ├── fpu ├── softfloat-macros.h ├── softfloat-specialize.h └── softfloat.c ├── gdb-xml ├── arm-core.xml ├── arm-neon.xml ├── arm-vfp.xml ├── arm-vfp3.xml ├── cf-core.xml ├── cf-fp.xml ├── power-altivec.xml ├── power-core.xml ├── power-fpu.xml ├── power-spe.xml └── power64-core.xml ├── gdbstub.c ├── gen-charmap.py ├── gen-skin.py ├── hw ├── android │ ├── android_arm.c │ ├── android_mips.c │ └── goldfish │ │ ├── audio.c │ │ ├── battery.c │ │ ├── device.c │ │ ├── events_device.c │ │ ├── fb.c │ │ ├── interrupt.c │ │ ├── mmc.c │ │ ├── nand.c │ │ ├── nand_reg.h │ │ ├── pipe.c │ │ ├── profile.c │ │ ├── timer.c │ │ ├── trace.c │ │ ├── tty.c │ │ └── vmem.c ├── arm │ ├── arm_gic.c │ ├── armv7m.c │ ├── armv7m_nvic.c │ ├── boot.c │ └── pic.c ├── core │ ├── dma.c │ ├── irq.c │ ├── loader.c │ ├── qdev.c │ ├── sysbus.c │ └── uboot_image.h ├── i386 │ ├── pc.c │ └── smbios.c ├── input │ ├── pckbd.c │ └── ps2.c ├── intc │ ├── apic.c │ ├── i8259.c │ └── ioapic.c ├── mips │ ├── cputimer.c │ ├── mips_int.c │ ├── mips_pic.c │ └── mips_r4k.c ├── net │ ├── ne2000.c │ └── smc91c111.c ├── nvram │ └── fw_cfg.c ├── pci-host │ ├── pci_host.h │ └── piix.c ├── pci │ └── pci.c ├── timer │ ├── i8254.c │ └── mc146818rtc.c └── watchdog │ └── watchdog.c ├── hxtool ├── images ├── android_icon.ico ├── android_icon.rc ├── android_icon_128.png └── android_icon_256.png ├── include ├── android │ ├── cbuffer.h │ ├── charpipe.h │ ├── iolooper.h │ ├── kvm.h │ ├── log-rotate.h │ ├── monitor.h │ ├── qemu-debug.h │ ├── shaper.h │ ├── sockets.h │ ├── tcpdump.h │ ├── trace_common.h │ └── user-events.h ├── block │ ├── aio.h │ ├── block.h │ └── block_int.h ├── disas │ ├── bfd.h │ └── disas.h ├── elf.h ├── exec │ ├── code-profile.h │ ├── cpu-all.h │ ├── cpu-common.h │ ├── cpu-defs.h │ ├── cputlb.h │ ├── def-helper.h │ ├── exec-all.h │ ├── gdbstub.h │ ├── gen-icount.h │ ├── hax.h │ ├── hwaddr.h │ ├── ioport.h │ ├── poison.h │ ├── ram_addr.h │ ├── softmmu-semi.h │ ├── softmmu_exec.h │ ├── softmmu_header.h │ ├── softmmu_template.h │ └── spinlock.h ├── fpu │ └── softfloat.h ├── hw │ ├── android │ │ └── goldfish │ │ │ ├── device.h │ │ │ ├── nand.h │ │ │ ├── pipe.h │ │ │ ├── profile.h │ │ │ ├── trace.h │ │ │ └── vmem.h │ ├── arm │ │ ├── arm.h │ │ └── pic.h │ ├── audiodev.h │ ├── boards.h │ ├── devices.h │ ├── elf_ops.h │ ├── hw.h │ ├── i386 │ │ ├── pc.h │ │ └── smbios.h │ ├── input │ │ └── ps2.h │ ├── irq.h │ ├── isa │ │ └── isa.h │ ├── loader.h │ ├── mips │ │ ├── bios.h │ │ └── mips.h │ ├── mmc.h │ ├── msmouse.h │ ├── nvram │ │ └── fw_cfg.h │ ├── pci │ │ ├── pci.h │ │ └── pci_ids.h │ ├── power_supply.h │ ├── qdev-core.h │ ├── qdev.h │ ├── sysbus.h │ ├── timer │ │ └── hpet.h │ └── xen │ │ └── xen.h ├── migration │ ├── migration.h │ ├── qemu-file.h │ └── vmstate.h ├── monitor │ └── monitor.h ├── net │ └── net.h ├── qapi │ ├── dealloc-visitor.h │ ├── error.h │ ├── opts-visitor.h │ ├── qmp-input-visitor.h │ ├── qmp-output-visitor.h │ ├── qmp │ │ ├── dispatch.h │ │ ├── json-lexer.h │ │ ├── json-parser.h │ │ ├── json-streamer.h │ │ ├── qbool.h │ │ ├── qdict.h │ │ ├── qerror.h │ │ ├── qfloat.h │ │ ├── qint.h │ │ ├── qjson.h │ │ ├── qlist.h │ │ ├── qobject.h │ │ ├── qstring.h │ │ └── types.h │ ├── string-input-visitor.h │ ├── string-output-visitor.h │ ├── visitor-impl.h │ └── visitor.h ├── qemu-common.h ├── qemu │ ├── aes.h │ ├── atomic.h │ ├── bitmap.h │ ├── bitops.h │ ├── bswap.h │ ├── cache-utils.h │ ├── compatfd.h │ ├── compiler.h │ ├── config-file.h │ ├── envlist.h │ ├── error-report.h │ ├── host-utils.h │ ├── int128.h │ ├── iov.h │ ├── log.h │ ├── module.h │ ├── notify.h │ ├── option.h │ ├── osdep.h │ ├── queue.h │ ├── range.h │ ├── sockets.h │ ├── thread-posix.h │ ├── thread-win32.h │ ├── thread.h │ ├── timer.h │ ├── tls.h │ └── typedefs.h ├── qom │ ├── cpu.h │ ├── object.h │ └── qom-qobject.h ├── sysemu │ ├── arch_init.h │ ├── balloon.h │ ├── blockdev.h │ ├── char.h │ ├── cpus.h │ ├── dma.h │ ├── kvm.h │ ├── os-posix.h │ ├── os-win32.h │ ├── sysemu.h │ └── watchdog.h ├── trace.h └── ui │ └── console.h ├── iohandler.c ├── ioport.c ├── kvm-all.c ├── kvm-android.c ├── log-rotate-android.c ├── main-loop.c ├── memory-android.c ├── migration-dummy-android.c ├── monitor-android.c ├── net ├── checksum.c ├── net-android.c └── net.c ├── offset_layout.py ├── os-posix.c ├── os-win32.c ├── pc-bios └── keymaps │ ├── ar │ ├── common │ ├── da │ ├── de │ ├── de-ch │ ├── en-gb │ ├── en-us │ ├── es │ ├── et │ ├── fi │ ├── fo │ ├── fr │ ├── fr-be │ ├── fr-ca │ ├── fr-ch │ ├── hr │ ├── hu │ ├── is │ ├── it │ ├── ja │ ├── lt │ ├── lv │ ├── mk │ ├── modifiers │ ├── nl │ ├── nl-be │ ├── no │ ├── pl │ ├── pt │ ├── pt-br │ ├── ru │ ├── sl │ ├── sv │ ├── th │ └── tr ├── posix-aio-compat.c ├── proxy ├── proxy_common.c ├── proxy_common.h ├── proxy_http.c ├── proxy_http.h ├── proxy_http_connector.c ├── proxy_http_int.h ├── proxy_http_rewriter.c └── proxy_int.h ├── qapi-auto-generated ├── qapi-types.c ├── qapi-types.h ├── qapi-visit.c ├── qapi-visit.h ├── qmp-commands.h └── qmp-marshal.c ├── qapi-schema.json ├── qemu-char.c ├── qemu-log.c ├── qemu-options.h ├── qemu-options.hx ├── qemu-timer.c ├── qobject ├── json-lexer.c ├── json-parser.c ├── json-streamer.c ├── qbool.c ├── qdict.c ├── qerror.c ├── qfloat.c ├── qint.c ├── qjson.c ├── qlist.c └── qstring.c ├── qom ├── container.c ├── object.c └── qom-qobject.c ├── savevm.c ├── scripts ├── ordereddict.py ├── ordereddict.pyc ├── qapi-commands.py ├── qapi-types.py ├── qapi-visit.py ├── qapi.py └── qapi.pyc ├── slirp-android ├── COPYRIGHT ├── bootp.c ├── bootp.h ├── cksum.c ├── ctl.h ├── debug.c ├── debug.h ├── helper.h ├── icmp_var.h ├── if.c ├── if.h ├── ip.h ├── ip_icmp.c ├── ip_icmp.h ├── ip_input.c ├── ip_output.c ├── libslirp.h ├── main.h ├── mbuf.c ├── mbuf.h ├── misc.c ├── misc.h ├── sbuf.c ├── sbuf.h ├── slirp.c ├── slirp.h ├── slirp_config.h ├── socket.c ├── socket.h ├── tcp.h ├── tcp_input.c ├── tcp_output.c ├── tcp_subr.c ├── tcp_timer.c ├── tcp_timer.h ├── tcp_var.h ├── tcpip.h ├── tftp.c ├── tftp.h ├── udp.c └── udp.h ├── slirp ├── COPYRIGHT ├── bootp.c ├── bootp.h ├── cksum.c ├── ctl.h ├── debug.c ├── debug.h ├── icmp_var.h ├── if.c ├── if.h ├── ip.h ├── ip_icmp.c ├── ip_icmp.h ├── ip_input.c ├── ip_output.c ├── libslirp.h ├── main.h ├── mbuf.c ├── mbuf.h ├── misc.c ├── misc.h ├── sbuf.c ├── sbuf.h ├── slirp.c ├── slirp.h ├── slirp_config.h ├── socket.c ├── socket.h ├── tcp.h ├── tcp_input.c ├── tcp_output.c ├── tcp_subr.c ├── tcp_timer.c ├── tcp_timer.h ├── tcp_var.h ├── tcpip.h ├── tftp.c ├── tftp.h ├── udp.c └── udp.h ├── sys-tree.h ├── tap-win32.c ├── target-arm ├── arm-semi.c ├── cpu-qom.h ├── cpu.h ├── helper.c ├── helper.h ├── iwmmxt_helper.c ├── kvm-consts.h ├── machine.c ├── neon_helper.c ├── op_addsub.h ├── op_helper.c ├── qom-cpu.h └── translate.c ├── target-i386 ├── TODO ├── cc_helper.c ├── cc_helper_template.h ├── cpu-qom.h ├── cpu.h ├── excp_helper.c ├── fpu_helper.c ├── hax-all.c ├── hax-darwin.c ├── hax-darwin.h ├── hax-i386.h ├── hax-interface.h ├── hax-windows.c ├── hax-windows.h ├── helper.c ├── helper.h ├── int_helper.c ├── kvm-gs-restore.c ├── kvm-gs-restore.h ├── kvm.c ├── machine.c ├── mem_helper.c ├── misc_helper.c ├── ops_sse.h ├── ops_sse_header.h ├── seg_helper.c ├── shift_helper_template.h ├── smm_helper.c ├── svm.h ├── svm_helper.c └── translate.c ├── target-mips ├── TODO ├── cpu-qom.h ├── cpu.h ├── helper.c ├── helper.h ├── machine.c ├── mips-defs.h ├── op_helper.c ├── translate.c └── translate_init.c ├── tcg-runtime.c ├── tcg ├── LICENSE ├── README ├── TODO ├── i386 │ ├── tcg-target.c │ └── tcg-target.h ├── optimize.c ├── tcg-be-ldst.h ├── tcg-be-null.h ├── tcg-op.h ├── tcg-opc.h ├── tcg-runtime.h ├── tcg.c └── tcg.h ├── telephony ├── Jamfile ├── android_modem.c ├── android_modem.h ├── gsm.c ├── gsm.h ├── gsm_unittest.cpp ├── modem_driver.c ├── modem_driver.h ├── remote_call.c ├── remote_call.h ├── sim_card.c ├── sim_card.h ├── simulator.c ├── sms.c ├── sms.h ├── sysdeps.h ├── sysdeps_posix.c ├── sysdeps_qemu.c ├── test1.c └── test2.c ├── translate-all.c ├── translate-all.h ├── ui ├── console.c ├── curses.c ├── curses_keys.h ├── d3des.c ├── d3des.h ├── input.c ├── keymaps.c ├── keymaps.h ├── sdl_keysym.h ├── vgafont.h ├── vnc-android.c ├── vnc-tls.h ├── vnc.c ├── vnc.h ├── vnc_keysym.h └── vnchextile.h ├── util ├── aes.c ├── bitmap.c ├── bitops.c ├── cache-utils.c ├── compatfd.c ├── cutils.c ├── envlist.c ├── error.c ├── hexdump.c ├── host-utils.c ├── iov.c ├── module.c ├── notify.c ├── osdep.c ├── oslib-posix.c ├── oslib-win32.c ├── path.c ├── qemu-config.c ├── qemu-error.c ├── qemu-option.c ├── qemu-sockets-android.c ├── qemu-sockets.c ├── qemu-thread-posix.c ├── qemu-thread-win32.c ├── qemu-timer-common.c ├── unicode.c └── yield-android.c └── vl-android.c /.gitignore: -------------------------------------------------------------------------------- 1 | images/emulator_icon32.o 2 | images/emulator_icon64.o 3 | objs/* 4 | *.*~ 5 | 6 | -------------------------------------------------------------------------------- /Android.mk: -------------------------------------------------------------------------------- 1 | # the following test is made to detect that we were called 2 | # through the 'm' or 'mm' build commands. if not, we use the 3 | # standard QEMU Makefile 4 | # 5 | LOCAL_PATH:= $(call my-dir) 6 | include $(LOCAL_PATH)/Makefile.android 7 | -------------------------------------------------------------------------------- /CleanSpec.mk: -------------------------------------------------------------------------------- 1 | # This empty file is here solely for the purpose of optimizing the Android build 2 | # Please keep it there, and empty, thanks :-) 3 | # 4 | 5 | $(call add-clean-step, rm -rf $(OUT_DIR)/host/linux-x86/obj/{SHARED,STATIC}_LIBRARIES/emulator*) 6 | $(call add-clean-step, rm -rf $(OUT_DIR)/host/linux-x86/obj/EXECUTABLES/emulator*) 7 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | This package contains the sources to the Android emulator program. 2 | 3 | See docs/DEVELOPMENT.TXT for building instructions. 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The following points clarify the QEMU license: 2 | 3 | 1) QEMU as a whole is released under the GNU General Public License 4 | 5 | 2) Parts of QEMU have specific licenses which are compatible with the 6 | GNU General Public License. Hence each source file contains its own 7 | licensing information. 8 | 9 | In particular, the QEMU virtual CPU core library (libqemu.a) is 10 | released under the GNU Lesser General Public License. Many hardware 11 | device emulation sources are released under the BSD license. 12 | 13 | 3) The Tiny Code Generator (TCG) is released under the BSD license 14 | (see license headers in files). 15 | 16 | 4) QEMU is a trademark of Fabrice Bellard. 17 | 18 | Fabrice Bellard. 19 | -------------------------------------------------------------------------------- /MODULE_LICENSE_GPL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/MODULE_LICENSE_GPL -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | This directory contains the sources of the Android emulator, 2 | a QEMU-based program to emulate virtual devices running various 3 | releases of the Android platform image. 4 | 5 | See the docs/ directory for more documentation about this 6 | code base and the platforms it emulates. 7 | 8 | If you plan to contribute patches, please read docs/DEVELOPMENT.TXT -------------------------------------------------------------------------------- /android/adb-qemud.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_ADB_PIPE_H_ 18 | #define ANDROID_ADB_PIPE_H_ 19 | 20 | /* 21 | * Implements 'adb' QEMUD service that is responsible for the data exchange 22 | * between the emulator and ADB daemon running on the guest. 23 | */ 24 | 25 | /* Initializes adb QEMUD service. */ 26 | extern void android_adb_service_init(void); 27 | 28 | #endif /* ANDROID_ADB_PIPE_H_ */ 29 | 30 | -------------------------------------------------------------------------------- /android/audio-test.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2010 The Android Open Source Project 2 | ** 3 | ** This software is licensed under the terms of the GNU General Public 4 | ** License version 2, as published by the Free Software Foundation, and 5 | ** may be copied, distributed, and modified under those terms. 6 | ** 7 | ** This program is distributed in the hope that it will be useful, 8 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | ** GNU General Public License for more details. 11 | */ 12 | #ifndef ANDROID_AUDIO_TEST_H 13 | #define ANDROID_AUDIO_TEST_H 14 | 15 | /* Start the audio test output, this will register a virtual sound 16 | * device that sends a saw signal to the audio sub-system. This is 17 | * used to test that the audio backend works without having to boot 18 | * a full system and launch a music application. 19 | */ 20 | extern int android_audio_test_start_out(void); 21 | 22 | #endif /* ANDROID_AUDIO_TEST_H */ 23 | -------------------------------------------------------------------------------- /android/base/misc/HttpUtils.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Android Open Source Project 2 | // 3 | // This software is licensed under the terms of the GNU General Public 4 | // License version 2, as published by the Free Software Foundation, and 5 | // may be copied, distributed, and modified under those terms. 6 | // 7 | // This program is distributed in the hope that it will be useful, 8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | // GNU General Public License for more details. 11 | 12 | #ifndef ANDROID_BASE_MISC_HTTP_UTILS_H 13 | #define ANDROID_BASE_MISC_HTTP_UTILS_H 14 | 15 | #include 16 | 17 | namespace android { 18 | namespace base { 19 | 20 | // Return true iff the content of |line|, or |lineLen| characters, 21 | // matches an HTTP request definition. See section 5.1 or RFC 2616. 22 | bool httpIsRequestLine(const char* line, size_t lineLen); 23 | 24 | } // namespace base 25 | } // namespace android 26 | 27 | #endif // ANDROID_BASE_MISC_HTTP_UTILS_H 28 | -------------------------------------------------------------------------------- /android/base/synchronization/ConditionVariable_unittest.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 The Android Open Source Project 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #include "android/base/synchronization/ConditionVariable.h" 16 | 17 | #include 18 | 19 | namespace android { 20 | namespace base { 21 | 22 | TEST(ConditionVariable, init) { 23 | ConditionVariable cond; 24 | } 25 | 26 | } // namespace base 27 | } // namespace android 28 | -------------------------------------------------------------------------------- /android/build/getdir.make: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2008 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | 16 | # used to return in 'dir' the name of the current operating system 17 | # we really get the value from the configuration script 18 | # 19 | dir := $(HOST_OS) 20 | -------------------------------------------------------------------------------- /android/build/prebuilt_static_library.make: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2015 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | 16 | #$(info PREBUILT_STATIC_LIBRARY $(LOCAL_MODULE) SRCS=$(LOCAL_SRC_FILES)) 17 | LOCAL_BUILT_MODULE := $(call local-library-path,$(LOCAL_MODULE)) 18 | 19 | $(LOCAL_BUILT_MODULE): $(LOCAL_SRC_FILES) 20 | @mkdir -p $(dir $@) 21 | @echo "PrebuiltLibrary: $@" 22 | $(hide) cp -f $< $@ 23 | 24 | LIBRARIES += $(LOCAL_BUILT_MODULE) 25 | -------------------------------------------------------------------------------- /android/camera/camera-service.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_CAMERA_CAMERA_SERVICE_H_ 18 | #define ANDROID_CAMERA_CAMERA_SERVICE_H_ 19 | 20 | /* 21 | * Contains public camera service API. 22 | */ 23 | 24 | /* Initializes camera emulation service over qemu pipe. */ 25 | extern void android_camera_service_init(void); 26 | 27 | /* Lists available web cameras. */ 28 | extern void android_list_web_cameras(void); 29 | 30 | #endif /* ANDROID_CAMERA_CAMERA_SERVICE_H_ */ 31 | -------------------------------------------------------------------------------- /android/config/config.h: -------------------------------------------------------------------------------- 1 | /* This file is included by target-specific files under 2 | * android/config/target-$ARCH/config.h, but contains all config 3 | * definitions that are independent of the target CPU. 4 | * 5 | * Do not include directly. 6 | */ 7 | #include "config-host.h" 8 | 9 | #define CONFIG_NAND 1 10 | #define CONFIG_SHAPER 1 11 | #define CONFIG_SOFTMMU 1 12 | #ifndef _WIN32 13 | #define CONFIG_NAND_LIMITS 1 14 | #endif 15 | -------------------------------------------------------------------------------- /android/config/target-arm/config.h: -------------------------------------------------------------------------------- 1 | /* ARM-specific configuration */ 2 | #include "android/config/config.h" 3 | 4 | #define TARGET_ARM 1 5 | #define CONFIG_SOFTFLOAT 1 6 | -------------------------------------------------------------------------------- /android/config/target-mips/config.h: -------------------------------------------------------------------------------- 1 | /* MIPS-specific configuration */ 2 | #include "android/config/config.h" 3 | 4 | #define TARGET_MIPS 1 5 | #define TARGET_MIPS64 1 6 | #define CONFIG_SOFTFLOAT 1 7 | -------------------------------------------------------------------------------- /android/config/target-x86/config.h: -------------------------------------------------------------------------------- 1 | /* x86-specific configuration */ 2 | #include "android/config/config.h" 3 | #define TARGET_X86_64 1 4 | #define TARGET_I386 1 5 | /* For now, KVM is only supported on Linux hosts */ 6 | #ifdef CONFIG_LINUX 7 | #define CONFIG_KVM 1 8 | #endif 9 | 10 | /* 11 | * HAX is supported in darwin and windows host 12 | */ 13 | #ifdef CONFIG_DARWIN 14 | #define CONFIG_HAX 1 15 | #endif 16 | 17 | #ifdef CONFIG_WIN32 18 | #define CONFIG_HAX 1 19 | #endif 20 | -------------------------------------------------------------------------------- /android/cpu_accelerator.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 The Android Open Source Project 2 | // 3 | // This software is licensed under the terms of the GNU General Public 4 | // License version 2, as published by the Free Software Foundation, and 5 | // may be copied, distributed, and modified under those terms. 6 | // 7 | // This program is distributed in the hope that it will be useful, 8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | // GNU General Public License for more details. 11 | 12 | #ifndef ANDROID_CPU_ACCELERATOR_H 13 | #define ANDROID_CPU_ACCELERATOR_H 14 | 15 | #include 16 | 17 | #include "android/utils/compiler.h" 18 | 19 | ANDROID_BEGIN_HEADER 20 | 21 | // Returns true if CPU acceleration is possible on this machine. 22 | // If |status| is not NULL, on exit, |*status| will be set to a 23 | // heap-allocated string describing the status of acceleration, 24 | // to be freed by the caller. 25 | bool android_hasCpuAcceleration(char** status); 26 | 27 | ANDROID_END_HEADER 28 | 29 | #endif // ANDROID_CPU_ACCELERATOR_H 30 | 31 | -------------------------------------------------------------------------------- /android/dependencies/MesaLib-10.4.2-patches.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/android/dependencies/MesaLib-10.4.2-patches.tar.xz -------------------------------------------------------------------------------- /android/dependencies/e2fsprogs-1.42.13-patches.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/android/dependencies/e2fsprogs-1.42.13-patches.tar.xz -------------------------------------------------------------------------------- /android/dependencies/glib-2.38.2-patches.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/android/dependencies/glib-2.38.2-patches.tar.xz -------------------------------------------------------------------------------- /android/display.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2010 The Android Open Source Project 2 | ** 3 | ** This software is licensed under the terms of the GNU General Public 4 | ** License version 2, as published by the Free Software Foundation, and 5 | ** may be copied, distributed, and modified under those terms. 6 | ** 7 | ** This program is distributed in the hope that it will be useful, 8 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | ** GNU General Public License for more details. 11 | */ 12 | #ifndef _ANDROID_DISPLAY_H 13 | #define _ANDROID_DISPLAY_H 14 | 15 | #include "ui/console.h" 16 | #include "android/framebuffer.h" 17 | 18 | extern void android_display_init(DisplayState* ds, QFrameBuffer* qfbuff); 19 | 20 | #endif /* _ANDROID_DISPLAY_H */ 21 | -------------------------------------------------------------------------------- /android/filesystems/testing/TestSupport.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Android Open Source Project 2 | // 3 | // This software is licensed under the terms of the GNU General Public 4 | // License version 2, as published by the Free Software Foundation, and 5 | // may be copied, distributed, and modified under those terms. 6 | // 7 | // This program is distributed in the hope that it will be useful, 8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | // GNU General Public License for more details. 11 | 12 | #ifndef ANDROID_FILESYSTEMS_TESTING_TEST_SUPPORT_H 13 | #define ANDROID_FILESYSTEMS_TESTING_TEST_SUPPORT_H 14 | 15 | #include 16 | 17 | namespace android { 18 | namespace testing { 19 | 20 | std::string CreateTempFilePath(); 21 | 22 | } // namespace testing 23 | } // namespace android 24 | 25 | #endif // ANDROID_FILESYSTEMS_TESTING_TEST_SUPPORT_H 26 | -------------------------------------------------------------------------------- /android/gps.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2007-2008 The Android Open Source Project 2 | ** 3 | ** This software is licensed under the terms of the GNU General Public 4 | ** License version 2, as published by the Free Software Foundation, and 5 | ** may be copied, distributed, and modified under those terms. 6 | ** 7 | ** This program is distributed in the hope that it will be useful, 8 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | ** GNU General Public License for more details. 11 | */ 12 | #ifndef _android_gps_h 13 | #define _android_gps_h 14 | 15 | #include "qemu-common.h" 16 | 17 | /* this is the internal character driver used to communicate with the 18 | * emulated GPS unit. see qemu_chr_open() in vl.c */ 19 | extern CharDriverState* android_gps_cs; 20 | 21 | extern void android_gps_send_nmea( const char* sentence ); 22 | 23 | #endif /* _android_gps_h */ 24 | -------------------------------------------------------------------------------- /android/hw-fingerprint.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2015 The Android Open Source Project 2 | ** 3 | ** This software is licensed under the terms of the GNU General Public 4 | ** License version 2, as published by the Free Software Foundation, and 5 | ** may be copied, distributed, and modified under those terms. 6 | ** 7 | ** This program is distributed in the hope that it will be useful, 8 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | ** GNU General Public License for more details. 11 | */ 12 | #ifndef _android_fingerprint_h 13 | #define _android_fingerprint_h 14 | 15 | #include "qemu-common.h" 16 | 17 | /* initialize */ 18 | extern void android_hw_fingerprint_init( void ); 19 | 20 | /* touch fingerprint sensor with fingerid*/ 21 | void android_hw_fingerprint_touch(int fingerid); 22 | 23 | /* take finger off the fingerprint sensor */ 24 | void android_hw_fingerprint_remove(); 25 | 26 | #endif /* _android_fingerprint_h */ 27 | -------------------------------------------------------------------------------- /android/hw-kmsg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2007-2008 The Android Open Source Project 2 | ** 3 | ** This software is licensed under the terms of the GNU General Public 4 | ** License version 2, as published by the Free Software Foundation, and 5 | ** may be copied, distributed, and modified under those terms. 6 | ** 7 | ** This program is distributed in the hope that it will be useful, 8 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | ** GNU General Public License for more details. 11 | */ 12 | #ifndef _android_kmsg_h 13 | #define _android_kmsg_h 14 | 15 | #include "qemu-common.h" 16 | 17 | /* this chardriver is used to read the kernel messages coming 18 | * from the first serial port (i.e. /dev/ttyS0) and store them 19 | * in memory for later... 20 | */ 21 | 22 | typedef enum { 23 | ANDROID_KMSG_SAVE_MESSAGES = (1 << 0), 24 | ANDROID_KMSG_PRINT_MESSAGES = (1 << 1), 25 | } AndroidKmsgFlags; 26 | 27 | extern void android_kmsg_init( AndroidKmsgFlags flags ); 28 | 29 | extern CharDriverState* android_kmsg_get_cs( void ); 30 | 31 | #endif /* _android_kmsg_h */ 32 | -------------------------------------------------------------------------------- /android/hw-pipe-net.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_PIPE_NET_H 18 | #define ANDROID_PIPE_NET_H 19 | 20 | void android_net_pipes_init(void); 21 | 22 | #endif /* ANDROID_PIPE_NET_H */ 23 | -------------------------------------------------------------------------------- /android/looper-generic.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Android Open Source Project 2 | // 3 | // This software is licensed under the terms of the GNU General Public 4 | // License version 2, as published by the Free Software Foundation, and 5 | // may be copied, distributed, and modified under those terms. 6 | // 7 | // This program is distributed in the hope that it will be useful, 8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | // GNU General Public License for more details. 11 | 12 | #include "android/looper-base.h" 13 | 14 | #include "android/base/async/Looper.h" 15 | 16 | using ::android::internal::GLooper; 17 | 18 | ::Looper* looper_newGeneric(void) { 19 | GLooper* glooper = new GLooper( 20 | ::android::base::Looper::create()); 21 | 22 | return &glooper->looper; 23 | } 24 | -------------------------------------------------------------------------------- /android/looper-qemu.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Android Open Source Project 2 | // 3 | // This software is licensed under the terms of the GNU General Public 4 | // License version 2, as published by the Free Software Foundation, and 5 | // may be copied, distributed, and modified under those terms. 6 | // 7 | // This program is distributed in the hope that it will be useful, 8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | // GNU General Public License for more details. 11 | 12 | #include "android/looper-base.h" 13 | 14 | #include "android/qemu/base/async/Looper.h" 15 | 16 | using ::android::internal::GLooper; 17 | 18 | ::Looper* looper_newCore(void) { 19 | GLooper* glooper = new GLooper( 20 | ::android::qemu::createLooper()); 21 | 22 | return &glooper->looper; 23 | } 24 | -------------------------------------------------------------------------------- /android/resource.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2007-2008 The Android Open Source Project 2 | ** 3 | ** This software is licensed under the terms of the GNU General Public 4 | ** License version 2, as published by the Free Software Foundation, and 5 | ** may be copied, distributed, and modified under those terms. 6 | ** 7 | ** This program is distributed in the hope that it will be useful, 8 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | ** GNU General Public License for more details. 11 | */ 12 | #ifndef _ANDROID_RESOURCE_H 13 | #define _ANDROID_RESOURCE_H 14 | 15 | #include 16 | 17 | extern const unsigned char* 18 | android_resource_find( const char* name, 19 | size_t *psize ); 20 | 21 | extern const unsigned char* 22 | android_icon_find( const char* name, 23 | size_t *psize ); 24 | 25 | #endif /* END */ 26 | 27 | -------------------------------------------------------------------------------- /android/scripts/tests/gen-entries/t.001/test._symbols: -------------------------------------------------------------------------------- 1 | _initLibrary 2 | _setStreamMode 3 | _initOpenGLRenderer 4 | _getHardwareStrings 5 | _setPostCallback 6 | _createOpenGLSubwindow 7 | _destroyOpenGLSubwindow 8 | _setOpenGLDisplayRotation 9 | _repaintOpenGLDisplay 10 | _stopOpenGLRenderer 11 | -------------------------------------------------------------------------------- /android/scripts/tests/gen-entries/t.001/test.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | initLibrary 3 | setStreamMode 4 | initOpenGLRenderer 5 | getHardwareStrings 6 | setPostCallback 7 | createOpenGLSubwindow 8 | destroyOpenGLSubwindow 9 | setOpenGLDisplayRotation 10 | repaintOpenGLDisplay 11 | stopOpenGLRenderer 12 | -------------------------------------------------------------------------------- /android/scripts/tests/gen-entries/t.001/test.sym: -------------------------------------------------------------------------------- 1 | VERSION { 2 | global: 3 | initLibrary; 4 | setStreamMode; 5 | initOpenGLRenderer; 6 | getHardwareStrings; 7 | setPostCallback; 8 | createOpenGLSubwindow; 9 | destroyOpenGLSubwindow; 10 | setOpenGLDisplayRotation; 11 | repaintOpenGLDisplay; 12 | stopOpenGLRenderer; 13 | local: 14 | *; 15 | }; 16 | -------------------------------------------------------------------------------- /android/scripts/tests/gen-entries/t.001/test.symbols: -------------------------------------------------------------------------------- 1 | initLibrary 2 | setStreamMode 3 | initOpenGLRenderer 4 | getHardwareStrings 5 | setPostCallback 6 | createOpenGLSubwindow 7 | destroyOpenGLSubwindow 8 | setOpenGLDisplayRotation 9 | repaintOpenGLDisplay 10 | stopOpenGLRenderer 11 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_arrow_back_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_battery_std_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_call_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_camera_enhance_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_close_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_crop_square_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_filter_tilt_shift_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_fullscreen_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_hangout_video_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_keyboard_arrow_down_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_keyboard_arrow_left_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_keyboard_arrow_right_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_keyboard_arrow_up_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_location_on_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_menu_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_mic_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_panorama_fish_eye_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_photo_camera_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_power_settings_new_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_sd_card_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_signal_cellular_4_bar_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_stay_current_portrait_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_unfold_less_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_unfold_more_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_volume_down_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_volume_up_48px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/skin/qt/images/ic_zoom_in_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/skin/qt/mac-native-window.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2015 The Android Open Source Project 2 | ** 3 | ** This software is licensed under the terms of the GNU General Public 4 | ** License version 2, as published by the Free Software Foundation, and 5 | ** may be copied, distributed, and modified under those terms. 6 | ** 7 | ** This program is distributed in the hope that it will be useful, 8 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | ** GNU General Public License for more details. 11 | */ 12 | #ifndef __MAC_NATIVE_WINDOW_C_INTF_H__ 13 | #define __MAC_NATIVE_WINDOW_C_INTF_H__ 14 | 15 | #ifdef __cplusplus 16 | extern "C" 17 | #endif 18 | void* getNSWindow(void* ns_view); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /android/skin/qt/mac-native-window.mm: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2015 The Android Open Source Project 2 | ** 3 | ** This software is licensed under the terms of the GNU General Public 4 | ** License version 2, as published by the Free Software Foundation, and 5 | ** may be copied, distributed, and modified under those terms. 6 | ** 7 | ** This program is distributed in the hope that it will be useful, 8 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | ** GNU General Public License for more details. 11 | */ 12 | 13 | #include 14 | 15 | #import "android/skin/qt/mac-native-window.h" 16 | 17 | void* getNSWindow(void* ns_view) { 18 | NSView *view = (NSView *)ns_view; 19 | if (!view) { 20 | return NULL; 21 | } 22 | Class viewClass = [view class]; 23 | Class nsviewClass = [NSView class]; 24 | if ([viewClass isSubclassOfClass:nsviewClass ]) { 25 | return [view window]; 26 | } else { 27 | return view; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /android/skin/qt/sources.mk: -------------------------------------------------------------------------------- 1 | # Definitions related to the Qt-based UI backend. 2 | 3 | ANDROID_SKIN_SOURCES += \ 4 | android/skin/qt/event-qt.cpp \ 5 | android/skin/qt/surface-qt.cpp \ 6 | android/skin/qt/winsys-qt.cpp \ 7 | 8 | ifeq (darwin,$(HOST_OS)) 9 | ANDROID_SKIN_SOURCES += \ 10 | android/skin/qt/mac-native-window.mm 11 | endif 12 | 13 | ANDROID_SKIN_SOURCES += \ 14 | android/skin/qt/emulator-window.cpp \ 15 | android/skin/qt/tool-window.cpp \ 16 | 17 | ANDROID_SKIN_QT_MOC_SRC_FILES := \ 18 | android/skin/qt/emulator-window.h \ 19 | android/skin/qt/tool-window.h \ 20 | 21 | ANDROID_SKIN_QT_RESOURCES := \ 22 | android/skin/qt/resources.qrc \ 23 | 24 | ANDROID_SKIN_QT_UI_SRC_FILES := \ 25 | android/skin/qt/battery.ui \ 26 | -------------------------------------------------------------------------------- /android/skin/qt/winsys-qt.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2014 The Android Open Source Project 2 | ** 3 | ** This software is licensed under the terms of the GNU General Public 4 | ** License version 2, as published by the Free Software Foundation, and 5 | ** may be copied, distributed, and modified under those terms. 6 | ** 7 | ** This program is distributed in the hope that it will be useful, 8 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | ** GNU General Public License for more details. 11 | */ 12 | #ifndef ANDROID_SKIN_QT_WINSYS_QT_H 13 | #define ANDROID_SKIN_QT_WINSYS_QT_H 14 | 15 | // Save the current window position for after the app exit. 16 | // This must be called in the aboutToQuit() signal handle for the 17 | // application window. 18 | extern void skin_winsys_save_window_pos(); 19 | 20 | #endif // ANDROID_SKIN_QT_WINSYS_QT_H 21 | -------------------------------------------------------------------------------- /android/skin/resource.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2007-2008 The Android Open Source Project 2 | ** 3 | ** This software is licensed under the terms of the GNU General Public 4 | ** License version 2, as published by the Free Software Foundation, and 5 | ** may be copied, distributed, and modified under those terms. 6 | ** 7 | ** This program is distributed in the hope that it will be useful, 8 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | ** GNU General Public License for more details. 11 | */ 12 | #ifndef ANDROID_SKIN_RESOURCE_H 13 | #define ANDROID_SKIN_RESOURCE_H 14 | 15 | #include 16 | 17 | // Find the resource data identified by |name|. On success return its 18 | // first address in memory, and sets |*psize| to its size in bytes. 19 | // On failure, return NULL. 20 | const unsigned char* skin_resource_find(const char* name, 21 | size_t* psize ); 22 | 23 | #endif // ANDROID_SKIN_RESOURCE_H 24 | -------------------------------------------------------------------------------- /android/skin/sources.mk: -------------------------------------------------------------------------------- 1 | # Definitions related to the emulator's UI implementation. 2 | # Note that there are two possible backends, based on the definitions 3 | # of EMULATOR_USE_SDL2 or EMULATOR_USE_QT. 4 | 5 | ANDROID_SKIN_QT_MOC_SRC_FILES := 6 | ANDROID_SKIN_QT_RESOURCES := 7 | 8 | ANDROID_SKIN_SOURCES := \ 9 | android/skin/charmap.c \ 10 | android/skin/rect.c \ 11 | android/skin/region.c \ 12 | android/skin/image.c \ 13 | android/skin/trackball.c \ 14 | android/skin/keyboard.c \ 15 | android/skin/keycode.c \ 16 | android/skin/keycode-buffer.c \ 17 | android/skin/keyset.c \ 18 | android/skin/file.c \ 19 | android/skin/window.c \ 20 | android/skin/resource.c \ 21 | android/skin/scaler.c \ 22 | android/skin/ui.c \ 23 | 24 | ifdef EMULATOR_USE_SDL2 25 | ANDROID_SKIN_SOURCES += \ 26 | android/skin/event-sdl2.c \ 27 | android/skin/surface-sdl2.c \ 28 | android/skin/winsys-sdl2.c \ 29 | 30 | endif # EMULATOR_USE_SDL2 31 | 32 | ifdef EMULATOR_USE_QT 33 | include $(LOCAL_PATH)/android/skin/qt/sources.mk 34 | endif # EMULATOR_USE_QT 35 | -------------------------------------------------------------------------------- /android/snapshot.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_SNAPSHOT_H 18 | #define ANDROID_SNAPSHOT_H 19 | 20 | #include "config/config.h" 21 | 22 | /* Prints a table with information on the snapshot stored in the file 23 | * 'snapstorage', then exit()s. 24 | */ 25 | void snapshot_print_and_exit( const char *snapstorage ); 26 | 27 | 28 | extern int android_snapshot_update_time; 29 | extern int android_snapshot_update_time_request; 30 | 31 | #endif /* ANDROID_SNAPSHOT_H */ 32 | -------------------------------------------------------------------------------- /android/utils/bufprint_unittest.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Android Open Source Project 2 | // 3 | // This software is licensed under the terms of the GNU General Public 4 | // License version 2, as published by the Free Software Foundation, and 5 | // may be copied, distributed, and modified under those terms. 6 | // 7 | // This program is distributed in the hope that it will be useful, 8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | // GNU General Public License for more details. 11 | 12 | #include "android/utils/bufprint.h" 13 | 14 | #include 15 | 16 | TEST(bufprint, SimpleString) { 17 | char buffer[128], *p = buffer, *end = p + sizeof(buffer); 18 | 19 | p = bufprint(p, end, "%s/%s", "foo", "bar"); 20 | EXPECT_EQ(buffer + 7, p); 21 | EXPECT_STREQ("foo/bar", buffer); 22 | } 23 | 24 | TEST(bufprint, TruncationOnOverflow) { 25 | char buffer[4], *p, *end = buffer + sizeof(buffer); 26 | p = bufprint(buffer, end, "foobar"); 27 | EXPECT_EQ(buffer + 4, p); 28 | EXPECT_STREQ("foo", buffer); 29 | } 30 | -------------------------------------------------------------------------------- /android/utils/host_bitness.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Android Open Source Project 2 | // 3 | // This software is licensed under the terms of the GNU General Public 4 | // License version 2, as published by the Free Software Foundation, and 5 | // may be copied, distributed, and modified under those terms. 6 | // 7 | // This program is distributed in the hope that it will be useful, 8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | // GNU General Public License for more details. 11 | 12 | #include "android/utils/host_bitness.h" 13 | 14 | #include "android/base/system/System.h" 15 | 16 | int android_getHostBitness(void) { 17 | return android::base::System::get()->getHostBitness(); 18 | } 19 | -------------------------------------------------------------------------------- /android/utils/host_bitness.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Android Open Source Project 2 | // 3 | // This software is licensed under the terms of the GNU General Public 4 | // License version 2, as published by the Free Software Foundation, and 5 | // may be copied, distributed, and modified under those terms. 6 | // 7 | // This program is distributed in the hope that it will be useful, 8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | // GNU General Public License for more details. 11 | 12 | #ifndef ANDROID_UTILS_HOST_BITNESS_H 13 | #define ANDROID_UTILS_HOST_BITNESS_H 14 | 15 | #include "android/utils/compiler.h" 16 | 17 | ANDROID_BEGIN_HEADER 18 | 19 | // Return the bitness of the host machine this program is running on. 20 | // This is independent of whether the current executable is a 32 or 64 21 | // bit binary. Returns 32 or 64. 22 | int android_getHostBitness(void); 23 | 24 | ANDROID_END_HEADER 25 | 26 | #endif // ANDROID_UTILS_HOST_BITNESS_H -------------------------------------------------------------------------------- /android/utils/host_bitness_unittest.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Android Open Source Project 2 | // 3 | // This software is licensed under the terms of the GNU General Public 4 | // License version 2, as published by the Free Software Foundation, and 5 | // may be copied, distributed, and modified under those terms. 6 | // 7 | // This program is distributed in the hope that it will be useful, 8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | // GNU General Public License for more details. 11 | 12 | #include "android/utils/host_bitness.h" 13 | 14 | #include 15 | 16 | #include 17 | 18 | TEST(HostBitness, android_getHostBitness) { 19 | int host_bitness = android_getHostBitness(); 20 | printf("Found host bitness: %d\n", host_bitness); 21 | EXPECT_TRUE(host_bitness == 32 || host_bitness == 64) << 22 | "Invalid host bitness: " << host_bitness; 23 | } 24 | -------------------------------------------------------------------------------- /android/utils/http_utils.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Android Open Source Project 2 | // 3 | // This software is licensed under the terms of the GNU General Public 4 | // License version 2, as published by the Free Software Foundation, and 5 | // may be copied, distributed, and modified under those terms. 6 | // 7 | // This program is distributed in the hope that it will be useful, 8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | // GNU General Public License for more details. 11 | 12 | #include "android/utils/http_utils.h" 13 | 14 | #include "android/base/misc/HttpUtils.h" 15 | 16 | bool android_http_is_request_line(const char* line, 17 | size_t line_len) { 18 | return android::base::httpIsRequestLine(line, line_len); 19 | } 20 | -------------------------------------------------------------------------------- /android/utils/http_utils.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Android Open Source Project 2 | // 3 | // This software is licensed under the terms of the GNU General Public 4 | // License version 2, as published by the Free Software Foundation, and 5 | // may be copied, distributed, and modified under those terms. 6 | // 7 | // This program is distributed in the hope that it will be useful, 8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | // GNU General Public License for more details. 11 | 12 | #ifndef ANDROID_UTILS_HTTP_UTILS_H 13 | #define ANDROID_UTILS_HTTP_UTILS_H 14 | 15 | #include "android/utils/compiler.h" 16 | 17 | #include 18 | #include 19 | 20 | ANDROID_BEGIN_HEADER 21 | 22 | // Simple C wrapper for android::base::httpIsRequestLine(). 23 | bool android_http_is_request_line(const char* line, 24 | size_t line_len); 25 | 26 | ANDROID_END_HEADER 27 | 28 | #endif // ANDROID_UTILS_HTTP_UTILS_H -------------------------------------------------------------------------------- /android/utils/setenv.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2008 The Android Open Source Project 2 | ** 3 | ** This software is licensed under the terms of the GNU General Public 4 | ** License version 2, as published by the Free Software Foundation, and 5 | ** may be copied, distributed, and modified under those terms. 6 | ** 7 | ** This program is distributed in the hope that it will be useful, 8 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | ** GNU General Public License for more details. 11 | */ 12 | #include 13 | #include 14 | #include 15 | 16 | #ifdef _WIN32 17 | int setenv(const char *name, const char *value, int overwrite) 18 | { 19 | int result = 0; 20 | if (overwrite || !getenv(name)) { 21 | size_t length = strlen(name) + strlen(value) + 2; 22 | char *string = malloc(length); 23 | snprintf(string, length, "%s=%s", name, value); 24 | result = putenv(string); 25 | } 26 | return result; 27 | } 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /android/utils/setenv.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2008 The Android Open Source Project 2 | ** 3 | ** This software is licensed under the terms of the GNU General Public 4 | ** License version 2, as published by the Free Software Foundation, and 5 | ** may be copied, distributed, and modified under those terms. 6 | ** 7 | ** This program is distributed in the hope that it will be useful, 8 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | ** GNU General Public License for more details. 11 | */ 12 | #ifndef ANDROID_UTILS_SETENV_H 13 | #define ANDROID_UTILS_SETENV_H 14 | 15 | #include "android/utils/compiler.h" 16 | 17 | ANDROID_BEGIN_HEADER 18 | 19 | #ifndef _WIN32 20 | #include 21 | #else 22 | extern void setenv(const char* name, const char* value, int overwrite); 23 | #endif 24 | 25 | ANDROID_END_HEADER 26 | 27 | #endif // ANDROID_UTILS_SETENV_H 28 | -------------------------------------------------------------------------------- /android/utils/string.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Android Open Source Project 2 | // 3 | // This software is licensed under the terms of the GNU General Public 4 | // License version 2, as published by the Free Software Foundation, and 5 | // may be copied, distributed, and modified under those terms. 6 | // 7 | // This program is distributed in the hope that it will be useful, 8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | // GNU General Public License for more details. 11 | 12 | #ifndef ANDROID_UTILS_STRING_H 13 | #define ANDROID_UTILS_STRING_H 14 | 15 | #include "android/utils/compiler.h" 16 | 17 | #include 18 | #if defined(__APPLE__) || defined(__FreeBSD__) 19 | #include 20 | #endif 21 | 22 | ANDROID_BEGIN_HEADER 23 | 24 | #if !defined(__APPLE__) && !defined(__FreeBSD__) 25 | size_t strlcpy(char* dst, const char * src, size_t size); 26 | #endif 27 | 28 | ANDROID_END_HEADER 29 | 30 | #endif // ANDROID_UTILS_STRING_H 31 | -------------------------------------------------------------------------------- /android/utils/vector.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | extern void 5 | _avector_ensure( void** items, size_t itemSize, unsigned* pMaxItems, unsigned newCount ) 6 | { 7 | unsigned oldMax = *pMaxItems; 8 | 9 | if (newCount > oldMax) { 10 | unsigned newMax = oldMax; 11 | unsigned bigMax = UINT_MAX / itemSize; 12 | 13 | if (itemSize == 0) { 14 | AASSERT_FAIL("trying to reallocate array of 0-size items (count=%d)\n", newCount); 15 | } 16 | 17 | if (newCount > bigMax) { 18 | AASSERT_FAIL("trying to reallocate over-sized array of %d-bytes items (%d > %d)\n", 19 | itemSize, newCount, bigMax); 20 | } 21 | 22 | while (newMax < newCount) { 23 | unsigned newMax2 = newMax + (newMax >> 1) + 4; 24 | if (newMax2 < newMax || newMax2 > bigMax) 25 | newMax2 = bigMax; 26 | newMax = newMax2; 27 | } 28 | 29 | *items = _android_array_realloc( *items, itemSize, newMax ); 30 | *pMaxItems = newMax; 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /android/utils/win32_cmdline_quote.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Android Open Source Project 2 | // 3 | // This software is licensed under the terms of the GNU General Public 4 | // License version 2, as published by the Free Software Foundation, and 5 | // may be copied, distributed, and modified under those terms. 6 | // 7 | // This program is distributed in the hope that it will be useful, 8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | // GNU General Public License for more details. 11 | 12 | #include "android/utils/win32_cmdline_quote.h" 13 | 14 | #include "android/base/system/Win32Utils.h" 15 | #include "android/base/String.h" 16 | 17 | #include "android/utils/system.h" 18 | 19 | char* win32_cmdline_quote(const char* param) { 20 | android::base::String result = 21 | android::base::Win32Utils::quoteCommandLine(param); 22 | return ASTRDUP(result.c_str()); 23 | } 24 | -------------------------------------------------------------------------------- /android/wear-agent/android_wear_agent.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Android Open Source Project 2 | // 3 | // This software is licensed under the terms of the GNU General Public 4 | // License version 2, as published by the Free Software Foundation, and 5 | // may be copied, distributed, and modified under those terms. 6 | // 7 | // This program is distributed in the hope that it will be useful, 8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | // GNU General Public License for more details. 11 | 12 | #ifndef ANDROID_WEAR_AGENT_ANDROID_WEAR_AGENT_H 13 | #define ANDROID_WEAR_AGENT_ANDROID_WEAR_AGENT_H 14 | 15 | // C interface to android/wear-agent/WearAgent.h 16 | 17 | #include "android/utils/compiler.h" 18 | #include "android/looper.h" 19 | 20 | ANDROID_BEGIN_HEADER 21 | 22 | // Start the agent, using |looper| to perform asynchronous tasks. 23 | void android_wear_agent_start(Looper* looper); 24 | 25 | // Stop the agent. 26 | void android_wear_agent_stop(void); 27 | 28 | ANDROID_END_HEADER 29 | 30 | #endif // ANDROID_WEAR_AGENT_ANDROID_WEAR_AGENT_H 31 | -------------------------------------------------------------------------------- /audio/audio_pt_int.h: -------------------------------------------------------------------------------- 1 | #ifndef QEMU_AUDIO_PT_INT_H 2 | #define QEMU_AUDIO_PT_INT_H 3 | 4 | #include 5 | 6 | struct audio_pt { 7 | const char *drv; 8 | pthread_t thread; 9 | pthread_cond_t cond; 10 | pthread_mutex_t mutex; 11 | }; 12 | 13 | int audio_pt_init (struct audio_pt *, void *(*) (void *), void *, 14 | const char *, const char *); 15 | int audio_pt_fini (struct audio_pt *, const char *); 16 | int audio_pt_lock (struct audio_pt *, const char *); 17 | int audio_pt_unlock (struct audio_pt *, const char *); 18 | int audio_pt_wait (struct audio_pt *, const char *); 19 | int audio_pt_unlock_and_signal (struct audio_pt *, const char *); 20 | int audio_pt_join (struct audio_pt *, void **, const char *); 21 | 22 | #endif /* audio_pt_int.h */ 23 | -------------------------------------------------------------------------------- /audio/audio_win_int.h: -------------------------------------------------------------------------------- 1 | #ifndef AUDIO_WIN_INT_H 2 | #define AUDIO_WIN_INT_H 3 | 4 | int waveformat_from_audio_settings (WAVEFORMATEX *wfx, 5 | struct audsettings *as); 6 | 7 | int waveformat_to_audio_settings (WAVEFORMATEX *wfx, 8 | struct audsettings *as); 9 | 10 | #endif /* AUDIO_WIN_INT_H */ 11 | -------------------------------------------------------------------------------- /audio/wrappers/esound.entries: -------------------------------------------------------------------------------- 1 | !esound 2 | %#include 3 | 4 | int esd_open_sound(const char *host); 5 | int esd_play_stream(esd_format_t format, int rate, const char *host, const char *name); 6 | int esd_record_stream(esd_format_t format, int rate, const char *host, const char *name); 7 | -------------------------------------------------------------------------------- /buffered_file.h: -------------------------------------------------------------------------------- 1 | /* 2 | * QEMU buffered QEMUFile 3 | * 4 | * Copyright IBM, Corp. 2008 5 | * 6 | * Authors: 7 | * Anthony Liguori 8 | * 9 | * This work is licensed under the terms of the GNU GPL, version 2. See 10 | * the COPYING file in the top-level directory. 11 | * 12 | */ 13 | 14 | #ifndef QEMU_BUFFERED_FILE_H 15 | #define QEMU_BUFFERED_FILE_H 16 | 17 | #include "hw/hw.h" 18 | 19 | typedef ssize_t (BufferedPutFunc)(void *opaque, const void *data, size_t size); 20 | typedef void (BufferedPutReadyFunc)(void *opaque); 21 | typedef void (BufferedWaitForUnfreezeFunc)(void *opaque); 22 | typedef int (BufferedCloseFunc)(void *opaque); 23 | 24 | QEMUFile *qemu_fopen_ops_buffered(void *opaque, size_t xfer_limit, 25 | BufferedPutFunc *put_buffer, 26 | BufferedPutReadyFunc *put_ready, 27 | BufferedWaitForUnfreezeFunc *wait_for_unfreeze, 28 | BufferedCloseFunc *close); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /code-profile.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2014-2015 The Android Open Source Project 2 | ** 3 | ** This software is licensed under the terms of the GNU General Public 4 | ** License version 2, as published by the Free Software Foundation, and 5 | ** may be copied, distributed, and modified under those terms. 6 | ** 7 | ** This program is distributed in the hope that it will be useful, 8 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | ** GNU General Public License for more details. 11 | */ 12 | 13 | #include "exec/code-profile.h" 14 | 15 | // IMPORTANT: Initializers are required to ensure that these 16 | // variables are properly linked into the final executables on 17 | // Darwin. Otherwise, the build will succeed, but trying to run 18 | // a program will result in a dyld failure. 19 | // 20 | CodeProfileRecordFunc code_profile_record_func = NULL; 21 | 22 | const char *code_profile_dirname = NULL; 23 | -------------------------------------------------------------------------------- /distrib/README: -------------------------------------------------------------------------------- 1 | This directory contains the sources of various third-party libraries used 2 | by the Android emulator build. Plus a few helper scripts. 3 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/GLESv1_dec/gles1.types: -------------------------------------------------------------------------------- 1 | GLbitfield 32 0x%08x 2 | GLboolean 8 %d 3 | GLclampf 32 %f 4 | GLclampx 32 0x%08x 5 | GLeglImageOES 32 %p 6 | GLenum 32 0x%08x 7 | GLfixed 32 0x%08x 8 | GLfloat 32 %f 9 | GLint 32 %d 10 | GLintptr 32 %p 11 | GLshort 16 %d 12 | GLsizei 32 %d 13 | GLsizeiptr 32 %p 14 | GLubyte 8 0x%02x 15 | GLuint 32 %u 16 | GLvoid 0 %x 17 | GLchar 8 %d 18 | GLenum* 32 0x%08x 19 | GLboolean* 32 0x%08x 20 | GLclampf* 32 0x%08x 21 | GLclampx* 32 0x%08x 22 | GLeglImageOES* 32 0x%08x 23 | GLfixed* 32 0x%08x 24 | GLfloat* 32 0x%08x 25 | GLint* 32 0x%08x 26 | GLshort* 32 0x%08x 27 | GLsizei* 32 0x%08x 28 | GLubyte* 32 0x%08x 29 | GLuint* 32 0x%08x 30 | GLvoid* 32 0x%08x 31 | GLchar* 32 0x%08x 32 | GLvoid** 32 0x%08x 33 | void* 32 0x%08x 34 | GLvoid*const* 32 0x%08x 35 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/GLESv1_dec/gles1_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef __GLES1_TYPES__H 17 | #define __GLES1_TYPES__H 18 | 19 | #include "gl_base_types.h" 20 | 21 | #endif // __GLES1_TYPES__H 22 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/GLESv2_dec/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | host_common_debug_CFLAGS := 4 | 5 | #For gl debbuging 6 | #host_common_debug_CFLAGS += -DCHECK_GL_ERROR 7 | #host_common_debug_CFLAGS += -DDEBUG_PRINTOUT 8 | 9 | 10 | ### host library ########################################## 11 | $(call emugl-begin-host-static-library,libGLESv2_dec) 12 | $(call emugl-import, libOpenglCodecCommon) 13 | $(call emugl-gen-decoder,$(LOCAL_PATH),gles2) 14 | 15 | # For gl2_types.h ! 16 | $(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) 17 | 18 | $(call emugl-export,CFLAGS,$(host_common_debug_CFLAGS)) 19 | 20 | LOCAL_SRC_FILES := GLESv2Decoder.cpp 21 | 22 | $(call emugl-end-module) 23 | 24 | ### host library, 64-bit #################################### 25 | $(call emugl-begin-host64-static-library,lib64GLESv2_dec) 26 | $(call emugl-import, lib64OpenglCodecCommon) 27 | $(call emugl-gen-decoder,$(LOCAL_PATH),gles2) 28 | 29 | # For gl2_types.h ! 30 | $(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) 31 | 32 | $(call emugl-export,CFLAGS,$(host_common_debug_CFLAGS)) 33 | 34 | LOCAL_SRC_FILES := GLESv2Decoder.cpp 35 | 36 | $(call emugl-end-module) 37 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/GLESv2_dec/gles2.types: -------------------------------------------------------------------------------- 1 | GLbitfield 32 0x%08x 2 | GLboolean 8 %d 3 | GLclampf 32 %f 4 | GLclampx 32 0x%08x 5 | GLeglImageOES 32 %p 6 | GLenum 32 0x%08x 7 | GLfixed 32 0x%08x 8 | GLfloat 32 %f 9 | GLint 32 %d 10 | GLintptr 32 %p 11 | GLshort 16 %d 12 | GLsizei 32 %d 13 | GLsizeiptr 32 %p 14 | GLubyte 8 0x%02x 15 | GLuint 32 %u 16 | GLvoid 0 %x 17 | GLchar 8 %d 18 | GLenum* 32 0x%08x 19 | GLboolean* 32 0x%08x 20 | GLclampf* 32 0x%08x 21 | GLclampx* 32 0x%08x 22 | GLeglImageOES* 32 0x%08x 23 | GLfixed* 32 0x%08x 24 | GLfloat* 32 0x%08x 25 | GLint* 32 0x%08x 26 | GLshort* 32 0x%08x 27 | GLsizei* 32 0x%08x 28 | GLubyte* 32 0x%08x 29 | GLuint* 32 0x%08x 30 | GLvoid* 32 0x%08x 31 | GLchar* 32 0x%08x 32 | GLchar** 32 0x%08x 33 | GLvoid** 32 0x%08x 34 | void* 32 0x%08x 35 | GLstr* 32 0x%08x 36 | GLvoidptr* 32 0x%08x 37 | GLchar*const* 32 0x%08x 38 | GLvoid*const* 32 0x%08x 39 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/GLESv2_dec/gles2_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _GL_2_TYPES_H_ 17 | #define _GL_2_TYPES_H_ 18 | #include "gl_base_types.h" 19 | 20 | typedef void *GLvoidptr; 21 | #endif 22 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/Translator/EGL/ClientAPIExts.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _CLIENT_APIS_EXTS_H 17 | #define _CLIENT_APIS_EXTS_H 18 | 19 | #include "GLcommon/TranslatorIfaces.h" 20 | 21 | namespace ClientAPIExts 22 | { 23 | 24 | void initClientFuncs(const GLESiface *iface, int idx); 25 | __translatorMustCastToProperFunctionPointerType getProcAddress(const char *fname); 26 | 27 | } // of namespace ClientAPIExts 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/Translator/EGL/MacPixelFormatsAttribs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef MAC_PIXELS_FORMATS_ATTRIBS_H 18 | #define MAC_PIXELS_FORMATS_ATTRIBS_H 19 | 20 | #include 21 | NSOpenGLPixelFormatAttribute** getPixelFormatsAttributes(int* size); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/Translator/GLES_CM/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | host_common_SRC_FILES := \ 4 | GLEScmImp.cpp \ 5 | GLEScmUtils.cpp \ 6 | GLEScmContext.cpp \ 7 | GLEScmValidate.cpp 8 | 9 | 10 | ### GLES_CM host implementation (On top of OpenGL) ######################## 11 | $(call emugl-begin-host-shared-library,libGLES_CM_translator) 12 | $(call emugl-import,libGLcommon) 13 | LOCAL_SRC_FILES := $(host_common_SRC_FILES) 14 | $(call emugl-end-module) 15 | 16 | 17 | ### GLES_CM host implementation, 64-bit ######################## 18 | $(call emugl-begin-host64-shared-library,lib64GLES_CM_translator) 19 | $(call emugl-import,lib64GLcommon) 20 | LOCAL_SRC_FILES := $(host_common_SRC_FILES) 21 | $(call emugl-end-module) 22 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/Translator/GLES_CM/GLEScmUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef GLES_UTILS_H 17 | #define GLES_UTILS_H 18 | #include 19 | #include 20 | 21 | size_t glParamSize(GLenum param); 22 | #endif 23 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/Translator/GLES_V2/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | host_common_SRC_FILES := \ 4 | GLESv2Imp.cpp \ 5 | GLESv2Context.cpp \ 6 | GLESv2Validate.cpp \ 7 | ShaderParser.cpp \ 8 | ProgramData.cpp 9 | 10 | 11 | ### GLES_V2 host implementation (On top of OpenGL) ######################## 12 | $(call emugl-begin-host-shared-library,libGLES_V2_translator) 13 | $(call emugl-import, libGLcommon) 14 | 15 | LOCAL_SRC_FILES := $(host_common_SRC_FILES) 16 | 17 | $(call emugl-end-module) 18 | 19 | 20 | ### GLES_V2 host implementation, 64-bit ############################## 21 | $(call emugl-begin-host64-shared-library,lib64GLES_V2_translator) 22 | $(call emugl-import, lib64GLcommon) 23 | 24 | LOCAL_SRC_FILES := $(host_common_SRC_FILES) 25 | 26 | $(call emugl-end-module) 27 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/Translator/GLcommon/GLutils.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #include 17 | 18 | bool isPowerOf2(int num) { 19 | return (num & (num -1)) == 0; 20 | } 21 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/Translator/GLcommon/gles1_extensions.entries: -------------------------------------------------------------------------------- 1 | !gles1_extensions 2 | 3 | # OpenGL functions which are needed ONLY for implementing GLES 1.1 EXTENSIONS 4 | void glCurrentPaletteMatrixARB(GLint index); 5 | void glMatrixIndexuivARB(GLint size, GLuint * indices); 6 | void glMatrixIndexPointerARB(GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); 7 | void glWeightPointerARB(GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); 8 | void glTexGenf(GLenum coord, GLenum pname, GLfloat param ); 9 | void glTexGeni(GLenum coord, GLenum pname, GLint param ); 10 | void glTexGenfv(GLenum coord, GLenum pname, const GLfloat *params ); 11 | void glTexGeniv(GLenum coord, GLenum pname, const GLint *params ); 12 | void glGetTexGenfv(GLenum coord, GLenum pname, GLfloat *params ); 13 | void glGetTexGeniv(GLenum coord, GLenum pname, GLint *params ); 14 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/Translator/GLcommon/gles2_extensions.entries: -------------------------------------------------------------------------------- 1 | !gles2_extensions 2 | 3 | # GLES 2.0 extensions 4 | void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); 5 | void glReleaseShaderCompiler(void); 6 | void glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length); 7 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/Translator/include/GLES/glplatform.h: -------------------------------------------------------------------------------- 1 | #ifndef __glplatform_h_ 2 | #define __glplatform_h_ 3 | 4 | /* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */ 5 | 6 | /* 7 | * This document is licensed under the SGI Free Software B License Version 8 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . 9 | */ 10 | 11 | /* Platform-specific types and definitions for OpenGL ES 1.X gl.h 12 | * 13 | * Adopters may modify khrplatform.h and this file to suit their platform. 14 | * You are encouraged to submit all modifications to the Khronos group so that 15 | * they can be included in future versions of this file. Please submit changes 16 | * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) 17 | * by filing a bug against product "OpenGL-ES" component "Registry". 18 | */ 19 | 20 | #include 21 | 22 | #ifndef GL_API 23 | #define GL_API KHRONOS_APICALL 24 | #endif 25 | 26 | #ifndef GL_APIENTRY 27 | #define GL_APIENTRY KHRONOS_APIENTRY 28 | #endif 29 | 30 | #endif /* __glplatform_h_ */ 31 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/Translator/include/GLES2/gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */ 5 | 6 | /* 7 | * This document is licensed under the SGI Free Software B License Version 8 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . 9 | */ 10 | 11 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 12 | * 13 | * Adopters may modify khrplatform.h and this file to suit their platform. 14 | * You are encouraged to submit all modifications to the Khronos group so that 15 | * they can be included in future versions of this file. Please submit changes 16 | * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) 17 | * by filing a bug against product "OpenGL-ES" component "Registry". 18 | */ 19 | 20 | #include 21 | 22 | #ifndef GL_APICALL 23 | #define GL_APICALL KHRONOS_APICALL 24 | #endif 25 | 26 | #ifndef GL_APIENTRY 27 | #define GL_APIENTRY KHRONOS_APIENTRY 28 | #endif 29 | 30 | #endif /* __gl2platform_h_ */ 31 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/Translator/include/GLcommon/PaletteTexture.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef __PALETTE_TEXTURE_H__ 17 | #define __PALETTE_TEXTURE_H__ 18 | 19 | #include 20 | 21 | #define MAX_SUPPORTED_PALETTE 10 22 | 23 | unsigned char* uncompressTexture(GLenum internalformat,GLenum& formatOut,GLsizei width,GLsizei height,GLsizei imageSize, const GLvoid* data,GLint level); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/Translator/include/GLcommon/gles2_extensions_functions.h: -------------------------------------------------------------------------------- 1 | // Auto-generated with: android/scripts/gen-entries.py --mode=funcargs distrib/android-emugl/host/libs/Translator/GLcommon/gles2_extensions.entries --output=distrib/android-emugl/host/libs/Translator/include/GLcommon/gles2_extensions_functions.h 2 | // DO NOT EDIT THIS FILE 3 | 4 | #ifndef GLES2_EXTENSIONS_FUNCTIONS_H 5 | #define GLES2_EXTENSIONS_FUNCTIONS_H 6 | 7 | #define LIST_GLES2_EXTENSIONS_FUNCTIONS(X) \ 8 | X(void, glGetShaderPrecisionFormat, (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision), (shadertype, precisiontype, range, precision)) \ 9 | X(void, glReleaseShaderCompiler, (), ()) \ 10 | X(void, glShaderBinary, (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length), (n, shaders, binaryformat, binary, length)) \ 11 | 12 | 13 | #endif // GLES2_EXTENSIONS_FUNCTIONS_H 14 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/Translator/include/GLcommon/gles_functions.h: -------------------------------------------------------------------------------- 1 | #ifndef GLES_FUNCTIONS_H 2 | 3 | #include "gles_common_functions.h" 4 | #include "gles_extensions_functions.h" 5 | #include "gles1_only_functions.h" 6 | #include "gles1_extensions_functions.h" 7 | #include "gles2_only_functions.h" 8 | #include "gles2_extensions_functions.h" 9 | 10 | #define LIST_GLES_FUNCTIONS(X,Y) \ 11 | LIST_GLES_COMMON_FUNCTIONS(X) \ 12 | LIST_GLES_EXTENSIONS_FUNCTIONS(Y) \ 13 | LIST_GLES1_ONLY_FUNCTIONS(X) \ 14 | LIST_GLES1_EXTENSIONS_FUNCTIONS(Y) \ 15 | LIST_GLES2_ONLY_FUNCTIONS(X) \ 16 | LIST_GLES2_EXTENSIONS_FUNCTIONS(Y) 17 | 18 | #endif // GLES_FUNCTIONS_H 19 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/libOpenglRender/GLESv1Dispatch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _GLES_V1_DISPATCH_H 17 | #define _GLES_V1_DISPATCH_H 18 | 19 | #include "gles1_dec.h" 20 | 21 | bool init_gles1_dispatch(); 22 | void *gles1_dispatch_get_proc_func(const char *name, void *userData); 23 | 24 | extern gles1_decoder_context_t s_gles1; 25 | 26 | #endif // _GLES_V1_DISPATCH_H 27 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/libOpenglRender/GLESv2Dispatch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _GLES_V2_DISPATCH_H 17 | #define _GLES_V2_DISPATCH_H 18 | 19 | #include "gles2_dec.h" 20 | 21 | bool init_gles2_dispatch(); 22 | void *gles2_dispatch_get_proc_func(const char *name, void *userData); 23 | 24 | extern gles2_decoder_context_t s_gles2; 25 | 26 | #endif // _GLES_V2_DISPATCH_H 27 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/libOpenglRender/RenderControl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _RENDER_CONTROL_H 17 | #define _RENDER_CONTROL_H 18 | 19 | #include "renderControl_dec.h" 20 | 21 | void initRenderControlContext(renderControl_decoder_context_t *dec); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/libOpenglRender/RenderEGL_extensions_functions.h: -------------------------------------------------------------------------------- 1 | // Auto-generated with: android/scripts/gen-entries.py --mode=functions distrib/android-emugl/host/libs/libOpenglRender/render_egl_extensions.entries --output=distrib/android-emugl/host/libs/libOpenglRender/RenderEGL_extensions_functions.h 2 | // DO NOT EDIT THIS FILE 3 | 4 | #ifndef RENDER_EGL_EXTENSIONS_FUNCTIONS_H 5 | #define RENDER_EGL_EXTENSIONS_FUNCTIONS_H 6 | 7 | #include 8 | #define EGL_EGLEXT_PROTOTYPES 9 | #include 10 | #define LIST_RENDER_EGL_EXTENSIONS_FUNCTIONS(X) \ 11 | X(EGLImageKHR, eglCreateImageKHR, (EGLDisplay display, EGLContext context, EGLenum target, EGLClientBuffer buffer, const EGLint* attrib_list)) \ 12 | X(EGLBoolean, eglDestroyImageKHR, (EGLDisplay display, EGLImageKHR image)) \ 13 | 14 | 15 | #endif // RENDER_EGL_EXTENSIONS_FUNCTIONS_H 16 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/libOpenglRender/render_egl_extensions.entries: -------------------------------------------------------------------------------- 1 | # The list of EGL extension functions used by libOpenglRender. 2 | # This is only a subset of the full EGL API. 3 | 4 | !Render_EGL_extensions 5 | 6 | %#include 7 | %#define EGL_EGLEXT_PROTOTYPES 8 | %#include 9 | 10 | EGLImageKHR eglCreateImageKHR(EGLDisplay display, EGLContext context, EGLenum target, EGLClientBuffer buffer, const EGLint* attrib_list); 11 | EGLBoolean eglDestroyImageKHR(EGLDisplay display, EGLImageKHR image); 12 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/renderControl_dec/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | 4 | ### host library ############################################ 5 | $(call emugl-begin-host-static-library,lib_renderControl_dec) 6 | $(call emugl-import,libOpenglCodecCommon) 7 | $(call emugl-gen-decoder,$(LOCAL_PATH),renderControl) 8 | # For renderControl_types.h 9 | $(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) 10 | $(call emugl-end-module) 11 | 12 | ### host library, 64-bit #################################### 13 | $(call emugl-begin-host64-static-library,lib64_renderControl_dec) 14 | $(call emugl-import,lib64OpenglCodecCommon) 15 | $(call emugl-gen-decoder,$(LOCAL_PATH),renderControl) 16 | # For renderControl_types.h 17 | $(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) 18 | $(call emugl-end-module) 19 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/renderControl_dec/renderControl.attrib: -------------------------------------------------------------------------------- 1 | GLOBAL 2 | base_opcode 10000 3 | encoder_headers "glUtils.h" 4 | 5 | rcGetEGLVersion 6 | dir major out 7 | len major sizeof(EGLint) 8 | dir minor out 9 | len minor sizeof(EGLint) 10 | 11 | rcQueryEGLString 12 | dir buffer out 13 | len buffer bufferSize 14 | 15 | rcGetGLString 16 | dir buffer out 17 | len buffer bufferSize 18 | 19 | rcGetNumConfigs 20 | dir numAttribs out 21 | len numAttribs sizeof(uint32_t) 22 | 23 | rcGetConfigs 24 | dir buffer out 25 | len buffer bufSize 26 | 27 | rcChooseConfig 28 | dir attribs in 29 | len attribs attribs_size 30 | dir configs out 31 | var_flag configs nullAllowed 32 | len configs configs_size*sizeof(uint32_t) 33 | 34 | rcReadColorBuffer 35 | dir pixels out 36 | len pixels (((glUtilsPixelBitSize(format, type) * width) >> 3) * height) 37 | 38 | rcUpdateColorBuffer 39 | dir pixels in 40 | len pixels (((glUtilsPixelBitSize(format, type) * width) >> 3) * height) 41 | var_flag pixels isLarge 42 | 43 | rcCloseColorBuffer 44 | flag flushOnEncode 45 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/renderControl_dec/renderControl.types: -------------------------------------------------------------------------------- 1 | uint32_t 32 0x%08x 2 | EGLint 32 0x%08x 3 | GLint 32 0x%08x 4 | GLuint 32 0x%08x 5 | GLenum 32 0x%08x 6 | EGLenum 32 0x%08x 7 | uint32_t* 32 0x%08x 8 | EGLint* 32 0x%08x 9 | GLint* 32 0x%08x 10 | GLuint* 32 0x%08x 11 | void* 32 0x%08x 12 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/libs/renderControl_dec/renderControl_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | #include 19 | #include "glUtils.h" 20 | 21 | // values for 'param' argument of rcGetFBParam 22 | #define FB_WIDTH 1 23 | #define FB_HEIGHT 2 24 | #define FB_XDPI 3 25 | #define FB_YDPI 4 26 | #define FB_FPS 5 27 | #define FB_MIN_SWAP_INTERVAL 6 28 | #define FB_MAX_SWAP_INTERVAL 7 29 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/Android.mk: -------------------------------------------------------------------------------- 1 | # Determine if the emugen build needs to be builts from 2 | # sources. 3 | LOCAL_PATH:=$(call my-dir) 4 | 5 | $(call emugl-begin-host-executable,emugen) 6 | 7 | LOCAL_SRC_FILES := \ 8 | ApiGen.cpp \ 9 | EntryPoint.cpp \ 10 | main.cpp \ 11 | Parser.cpp \ 12 | strUtils.cpp \ 13 | TypeFactory.cpp \ 14 | 15 | LOCAL_HOST_BUILD := true 16 | 17 | $(call emugl-end-module) 18 | 19 | # The location of the emugen host tool that is used to generate wire 20 | # protocol encoders/ decoders. This variable is used by other emugl modules. 21 | EMUGL_EMUGEN := $(LOCAL_BUILT_MODULE) 22 | 23 | $(call emugl-begin-host-executable,emugen_unittests) 24 | LOCAL_SRC_FILES := \ 25 | Parser.cpp \ 26 | Parser_unittest.cpp 27 | LOCAL_HOST_BUILD := true 28 | $(call emugl-import,libemugl_gtest_host) 29 | $(call emugl-end-module) 30 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/errors.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _ERRORS_H_ 17 | #define _ERRORS_H_ 18 | 19 | #define BAD_USAGE -1 20 | #define BAD_SPEC_FILE -2 21 | #define BAD_TYPES_FILE -3 22 | #define BAD_ATTRIBUTES_FILE -4 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/getopt.h: -------------------------------------------------------------------------------- 1 | #ifndef GETOPT_H 2 | #define GETOPT_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern int optind; 9 | extern char* optarg; 10 | extern int optopt; 11 | 12 | int getopt(int argc, char* const argv[], const char* ostr); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | 18 | #endif // GETOPT_H 19 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/strUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef STR_UTILS_H_ 17 | #define STR_UTILS_H_ 18 | 19 | #include 20 | #include 21 | 22 | #define WHITESPACE " \t\n" 23 | 24 | std::string trim(const std::string & str); 25 | std::string getNextToken(const std::string & str, size_t pos, size_t * last, const std::string & delim); 26 | template std::string inline toString(const T& t) { 27 | std::stringstream ss; 28 | ss << t; 29 | return ss.str(); 30 | 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/expected/decoder/foo_dec.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | 4 | #ifndef GUARD_foo_decoder_context_t 5 | #define GUARD_foo_decoder_context_t 6 | 7 | #include "IOStream.h" 8 | #include "foo_server_context.h" 9 | 10 | 11 | 12 | struct foo_decoder_context_t : public foo_server_context_t { 13 | 14 | size_t decode(void *buf, size_t bufsize, IOStream *stream); 15 | 16 | }; 17 | 18 | #endif // GUARD_foo_decoder_context_t 19 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/expected/decoder/foo_opcodes.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __GUARD_foo_opcodes_h_ 4 | #define __GUARD_foo_opcodes_h_ 5 | 6 | #define OP_fooAlphaFunc 200 7 | #define OP_fooIsBuffer 201 8 | #define OP_fooUnsupported 202 9 | #define OP_fooDoEncoderFlush 203 10 | #define OP_fooTakeConstVoidPtrConstPtr 204 11 | #define OP_last 205 12 | 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/expected/decoder/foo_server_base.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __foo_server_base_t_h 4 | #define __foo_server_base_t_h 5 | 6 | #include "foo_server_proc.h" 7 | 8 | 9 | struct foo_server_base_t { 10 | 11 | fooAlphaFunc_server_proc_t fooAlphaFunc; 12 | fooIsBuffer_server_proc_t fooIsBuffer; 13 | fooUnsupported_server_proc_t fooUnsupported; 14 | fooDoEncoderFlush_server_proc_t fooDoEncoderFlush; 15 | fooTakeConstVoidPtrConstPtr_server_proc_t fooTakeConstVoidPtrConstPtr; 16 | }; 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/expected/decoder/foo_server_context.cpp: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | 4 | 5 | #include 6 | #include "foo_server_context.h" 7 | 8 | 9 | #include 10 | 11 | int foo_server_context_t::initDispatchByName(void *(*getProc)(const char *, void *userData), void *userData) 12 | { 13 | fooAlphaFunc = (fooAlphaFunc_server_proc_t) getProc("fooAlphaFunc", userData); 14 | fooIsBuffer = (fooIsBuffer_server_proc_t) getProc("fooIsBuffer", userData); 15 | fooUnsupported = (fooUnsupported_server_proc_t) getProc("fooUnsupported", userData); 16 | fooDoEncoderFlush = (fooDoEncoderFlush_server_proc_t) getProc("fooDoEncoderFlush", userData); 17 | fooTakeConstVoidPtrConstPtr = (fooTakeConstVoidPtrConstPtr_server_proc_t) getProc("fooTakeConstVoidPtrConstPtr", userData); 18 | return 0; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/expected/decoder/foo_server_context.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __foo_server_context_t_h 4 | #define __foo_server_context_t_h 5 | 6 | #include "foo_server_base.h" 7 | 8 | 9 | struct foo_server_context_t : foo_server_base_t { 10 | 11 | virtual ~foo_server_context_t() {} 12 | int initDispatchByName( void *(*getProc)(const char *name, void *userData), void *userData); 13 | }; 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/expected/decoder/foo_server_proc.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __foo_server_proc_t_h 4 | #define __foo_server_proc_t_h 5 | 6 | 7 | 8 | #include "foo_types.h" 9 | #ifndef foo_APIENTRY 10 | #define foo_APIENTRY 11 | #endif 12 | typedef void (foo_APIENTRY *fooAlphaFunc_server_proc_t) (FooInt, FooFloat); 13 | typedef FooBoolean (foo_APIENTRY *fooIsBuffer_server_proc_t) (void*); 14 | typedef void (foo_APIENTRY *fooUnsupported_server_proc_t) (void*); 15 | typedef void (foo_APIENTRY *fooDoEncoderFlush_server_proc_t) (FooInt); 16 | typedef void (foo_APIENTRY *fooTakeConstVoidPtrConstPtr_server_proc_t) (const void* const*); 17 | 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/expected/encoder/foo_client_base.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __foo_client_base_t_h 4 | #define __foo_client_base_t_h 5 | 6 | #include "foo_client_proc.h" 7 | 8 | 9 | struct foo_client_base_t { 10 | 11 | fooAlphaFunc_client_proc_t fooAlphaFunc; 12 | fooIsBuffer_client_proc_t fooIsBuffer; 13 | fooUnsupported_client_proc_t fooUnsupported; 14 | fooDoEncoderFlush_client_proc_t fooDoEncoderFlush; 15 | fooTakeConstVoidPtrConstPtr_client_proc_t fooTakeConstVoidPtrConstPtr; 16 | }; 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/expected/encoder/foo_client_context.cpp: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | 4 | 5 | #include 6 | #include "foo_client_context.h" 7 | 8 | 9 | #include 10 | 11 | int foo_client_context_t::initDispatchByName(void *(*getProc)(const char *, void *userData), void *userData) 12 | { 13 | fooAlphaFunc = (fooAlphaFunc_client_proc_t) getProc("fooAlphaFunc", userData); 14 | fooIsBuffer = (fooIsBuffer_client_proc_t) getProc("fooIsBuffer", userData); 15 | fooUnsupported = (fooUnsupported_client_proc_t) getProc("fooUnsupported", userData); 16 | fooDoEncoderFlush = (fooDoEncoderFlush_client_proc_t) getProc("fooDoEncoderFlush", userData); 17 | fooTakeConstVoidPtrConstPtr = (fooTakeConstVoidPtrConstPtr_client_proc_t) getProc("fooTakeConstVoidPtrConstPtr", userData); 18 | return 0; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/expected/encoder/foo_client_context.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __foo_client_context_t_h 4 | #define __foo_client_context_t_h 5 | 6 | #include "foo_client_base.h" 7 | 8 | 9 | struct foo_client_context_t : foo_client_base_t { 10 | 11 | virtual ~foo_client_context_t() {} 12 | 13 | typedef foo_client_context_t *CONTEXT_ACCESSOR_TYPE(void); 14 | static void setContextAccessor(CONTEXT_ACCESSOR_TYPE *f); 15 | int initDispatchByName( void *(*getProc)(const char *name, void *userData), void *userData); 16 | virtual void setError(unsigned int error){ (void)error; }; 17 | virtual unsigned int getError(){ return 0; }; 18 | }; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/expected/encoder/foo_client_proc.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __foo_client_proc_t_h 4 | #define __foo_client_proc_t_h 5 | 6 | 7 | 8 | #include "foo_types.h" 9 | #ifndef foo_APIENTRY 10 | #define foo_APIENTRY 11 | #endif 12 | typedef void (foo_APIENTRY *fooAlphaFunc_client_proc_t) (void * ctx, FooInt, FooFloat); 13 | typedef FooBoolean (foo_APIENTRY *fooIsBuffer_client_proc_t) (void * ctx, void*); 14 | typedef void (foo_APIENTRY *fooUnsupported_client_proc_t) (void * ctx, void*); 15 | typedef void (foo_APIENTRY *fooDoEncoderFlush_client_proc_t) (void * ctx, FooInt); 16 | typedef void (foo_APIENTRY *fooTakeConstVoidPtrConstPtr_client_proc_t) (void * ctx, const void* const*); 17 | 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/expected/encoder/foo_enc.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | 4 | #ifndef GUARD_foo_encoder_context_t 5 | #define GUARD_foo_encoder_context_t 6 | 7 | #include "IOStream.h" 8 | #include "foo_client_context.h" 9 | 10 | 11 | #include "fooUtils.h" 12 | #include "fooBase.h" 13 | 14 | struct foo_encoder_context_t : public foo_client_context_t { 15 | 16 | IOStream *m_stream; 17 | 18 | foo_encoder_context_t(IOStream *stream); 19 | }; 20 | 21 | #endif // GUARD_foo_encoder_context_t -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/expected/encoder/foo_ftable.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __foo_client_ftable_t_h 4 | #define __foo_client_ftable_t_h 5 | 6 | 7 | static const struct _foo_funcs_by_name { 8 | const char *name; 9 | void *proc; 10 | } foo_funcs_by_name[] = { 11 | {"fooAlphaFunc", (void*)fooAlphaFunc}, 12 | {"fooIsBuffer", (void*)fooIsBuffer}, 13 | {"fooUnsupported", (void*)fooUnsupported}, 14 | {"fooDoEncoderFlush", (void*)fooDoEncoderFlush}, 15 | {"fooTakeConstVoidPtrConstPtr", (void*)fooTakeConstVoidPtrConstPtr}, 16 | }; 17 | static const int foo_num_funcs = sizeof(foo_funcs_by_name) / sizeof(struct _foo_funcs_by_name); 18 | 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/expected/encoder/foo_opcodes.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __GUARD_foo_opcodes_h_ 4 | #define __GUARD_foo_opcodes_h_ 5 | 6 | #define OP_fooAlphaFunc 200 7 | #define OP_fooIsBuffer 201 8 | #define OP_fooUnsupported 202 9 | #define OP_fooDoEncoderFlush 203 10 | #define OP_fooTakeConstVoidPtrConstPtr 204 11 | #define OP_last 205 12 | 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/expected/wrapper/foo_wrapper_base.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __foo_wrapper_base_t_h 4 | #define __foo_wrapper_base_t_h 5 | 6 | #include "foo_wrapper_proc.h" 7 | 8 | 9 | struct foo_wrapper_base_t { 10 | 11 | fooAlphaFunc_wrapper_proc_t fooAlphaFunc; 12 | fooIsBuffer_wrapper_proc_t fooIsBuffer; 13 | fooUnsupported_wrapper_proc_t fooUnsupported; 14 | fooDoEncoderFlush_wrapper_proc_t fooDoEncoderFlush; 15 | fooTakeConstVoidPtrConstPtr_wrapper_proc_t fooTakeConstVoidPtrConstPtr; 16 | }; 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/expected/wrapper/foo_wrapper_context.cpp: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | 4 | 5 | #include 6 | #include "foo_wrapper_context.h" 7 | 8 | 9 | #include 10 | 11 | int foo_wrapper_context_t::initDispatchByName(void *(*getProc)(const char *, void *userData), void *userData) 12 | { 13 | fooAlphaFunc = (fooAlphaFunc_wrapper_proc_t) getProc("fooAlphaFunc", userData); 14 | fooIsBuffer = (fooIsBuffer_wrapper_proc_t) getProc("fooIsBuffer", userData); 15 | fooUnsupported = (fooUnsupported_wrapper_proc_t) getProc("fooUnsupported", userData); 16 | fooDoEncoderFlush = (fooDoEncoderFlush_wrapper_proc_t) getProc("fooDoEncoderFlush", userData); 17 | fooTakeConstVoidPtrConstPtr = (fooTakeConstVoidPtrConstPtr_wrapper_proc_t) getProc("fooTakeConstVoidPtrConstPtr", userData); 18 | return 0; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/expected/wrapper/foo_wrapper_context.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __foo_wrapper_context_t_h 4 | #define __foo_wrapper_context_t_h 5 | 6 | #include "foo_wrapper_base.h" 7 | 8 | 9 | struct foo_wrapper_context_t : foo_wrapper_base_t { 10 | 11 | virtual ~foo_wrapper_context_t() {} 12 | 13 | typedef foo_wrapper_context_t *CONTEXT_ACCESSOR_TYPE(void); 14 | static void setContextAccessor(CONTEXT_ACCESSOR_TYPE *f); 15 | int initDispatchByName( void *(*getProc)(const char *name, void *userData), void *userData); 16 | }; 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/expected/wrapper/foo_wrapper_proc.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __foo_wrapper_proc_t_h 4 | #define __foo_wrapper_proc_t_h 5 | 6 | 7 | 8 | #include "foo_types.h" 9 | #ifndef foo_APIENTRY 10 | #define foo_APIENTRY 11 | #endif 12 | typedef void (foo_APIENTRY *fooAlphaFunc_wrapper_proc_t) (FooInt, FooFloat); 13 | typedef FooBoolean (foo_APIENTRY *fooIsBuffer_wrapper_proc_t) (void*); 14 | typedef void (foo_APIENTRY *fooUnsupported_wrapper_proc_t) (void*); 15 | typedef void (foo_APIENTRY *fooDoEncoderFlush_wrapper_proc_t) (FooInt); 16 | typedef void (foo_APIENTRY *fooTakeConstVoidPtrConstPtr_wrapper_proc_t) (const void* const*); 17 | 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/input/foo.attrib: -------------------------------------------------------------------------------- 1 | GLOBAL 2 | base_opcode 200 3 | encoder_headers "fooUtils.h" "fooBase.h" 4 | 5 | fooIsBuffer 6 | dir stuff in 7 | len stuff (4 * sizeof(float)) 8 | param_check stuff if (n == NULL) { LOG(ERROR) << "NULL stuff"; return; } 9 | 10 | fooUnsupported 11 | dir params in 12 | flag unsupported 13 | 14 | fooDoEncoderFlush 15 | flag flushOnEncode 16 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/input/foo.in: -------------------------------------------------------------------------------- 1 | FOO_ENTRY(void, fooAlphaFunc, FooInt func, FooFloat ref) 2 | FOO_ENTRY(FooBoolean, fooIsBuffer, void* stuff) 3 | FOO_ENTRY(void, fooUnsupported, void* params) 4 | FOO_ENTRY(void, fooDoEncoderFlush, FooInt param) 5 | FOO_ENTRY(void, fooTakeConstVoidPtrConstPtr, const void* const* param) 6 | -------------------------------------------------------------------------------- /distrib/android-emugl/host/tools/emugen/tests/t.001/input/foo.types: -------------------------------------------------------------------------------- 1 | FooBoolean 8 %d 2 | FooInt 32 %d 3 | FooShort 16 %d 4 | FooFloat 32 %f 5 | FooEnum 32 %08x 6 | FooVoid 0 %x 7 | FooChar 8 %d 8 | FooChar* 32 0x%08x 9 | void* 32 0x%08x 10 | void*const* 32 0x%08x 11 | -------------------------------------------------------------------------------- /distrib/android-emugl/shared/OpenglCodecCommon/ErrorLog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _ERROR_LOG_H_ 17 | #define _ERROR_LOG_H_ 18 | 19 | #include 20 | #define ERR(...) fprintf(stderr, __VA_ARGS__) 21 | #ifdef EMUGL_DEBUG 22 | # define DBG(...) fprintf(stderr, __VA_ARGS__) 23 | #else 24 | # define DBG(...) ((void)0) 25 | #endif 26 | 27 | #endif // _ERROR_LOG_H_ 28 | -------------------------------------------------------------------------------- /distrib/android-emugl/shared/OpenglCodecCommon/GLErrorLog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef __GL_ERROR_LOG_H__ 18 | #define __GL_ERROR_LOG_H__ 19 | 20 | #include "ErrorLog.h" 21 | 22 | #ifdef CHECK_GL_ERROR 23 | void dbg(){} 24 | #define GET_GL_ERROR(gl) \ 25 | { \ 26 | int err = gl.glGetError(); \ 27 | if (err) { dbg(); ERR("Error: 0x%X in %s (%s:%d)\n", err, __FUNCTION__, __FILE__, __LINE__); } \ 28 | } 29 | 30 | #else 31 | #define GET_GL_ERROR(gl) 32 | #endif 33 | 34 | #endif //__GL_ERROR_LOG_H__ 35 | -------------------------------------------------------------------------------- /distrib/android-emugl/shared/OpenglCodecCommon/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ROOT=../.. 3 | 4 | include $(ROOT)/make/commondefs 5 | 6 | CXXFILES = TcpStream.cpp GLClientState.cpp glUtils.cpp 7 | CXXINCS += -I$(ROOT)/libs/GLESv1 -I$(ROOT)/include 8 | 9 | LIBRARY_NAME = libcodecCommon.a 10 | 11 | include $(COMMONRULES) 12 | 13 | 14 | -------------------------------------------------------------------------------- /distrib/android-emugl/shared/OpenglCodecCommon/TimeUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _TIME_UTILS_H 17 | #define _TIME_UTILS_H 18 | 19 | long long GetCurrentTimeMS(); 20 | void TimeSleepMS(int p_mili); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /distrib/android-emugl/shared/OpenglCodecCommon/codec_defs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _CODEC_DEFS_H 17 | #define _CODEC_DEFS_H 18 | 19 | #define CODEC_SERVER_PORT 22468 20 | 21 | #define CODEC_MAX_VERTEX_ATTRIBUTES 64 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /distrib/android-emugl/shared/emugl/common/condition_variable_unittest.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 The Android Open Source Project 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #include "emugl/common/condition_variable.h" 16 | 17 | #include "emugl/common/mutex.h" 18 | 19 | #include 20 | 21 | namespace emugl { 22 | 23 | TEST(ConditionVariable, init) { 24 | ConditionVariable cond; 25 | } 26 | 27 | } // namespace emugl 28 | -------------------------------------------------------------------------------- /distrib/android-emugl/shared/emugl/common/scoped_pointer_vector.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 The Android Open Source Project 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #ifndef EMUGL_COMMON_SCOPED_POINTER_VECTOR_H 16 | #define EMUGL_COMMON_SCOPED_POINTER_VECTOR_H 17 | 18 | namespace emugl { 19 | 20 | template 21 | class ScopedPointerVector { 22 | ScopedPointerVector 23 | }; 24 | 25 | } // namespace emugl 26 | 27 | #endif // EMUGL_COMMON_SCOPED_POINTER_VECTOR_H 28 | -------------------------------------------------------------------------------- /distrib/android-emugl/shared/emugl/common/testing/test_shared_library.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 The Android Open Source Project 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // This source file must be compiled into a simple shared library which 16 | // will be used by shared_library_unittest.cpp to verify that the 17 | // emugl::SharedLibrary class works properly. 18 | 19 | 20 | extern "C" int foo_function(void) { 21 | return 42; 22 | } 23 | -------------------------------------------------------------------------------- /distrib/ext4_utils/README: -------------------------------------------------------------------------------- 1 | This directory contains a copy of the $AOSP/system/extras/ext4_utils 2 | library at the following commit: 3 | 4 | 9c82554ee3284b57df9d8dfdf11467066ab0877a 5 | -------------------------------------------------------------------------------- /distrib/ext4_utils/src/MODULE_LICENSE_APACHE2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/distrib/ext4_utils/src/MODULE_LICENSE_APACHE2 -------------------------------------------------------------------------------- /distrib/ext4_utils/src/ext4fixup.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | int ext4fixup(char *fsdev); 18 | int ext4fixup_internal(char *fsdev, int v_flag, int n_flag, 19 | int stop_phase, int stop_loc, int stop_count); 20 | 21 | -------------------------------------------------------------------------------- /distrib/ext4_utils/src/extent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _EXTENT_H_ 18 | #define _EXTENT_H_ 19 | 20 | #include "allocate.h" 21 | #include "ext4_utils.h" 22 | 23 | void inode_allocate_extents(struct ext4_inode *inode, u64 len); 24 | void inode_allocate_file_extents(struct ext4_inode *inode, u64 len, 25 | const char *filename); 26 | u8 *inode_allocate_data_extents(struct ext4_inode *inode, u64 len, 27 | u64 backing_len); 28 | void free_extent_blocks(); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /distrib/ext4_utils/src/indirect.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _INDIRECT_H_ 18 | #define _INDIRECT_H_ 19 | 20 | #include "allocate.h" 21 | 22 | void inode_allocate_indirect(struct ext4_inode *inode, unsigned long len); 23 | u8 *inode_allocate_data_indirect(struct ext4_inode *inode, unsigned long len, 24 | unsigned long backing_len); 25 | void inode_attach_resize(struct ext4_inode *inode, 26 | struct block_allocation *alloc); 27 | void free_indirect_blocks(); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /distrib/ext4_utils/src/sha1.h: -------------------------------------------------------------------------------- 1 | /* $NetBSD: sha1.h,v 1.13 2005/12/26 18:41:36 perry Exp $ */ 2 | 3 | /* 4 | * SHA-1 in C 5 | * By Steve Reid 6 | * 100% Public Domain 7 | */ 8 | 9 | #ifndef _SYS_SHA1_H_ 10 | #define _SYS_SHA1_H_ 11 | 12 | #include 13 | #include 14 | 15 | #ifdef USE_MINGW 16 | typedef unsigned char u_char; 17 | typedef unsigned int uint32_t; 18 | typedef unsigned int u_int32_t; 19 | typedef unsigned int u_int; 20 | 21 | #define __BEGIN_DECLS 22 | #define __END_DECLS 23 | #else 24 | #include 25 | #endif 26 | 27 | #define SHA1_DIGEST_LENGTH 20 28 | #define SHA1_DIGEST_STRING_LENGTH 41 29 | 30 | typedef struct { 31 | uint32_t state[5]; 32 | uint32_t count[2]; 33 | u_char buffer[64]; 34 | } SHA1_CTX; 35 | 36 | __BEGIN_DECLS 37 | void SHA1Transform(uint32_t[5], const u_char[64]); 38 | void SHA1Init(SHA1_CTX *); 39 | void SHA1Update(SHA1_CTX *, const u_char *, u_int); 40 | void SHA1Final(u_char[SHA1_DIGEST_LENGTH], SHA1_CTX *); 41 | __END_DECLS 42 | 43 | #endif /* _SYS_SHA1_H_ */ 44 | -------------------------------------------------------------------------------- /distrib/ext4_utils/src/uuid.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _UUID_H_ 18 | #define _UUID_H_ 19 | 20 | #include "ext4_utils.h" 21 | 22 | void generate_uuid(const char *namespace, const char *name, u8 result[16]); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /distrib/ext4_utils/src/wipe.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _WIPE_H_ 18 | #define _WIPE_H_ 19 | 20 | #include "ext4_utils.h" 21 | 22 | /* Set WIPE_IS_SUPPORTED to 1 if the current platform supports 23 | * wiping of block devices. 0 otherwise. For now, only Linux does. 24 | */ 25 | #ifdef __linux__ 26 | # define WIPE_IS_SUPPORTED 1 27 | #else 28 | # define WIPE_IS_SUPPORTED 0 29 | #endif 30 | 31 | int wipe_block_device(int fd, s64 len); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /distrib/jpeg-6b/MODULE_LICENSE_BSD_LIKE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/distrib/jpeg-6b/MODULE_LICENSE_BSD_LIKE -------------------------------------------------------------------------------- /distrib/jpeg-6b/ThirdPartyProject.prop: -------------------------------------------------------------------------------- 1 | # Copyright 2010 Google Inc. All Rights Reserved. 2 | #Fri Jul 16 10:03:09 PDT 2010 3 | currentVersion=8a 4 | version=6b 5 | isNative=true 6 | name=jpeg 7 | keywords=jpeg 8 | onDevice=true 9 | homepage=http\://www.ijg.org/ 10 | -------------------------------------------------------------------------------- /distrib/jpeg-6b/jconfig.vms: -------------------------------------------------------------------------------- 1 | /* jconfig.vms --- jconfig.h for use on Digital VMS. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #endif /* JPEG_INTERNALS */ 23 | 24 | #ifdef JPEG_CJPEG_DJPEG 25 | 26 | #define BMP_SUPPORTED /* BMP image file format */ 27 | #define GIF_SUPPORTED /* GIF image file format */ 28 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 29 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 30 | #define TARGA_SUPPORTED /* Targa image file format */ 31 | 32 | #define TWO_FILE_COMMANDLINE /* Needed on VMS */ 33 | #undef NEED_SIGNAL_CATCHER 34 | #undef DONT_USE_B_MODE 35 | #undef PROGRESS_REPORT /* optional */ 36 | 37 | #endif /* JPEG_CJPEG_DJPEG */ 38 | -------------------------------------------------------------------------------- /distrib/jpeg-6b/jversion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jversion.h 3 | * 4 | * Copyright (C) 1991-1998, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains software version identification. 9 | */ 10 | 11 | 12 | #define JVERSION "6b 27-Mar-1998" 13 | 14 | #define JCOPYRIGHT "Copyright (C) 1998, Thomas G. Lane" 15 | -------------------------------------------------------------------------------- /distrib/jpeg-6b/makvms.opt: -------------------------------------------------------------------------------- 1 | ! A pointer to the VAX/VMS C Run-Time Shareable Library. 2 | ! This file is needed by makefile.mms and makefile.vms, 3 | ! but only for the older VAX C compiler. DEC C does not need it. 4 | Sys$Library:VAXCRTL.EXE /Share 5 | -------------------------------------------------------------------------------- /distrib/jpeg-6b/testimg.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/distrib/jpeg-6b/testimg.bmp -------------------------------------------------------------------------------- /distrib/jpeg-6b/testimg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/distrib/jpeg-6b/testimg.jpg -------------------------------------------------------------------------------- /distrib/jpeg-6b/testimg.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/distrib/jpeg-6b/testimg.ppm -------------------------------------------------------------------------------- /distrib/jpeg-6b/testimgp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/distrib/jpeg-6b/testimgp.jpg -------------------------------------------------------------------------------- /distrib/jpeg-6b/testorig.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/distrib/jpeg-6b/testorig.jpg -------------------------------------------------------------------------------- /distrib/jpeg-6b/testprog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/distrib/jpeg-6b/testprog.jpg -------------------------------------------------------------------------------- /distrib/libpng-1.2.46/pngusr.h: -------------------------------------------------------------------------------- 1 | #define PNG_USER_PRIVATEBUILD "Skia build; no MNG features" 2 | #define PNG_USER_DLLFNAME_POSTFIX "Sk" 3 | #define PNG_NO_MNG_FEATURES 4 | #define PNG_NO_READ_GAMMA 5 | -------------------------------------------------------------------------------- /distrib/libpng-1.2.46/pngvcrd.c: -------------------------------------------------------------------------------- 1 | /* pnggvrd.c was removed from libpng-1.2.20. */ 2 | -------------------------------------------------------------------------------- /distrib/libpng-1.2.46/sources.make: -------------------------------------------------------------------------------- 1 | # this file is included by various Makefiles and defines the set of sources used by our version of LibPng 2 | # 3 | LIBPNG_SOURCES := \ 4 | png.c \ 5 | pngerror.c \ 6 | pngget.c \ 7 | pngmem.c \ 8 | pngpread.c \ 9 | pngread.c \ 10 | pngrio.c \ 11 | pngrtran.c \ 12 | pngrutil.c \ 13 | pngset.c \ 14 | pngtrans.c \ 15 | pngvcrd.c \ 16 | pngwio.c \ 17 | pngwrite.c \ 18 | pngwtran.c \ 19 | pngwutil.c 20 | 21 | # Enable MMX code path for x86, except on Darwin where it fails 22 | PNG_MMX := no 23 | ifeq ($(HOST_ARCH),x86) 24 | ifneq ($(BUILD_DEBUG_EMULATOR),true) 25 | PNG_MMX := yes 26 | endif 27 | endif 28 | ifeq ($(HOST_OS),darwin) 29 | PNG_MMX := no 30 | endif 31 | 32 | ifeq ($(PNG_MMX),yes) 33 | LIBPNG_SOURCES += pnggccrd.c 34 | else 35 | LIBPNG_CFLAGS += -DPNG_NO_MMX_CODE 36 | endif 37 | 38 | LIBPNG_SOURCES := $(LIBPNG_SOURCES:%=$(LIBPNG_DIR)/%) 39 | -------------------------------------------------------------------------------- /distrib/libselinux/NOTICE: -------------------------------------------------------------------------------- 1 | This library (libselinux) is public domain software, i.e. not copyrighted. 2 | 3 | Warranty Exclusion 4 | ------------------ 5 | You agree that this software is a 6 | non-commercially developed program that may contain "bugs" (as that 7 | term is used in the industry) and that it may not function as intended. 8 | The software is licensed "as is". NSA makes no, and hereby expressly 9 | disclaims all, warranties, express, implied, statutory, or otherwise 10 | with respect to the software, including noninfringement and the implied 11 | warranties of merchantability and fitness for a particular purpose. 12 | 13 | Limitation of Liability 14 | ----------------------- 15 | In no event will NSA be liable for any damages, including loss of data, 16 | lost profits, cost of cover, or other special, incidental, 17 | consequential, direct or indirect damages arising from the software or 18 | the use thereof, however caused and on any theory of liability. This 19 | limitation will apply even if NSA has been advised of the possibility 20 | of such damage. You acknowledge that this is a reasonable allocation of 21 | risk. 22 | -------------------------------------------------------------------------------- /distrib/libselinux/README: -------------------------------------------------------------------------------- 1 | This directory contains the content of $AOSP/external/libselinux taken 2 | from the following commit: 3 | 4 | e9b58950df18f55a74e3b79bffe7f18556613ad1 5 | -------------------------------------------------------------------------------- /distrib/libselinux/src/avc_sidtab.h: -------------------------------------------------------------------------------- 1 | /* 2 | * A security identifier table (sidtab) is a hash table 3 | * of security context structures indexed by SID value. 4 | */ 5 | #ifndef _SELINUX_AVC_SIDTAB_H_ 6 | #define _SELINUX_AVC_SIDTAB_H_ 7 | 8 | #include 9 | #include 10 | #include "dso.h" 11 | 12 | struct sidtab_node { 13 | struct security_id sid_s; 14 | struct sidtab_node *next; 15 | }; 16 | 17 | #define SIDTAB_HASH_BITS 7 18 | #define SIDTAB_HASH_BUCKETS (1 << SIDTAB_HASH_BITS) 19 | #define SIDTAB_HASH_MASK (SIDTAB_HASH_BUCKETS-1) 20 | #define SIDTAB_SIZE SIDTAB_HASH_BUCKETS 21 | 22 | struct sidtab { 23 | struct sidtab_node **htable; 24 | unsigned nel; 25 | }; 26 | 27 | int sidtab_init(struct sidtab *s) hidden; 28 | int sidtab_insert(struct sidtab *s, const char * ctx) hidden; 29 | 30 | int sidtab_context_to_sid(struct sidtab *s, 31 | const char * ctx, security_id_t * sid) hidden; 32 | 33 | void sidtab_sid_stats(struct sidtab *s, char *buf, int buflen) hidden; 34 | void sidtab_destroy(struct sidtab *s) hidden; 35 | 36 | #endif /* _SELINUX_AVC_SIDTAB_H_ */ 37 | -------------------------------------------------------------------------------- /distrib/libselinux/src/callbacks.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file describes the callbacks passed to selinux_init() and available 3 | * for use from the library code. They all have default implementations. 4 | */ 5 | #ifndef _SELINUX_CALLBACKS_H_ 6 | #define _SELINUX_CALLBACKS_H_ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include "dso.h" 13 | 14 | /* callback pointers */ 15 | extern int __attribute__ ((format(printf, 2, 3))) 16 | (*selinux_log) (int type, const char *, ...) hidden; 17 | 18 | extern int 19 | (*selinux_audit) (void *, security_class_t, char *, size_t) hidden; 20 | 21 | extern int 22 | (*selinux_validate)(char **ctx) hidden; 23 | 24 | extern int 25 | (*selinux_netlink_setenforce) (int enforcing) hidden; 26 | 27 | extern int 28 | (*selinux_netlink_policyload) (int seqno) hidden; 29 | 30 | #endif /* _SELINUX_CALLBACKS_H_ */ 31 | -------------------------------------------------------------------------------- /distrib/libselinux/src/check_context.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include "selinux_internal.h" 9 | #include "policy.h" 10 | #include 11 | 12 | int security_check_context(const char * con) 13 | { 14 | char path[PATH_MAX]; 15 | int fd, ret; 16 | 17 | if (!selinux_mnt) { 18 | errno = ENOENT; 19 | return -1; 20 | } 21 | 22 | snprintf(path, sizeof path, "%s/context", selinux_mnt); 23 | fd = open(path, O_RDWR); 24 | if (fd < 0) 25 | return -1; 26 | 27 | ret = write(fd, con, strlen(con) + 1); 28 | close(fd); 29 | if (ret < 0) 30 | return -1; 31 | return 0; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /distrib/libselinux/src/context_internal.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include "dso.h" 3 | 4 | hidden_proto(context_new) 5 | hidden_proto(context_free) 6 | hidden_proto(context_str) 7 | hidden_proto(context_type_set) 8 | hidden_proto(context_type_get) 9 | hidden_proto(context_role_set) 10 | hidden_proto(context_role_get) 11 | hidden_proto(context_user_set) 12 | hidden_proto(context_user_get) 13 | hidden_proto(context_range_set) 14 | hidden_proto(context_range_get) 15 | -------------------------------------------------------------------------------- /distrib/libselinux/src/deny_unknown.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "selinux_internal.h" 8 | #include "policy.h" 9 | #include 10 | #include 11 | 12 | int security_deny_unknown(void) 13 | { 14 | int fd, ret, deny_unknown = 0; 15 | char path[PATH_MAX]; 16 | char buf[20]; 17 | 18 | if (!selinux_mnt) { 19 | errno = ENOENT; 20 | return -1; 21 | } 22 | 23 | snprintf(path, sizeof(path), "%s/deny_unknown", selinux_mnt); 24 | fd = open(path, O_RDONLY); 25 | if (fd < 0) 26 | return -1; 27 | 28 | memset(buf, 0, sizeof(buf)); 29 | ret = read(fd, buf, sizeof(buf) - 1); 30 | close(fd); 31 | if (ret < 0) 32 | return -1; 33 | 34 | if (sscanf(buf, "%d", &deny_unknown) != 1) 35 | return -1; 36 | 37 | return deny_unknown; 38 | } 39 | 40 | hidden_def(security_deny_unknown); 41 | -------------------------------------------------------------------------------- /distrib/libselinux/src/disable.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "selinux_internal.h" 8 | #include "policy.h" 9 | #include 10 | #include 11 | 12 | int security_disable(void) 13 | { 14 | int fd, ret; 15 | char path[PATH_MAX]; 16 | char buf[20]; 17 | 18 | if (!selinux_mnt) { 19 | errno = ENOENT; 20 | return -1; 21 | } 22 | 23 | snprintf(path, sizeof path, "%s/disable", selinux_mnt); 24 | fd = open(path, O_WRONLY); 25 | if (fd < 0) 26 | return -1; 27 | 28 | buf[0] = '1'; 29 | buf[1] = '\0'; 30 | ret = write(fd, buf, strlen(buf)); 31 | close(fd); 32 | if (ret < 0) 33 | return -1; 34 | 35 | return 0; 36 | } 37 | 38 | hidden_def(security_disable) 39 | -------------------------------------------------------------------------------- /distrib/libselinux/src/dso.h: -------------------------------------------------------------------------------- 1 | #ifndef _SELINUX_DSO_H 2 | #define _SELINUX_DSO_H 1 3 | 4 | #ifdef SHARED 5 | # define hidden __attribute__ ((visibility ("hidden"))) 6 | # define hidden_proto(fct) __hidden_proto (fct, fct##_internal) 7 | # define __hidden_proto(fct, internal) \ 8 | extern __typeof (fct) internal; \ 9 | extern __typeof (fct) fct __asm (#internal) hidden; 10 | # if defined(__alpha__) || defined(__mips__) 11 | # define hidden_def(fct) \ 12 | asm (".globl " #fct "\n" #fct " = " #fct "_internal"); 13 | # else 14 | # define hidden_def(fct) \ 15 | asm (".globl " #fct "\n.set " #fct ", " #fct "_internal"); 16 | #endif 17 | #else 18 | # define hidden 19 | # define hidden_proto(fct) 20 | # define hidden_def(fct) 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /distrib/libselinux/src/fgetfilecon.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "selinux_internal.h" 8 | #include "policy.h" 9 | 10 | int fgetfilecon(int fd, char ** context) 11 | { 12 | char *buf; 13 | ssize_t size; 14 | ssize_t ret; 15 | 16 | size = INITCONTEXTLEN + 1; 17 | buf = malloc(size); 18 | if (!buf) 19 | return -1; 20 | memset(buf, 0, size); 21 | 22 | ret = fgetxattr(fd, XATTR_NAME_SELINUX, buf, size - 1); 23 | if (ret < 0 && errno == ERANGE) { 24 | char *newbuf; 25 | 26 | size = fgetxattr(fd, XATTR_NAME_SELINUX, NULL, 0); 27 | if (size < 0) 28 | goto out; 29 | 30 | size++; 31 | newbuf = realloc(buf, size); 32 | if (!newbuf) 33 | goto out; 34 | 35 | buf = newbuf; 36 | memset(buf, 0, size); 37 | ret = fgetxattr(fd, XATTR_NAME_SELINUX, buf, size - 1); 38 | } 39 | out: 40 | if (ret == 0) { 41 | /* Re-map empty attribute values to errors. */ 42 | errno = EOPNOTSUPP; 43 | ret = -1; 44 | } 45 | if (ret < 0) 46 | free(buf); 47 | else 48 | *context = buf; 49 | return ret; 50 | } 51 | 52 | -------------------------------------------------------------------------------- /distrib/libselinux/src/freecon.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "selinux_internal.h" 3 | #include 4 | #include 5 | 6 | void freecon(char * con) 7 | { 8 | free(con); 9 | } 10 | 11 | hidden_def(freecon) 12 | -------------------------------------------------------------------------------- /distrib/libselinux/src/fsetfilecon.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "selinux_internal.h" 8 | #include "policy.h" 9 | 10 | int fsetfilecon(int fd, const char *context) 11 | { 12 | return fsetxattr(fd, XATTR_NAME_SELINUX, context, strlen(context) + 1, 13 | 0); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /distrib/libselinux/src/getenforce.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "selinux_internal.h" 8 | #include "policy.h" 9 | #include 10 | #include 11 | 12 | int security_getenforce(void) 13 | { 14 | int fd, ret, enforce = 0; 15 | char path[PATH_MAX]; 16 | char buf[20]; 17 | 18 | if (!selinux_mnt) { 19 | errno = ENOENT; 20 | return -1; 21 | } 22 | 23 | snprintf(path, sizeof path, "%s/enforce", selinux_mnt); 24 | fd = open(path, O_RDONLY); 25 | if (fd < 0) 26 | return -1; 27 | 28 | memset(buf, 0, sizeof buf); 29 | ret = read(fd, buf, sizeof buf - 1); 30 | close(fd); 31 | if (ret < 0) 32 | return -1; 33 | 34 | if (sscanf(buf, "%d", &enforce) != 1) 35 | return -1; 36 | 37 | return enforce; 38 | } 39 | 40 | hidden_def(security_getenforce) 41 | -------------------------------------------------------------------------------- /distrib/libselinux/src/getfilecon.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "selinux_internal.h" 5 | #include 6 | #include 7 | #include 8 | #include "policy.h" 9 | 10 | int getfilecon(const char *path, char ** context) 11 | { 12 | char *buf; 13 | ssize_t size; 14 | ssize_t ret; 15 | 16 | size = INITCONTEXTLEN + 1; 17 | buf = malloc(size); 18 | if (!buf) 19 | return -1; 20 | memset(buf, 0, size); 21 | 22 | ret = getxattr(path, XATTR_NAME_SELINUX, buf, size - 1); 23 | if (ret < 0 && errno == ERANGE) { 24 | char *newbuf; 25 | 26 | size = getxattr(path, XATTR_NAME_SELINUX, NULL, 0); 27 | if (size < 0) 28 | goto out; 29 | 30 | size++; 31 | newbuf = realloc(buf, size); 32 | if (!newbuf) 33 | goto out; 34 | 35 | buf = newbuf; 36 | memset(buf, 0, size); 37 | ret = getxattr(path, XATTR_NAME_SELINUX, buf, size - 1); 38 | } 39 | out: 40 | if (ret == 0) { 41 | /* Re-map empty attribute values to errors. */ 42 | errno = EOPNOTSUPP; 43 | ret = -1; 44 | } 45 | if (ret < 0) 46 | free(buf); 47 | else 48 | *context = buf; 49 | return ret; 50 | } 51 | -------------------------------------------------------------------------------- /distrib/libselinux/src/getpeercon.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "selinux_internal.h" 8 | #include "policy.h" 9 | 10 | #ifndef SO_PEERSEC 11 | #define SO_PEERSEC 31 12 | #endif 13 | 14 | int getpeercon(int fd, char ** context) 15 | { 16 | char *buf; 17 | socklen_t size; 18 | ssize_t ret; 19 | 20 | size = INITCONTEXTLEN + 1; 21 | buf = malloc(size); 22 | if (!buf) 23 | return -1; 24 | memset(buf, 0, size); 25 | 26 | ret = getsockopt(fd, SOL_SOCKET, SO_PEERSEC, buf, &size); 27 | if (ret < 0 && errno == ERANGE) { 28 | char *newbuf; 29 | 30 | newbuf = realloc(buf, size); 31 | if (!newbuf) 32 | goto out; 33 | 34 | buf = newbuf; 35 | memset(buf, 0, size); 36 | ret = getsockopt(fd, SOL_SOCKET, SO_PEERSEC, buf, &size); 37 | } 38 | out: 39 | if (ret < 0) 40 | free(buf); 41 | else 42 | *context = buf; 43 | return ret; 44 | } 45 | 46 | -------------------------------------------------------------------------------- /distrib/libselinux/src/lgetfilecon.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "selinux_internal.h" 8 | #include "policy.h" 9 | 10 | int lgetfilecon(const char *path, char ** context) 11 | { 12 | char *buf; 13 | ssize_t size; 14 | ssize_t ret; 15 | 16 | size = INITCONTEXTLEN + 1; 17 | buf = malloc(size); 18 | if (!buf) 19 | return -1; 20 | memset(buf, 0, size); 21 | 22 | ret = lgetxattr(path, XATTR_NAME_SELINUX, buf, size - 1); 23 | if (ret < 0 && errno == ERANGE) { 24 | char *newbuf; 25 | 26 | size = lgetxattr(path, XATTR_NAME_SELINUX, NULL, 0); 27 | if (size < 0) 28 | goto out; 29 | 30 | size++; 31 | newbuf = realloc(buf, size); 32 | if (!newbuf) 33 | goto out; 34 | 35 | buf = newbuf; 36 | memset(buf, 0, size); 37 | ret = lgetxattr(path, XATTR_NAME_SELINUX, buf, size - 1); 38 | } 39 | out: 40 | if (ret == 0) { 41 | /* Re-map empty attribute values to errors. */ 42 | errno = EOPNOTSUPP; 43 | ret = -1; 44 | } 45 | if (ret < 0) 46 | free(buf); 47 | else 48 | *context = buf; 49 | return ret; 50 | } 51 | -------------------------------------------------------------------------------- /distrib/libselinux/src/load_policy.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include "selinux_internal.h" 14 | #include 15 | #include "policy.h" 16 | #include 17 | #include "callbacks.h" 18 | 19 | int security_load_policy(void *data, size_t len) 20 | { 21 | char path[PATH_MAX]; 22 | int fd, ret; 23 | 24 | if (!selinux_mnt) { 25 | errno = ENOENT; 26 | return -1; 27 | } 28 | 29 | snprintf(path, sizeof path, "%s/load", selinux_mnt); 30 | fd = open(path, O_RDWR); 31 | if (fd < 0) 32 | return -1; 33 | 34 | ret = write(fd, data, len); 35 | close(fd); 36 | if (ret < 0) 37 | return -1; 38 | return 0; 39 | } 40 | 41 | hidden_def(security_load_policy) 42 | -------------------------------------------------------------------------------- /distrib/libselinux/src/lsetfilecon.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "selinux_internal.h" 8 | #include "policy.h" 9 | 10 | int lsetfilecon(const char *path, const char *context) 11 | { 12 | return lsetxattr(path, XATTR_NAME_SELINUX, context, strlen(context) + 1, 13 | 0); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /distrib/libselinux/src/mapping.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file describes the class and permission mappings used to 3 | * hide the kernel numbers from userspace by allowing userspace object 4 | * managers to specify a list of classes and permissions. 5 | */ 6 | #ifndef _SELINUX_MAPPING_H_ 7 | #define _SELINUX_MAPPING_H_ 8 | 9 | #include 10 | 11 | /* 12 | * Get real, kernel values from mapped values 13 | */ 14 | 15 | extern security_class_t 16 | unmap_class(security_class_t tclass); 17 | 18 | extern access_vector_t 19 | unmap_perm(security_class_t tclass, access_vector_t tperm); 20 | 21 | /* 22 | * Get mapped values from real, kernel values 23 | */ 24 | 25 | extern security_class_t 26 | map_class(security_class_t kclass); 27 | 28 | extern access_vector_t 29 | map_perm(security_class_t tclass, access_vector_t kperm); 30 | 31 | extern void 32 | map_decision(security_class_t tclass, struct av_decision *avd); 33 | 34 | /*mapping is not used for embedded build*/ 35 | #ifdef DISABLE_AVC 36 | #define unmap_perm(x,y) y 37 | #define unmap_class(x) x 38 | #define map_decision(x,y) 39 | #endif 40 | 41 | #endif /* _SELINUX_MAPPING_H_ */ 42 | -------------------------------------------------------------------------------- /distrib/libselinux/src/policy.h: -------------------------------------------------------------------------------- 1 | #ifndef _POLICY_H_ 2 | #define _POLICY_H_ 3 | 4 | /* Private definitions used internally by libselinux. */ 5 | 6 | /* xattr name for SELinux attributes. */ 7 | #define XATTR_NAME_SELINUX "security.selinux" 8 | 9 | /* Initial length guess for getting contexts. */ 10 | #define INITCONTEXTLEN 255 11 | 12 | /* selinuxfs magic number */ 13 | #define SELINUX_MAGIC 0xf97cff8c 14 | 15 | /* Preferred selinuxfs mount point directory paths. */ 16 | #define SELINUXMNT "/sys/fs/selinux" 17 | #define OLDSELINUXMNT "/selinux" 18 | 19 | /* selinuxfs filesystem type string. */ 20 | #define SELINUXFS "selinuxfs" 21 | 22 | /* selinuxfs mount point determined at runtime */ 23 | extern char *selinux_mnt; 24 | 25 | /* First version of policy supported in mainline Linux. */ 26 | #define DEFAULT_POLICY_VERSION 15 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /distrib/libselinux/src/policyvers.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "selinux_internal.h" 8 | #include 9 | #include "policy.h" 10 | #include "dso.h" 11 | #include 12 | 13 | int security_policyvers(void) 14 | { 15 | int fd, ret; 16 | char path[PATH_MAX]; 17 | char buf[20]; 18 | unsigned vers = DEFAULT_POLICY_VERSION; 19 | 20 | if (!selinux_mnt) { 21 | errno = ENOENT; 22 | return -1; 23 | } 24 | 25 | snprintf(path, sizeof path, "%s/policyvers", selinux_mnt); 26 | fd = open(path, O_RDONLY); 27 | if (fd < 0) { 28 | if (errno == ENOENT) 29 | return vers; 30 | else 31 | return -1; 32 | } 33 | memset(buf, 0, sizeof buf); 34 | ret = read(fd, buf, sizeof buf - 1); 35 | close(fd); 36 | if (ret < 0) 37 | return -1; 38 | 39 | if (sscanf(buf, "%u", &vers) != 1) 40 | return -1; 41 | 42 | return vers; 43 | } 44 | 45 | hidden_def(security_policyvers) 46 | -------------------------------------------------------------------------------- /distrib/libselinux/src/selinux_netlink.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Netlink event notifications for SELinux. 3 | * 4 | * Author: James Morris 5 | */ 6 | #ifndef _LINUX_SELINUX_NETLINK_H 7 | #define _LINUX_SELINUX_NETLINK_H 8 | 9 | /* Message types. */ 10 | #define SELNL_MSG_BASE 0x10 11 | enum { 12 | SELNL_MSG_SETENFORCE = SELNL_MSG_BASE, 13 | SELNL_MSG_POLICYLOAD, 14 | SELNL_MSG_MAX 15 | }; 16 | 17 | /* Multicast groups */ 18 | #define SELNL_GRP_NONE 0x00000000 19 | #define SELNL_GRP_AVC 0x00000001 /* AVC notifications */ 20 | #define SELNL_GRP_ALL 0xffffffff 21 | 22 | /* Message structures */ 23 | struct selnl_msg_setenforce { 24 | int32_t val; 25 | }; 26 | 27 | struct selnl_msg_policyload { 28 | uint32_t seqno; 29 | }; 30 | 31 | #endif /* _LINUX_SELINUX_NETLINK_H */ 32 | -------------------------------------------------------------------------------- /distrib/libselinux/src/setenforce.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "selinux_internal.h" 8 | #include "policy.h" 9 | #include 10 | #include 11 | 12 | int security_setenforce(int value) 13 | { 14 | int fd, ret; 15 | char path[PATH_MAX]; 16 | char buf[20]; 17 | 18 | if (!selinux_mnt) { 19 | errno = ENOENT; 20 | return -1; 21 | } 22 | 23 | snprintf(path, sizeof path, "%s/enforce", selinux_mnt); 24 | fd = open(path, O_RDWR); 25 | if (fd < 0) 26 | return -1; 27 | 28 | snprintf(buf, sizeof buf, "%d", value); 29 | ret = write(fd, buf, strlen(buf)); 30 | close(fd); 31 | if (ret < 0) 32 | return -1; 33 | 34 | return 0; 35 | } 36 | 37 | hidden_def(security_setenforce) 38 | -------------------------------------------------------------------------------- /distrib/libselinux/src/setfilecon.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "selinux_internal.h" 8 | #include "policy.h" 9 | 10 | int setfilecon(const char *path, const char *context) 11 | { 12 | return setxattr(path, XATTR_NAME_SELINUX, context, strlen(context) + 1, 13 | 0); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /distrib/libsparse/README: -------------------------------------------------------------------------------- 1 | This directory contains a copy of the sources of the AOSP libsparse library. 2 | 3 | For reference, the files were taken from $AOSP/system/core/libsparse with 4 | the following commit: 5 | 6 | 252b0e2b46e3d5e71a8b5c55928dc9ca62811f0a 7 | -------------------------------------------------------------------------------- /distrib/libsparse/src/defs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _LIBSPARSE_DEFS_H_ 18 | 19 | #ifndef __unused 20 | #define __unused __attribute__((__unused__)) 21 | #endif 22 | 23 | #endif /* _LIBSPARSE_DEFS_H_ */ 24 | -------------------------------------------------------------------------------- /distrib/libsparse/src/sparse_crc32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | uint32_t sparse_crc32(uint32_t crc, const void *buf, size_t size); 20 | 21 | -------------------------------------------------------------------------------- /distrib/libsparse/src/sparse_err.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | void sparse_default_print(const char *fmt, ...) 24 | { 25 | va_list argp; 26 | 27 | va_start(argp, fmt); 28 | vfprintf(stderr, fmt, argp); 29 | va_end(argp); 30 | } 31 | 32 | void (*sparse_print_error)(const char *fmt, ...) = sparse_default_print; 33 | void (*sparse_print_verbose)(const char *fmt, ...) = sparse_default_print; 34 | -------------------------------------------------------------------------------- /distrib/libsparse/src/sparse_file.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _LIBSPARSE_SPARSE_FILE_H_ 18 | #define _LIBSPARSE_SPARSE_FILE_H_ 19 | 20 | #include 21 | 22 | struct sparse_file { 23 | unsigned int block_size; 24 | int64_t len; 25 | bool verbose; 26 | 27 | struct backed_block_list *backed_block_list; 28 | struct output_file *out; 29 | }; 30 | 31 | 32 | #endif /* _LIBSPARSE_SPARSE_FILE_H_ */ 33 | -------------------------------------------------------------------------------- /distrib/mini-glib/README: -------------------------------------------------------------------------------- 1 | This is a tiny replacement for the GLib library that can be used when building 2 | the Android emulator. 3 | 4 | This may be replaced in the future by a full GLib source tree, but this 5 | introduces several subtle issues in the emulator build, which are better 6 | avoided for now. 7 | -------------------------------------------------------------------------------- /distrib/mini-glib/sources.make: -------------------------------------------------------------------------------- 1 | # Included from top-level Makefile.common 2 | 3 | GLIB_INCLUDE_DIR := $(LOCAL_PATH)/$(GLIB_DIR)/include 4 | 5 | GLIB_SOURCES := \ 6 | $(GLIB_DIR)/src/glib-mini.c \ 7 | 8 | ifeq ($(HOST_OS),windows) 9 | GLIB_SOURCES += \ 10 | $(GLIB_DIR)/src/glib-mini-win32.c \ 11 | 12 | endif 13 | -------------------------------------------------------------------------------- /distrib/sdl2-2.0.3/COPYING.txt: -------------------------------------------------------------------------------- 1 | 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | 21 | -------------------------------------------------------------------------------- /distrib/sdl2-2.0.3/README-SDL.txt: -------------------------------------------------------------------------------- 1 | 2 | Please distribute this file with the SDL runtime environment: 3 | 4 | The Simple DirectMedia Layer (SDL for short) is a cross-platform library 5 | designed to make it easy to write multi-media software, such as games and 6 | emulators. 7 | 8 | The Simple DirectMedia Layer library source code is available from: 9 | http://www.libsdl.org/ 10 | 11 | This library is distributed under the terms of the zlib license: 12 | http://www.zlib.net/zlib_license.html 13 | 14 | -------------------------------------------------------------------------------- /distrib/sdl2-2.0.3/include/SDL_copying.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | -------------------------------------------------------------------------------- /distrib/sdl2-2.0.3/include/SDL_revision.h: -------------------------------------------------------------------------------- 1 | #define SDL_REVISION "hg-8628:b558f99d48f0" 2 | #define SDL_REVISION_NUMBER 8628 3 | -------------------------------------------------------------------------------- /distrib/sdl2-2.0.3/src/SDL_assert_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | extern void SDL_AssertionsQuit(void); 23 | 24 | /* vi: set ts=4 sw=4 expandtab: */ 25 | -------------------------------------------------------------------------------- /distrib/sdl2-2.0.3/src/audio/sun/SDL_sunaudio.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/distrib/sdl2-2.0.3/src/audio/sun/SDL_sunaudio.c -------------------------------------------------------------------------------- /distrib/sdl2-2.0.3/src/events/default_cursor.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/distrib/sdl2-2.0.3/src/events/default_cursor.h -------------------------------------------------------------------------------- /distrib/sdl2-2.0.3/src/haptic/SDL_haptic_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | extern int SDL_HapticInit(void); 23 | extern void SDL_HapticQuit(void); 24 | 25 | /* vi: set ts=4 sw=4 expandtab: */ 26 | -------------------------------------------------------------------------------- /distrib/sdl2-2.0.3/src/libm/s_fabs.c: -------------------------------------------------------------------------------- 1 | /* @(#)s_fabs.c 5.1 93/09/24 */ 2 | /* 3 | * ==================================================== 4 | * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 5 | * 6 | * Developed at SunPro, a Sun Microsystems, Inc. business. 7 | * Permission to use, copy, modify, and distribute this 8 | * software is freely granted, provided that this notice 9 | * is preserved. 10 | * ==================================================== 11 | */ 12 | 13 | #if defined(LIBM_SCCS) && !defined(lint) 14 | static const char rcsid[] = 15 | "$NetBSD: s_fabs.c,v 1.7 1995/05/10 20:47:13 jtc Exp $"; 16 | #endif 17 | 18 | /* 19 | * fabs(x) returns the absolute value of x. 20 | */ 21 | 22 | #include "math_libm.h" 23 | #include "math_private.h" 24 | 25 | libm_hidden_proto(fabs) 26 | #ifdef __STDC__ 27 | double fabs(double x) 28 | #else 29 | double fabs(x) 30 | double x; 31 | #endif 32 | { 33 | u_int32_t high; 34 | GET_HIGH_WORD(high, x); 35 | SET_HIGH_WORD(x, high & 0x7fffffff); 36 | return x; 37 | } 38 | 39 | libm_hidden_def(fabs) 40 | -------------------------------------------------------------------------------- /distrib/sdl2-2.0.3/src/main/dummy/SDL_dummy_main.c: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_dummy_main.c, placed in the public domain by Sam Lantinga 3/13/14 3 | */ 4 | #include "../../SDL_internal.h" 5 | 6 | /* Include the SDL main definition header */ 7 | #include "SDL_main.h" 8 | 9 | #ifdef main 10 | #undef main 11 | int 12 | main(int argc, char *argv[]) 13 | { 14 | return (SDL_main(argc, argv)); 15 | } 16 | #else 17 | /* Nothing to do on this platform */ 18 | int 19 | SDL_main_stub_symbol(void); 20 | 21 | int 22 | SDL_main_stub_symbol(void) 23 | { 24 | return 0; 25 | } 26 | #endif 27 | 28 | /* vi: set ts=4 sw=4 expandtab: */ 29 | -------------------------------------------------------------------------------- /distrib/sdl2-2.0.3/src/main/windows/version.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/distrib/sdl2-2.0.3/src/main/windows/version.rc -------------------------------------------------------------------------------- /distrib/sdl2-2.0.3/src/test/SDL_test_font.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/distrib/sdl2-2.0.3/src/test/SDL_test_font.c -------------------------------------------------------------------------------- /distrib/sdl2-2.0.3/src/thread/generic/SDL_sysmutex_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | /* vi: set ts=4 sw=4 expandtab: */ 23 | -------------------------------------------------------------------------------- /distrib/sdl2-2.0.3/src/thread/psp/SDL_sysmutex_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | /* vi: set ts=4 sw=4 expandtab: */ 23 | -------------------------------------------------------------------------------- /distrib/sdl2-2.0.3/src/thread/psp/SDL_systhread_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #include 23 | 24 | typedef SceUID SYS_ThreadHandle; 25 | -------------------------------------------------------------------------------- /distrib/sdl2-2.0.3/src/video/SDL_RLEaccel.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/distrib/sdl2-2.0.3/src/video/SDL_RLEaccel.c -------------------------------------------------------------------------------- /distrib/sdl2-2.0.3/src/video/SDL_blit_copy.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | void SDL_BlitCopy(SDL_BlitInfo * info); 23 | 24 | /* vi: set ts=4 sw=4 expandtab: */ 25 | -------------------------------------------------------------------------------- /distrib/sdl2-2.0.3/src/video/psp/SDL_pspmouse_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #include "SDL_pspvideo.h" 23 | 24 | /* Functions to be exported */ 25 | -------------------------------------------------------------------------------- /distrib/zlib-1.2.8/gzclose.c: -------------------------------------------------------------------------------- 1 | /* gzclose.c -- zlib gzclose() function 2 | * Copyright (C) 2004, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | #include "gzguts.h" 7 | 8 | /* gzclose() is in a separate file so that it is linked in only if it is used. 9 | That way the other gzclose functions can be used instead to avoid linking in 10 | unneeded compression or decompression routines. */ 11 | int ZEXPORT gzclose(file) 12 | gzFile file; 13 | { 14 | #ifndef NO_GZCOMPRESS 15 | gz_statep state; 16 | 17 | if (file == NULL) 18 | return Z_STREAM_ERROR; 19 | state = (gz_statep)file; 20 | 21 | return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); 22 | #else 23 | return gzclose_r(file); 24 | #endif 25 | } 26 | -------------------------------------------------------------------------------- /distrib/zlib-1.2.8/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /distrib/zlib-1.2.8/sources.make: -------------------------------------------------------------------------------- 1 | OLD_LOCAL_PATH := $(LOCAL_PATH) 2 | LOCAL_PATH := $(call my-dir) 3 | 4 | ZLIB_SOURCES := \ 5 | adler32.c \ 6 | compress.c \ 7 | crc32.c \ 8 | deflate.c \ 9 | gzclose.c \ 10 | gzlib.c \ 11 | gzread.c \ 12 | gzwrite.c \ 13 | infback.c \ 14 | inffast.c \ 15 | inflate.c \ 16 | inftrees.c \ 17 | trees.c \ 18 | uncompr.c \ 19 | zutil.c 20 | 21 | ZLIB_INCLUDES := $(LOCAL_PATH) 22 | 23 | $(call start-emulator-library,emulator-zlib) 24 | LOCAL_SRC_FILES := $(ZLIB_SOURCES) 25 | LOCAL_C_INCLUDES := $(ZLIB_INCLUDES) 26 | $(call end-emulator-library) 27 | 28 | $(call start-emulator64-library,emulator64-zlib) 29 | LOCAL_SRC_FILES := $(ZLIB_SOURCES) 30 | LOCAL_C_INCLUDES := $(ZLIB_INCLUDES) 31 | $(call end-emulator-library) 32 | 33 | LOCAL_PATH := $(OLD_LOCAL_PATH) 34 | -------------------------------------------------------------------------------- /gdb-xml/cf-fp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | , 21 | 22 | 23 | -------------------------------------------------------------------------------- /hw/mips/mips_pic.c: -------------------------------------------------------------------------------- 1 | /* 2 | * MIPS CPU interrupt support. 3 | * 4 | */ 5 | 6 | #include "hw/hw.h" 7 | 8 | /* Stub functions for hardware that don't exist. */ 9 | void pic_info(void) 10 | { 11 | } 12 | 13 | void irq_info(void) 14 | { 15 | } 16 | 17 | static void mips_cpu_irq_handler(void *opaque, int irq, int level) 18 | { 19 | CPUOldState *env = (CPUOldState *)opaque; 20 | int causebit; 21 | 22 | if (irq < 0 || 7 < irq) 23 | cpu_abort(env, "mips_pic_cpu_handler: Bad interrupt line %d\n", 24 | irq); 25 | 26 | causebit = 0x00000100 << irq; 27 | if (level) { 28 | env->CP0_Cause |= causebit; 29 | cpu_interrupt(ENV_GET_CPU(env), CPU_INTERRUPT_HARD); 30 | } else { 31 | env->CP0_Cause &= ~causebit; 32 | cpu_reset_interrupt(ENV_GET_CPU(env), CPU_INTERRUPT_HARD); 33 | } 34 | } 35 | 36 | qemu_irq *mips_cpu_irq_init(CPUOldState *env) 37 | { 38 | return qemu_allocate_irqs(mips_cpu_irq_handler, env, 8); 39 | } 40 | -------------------------------------------------------------------------------- /images/android_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/images/android_icon.ico -------------------------------------------------------------------------------- /images/android_icon.rc: -------------------------------------------------------------------------------- 1 | 1 ICON "../images/android_icon.ico" 2 | 3 | 4 | -------------------------------------------------------------------------------- /images/android_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/images/android_icon_128.png -------------------------------------------------------------------------------- /images/android_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/images/android_icon_256.png -------------------------------------------------------------------------------- /include/android/kvm.h: -------------------------------------------------------------------------------- 1 | #ifndef KVM_ANDROID_H 2 | #define KVM_ANDROID_H 3 | 4 | // Name of environment variable used to control the name of the device 5 | // to use, when it is not /dev/kvm 6 | #define KVM_DEVICE_NAME_ENV "ANDROID_EMULATOR_KVM_DEVICE" 7 | 8 | /* Returns 1 if we can use /dev/kvm on this machine */ 9 | extern int kvm_check_allowed(void); 10 | 11 | #endif /* KVM_ANDROID_H */ 12 | -------------------------------------------------------------------------------- /include/android/qemu-debug.h: -------------------------------------------------------------------------------- 1 | /* this is a transitional header. It should only be included 2 | * by non-specific source files. Later, a non-Android specific 3 | * implementation will be hooked in 4 | */ 5 | #include "android/utils/debug.h" 6 | -------------------------------------------------------------------------------- /include/exec/hwaddr.h: -------------------------------------------------------------------------------- 1 | /* Define hwaddr if it exists. */ 2 | 3 | #ifndef HWADDR_H 4 | #define HWADDR_H 5 | 6 | #include 7 | 8 | #define HWADDR_BITS 64 9 | /* hwaddr is the type of a physical address (its size can 10 | be different from 'target_ulong'). */ 11 | 12 | typedef uint64_t hwaddr; 13 | #define HWADDR_MAX UINT64_MAX 14 | #define TARGET_FMT_plx "%016" PRIx64 15 | #define HWADDR_PRId PRId64 16 | #define HWADDR_PRIi PRIi64 17 | #define HWADDR_PRIo PRIo64 18 | #define HWADDR_PRIu PRIu64 19 | #define HWADDR_PRIx PRIx64 20 | #define HWADDR_PRIX PRIX64 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /include/hw/android/goldfish/nand.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2007-2008 The Android Open Source Project 2 | ** 3 | ** This software is licensed under the terms of the GNU General Public 4 | ** License version 2, as published by the Free Software Foundation, and 5 | ** may be copied, distributed, and modified under those terms. 6 | ** 7 | ** This program is distributed in the hope that it will be useful, 8 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | ** GNU General Public License for more details. 11 | */ 12 | #ifndef NAND_DEVICE_H 13 | #define NAND_DEVICE_H 14 | 15 | void nand_dev_init(uint32_t base); 16 | void nand_add_dev(const char *arg); 17 | void parse_nand_limits(char* limits); 18 | 19 | typedef struct { 20 | uint64_t limit; 21 | uint64_t counter; 22 | int pid; 23 | int signal; 24 | } nand_threshold; 25 | 26 | extern nand_threshold android_nand_read_threshold; 27 | extern nand_threshold android_nand_write_threshold; 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /include/hw/android/goldfish/vmem.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2007-2008 The Android Open Source Project 2 | ** 3 | ** This software is licensed under the terms of the GNU General Public 4 | ** License version 2, as published by the Free Software Foundation, and 5 | ** may be copied, distributed, and modified under those terms. 6 | ** 7 | ** This program is distributed in the hope that it will be useful, 8 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | ** GNU General Public License for more details. 11 | */ 12 | #ifndef GOLDFISH_VMEM_H 13 | #define GOLDFISH_VMEM_H 14 | 15 | #include "cpu.h" 16 | 17 | // Call these functions instead of cpu_memory_rw_debug and 18 | // cpu_get_phys_page_debug to ensure virtual address translation always works 19 | // properly, and efficently, under KVM. 20 | 21 | int safe_memory_rw_debug(CPUState *env, target_ulong addr, uint8_t *buf, 22 | int len, int is_write); 23 | 24 | hwaddr safe_get_phys_page_debug(CPUState *env, target_ulong addr); 25 | 26 | 27 | #endif /* GOLDFISH_VMEM_H */ 28 | -------------------------------------------------------------------------------- /include/hw/arm/pic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generic ARM Programmable Interrupt Controller support. 3 | * 4 | * Copyright (c) 2006 CodeSourcery. 5 | * Written by Paul Brook 6 | * 7 | * This code is licenced under the LGPL. 8 | * 9 | * Arm hardware uses a wide variety of interrupt handling hardware. 10 | * This provides a generic framework for connecting interrupt sources and 11 | * inputs. 12 | */ 13 | 14 | #ifndef ARM_INTERRUPT_H 15 | #define ARM_INTERRUPT_H 1 16 | 17 | #include "cpu.h" 18 | #include "hw/irq.h" 19 | 20 | /* The CPU is also modeled as an interrupt controller. */ 21 | #define ARM_PIC_CPU_IRQ 0 22 | #define ARM_PIC_CPU_FIQ 1 23 | qemu_irq *arm_pic_init_cpu(CPUOldState *env); 24 | 25 | #endif /* !ARM_INTERRUPT_H */ 26 | 27 | -------------------------------------------------------------------------------- /include/hw/audiodev.h: -------------------------------------------------------------------------------- 1 | /* es1370.c */ 2 | int es1370_init(PCIBus *bus); 3 | 4 | /* sb16.c */ 5 | int SB16_init(qemu_irq *pic); 6 | 7 | /* adlib.c */ 8 | int Adlib_init(qemu_irq *pic); 9 | 10 | /* gus.c */ 11 | int GUS_init(qemu_irq *pic); 12 | 13 | /* ac97.c */ 14 | int ac97_init(PCIBus *buf); 15 | 16 | /* cs4231a.c */ 17 | int cs4231a_init(qemu_irq *pic); 18 | -------------------------------------------------------------------------------- /include/hw/boards.h: -------------------------------------------------------------------------------- 1 | /* Declarations for use by board files for creating devices. */ 2 | 3 | #ifndef HW_BOARDS_H 4 | #define HW_BOARDS_H 5 | 6 | #include "exec/cpu-common.h" 7 | 8 | typedef void QEMUMachineInitFunc(ram_addr_t ram_size, 9 | const char *boot_device, 10 | const char *kernel_filename, 11 | const char *kernel_cmdline, 12 | const char *initrd_filename, 13 | const char *cpu_model); 14 | 15 | typedef struct QEMUMachine { 16 | const char *name; 17 | const char *desc; 18 | QEMUMachineInitFunc *init; 19 | int use_scsi; 20 | int max_cpus; 21 | int is_default; 22 | struct QEMUMachine *next; 23 | } QEMUMachine; 24 | 25 | int qemu_register_machine(QEMUMachine *m); 26 | 27 | extern QEMUMachine *current_machine; 28 | 29 | /* android_arm.c */ 30 | extern QEMUMachine android_arm_machine; 31 | 32 | /* android_mips.c */ 33 | extern QEMUMachine android_mips_machine; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /include/hw/input/ps2.h: -------------------------------------------------------------------------------- 1 | /* ps2.c */ 2 | void *ps2_kbd_init(void (*update_irq)(void *, int), void *update_arg); 3 | void *ps2_mouse_init(void (*update_irq)(void *, int), void *update_arg); 4 | void ps2_write_mouse(void *, int val); 5 | void ps2_write_keyboard(void *, int val); 6 | uint32_t ps2_read_data(void *); 7 | void ps2_queue(void *, int b); 8 | void ps2_keyboard_set_translation(void *opaque, int mode); 9 | void ps2_mouse_fake_event(void *opaque); 10 | -------------------------------------------------------------------------------- /include/hw/irq.h: -------------------------------------------------------------------------------- 1 | #ifndef QEMU_IRQ_H 2 | #define QEMU_IRQ_H 3 | 4 | /* Generic IRQ/GPIO pin infrastructure. */ 5 | 6 | /* FIXME: Rmove one of these. */ 7 | typedef void (*qemu_irq_handler)(void *opaque, int n, int level); 8 | typedef void SetIRQFunc(void *opaque, int irq_num, int level); 9 | 10 | void qemu_set_irq(qemu_irq irq, int level); 11 | 12 | static inline void qemu_irq_raise(qemu_irq irq) 13 | { 14 | qemu_set_irq(irq, 1); 15 | } 16 | 17 | static inline void qemu_irq_lower(qemu_irq irq) 18 | { 19 | qemu_set_irq(irq, 0); 20 | } 21 | 22 | static inline void qemu_irq_pulse(qemu_irq irq) 23 | { 24 | qemu_set_irq(irq, 1); 25 | qemu_set_irq(irq, 0); 26 | } 27 | 28 | /* Returns an array of N IRQs. */ 29 | qemu_irq *qemu_allocate_irqs(qemu_irq_handler handler, void *opaque, int n); 30 | void qemu_free_irqs(qemu_irq *s); 31 | 32 | /* Returns a new IRQ with opposite polarity. */ 33 | qemu_irq qemu_irq_invert(qemu_irq irq); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /include/hw/isa/isa.h: -------------------------------------------------------------------------------- 1 | #ifndef HW_ISA_H 2 | #define HW_ISA_H 3 | 4 | /* ISA bus */ 5 | 6 | #include "exec/hwaddr.h" 7 | #include "exec/ioport.h" 8 | #include "hw/qdev.h" 9 | 10 | extern hwaddr isa_mem_base; 11 | 12 | void isa_mmio_init(hwaddr base, hwaddr size); 13 | 14 | /* dma.c */ 15 | int DMA_get_channel_mode (int nchan); 16 | int DMA_read_memory (int nchan, void *buf, int pos, int size); 17 | int DMA_write_memory (int nchan, void *buf, int pos, int size); 18 | void DMA_hold_DREQ (int nchan); 19 | void DMA_release_DREQ (int nchan); 20 | void DMA_schedule(int nchan); 21 | void DMA_init (int high_page_enable); 22 | void DMA_register_channel (int nchan, 23 | DMA_transfer_handler transfer_handler, 24 | void *opaque); 25 | #endif 26 | -------------------------------------------------------------------------------- /include/hw/mips/bios.h: -------------------------------------------------------------------------------- 1 | #include "cpu.h" 2 | 3 | #define BIOS_SIZE (4 * 1024 * 1024) 4 | #ifdef TARGET_WORDS_BIGENDIAN 5 | #define BIOS_FILENAME "mips_bios.bin" 6 | #else 7 | #define BIOS_FILENAME "mipsel_bios.bin" 8 | #endif 9 | -------------------------------------------------------------------------------- /include/hw/msmouse.h: -------------------------------------------------------------------------------- 1 | /* msmouse.c */ 2 | CharDriverState *qemu_chr_open_msmouse(QemuOpts *opts); 3 | -------------------------------------------------------------------------------- /include/hw/qdev.h: -------------------------------------------------------------------------------- 1 | #ifndef QDEV_H 2 | #define QDEV_H 3 | 4 | #include "hw/hw.h" 5 | #include "hw/qdev-core.h" 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /include/hw/timer/hpet.h: -------------------------------------------------------------------------------- 1 | #ifndef __HPET__ 2 | #define __HPET__ 1 3 | 4 | 5 | 6 | struct hpet_info { 7 | unsigned long hi_ireqfreq; /* Hz */ 8 | unsigned long hi_flags; /* information */ 9 | unsigned short hi_hpet; 10 | unsigned short hi_timer; 11 | }; 12 | 13 | #define HPET_INFO_PERIODIC 0x0001 /* timer is periodic */ 14 | 15 | #define HPET_IE_ON _IO('h', 0x01) /* interrupt on */ 16 | #define HPET_IE_OFF _IO('h', 0x02) /* interrupt off */ 17 | #define HPET_INFO _IOR('h', 0x03, struct hpet_info) 18 | #define HPET_EPI _IO('h', 0x04) /* enable periodic */ 19 | #define HPET_DPI _IO('h', 0x05) /* disable periodic */ 20 | #define HPET_IRQFREQ _IOW('h', 0x6, unsigned long) /* IRQFREQ usec */ 21 | 22 | #endif /* !__HPET__ */ 23 | -------------------------------------------------------------------------------- /include/qapi/dealloc-visitor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Dealloc Visitor 3 | * 4 | * Copyright IBM, Corp. 2011 5 | * 6 | * Authors: 7 | * Michael Roth 8 | * 9 | * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. 10 | * See the COPYING.LIB file in the top-level directory. 11 | * 12 | */ 13 | 14 | #ifndef QAPI_DEALLOC_VISITOR_H 15 | #define QAPI_DEALLOC_VISITOR_H 16 | 17 | #include "qapi/visitor.h" 18 | 19 | typedef struct QapiDeallocVisitor QapiDeallocVisitor; 20 | 21 | QapiDeallocVisitor *qapi_dealloc_visitor_new(void); 22 | void qapi_dealloc_visitor_cleanup(QapiDeallocVisitor *d); 23 | 24 | Visitor *qapi_dealloc_get_visitor(QapiDeallocVisitor *v); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /include/qapi/qmp-input-visitor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Input Visitor 3 | * 4 | * Copyright IBM, Corp. 2011 5 | * 6 | * Authors: 7 | * Anthony Liguori 8 | * 9 | * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. 10 | * See the COPYING.LIB file in the top-level directory. 11 | * 12 | */ 13 | 14 | #ifndef QMP_INPUT_VISITOR_H 15 | #define QMP_INPUT_VISITOR_H 16 | 17 | #include "qapi/visitor.h" 18 | #include "qapi/qmp/qobject.h" 19 | 20 | typedef struct QmpInputVisitor QmpInputVisitor; 21 | 22 | QmpInputVisitor *qmp_input_visitor_new(QObject *obj); 23 | QmpInputVisitor *qmp_input_visitor_new_strict(QObject *obj); 24 | 25 | void qmp_input_visitor_cleanup(QmpInputVisitor *v); 26 | 27 | Visitor *qmp_input_get_visitor(QmpInputVisitor *v); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /include/qapi/qmp-output-visitor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Output Visitor 3 | * 4 | * Copyright IBM, Corp. 2011 5 | * 6 | * Authors: 7 | * Anthony Liguori 8 | * 9 | * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. 10 | * See the COPYING.LIB file in the top-level directory. 11 | * 12 | */ 13 | 14 | #ifndef QMP_OUTPUT_VISITOR_H 15 | #define QMP_OUTPUT_VISITOR_H 16 | 17 | #include "qapi/visitor.h" 18 | #include "qapi/qmp/qobject.h" 19 | 20 | typedef struct QmpOutputVisitor QmpOutputVisitor; 21 | 22 | QmpOutputVisitor *qmp_output_visitor_new(void); 23 | void qmp_output_visitor_cleanup(QmpOutputVisitor *v); 24 | 25 | QObject *qmp_output_get_qobject(QmpOutputVisitor *v); 26 | Visitor *qmp_output_get_visitor(QmpOutputVisitor *v); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /include/qapi/qmp/json-parser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * JSON Parser 3 | * 4 | * Copyright IBM, Corp. 2009 5 | * 6 | * Authors: 7 | * Anthony Liguori 8 | * 9 | * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. 10 | * See the COPYING.LIB file in the top-level directory. 11 | * 12 | */ 13 | 14 | #ifndef QEMU_JSON_PARSER_H 15 | #define QEMU_JSON_PARSER_H 16 | 17 | #include "qemu-common.h" 18 | #include "qapi/qmp/qlist.h" 19 | #include "qapi/error.h" 20 | 21 | QObject *json_parser_parse(QList *tokens, va_list *ap); 22 | QObject *json_parser_parse_err(QList *tokens, va_list *ap, Error **errp); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /include/qapi/qmp/qbool.h: -------------------------------------------------------------------------------- 1 | /* 2 | * QBool Module 3 | * 4 | * Copyright IBM, Corp. 2009 5 | * 6 | * Authors: 7 | * Anthony Liguori 8 | * 9 | * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. 10 | * See the COPYING.LIB file in the top-level directory. 11 | * 12 | */ 13 | 14 | #ifndef QBOOL_H 15 | #define QBOOL_H 16 | 17 | #include 18 | #include "qapi/qmp/qobject.h" 19 | 20 | typedef struct QBool { 21 | QObject_HEAD; 22 | int value; 23 | } QBool; 24 | 25 | QBool *qbool_from_int(int value); 26 | int qbool_get_int(const QBool *qb); 27 | QBool *qobject_to_qbool(const QObject *obj); 28 | 29 | #endif /* QBOOL_H */ 30 | -------------------------------------------------------------------------------- /include/qapi/qmp/qfloat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * QFloat Module 3 | * 4 | * Copyright IBM, Corp. 2009 5 | * 6 | * Authors: 7 | * Anthony Liguori 8 | * 9 | * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. 10 | * See the COPYING.LIB file in the top-level directory. 11 | * 12 | */ 13 | 14 | #ifndef QFLOAT_H 15 | #define QFLOAT_H 16 | 17 | #include 18 | #include "qapi/qmp/qobject.h" 19 | 20 | typedef struct QFloat { 21 | QObject_HEAD; 22 | double value; 23 | } QFloat; 24 | 25 | QFloat *qfloat_from_double(double value); 26 | double qfloat_get_double(const QFloat *qi); 27 | QFloat *qobject_to_qfloat(const QObject *obj); 28 | 29 | #endif /* QFLOAT_H */ 30 | -------------------------------------------------------------------------------- /include/qapi/qmp/qint.h: -------------------------------------------------------------------------------- 1 | /* 2 | * QInt Module 3 | * 4 | * Copyright (C) 2009 Red Hat Inc. 5 | * 6 | * Authors: 7 | * Luiz Capitulino 8 | * 9 | * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. 10 | * See the COPYING.LIB file in the top-level directory. 11 | */ 12 | 13 | #ifndef QINT_H 14 | #define QINT_H 15 | 16 | #include 17 | #include "qapi/qmp/qobject.h" 18 | 19 | typedef struct QInt { 20 | QObject_HEAD; 21 | int64_t value; 22 | } QInt; 23 | 24 | QInt *qint_from_int(int64_t value); 25 | int64_t qint_get_int(const QInt *qi); 26 | QInt *qobject_to_qint(const QObject *obj); 27 | 28 | #endif /* QINT_H */ 29 | -------------------------------------------------------------------------------- /include/qapi/qmp/qjson.h: -------------------------------------------------------------------------------- 1 | /* 2 | * QObject JSON integration 3 | * 4 | * Copyright IBM, Corp. 2009 5 | * 6 | * Authors: 7 | * Anthony Liguori 8 | * 9 | * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. 10 | * See the COPYING.LIB file in the top-level directory. 11 | * 12 | */ 13 | 14 | #ifndef QJSON_H 15 | #define QJSON_H 16 | 17 | #include 18 | #include "qemu/compiler.h" 19 | #include "qapi/qmp/qobject.h" 20 | #include "qapi/qmp/qstring.h" 21 | 22 | QObject *qobject_from_json(const char *string) GCC_FMT_ATTR(1, 0); 23 | QObject *qobject_from_jsonf(const char *string, ...) GCC_FMT_ATTR(1, 2); 24 | QObject *qobject_from_jsonv(const char *string, va_list *ap) GCC_FMT_ATTR(1, 0); 25 | 26 | QString *qobject_to_json(const QObject *obj); 27 | QString *qobject_to_json_pretty(const QObject *obj); 28 | 29 | #endif /* QJSON_H */ 30 | -------------------------------------------------------------------------------- /include/qapi/qmp/qstring.h: -------------------------------------------------------------------------------- 1 | /* 2 | * QString Module 3 | * 4 | * Copyright (C) 2009 Red Hat Inc. 5 | * 6 | * Authors: 7 | * Luiz Capitulino 8 | * 9 | * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. 10 | * See the COPYING.LIB file in the top-level directory. 11 | */ 12 | 13 | #ifndef QSTRING_H 14 | #define QSTRING_H 15 | 16 | #include 17 | #include "qapi/qmp/qobject.h" 18 | 19 | typedef struct QString { 20 | QObject_HEAD; 21 | char *string; 22 | size_t length; 23 | size_t capacity; 24 | } QString; 25 | 26 | QString *qstring_new(void); 27 | QString *qstring_from_str(const char *str); 28 | QString *qstring_from_substr(const char *str, int start, int end); 29 | size_t qstring_get_length(const QString *qstring); 30 | const char *qstring_get_str(const QString *qstring); 31 | void qstring_append_int(QString *qstring, int64_t value); 32 | void qstring_append(QString *qstring, const char *str); 33 | void qstring_append_chr(QString *qstring, int c); 34 | QString *qobject_to_qstring(const QObject *obj); 35 | 36 | #endif /* QSTRING_H */ 37 | -------------------------------------------------------------------------------- /include/qapi/qmp/types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Include all QEMU objects. 3 | * 4 | * Copyright (C) 2009 Red Hat Inc. 5 | * 6 | * Authors: 7 | * Luiz Capitulino 8 | * 9 | * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. 10 | * See the COPYING.LIB file in the top-level directory. 11 | */ 12 | 13 | #ifndef QEMU_OBJECTS_H 14 | #define QEMU_OBJECTS_H 15 | 16 | #include "qapi/qmp/qobject.h" 17 | #include "qapi/qmp/qint.h" 18 | #include "qapi/qmp/qfloat.h" 19 | #include "qapi/qmp/qbool.h" 20 | #include "qapi/qmp/qstring.h" 21 | #include "qapi/qmp/qdict.h" 22 | #include "qapi/qmp/qlist.h" 23 | #include "qapi/qmp/qjson.h" 24 | 25 | #endif /* QEMU_OBJECTS_H */ 26 | -------------------------------------------------------------------------------- /include/qapi/string-input-visitor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * String parsing Visitor 3 | * 4 | * Copyright Red Hat, Inc. 2012 5 | * 6 | * Author: Paolo Bonzini 7 | * 8 | * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. 9 | * See the COPYING.LIB file in the top-level directory. 10 | * 11 | */ 12 | 13 | #ifndef STRING_INPUT_VISITOR_H 14 | #define STRING_INPUT_VISITOR_H 15 | 16 | #include "qapi/visitor.h" 17 | 18 | typedef struct StringInputVisitor StringInputVisitor; 19 | 20 | StringInputVisitor *string_input_visitor_new(const char *str); 21 | void string_input_visitor_cleanup(StringInputVisitor *v); 22 | 23 | Visitor *string_input_get_visitor(StringInputVisitor *v); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /include/qapi/string-output-visitor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * String printing Visitor 3 | * 4 | * Copyright Red Hat, Inc. 2012 5 | * 6 | * Author: Paolo Bonzini 7 | * 8 | * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. 9 | * See the COPYING.LIB file in the top-level directory. 10 | * 11 | */ 12 | 13 | #ifndef STRING_OUTPUT_VISITOR_H 14 | #define STRING_OUTPUT_VISITOR_H 15 | 16 | #include "qapi/visitor.h" 17 | 18 | typedef struct StringOutputVisitor StringOutputVisitor; 19 | 20 | StringOutputVisitor *string_output_visitor_new(void); 21 | void string_output_visitor_cleanup(StringOutputVisitor *v); 22 | 23 | char *string_output_get_string(StringOutputVisitor *v); 24 | Visitor *string_output_get_visitor(StringOutputVisitor *v); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /include/qemu/config-file.h: -------------------------------------------------------------------------------- 1 | #ifndef QEMU_CONFIG_H 2 | #define QEMU_CONFIG_H 3 | 4 | extern QemuOptsList qemu_fsdev_opts; 5 | extern QemuOptsList qemu_virtfs_opts; 6 | extern QemuOptsList qemu_spice_opts; 7 | 8 | QemuOptsList *qemu_find_opts(const char *group); 9 | void qemu_add_opts(QemuOptsList *list); 10 | int qemu_set_option(const char *str); 11 | int qemu_global_option(const char *str); 12 | void qemu_add_globals(void); 13 | 14 | void qemu_config_write(FILE *fp); 15 | int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname); 16 | 17 | int qemu_read_config_file(const char *filename); 18 | 19 | #endif /* QEMU_CONFIG_H */ 20 | -------------------------------------------------------------------------------- /include/qemu/envlist.h: -------------------------------------------------------------------------------- 1 | #ifndef ENVLIST_H 2 | #define ENVLIST_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef struct envlist envlist_t; 9 | 10 | envlist_t *envlist_create(void); 11 | void envlist_free(envlist_t *); 12 | int envlist_setenv(envlist_t *, const char *); 13 | int envlist_unsetenv(envlist_t *, const char *); 14 | int envlist_parse_set(envlist_t *, const char *); 15 | int envlist_parse_unset(envlist_t *, const char *); 16 | char **envlist_to_environ(const envlist_t *, size_t *); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif /* ENVLIST_H */ 23 | -------------------------------------------------------------------------------- /include/qemu/thread-posix.h: -------------------------------------------------------------------------------- 1 | #ifndef __QEMU_THREAD_POSIX_H 2 | #define __QEMU_THREAD_POSIX_H 1 3 | #include "pthread.h" 4 | #include 5 | 6 | struct QemuMutex { 7 | pthread_mutex_t lock; 8 | }; 9 | 10 | struct QemuCond { 11 | pthread_cond_t cond; 12 | }; 13 | 14 | struct QemuSemaphore { 15 | #if defined(__APPLE__) || defined(__NetBSD__) 16 | pthread_mutex_t lock; 17 | pthread_cond_t cond; 18 | unsigned int count; 19 | #else 20 | sem_t sem; 21 | #endif 22 | }; 23 | 24 | struct QemuEvent { 25 | #ifndef __linux__ 26 | pthread_mutex_t lock; 27 | pthread_cond_t cond; 28 | #endif 29 | unsigned value; 30 | }; 31 | 32 | struct QemuThread { 33 | pthread_t thread; 34 | }; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /include/qemu/thread-win32.h: -------------------------------------------------------------------------------- 1 | #ifndef __QEMU_THREAD_WIN32_H 2 | #define __QEMU_THREAD_WIN32_H 1 3 | #include "windows.h" 4 | 5 | struct QemuMutex { 6 | CRITICAL_SECTION lock; 7 | LONG owner; 8 | }; 9 | 10 | struct QemuCond { 11 | LONG waiters, target; 12 | HANDLE sema; 13 | HANDLE continue_event; 14 | }; 15 | 16 | struct QemuSemaphore { 17 | HANDLE sema; 18 | }; 19 | 20 | struct QemuEvent { 21 | HANDLE event; 22 | }; 23 | 24 | typedef struct QemuThreadData QemuThreadData; 25 | struct QemuThread { 26 | QemuThreadData *data; 27 | unsigned tid; 28 | }; 29 | 30 | /* Only valid for joinable threads. */ 31 | HANDLE qemu_thread_get_handle(QemuThread *thread); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /include/sysemu/arch_init.h: -------------------------------------------------------------------------------- 1 | #ifndef QEMU_ARCH_INIT_H 2 | #define QEMU_ARCH_INIT_H 3 | 4 | extern const char arch_config_name[]; 5 | 6 | enum { 7 | QEMU_ARCH_ALL = -1, 8 | QEMU_ARCH_ALPHA = 1, 9 | QEMU_ARCH_ARM = 2, 10 | QEMU_ARCH_CRIS = 4, 11 | QEMU_ARCH_I386 = 8, 12 | QEMU_ARCH_M68K = 16, 13 | QEMU_ARCH_LM32 = 32, 14 | QEMU_ARCH_MICROBLAZE = 64, 15 | QEMU_ARCH_MIPS = 128, 16 | QEMU_ARCH_PPC = 256, 17 | QEMU_ARCH_S390X = 512, 18 | QEMU_ARCH_SH4 = 1024, 19 | QEMU_ARCH_SPARC = 2048, 20 | }; 21 | 22 | extern const uint32_t arch_type; 23 | 24 | void select_soundhw(const char *optarg); 25 | void do_acpitable_option(const char *optarg); 26 | void do_smbios_option(const char *optarg); 27 | void cpudef_init(void); 28 | int audio_available(void); 29 | void audio_init(qemu_irq *isa_pic, PCIBus *pci_bus); 30 | int kvm_available(void); 31 | int xen_available(void); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /include/sysemu/balloon.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Balloon 3 | * 4 | * Copyright IBM, Corp. 2008 5 | * 6 | * Authors: 7 | * Anthony Liguori 8 | * 9 | * This work is licensed under the terms of the GNU GPL, version 2. See 10 | * the COPYING file in the top-level directory. 11 | * 12 | */ 13 | 14 | #ifndef _QEMU_BALLOON_H 15 | #define _QEMU_BALLOON_H 16 | 17 | #include "exec/cpu-defs.h" 18 | 19 | typedef ram_addr_t (QEMUBalloonEvent)(void *opaque, ram_addr_t target); 20 | 21 | void qemu_add_balloon_handler(QEMUBalloonEvent *func, void *opaque); 22 | 23 | void qemu_balloon(ram_addr_t target); 24 | 25 | ram_addr_t qemu_balloon_status(void); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /include/trace.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/include/trace.h -------------------------------------------------------------------------------- /memory-android.c: -------------------------------------------------------------------------------- 1 | #include "cpu.h" 2 | #include "exec/exec-all.h" 3 | #include "qemu/host-utils.h" 4 | 5 | uint64_t io_mem_read(int io_index, hwaddr addr, unsigned size) 6 | { 7 | return _io_mem_read[io_index][ctzl(size)](io_mem_opaque[io_index], 8 | addr); 9 | } 10 | 11 | void io_mem_write(int io_index, hwaddr addr, 12 | uint64_t val, unsigned size) 13 | { 14 | _io_mem_write[io_index][ctzl(size)](io_mem_opaque[io_index], 15 | addr, val); 16 | } 17 | -------------------------------------------------------------------------------- /pc-bios/keymaps/en-us: -------------------------------------------------------------------------------- 1 | # generated from XKB map us 2 | include common 3 | map 0x409 4 | exclam 0x02 shift 5 | at 0x03 shift 6 | numbersign 0x04 shift 7 | dollar 0x05 shift 8 | percent 0x06 shift 9 | asciicircum 0x07 shift 10 | ampersand 0x08 shift 11 | asterisk 0x09 shift 12 | parenleft 0x0a shift 13 | parenright 0x0b shift 14 | minus 0x0c 15 | underscore 0x0c shift 16 | equal 0x0d 17 | plus 0x0d shift 18 | bracketleft 0x1a 19 | braceleft 0x1a shift 20 | bracketright 0x1b 21 | braceright 0x1b shift 22 | semicolon 0x27 23 | colon 0x27 shift 24 | apostrophe 0x28 25 | quotedbl 0x28 shift 26 | grave 0x29 27 | asciitilde 0x29 shift 28 | backslash 0x2b 29 | bar 0x2b shift 30 | comma 0x33 31 | less 0x33 shift 32 | period 0x34 33 | greater 0x34 shift 34 | slash 0x35 35 | question 0x35 shift 36 | -------------------------------------------------------------------------------- /pc-bios/keymaps/fr-ca: -------------------------------------------------------------------------------- 1 | # Canadian French 2 | # By Simon Germain 3 | include common 4 | map 0xc0c 5 | 6 | backslash 0x29 altgr 7 | plusminus 0x2 altgr 8 | at 0x3 altgr 9 | sterling 0x4 altgr 10 | cent 0x5 altgr 11 | currency 0x6 altgr 12 | notsign 0x7 altgr 13 | bar 0x29 shift 14 | twosuperior 0x9 altgr 15 | threesuperior 0xa altgr 16 | onequarter 0xb altgr 17 | onehalf 0xc altgr 18 | threequarters 0xd altgr 19 | section 0x18 altgr 20 | paragraph 0x19 altgr 21 | bracketleft 0x1a altgr 22 | bracketright 0x1b altgr 23 | asciitilde 0x27 altgr 24 | braceleft 0x28 altgr 25 | braceright 0x2b altgr 26 | less 0x2b 27 | greater 0x2b shift 28 | guillemotleft 0x56 29 | guillemotright 0x56 shift 30 | degree 0x56 altgr 31 | mu 0x32 altgr 32 | eacute 0x35 33 | dead_acute 0x35 altgr 34 | dead_grave 0x28 35 | dead_circumflex 0x1a 36 | dead_circumflex 0x1a shift 37 | dead_cedilla 0x1b 38 | dead_diaeresis 0x1b shift 39 | exclam 0x2 shift 40 | quotedbl 0x3 shift 41 | slash 0x4 shift 42 | dollar 0x5 shift 43 | percent 0x6 shift 44 | question 0x7 shift 45 | ampersand 0x8 shift 46 | asterisk 0x9 shift 47 | parenleft 0xa shift 48 | parenright 0xb shift 49 | underscore 0xc shift 50 | plus 0xd shift 51 | -------------------------------------------------------------------------------- /pc-bios/keymaps/is: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/pc-bios/keymaps/is -------------------------------------------------------------------------------- /pc-bios/keymaps/modifiers: -------------------------------------------------------------------------------- 1 | Shift_R 0x36 2 | Shift_L 0x2a 3 | 4 | Alt_R 0xb8 5 | Mode_switch 0xb8 6 | ISO_Level3_Shift 0xb8 7 | Alt_L 0x38 8 | 9 | Control_R 0x9d 10 | Control_L 0x1d 11 | 12 | # Translate Super to Windows keys. 13 | # This is hardcoded. See documentation for details. 14 | Super_R 0xdc 15 | Super_L 0xdb 16 | 17 | # Translate Menu to the Windows Application key. 18 | Menu 0xdd 19 | -------------------------------------------------------------------------------- /pc-bios/keymaps/nl-be: -------------------------------------------------------------------------------- 1 | # Dutch (Belgium) 2 | map 0x813 3 | include common 4 | -------------------------------------------------------------------------------- /proxy/proxy_http.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2007-2008 The Android Open Source Project 2 | ** 3 | ** This software is licensed under the terms of the GNU General Public 4 | ** License version 2, as published by the Free Software Foundation, and 5 | ** may be copied, distributed, and modified under those terms. 6 | ** 7 | ** This program is distributed in the hope that it will be useful, 8 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | ** GNU General Public License for more details. 11 | */ 12 | #ifndef _PROXY_HTTP_H 13 | #define _PROXY_HTTP_H 14 | 15 | #include "proxy_common.h" 16 | 17 | extern int 18 | proxy_http_setup( const char* servername, 19 | int servernamelen, 20 | int serverport, 21 | int num_options, 22 | const ProxyOption* options ); 23 | 24 | #endif /* END */ 25 | -------------------------------------------------------------------------------- /scripts/ordereddict.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/scripts/ordereddict.pyc -------------------------------------------------------------------------------- /scripts/qapi.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/scripts/qapi.pyc -------------------------------------------------------------------------------- /slirp-android/ctl.h: -------------------------------------------------------------------------------- 1 | #define CTL_CMD 0 2 | #define CTL_EXEC 1 3 | #define CTL_ALIAS 2 4 | #define CTL_DNS 3 5 | /* NOTE: DNS_ADDR_MAX addresses, starting from CTL_DNS, are reserved */ 6 | 7 | #define CTL_IS_DNS(x) ((unsigned)((x)-CTL_DNS) < (unsigned)dns_addr_count) 8 | 9 | #define CTL_SPECIAL "10.0.2.0" 10 | #define CTL_LOCAL "10.0.2.15" 11 | -------------------------------------------------------------------------------- /slirp-android/sbuf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1995 Danny Gasparovski. 3 | * 4 | * Please read the file COPYRIGHT for the 5 | * terms and conditions of the copyright. 6 | */ 7 | 8 | #ifndef _SBUF_H_ 9 | #define _SBUF_H_ 10 | 11 | #define sbflush(sb) sbdrop((sb),(sb)->sb_cc) 12 | #define sbspace(sb) ((sb)->sb_datalen - (sb)->sb_cc) 13 | 14 | struct sbuf { 15 | u_int sb_cc; /* actual chars in buffer */ 16 | u_int sb_datalen; /* Length of data */ 17 | char *sb_wptr; /* write pointer. points to where the next 18 | * bytes should be written in the sbuf */ 19 | char *sb_rptr; /* read pointer. points to where the next 20 | * byte should be read from the sbuf */ 21 | char *sb_data; /* Actual data */ 22 | }; 23 | 24 | void sbfree _P((struct sbuf *)); 25 | void sbdrop _P((struct sbuf *, int)); 26 | void sbreserve _P((struct sbuf *, int)); 27 | void sbappend _P((struct socket *, struct mbuf *)); 28 | void sbcopy _P((struct sbuf *, int, int, char *)); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /slirp-android/tftp.h: -------------------------------------------------------------------------------- 1 | /* tftp defines */ 2 | 3 | #define TFTP_SESSIONS_MAX 3 4 | 5 | #define TFTP_SERVER 69 6 | 7 | #define TFTP_RRQ 1 8 | #define TFTP_WRQ 2 9 | #define TFTP_DATA 3 10 | #define TFTP_ACK 4 11 | #define TFTP_ERROR 5 12 | #define TFTP_OACK 6 13 | 14 | #define TFTP_FILENAME_MAX 512 15 | 16 | struct tftp_t { 17 | struct ip ip; 18 | struct udphdr udp; 19 | u_int16_t tp_op; 20 | union { 21 | struct { 22 | u_int16_t tp_block_nr; 23 | u_int8_t tp_buf[512]; 24 | } tp_data; 25 | struct { 26 | u_int16_t tp_error_code; 27 | u_int8_t tp_msg[512]; 28 | } tp_error; 29 | u_int8_t tp_buf[512 + 2]; 30 | } x; 31 | }; 32 | 33 | void tftp_input(struct mbuf *m); 34 | -------------------------------------------------------------------------------- /slirp/ctl.h: -------------------------------------------------------------------------------- 1 | #define CTL_CMD 0 2 | #define CTL_EXEC 1 3 | #define CTL_ALIAS 2 4 | #define CTL_DNS 3 5 | 6 | #define CTL_SPECIAL "10.0.2.0" 7 | #define CTL_LOCAL "10.0.2.15" 8 | -------------------------------------------------------------------------------- /slirp/sbuf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1995 Danny Gasparovski. 3 | * 4 | * Please read the file COPYRIGHT for the 5 | * terms and conditions of the copyright. 6 | */ 7 | 8 | #ifndef _SBUF_H_ 9 | #define _SBUF_H_ 10 | 11 | #define sbflush(sb) sbdrop((sb),(sb)->sb_cc) 12 | #define sbspace(sb) ((sb)->sb_datalen - (sb)->sb_cc) 13 | 14 | struct sbuf { 15 | u_int sb_cc; /* actual chars in buffer */ 16 | u_int sb_datalen; /* Length of data */ 17 | char *sb_wptr; /* write pointer. points to where the next 18 | * bytes should be written in the sbuf */ 19 | char *sb_rptr; /* read pointer. points to where the next 20 | * byte should be read from the sbuf */ 21 | char *sb_data; /* Actual data */ 22 | }; 23 | 24 | void sbfree _P((struct sbuf *)); 25 | void sbdrop _P((struct sbuf *, int)); 26 | void sbreserve _P((struct sbuf *, int)); 27 | void sbappend _P((struct socket *, struct mbuf *)); 28 | void sbcopy _P((struct sbuf *, int, int, char *)); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /slirp/tcp_subr.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aosp-mirror/platform_external_qemu/a7c579bdcbe2543472535718d3b637cb864f6f36/slirp/tcp_subr.c -------------------------------------------------------------------------------- /slirp/tftp.h: -------------------------------------------------------------------------------- 1 | /* tftp defines */ 2 | 3 | #define TFTP_SESSIONS_MAX 3 4 | 5 | #define TFTP_SERVER 69 6 | 7 | #define TFTP_RRQ 1 8 | #define TFTP_WRQ 2 9 | #define TFTP_DATA 3 10 | #define TFTP_ACK 4 11 | #define TFTP_ERROR 5 12 | #define TFTP_OACK 6 13 | 14 | #define TFTP_FILENAME_MAX 512 15 | 16 | struct tftp_t { 17 | struct ip ip; 18 | struct udphdr udp; 19 | u_int16_t tp_op; 20 | union { 21 | struct { 22 | u_int16_t tp_block_nr; 23 | u_int8_t tp_buf[512]; 24 | } tp_data; 25 | struct { 26 | u_int16_t tp_error_code; 27 | u_int8_t tp_msg[512]; 28 | } tp_error; 29 | u_int8_t tp_buf[512 + 2]; 30 | } x; 31 | }; 32 | 33 | void tftp_input(struct mbuf *m); 34 | -------------------------------------------------------------------------------- /target-arm/cpu-qom.h: -------------------------------------------------------------------------------- 1 | #ifndef QEMU_ARM_CPU_QOM_H 2 | #define QEMU_ARM_CPU_QOM_H 3 | 4 | #include "qemu/osdep.h" 5 | #include "qom/cpu.h" 6 | 7 | typedef struct ARMCPU { 8 | CPUState parent_obj; 9 | 10 | CPUARMState env; 11 | } ARMCPU; 12 | 13 | static inline ARMCPU *arm_env_get_cpu(CPUARMState *env) 14 | { 15 | return container_of(env, ARMCPU, env); 16 | } 17 | 18 | #define ENV_GET_CPU(e) CPU(arm_env_get_cpu(e)) 19 | #define ENV_OFFSET offsetof(ARMCPU, env) 20 | 21 | #endif // QEMU_ARM_CPU_QOM_H 22 | -------------------------------------------------------------------------------- /target-arm/qom-cpu.h: -------------------------------------------------------------------------------- 1 | #ifndef QEMU_ARM_CPU_QOM_H 2 | #define QEMU_ARM_CPU_QOM_H 3 | 4 | #include "qemu/osdep.h" 5 | #include "qom/cpu.h" 6 | 7 | typedef struct ARMCPU { 8 | CPUState parent_obj; 9 | 10 | CPUARMState env; 11 | }; 12 | 13 | static inline ARMCPU *arm_env_get_cpu(CPUARMState *env) 14 | { 15 | return container_of(env, ARMCPU, env); 16 | } 17 | 18 | #define ENV_GET_CPU(e) CPU(arm_env_get_cpu(e)) 19 | #define ENV_OFFSET offsetof(ARMCPU, env) 20 | 21 | #endif // QEMU_ARM_CPU_QOM_H 22 | -------------------------------------------------------------------------------- /target-i386/cpu-qom.h: -------------------------------------------------------------------------------- 1 | #ifndef QEMU_X86_CPU_QOM_H 2 | #define QEMU_X86_CPU_QOM_H 3 | 4 | #include "qemu/osdep.h" 5 | #include "qom/cpu.h" 6 | 7 | typedef struct X86CPU { 8 | CPUState parent_obj; 9 | 10 | CPUX86State env; 11 | } X86CPU; 12 | 13 | static inline X86CPU *x86_env_get_cpu(CPUX86State *env) 14 | { 15 | return container_of(env, X86CPU, env); 16 | } 17 | 18 | #define ENV_GET_CPU(e) CPU(x86_env_get_cpu(e)) 19 | #define ENV_OFFSET offsetof(X86CPU, env) 20 | 21 | #endif // QEMU_X86_CPU_QOM_H 22 | -------------------------------------------------------------------------------- /target-i386/kvm-gs-restore.h: -------------------------------------------------------------------------------- 1 | #ifndef _KVM_GS_RESTORE_H 2 | #define _KVM_GS_RESTORE_H 3 | 4 | #ifdef CONFIG_KVM_GS_RESTORE 5 | int no_gs_ioctl(int fd, int type, void *arg); 6 | int gs_base_post_run(void); 7 | int gs_base_pre_run(void); 8 | extern int gs_need_restore; 9 | #define KVM_GS_RESTORE_NO 0x2 10 | #endif 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /target-mips/cpu-qom.h: -------------------------------------------------------------------------------- 1 | #ifndef QEMU_MIPS_CPU_QOM_H 2 | #define QEMU_MIPS_CPU_QOM_H 3 | 4 | #include "qemu/osdep.h" 5 | #include "qom/cpu.h" 6 | 7 | typedef struct MIPSCPU { 8 | CPUState parent_obj; 9 | 10 | CPUMIPSState env; 11 | } MIPSCPU; 12 | 13 | 14 | static inline MIPSCPU *mips_env_get_cpu(CPUMIPSState *env) 15 | { 16 | return container_of(env, MIPSCPU, env); 17 | } 18 | 19 | #define ENV_GET_CPU(e) CPU(mips_env_get_cpu(e)) 20 | #define ENV_OFFSET offsetof(MIPSCPU, env) 21 | 22 | #endif // QEMU_MIPS_CPU_QOM_H 23 | -------------------------------------------------------------------------------- /tcg/LICENSE: -------------------------------------------------------------------------------- 1 | All the files in this directory and subdirectories are released under 2 | a BSD like license (see header in each file). No other license is 3 | accepted. 4 | -------------------------------------------------------------------------------- /tcg/TODO: -------------------------------------------------------------------------------- 1 | - Add new instructions such as: clz, ctz, popcnt. 2 | 3 | - See if it is worth exporting mul2, mulu2, div2, divu2. 4 | 5 | - Support of globals saved in fixed registers between TBs. 6 | 7 | Ideas: 8 | 9 | - Move the slow part of the qemu_ld/st ops after the end of the TB. 10 | 11 | - Change exception syntax to get closer to QOP system (exception 12 | parameters given with a specific instruction). 13 | 14 | - Add float and vector support. 15 | -------------------------------------------------------------------------------- /tcg/tcg-runtime.h: -------------------------------------------------------------------------------- 1 | #ifndef TCG_RUNTIME_H 2 | #define TCG_RUNTIME_H 3 | 4 | /* tcg-runtime.c */ 5 | int32_t tcg_helper_div_i32(int32_t arg1, int32_t arg2); 6 | int32_t tcg_helper_rem_i32(int32_t arg1, int32_t arg2); 7 | uint32_t tcg_helper_divu_i32(uint32_t arg1, uint32_t arg2); 8 | uint32_t tcg_helper_remu_i32(uint32_t arg1, uint32_t arg2); 9 | 10 | int64_t tcg_helper_shl_i64(int64_t arg1, int64_t arg2); 11 | int64_t tcg_helper_shr_i64(int64_t arg1, int64_t arg2); 12 | int64_t tcg_helper_sar_i64(int64_t arg1, int64_t arg2); 13 | int64_t tcg_helper_div_i64(int64_t arg1, int64_t arg2); 14 | int64_t tcg_helper_rem_i64(int64_t arg1, int64_t arg2); 15 | int64_t tcg_helper_mulsh_i64(int64_t arg1, int64_t arg2); 16 | uint64_t tcg_helper_divu_i64(uint64_t arg1, uint64_t arg2); 17 | uint64_t tcg_helper_remu_i64(uint64_t arg1, uint64_t arg2); 18 | uint64_t tcg_helper_muluh_i64(uint64_t arg1, uint64_t arg2); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /telephony/Jamfile: -------------------------------------------------------------------------------- 1 | Main telephony : telephony.c ; 2 | 3 | Library sysdeps : sysdeps_posix.c ; 4 | Library android_modem : android_modem.c sim_card.c ; 5 | 6 | for prog in test1 test2 { 7 | Main $(prog) : $(prog).c ; 8 | LinkLibraries $(prog) : sysdeps ; 9 | } 10 | 11 | Main simulator : simulator.c ; 12 | LinkLibraries simulator : sysdeps android_modem ; 13 | 14 | -------------------------------------------------------------------------------- /util/hexdump.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Helper to hexdump a buffer 3 | * 4 | * Copyright (c) 2013 Red Hat, Inc. 5 | * Copyright (c) 2013 Gerd Hoffmann 6 | * Copyright (c) 2013 Peter Crosthwaite 7 | * Copyright (c) 2013 Xilinx, Inc 8 | * 9 | * This work is licensed under the terms of the GNU GPL, version 2. See 10 | * the COPYING file in the top-level directory. 11 | * 12 | * Contributions after 2012-01-13 are licensed under the terms of the 13 | * GNU GPL, version 2 or (at your option) any later version. 14 | */ 15 | 16 | #include "qemu-common.h" 17 | 18 | void qemu_hexdump(const char *buf, FILE *fp, const char *prefix, size_t size) 19 | { 20 | unsigned int b; 21 | 22 | for (b = 0; b < size; b++) { 23 | if ((b % 16) == 0) { 24 | fprintf(fp, "%s: %04x:", prefix, b); 25 | } 26 | if ((b % 4) == 0) { 27 | fprintf(fp, " "); 28 | } 29 | fprintf(fp, " %02x", (unsigned char)buf[b]); 30 | if ((b % 16) == 15) { 31 | fprintf(fp, "\n"); 32 | } 33 | } 34 | if ((b % 16) != 0) { 35 | fprintf(fp, "\n"); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /util/yield-android.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #ifdef _WIN32 4 | #include 5 | #else 6 | #include 7 | #endif 8 | 9 | // Wait until file descriptor |fd| becomes readable. 10 | void yield_until_fd_readable(int fd) { 11 | for (;;) { 12 | fd_set read_fds; 13 | FD_ZERO(&read_fds); 14 | FD_SET(fd, &read_fds); 15 | int ret = select(fd + 1, &read_fds, NULL, NULL, NULL); 16 | if (ret == 1 || (ret < 0 && errno != -EINTR)) 17 | return; 18 | } 19 | } 20 | 21 | --------------------------------------------------------------------------------