Hello,<br>To demonstrate Android on wayland, I attach a picture with weston running on STE Snowball board (ARM PCU + Mali GPU) current git version with some specific modifications. Weston uses the framebuffer compositor (fbdev). Weston is build with Linaro toolchain and the glibc corresponding.<br>
Inside the window, Android Plasma uses JellyBean framework (bionic, surfaceflinger, ...). SurfaceFlinger is a client of wayland.<br>Regards,<br>Marc Chalain.<br><br><div class="gmail_quote">2013/7/15 mchalain [<a href="mailto:marc.chalain@gmail.com">marc.chalain@gmail.com</a>] <span dir="ltr"><<a href="mailto:marc.chalain@gmail.com" target="_blank">marc.chalain@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: mchalain <<a href="mailto:marc.chalain@gmail.com">marc.chalain@gmail.com</a>><br>
<br>
The Wayland directory has to be inside "external" directory of Android tree.<br>
On some old Android bionic version wayland needs an extra support for timerfd_create and signalfd. To pass this problem, I develop a "libglibcpatches" which implement this syscalls. You will can find this library on github repository. But this syscalls exist on the last version of bionic.<br>

The libwayland_client allows to develop a FrameBuffer client for SurfaceFlinger of Android and to run Android over weston or other Wayland server.<br>
The libwayland_server should allows to develop a compositor over SurfaceFlinger, but I never try.<br>
---<br>
 Android.mk |  127 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br>
 1 file changed, 127 insertions(+)<br>
 create mode 100644 Android.mk<br>
<br>
diff --git a/Android.mk b/Android.mk<br>
new file mode 100644<br>
index 0000000..bd13692<br>
--- /dev/null<br>
+++ b/Android.mk<br>
@@ -0,0 +1,127 @@<br>
+# Copyright (C) 2009 The Android Open Source Project<br>
+#<br>
+# Licensed under the Apache License, Version 2.0 (the "License");<br>
+# you may not use this file except in compliance with the License.<br>
+# You may obtain a copy of the License at<br>
+#<br>
+#      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">http://www.apache.org/licenses/LICENSE-2.0</a><br>
+#<br>
+# Unless required by applicable law or agreed to in writing, software<br>
+# distributed under the License is distributed on an "AS IS" BASIS,<br>
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br>
+# See the License for the specific language governing permissions and<br>
+# limitations under the License.<br>
+#<br>
+<br>
+# the purpose of this sample is to demonstrate how one can<br>
+# generate two distinct shared libraries and have them both<br>
+# uploaded in<br>
+#<br>
+<br>
+LOCAL_PATH:= $(call my-dir)<br>
+<br>
+topdir=external<br>
+ifneq ($(HAVE_SIGNALFD),y)<br>
+GLIBCPATCHES_INCLUDES=$(topdir)/glibcpatches/include<br>
+GLIBCPATCHES_LIBS=libglibcpatches<br>
+endif<br>
+ifeq ($(HAVE_RT),y)<br>
+RT=-lrt<br>
+endif<br>
+<br>
+# scanner, which compile protocol from xml file<br>
+#<br>
+include $(CLEAR_VARS)<br>
+<br>
+wayland_scanner = wayland-scanner<br>
+LOCAL_MODULE    := $(wayland_scanner)<br>
+LOCAL_MODULE_TAGS := optional<br>
+LOCAL_SRC_FILES :=             \<br>
+       src/wayland-util.c \<br>
+       src/scanner.c<br>
+LOCAL_SHARED_LIBRARIES := libexpat<br>
+LOCAL_C_INCLUDES := $(topdir)/expat/lib<br>
+<br>
+include $(BUILD_HOST_EXECUTABLE)<br>
+<br>
+# util lib, which will be built statically<br>
+#<br>
+include $(CLEAR_VARS)<br>
+<br>
+LOCAL_MODULE    := libwayland-util<br>
+LOCAL_MODULE_TAGS := optional<br>
+LOCAL_SRC_FILES :=                             \<br>
+       src/connection.c                                \<br>
+       src/wayland-util.c                              \<br>
+       src/wayland-os.c<br>
+LOCAL_C_INCLUDES :=            \<br>
+                       $(topdir)/libffi/$(ffi_os)-$(ffi_arch) \<br>
+                       $(LOCAL_PATH)/src \<br>
+                       $(GLIBCPATCHES_INCLUDES)<br>
+LOCAL_SHARED_LIBRARIES := libffi $(GLIBCPATCHES_LIBS)<br>
+include $(BUILD_STATIC_LIBRARY)<br>
+<br>
+# server lib, which will depend on and include the util<br>
+#<br>
+include $(CLEAR_VARS)<br>
+<br>
+LOCAL_MODULE    := libwayland_server<br>
+LOCAL_MODULE_TAGS := optional<br>
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES<br>
+LOCAL_SRC_FILES :=                     \<br>
+       src/wayland-protocol.c                  \<br>
+       src/wayland-server-protocol.h   \<br>
+       src/wayland-server.c                    \<br>
+       src/wayland-shm.c                               \<br>
+       src/data-device.c                               \<br>
+       src/event-loop.c<br>
+LOCAL_CFLAGS := -I$(LOCAL_PATH)<br>
+LOCAL_LDLIBS    += $(RT) -lm<br>
+#LOCAL_LDFLAGS = \<br>
+#      -Wl,-version-info,$(wayland_major):$(wayland_minor):$(wayland_micro)<br>
+LOCAL_C_INCLUDES :=                    \<br>
+                       $(topdir)/libffi/$(ffi_os)-$(ffi_arch) \<br>
+                       $(LOCAL_PATH)/src \<br>
+                       $(GLIBCPATCHES_INCLUDES)<br>
+LOCAL_STATIC_LIBRARIES := libwayland-util<br>
+LOCAL_SHARED_LIBRARIES := libffi $(GLIBCPATCHES_LIBS)<br>
+<br>
+include $(BUILD_SHARED_LIBRARY)<br>
+<br>
+# client lib, which will depend on and include the util<br>
+#<br>
+include $(CLEAR_VARS)<br>
+<br>
+LOCAL_MODULE    := libwayland_client<br>
+LOCAL_MODULE_TAGS := optional<br>
+LOCAL_SRC_FILES :=             \<br>
+       src/wayland-protocol.c                  \<br>
+       src/wayland-client-protocol.h   \<br>
+       src/wayland-client.c<br>
+LOCAL_LDLIBS    += $(RT) -lm<br>
+#LOCAL_LDFLAGS = \<br>
+#      -Wl,-version-info,$(wayland_major):$(wayland_minor):$(wayland_micro)<br>
+LOCAL_STATIC_LIBRARIES := libwayland-util<br>
+LOCAL_SHARED_LIBRARIES := libffi $(GLIBCPATCHES_LIBS)<br>
+<br>
+include $(BUILD_SHARED_LIBRARY)<br>
+<br>
+$(BUILD_SOURCES): $(wayland_scanner)<br>
+$(LOCAL_PATH)/src/wayland-version.h:$(LOCAL_PATH)/src/<a href="http://wayland-version.h.in" target="_blank">wayland-version.h.in</a><br>
+       sed "s/@WAYLAND_VERSION_MAJOR@/$(wayland_major)/" $< > $@<br>
+       sed -i "s/@WAYLAND_VERSION_MINOR@/$(wayland_minor)/" $@<br>
+       sed -i "s/@WAYLAND_VERSION_MICRO@/$(wayland_micro)/" $@<br>
+       sed -i "s/@WAYLAND_VERSION@/$(wayland_version)/" $@<br>
+$(LOCAL_PATH)/src/%-client-protocol.h: $(LOCAL_PATH)/protocol/%.xml<br>
+       $(wayland_scanner) client-header < $< > $@<br>
+$(LOCAL_PATH)/src/%-server-protocol.h: $(LOCAL_PATH)/protocol/%.xml<br>
+       $(wayland_scanner) server-header < $< > $@<br>
+$(LOCAL_PATH)/src/%-protocol.c: $(LOCAL_PATH)/protocol/%.xml \<br>
+                                                       $(LOCAL_PATH)/src/%-server-protocol.h \<br>
+                                                       $(LOCAL_PATH)/src/%-client-protocol.h \<br>
+                                                       $(LOCAL_PATH)/src/wayland-version.h<br>
+       $(wayland_scanner) code < $< > $@<br>
+<br>
+BUILT_SOURCES =        $(addprefix $(LOCAL_PATH)/src/, \<br>
+       wayland-protocol.c \<br>
+       )<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.9.5<br>
<br>
</font></span></blockquote></div><br>