以生产OpenGL图形创建虚拟硬件,内核,QEMU的Andr​​oid模拟器 [英] Create virtual hardware, kernel, qemu for Android Emulator in order to produce OpenGL graphics

查看:310
本文介绍了以生产OpenGL图形创建虚拟硬件,内核,QEMU的Andr​​oid模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的Andr​​oid,并希望玩的模拟器。

I am new to android and wish to play around with the emulator.

我想要做的是创造我自己的一片,能够收集OpenGL命令,并产生OpenGL图形虚拟硬件。
有人告诉我,为了做到这一点,我将需要编写一个Linux的籽粒驱动程序,以便能够与硬件进行通信。此外,我需要编写一个Android用户空间库调用籽粒驱动程序。

What I want to do is to create my own piece of virtual hardware that can collect OpenGL commands and produce OpenGL graphics. I have been told that in order to do this I will need to write a linux kernal driver to enable communication with the hardware. Additionally, I will need to write an Android user space library to call the kernal driver.

要开始我打算做一个非常简单的硬件,只有做的,比如说1或2,命令。

To start with I plan on making a very simple piece of hardware that only does, say 1 or 2, commands.

有没有人在这里完成这样的事?如果是这样,你有什么提示或可能联系到额外的信息?
任何反馈将是AP preciated。

Has anyone here done something like this? If so, do you have any tips or possible links to extra information? Any feedback would be appreciated.

推荐答案

编写硬件仿真是一个棘手的任务,绝非易事。所以,如果你真的想这样做,我不是从头开始。在你的情况我会先用一些简单的开始(因为许多图书馆都已经在客户机和主机侧的地方):实现通过QEMU普通Linux上的OpenGL直通。怎样才能:

Writing a hardware emulation is a tricky task and by no means easy. So if you really want to do this, I'd not start from scratch. In your case I'd first start with some simpler (because many of the libraries are already in place on guest and the host side): Implementing a OpenGL passthrough for ordinary Linux through qemu. What does it take:

首先,添加一些虚拟GPU到QEMU的,其中还涉及补充说,使用OpenGL一个新的图形输出模块(到目前为止QEMU使用SDL)。接下来创建Linux内核DRI / DRM驱动程序,这将在来宾运行(Android使用自己的图形系统,但对于学习DRI / DRM是罚款),以及在梅萨。在主机端,您必须从翻译QEMU出现什么在OpenGL调用。由于主机端GPU是做所有的辛勤工作的DRI / DRM部分将是相当小,只是建立一个多桥。

First you add some virtual GPU into qemu, which also involves adding a new graphics output module that uses OpenGL (so far qemu uses SDL). Next you create DRI/DRM drivers in the Linux kernel, that will run on the guest (Android uses its own graphics system, but for learning DRI/DRM are fine), as well as in Mesa. On the host side you must translate what comes from qemu in OpenGL calls. Since the host side GPU is doing all the hard work your DRI/DRM part will be quite minimal and just build a brigde.

这篇关于以生产OpenGL图形创建虚拟硬件,内核,QEMU的Andr​​oid模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆