[Mesa-dev] [PATCH 00/15] i965, mesa, glapi: Build libi965_dri on Android

Chia-I Wu olvaffe at gmail.com
Thu Aug 4 11:25:46 PDT 2011


Hi Chad,

On Thu, Aug 4, 2011 at 6:47 PM, Chad Versace <chad at chad-versace.us> wrote:
> This is the first step in porting i965 to Android, initially to Gingerbread.
> Android is ubiquituous now, and the platform's importance can't be denied. The
> Intel drivers really should support it.
>
> The series first builds libglapi, then libmesa, and then libi965_dri.
> lib965_dri doens't work yet; it doesn't even link to libdrm. This is just the
> initial work to get it to build.
>
> I'm aware that this may be controversial, so I've attempted to integrate the
> Android makefiles as non-disruptively as possible.
>  - The Android makefiles attempt to duplicate as little as possible from the
>    existing makefiles. In one case, this dictated that some Makefile code be
>    extracted into a shared makefile.
>  - I've avoided modifying the existsing makefiles except when absolutely
>    necessary. When a modification or cleanup was necessary, I have attempted
>    to keep the changes minimal and do them incrementally.
>  - The locations of the Android makefiles mirror those of the existing
>    makefiles.
>
> The series does not break the Linux i965 build. I doubt it breaks other
> drivers' builds, but I haven't tested it. If you want me to check that it
> doesn't break your build, just let me know the autoconf options.
>
> The series lives on my android-gingerbread-i965 branch. If you'd like to try
> the Android build yourself, you should pull from my personal Android manifest
> [1], which closely mirrors android-x86, and set `BOARD_USES_I965 := true` in
> buildspeck.mk.
>
> [1] repo init -u git://anongit.freedesktop.git/~chadversary/android.manifeset.git -b gingerbread-i965
Thanks for bringing this up and working on it.  Before commenting on
the changes to Mesa, I'd like to talk a little bit about the external
dependencies.

To have a working build of Mesa for the Android Gingerbread source
tree, these external changes are needed

 1) modify Android's init (pid 1) to create DRI device nodes under /dev
 2) make off_t 64-bit so that mmap() a GEM object works
 3) figure out how to authenticate a DRM fd
 4) add libdrm to Android source tree
 5) add drm_gralloc (the DDX driver, sort of) to Android source tree

There may be more that I cannot recall now.

Of these changes, only 3), 4), and 5) affect how Mesa is built.
It is safe to assume 4) and 5) are already there, as we have
good relationship with those projects.  But how to solve 3) is still
an open question.

We can either spend several months discussing 3) with the Android team
before landing Android support to Mesa.  Or we can assume it is
solved, land the Android support for Mesa probably over the next few
weeks, and initiate the discussion with the Android team with
something concrete.  Now that we are at this, my preference is the
latter.

Back to your changes.  I am fine with landing your version and is
willing to help review them, proivided your work won't stop after
i915/i965 is supported.  Otherwise, I prefer to prepare my version[1]
for upstreaming, which can build all actively maintained drivers
including Gallium ones.  It would also be really great you can help,
and suppose the list is fine with yet another build system for Mesa.

[1] http://cgit.freedesktop.org/~olv/mesa/log/?h=android-gingerbread-7.11

> Chad Versace (15):
>  mesa: Add toplevel Android.mk
>  glapi: Build libmesa_glapi on Android
>  mesa/sources.mak: Convert all variables to be simply-expanded
>  mesa/sources.mak: Cleanup include paths for Android
>  mesa/sources.mak: Change handling of lex and yacc files for Android
>  main: Remove problematic #include on Android
>  main: Add -o option to es_generator.py
>  mesa: Build libmesa_main for Android
>  dri/Makefile.defines: Remove non-existent dir from include paths
>  dri/Makefile.defines: Convert all variables to be simply-expanded
>  dri/Makefile.defines: Only add -Iserver to includes if the dir exists
>  dri/Makefile.defines: Cleanup filepaths for Android
>  i965: New file sources.mk
>  i965: Include sources.mk in Makefile
>  i965: Build libi965_dri on Android
>
>  Android.mk                            |   68 +++++++++++++++++++
>  android/mesa_local_vars.mk            |   32 +++++++++
>  src/Android.mk                        |    1 +
>  src/mapi/Android.mk                   |    1 +
>  src/mapi/shared-glapi/Android.mk      |   95 ++++++++++++++++++++++++++
>  src/mesa/Android.mk                   |   63 +++++++++++++++++
>  src/mesa/drivers/Android.mk           |    1 +
>  src/mesa/drivers/dri/Android.mk       |   33 +++++++++
>  src/mesa/drivers/dri/Makefile.defines |   61 ++++++++++-------
>  src/mesa/drivers/dri/Makefile.targets |    5 ++
>  src/mesa/drivers/dri/i965/Android.mk  |   61 +++++++++++++++++
>  src/mesa/drivers/dri/i965/Makefile    |  119 +--------------------------------
>  src/mesa/drivers/dri/i965/sources.mk  |  115 +++++++++++++++++++++++++++++++
>  src/mesa/main/compiler.h              |    2 +-
>  src/mesa/main/es_generator.py         |   10 +++-
>  src/mesa/sources.mak                  |   87 ++++++++++++++----------
>  16 files changed, 576 insertions(+), 178 deletions(-)
>  create mode 100644 Android.mk
>  create mode 100644 android/mesa_local_vars.mk
>  create mode 100644 src/Android.mk
>  create mode 100644 src/mapi/Android.mk
>  create mode 100644 src/mapi/shared-glapi/Android.mk
>  create mode 100644 src/mesa/Android.mk
>  create mode 100644 src/mesa/drivers/Android.mk
>  create mode 100644 src/mesa/drivers/dri/Android.mk
>  create mode 100644 src/mesa/drivers/dri/i965/Android.mk
>  create mode 100644 src/mesa/drivers/dri/i965/sources.mk
>
> --
> 1.7.6
>
>



-- 
olv at LunarG.com


More information about the mesa-dev mailing list