[Mesa-dev] [PATCH] Android: move libraries to /vendor
Rob Herring
robh at kernel.org
Tue Sep 19 21:57:27 UTC 2017
As part of Treble project in Android O, all the device specific files have
to be located in a separate vendor partition. This is done by setting
LOCAL_PROPRIETARY_MODULE (the name is misleading). This change will not
break existing platforms without a vendor partition as it will just move
files to /system/vendor.
Signed-off-by: Rob Herring <robh at kernel.org>
---
Testing on prior Android versions would be appreciated. I don't think
there should be any issues as /vendor has been supported for some time.
Android.common.mk | 4 ++--
src/egl/Android.mk | 1 +
src/gallium/targets/dri/Android.mk | 1 +
src/gbm/Android.mk | 1 +
src/intel/Android.vulkan.mk | 1 +
src/mapi/Android.mk | 1 +
src/mesa/drivers/dri/i915/Android.mk | 1 +
src/mesa/drivers/dri/i965/Android.mk | 1 +
8 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/Android.common.mk b/Android.common.mk
index 6f70dd94a1f5..f5c0dc396fdd 100644
--- a/Android.common.mk
+++ b/Android.common.mk
@@ -101,8 +101,8 @@ LOCAL_CFLAGS += -DHAVE_LIBDRM
LOCAL_SHARED_LIBRARIES += libdrm
endif
-LOCAL_CFLAGS_32 += -DDEFAULT_DRIVER_DIR=\"/system/lib/$(MESA_DRI_MODULE_REL_PATH)\"
-LOCAL_CFLAGS_64 += -DDEFAULT_DRIVER_DIR=\"/system/lib64/$(MESA_DRI_MODULE_REL_PATH)\"
+LOCAL_CFLAGS_32 += -DDEFAULT_DRIVER_DIR=\"/vendor/lib/$(MESA_DRI_MODULE_REL_PATH)\"
+LOCAL_CFLAGS_64 += -DDEFAULT_DRIVER_DIR=\"/vendor/lib64/$(MESA_DRI_MODULE_REL_PATH)\"
# uncomment to keep the debug symbols
#LOCAL_STRIP_MODULE := false
diff --git a/src/egl/Android.mk b/src/egl/Android.mk
index 00553226773e..a7b3d3efec1d 100644
--- a/src/egl/Android.mk
+++ b/src/egl/Android.mk
@@ -69,6 +69,7 @@ ifneq ($(MESA_BUILD_GALLIUM),)
LOCAL_REQUIRED_MODULES += gallium_dri
endif
+LOCAL_PROPRIETARY_MODULE := true
LOCAL_MODULE := libGLES_mesa
LOCAL_MODULE_RELATIVE_PATH := egl
diff --git a/src/gallium/targets/dri/Android.mk b/src/gallium/targets/dri/Android.mk
index 150b2e368e51..0edf3f342403 100644
--- a/src/gallium/targets/dri/Android.mk
+++ b/src/gallium/targets/dri/Android.mk
@@ -25,6 +25,7 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+LOCAL_PROPRIETARY_MODULE := true
LOCAL_MODULE := gallium_dri
LOCAL_MODULE_RELATIVE_PATH := $(MESA_DRI_MODULE_REL_PATH)
diff --git a/src/gbm/Android.mk b/src/gbm/Android.mk
index a3f8fbbeabce..1e727e8e4787 100644
--- a/src/gbm/Android.mk
+++ b/src/gbm/Android.mk
@@ -33,6 +33,7 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/main
LOCAL_STATIC_LIBRARIES := libmesa_loader
+LOCAL_PROPRIETARY_MODULE := true
LOCAL_MODULE := libgbm
LOCAL_SRC_FILES := \
diff --git a/src/intel/Android.vulkan.mk b/src/intel/Android.vulkan.mk
index 17ae4b071b3a..c0417d9374ed 100644
--- a/src/intel/Android.vulkan.mk
+++ b/src/intel/Android.vulkan.mk
@@ -236,6 +236,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := libvulkan_intel
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_PROPRIETARY_MODULE := true
LOCAL_LDFLAGS += -Wl,--build-id=sha1
diff --git a/src/mapi/Android.mk b/src/mapi/Android.mk
index 552bab69625b..ce34be62bae4 100644
--- a/src/mapi/Android.mk
+++ b/src/mapi/Android.mk
@@ -51,6 +51,7 @@ LOCAL_C_INCLUDES := \
$(MESA_TOP)/src/mapi
LOCAL_MODULE := libglapi
+LOCAL_PROPRIETARY_MODULE := true
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
intermediates := $(call local-generated-sources-dir)
diff --git a/src/mesa/drivers/dri/i915/Android.mk b/src/mesa/drivers/dri/i915/Android.mk
index 62d388e08df5..60ef6e696e82 100644
--- a/src/mesa/drivers/dri/i915/Android.mk
+++ b/src/mesa/drivers/dri/i915/Android.mk
@@ -25,6 +25,7 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+LOCAL_PROPRIETARY_MODULE := true
LOCAL_MODULE := i915_dri
LOCAL_MODULE_RELATIVE_PATH := $(MESA_DRI_MODULE_REL_PATH)
diff --git a/src/mesa/drivers/dri/i965/Android.mk b/src/mesa/drivers/dri/i965/Android.mk
index d75ffb138130..77a2a2ade8b9 100644
--- a/src/mesa/drivers/dri/i965/Android.mk
+++ b/src/mesa/drivers/dri/i965/Android.mk
@@ -278,6 +278,7 @@ LOCAL_GENERATED_SOURCES := \
$(MESA_DRI_OPTIONS_H) \
$(MESA_GEN_NIR_H)
+LOCAL_PROPRIETARY_MODULE := true
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
intermediates := $(call local-generated-sources-dir)
--
2.11.0
More information about the mesa-dev
mailing list