Android-x86
Fork

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-libdrm: コミット

external/libdrm


コミットメタ情報

リビジョン3f5fd81807754b07156bf644edba6f8f9dcef15e (tree)
日時2018-06-14 19:03:18
作者Jiyong Park <jiyong@goog...>
コミッターChih-Wei Huang

ログメッセージ

android: make libdrm*.so available to the vendor partition

libdrm_<vendor>.so are moved to the vendor partition (/vendor/lib or
/system/vendor/lib if there is no dedicated vendor partition), since
they are vendor-specific extension that must not be in the system
partition which should be generic.

libdrm.so (which is generic) is built/installed twice: once to
/vendor/lib to satisfy the dependency for the libdrm_<vendor>.so libs
and once to /system/lib for platform clients such as the recovery
executable.

The platform variant of libdrm is named as libdrm_platform.so since
in Android.mk we can't have two different shared libs having
same soname. In the near future, this will be fixed by converting these
Android.mk files to Android.bp and mark the module libdrm as
'vendor_available: true'. (See
https://android-review.googlesource.com/c/368372/ for further detail on
the property)

Signed-off-by: Jiyong Park <jiyong@google.com>

変更サマリ

差分

--- a/Android.common.mk
+++ b/Android.common.mk
@@ -14,5 +14,3 @@ LOCAL_CFLAGS += \
1414 # Quiet down the build system and remove any .h files from the sources
1515 LOCAL_SRC_FILES := $(patsubst %.h, , $(LOCAL_SRC_FILES))
1616 LOCAL_EXPORT_C_INCLUDE_DIRS += $(LOCAL_PATH)
17-
18-LOCAL_PROPRIETARY_MODULE := true
--- a/Android.mk
+++ b/Android.mk
@@ -21,6 +21,10 @@
2121 # IN THE SOFTWARE.
2222 #
2323
24+# Two identical libs are defined here.
25+# libdrm: for vendors. installed to /vendor/lib. libdrm_<vendor> uses this.
26+# libdrm_platform: for platform modules (such as libminui). installed to /system/lib
27+
2428 LIBDRM_COMMON_MK := $(call my-dir)/Android.common.mk
2529
2630 LOCAL_PATH := $(call my-dir)
@@ -33,7 +37,41 @@ include $(LOCAL_PATH)/Makefile.sources
3337
3438 #static library for the device (recovery)
3539 include $(CLEAR_VARS)
40+
41+LOCAL_MODULE := libdrm_platform
42+
43+LOCAL_SRC_FILES := $(LIBDRM_FILES)
44+LOCAL_EXPORT_C_INCLUDE_DIRS := \
45+ $(LOCAL_PATH) \
46+ $(LOCAL_PATH)/include/drm
47+
48+LOCAL_C_INCLUDES := \
49+ $(LOCAL_PATH)/include/drm
50+
51+include $(LIBDRM_COMMON_MK)
52+include $(BUILD_STATIC_LIBRARY)
53+
54+# Dynamic library for the device
55+include $(CLEAR_VARS)
56+
57+LOCAL_MODULE := libdrm_platform
58+
59+LOCAL_SRC_FILES := $(LIBDRM_FILES)
60+LOCAL_EXPORT_C_INCLUDE_DIRS := \
61+ $(LOCAL_PATH) \
62+ $(LOCAL_PATH)/include/drm
63+
64+LOCAL_C_INCLUDES := \
65+ $(LOCAL_PATH)/include/drm
66+
67+include $(LIBDRM_COMMON_MK)
68+include $(BUILD_SHARED_LIBRARY)
69+
70+# Static library for the device (recovery)
71+include $(CLEAR_VARS)
72+
3673 LOCAL_MODULE := libdrm
74+LOCAL_VENDOR_MODULE := true
3775
3876 LOCAL_SRC_FILES := $(LIBDRM_FILES)
3977 LOCAL_EXPORT_C_INCLUDE_DIRS := \
@@ -50,6 +88,7 @@ include $(BUILD_STATIC_LIBRARY)
5088 # Shared library for the device
5189 include $(CLEAR_VARS)
5290 LOCAL_MODULE := libdrm
91+LOCAL_VENDOR_MODULE := true
5392
5493 LOCAL_SRC_FILES := $(LIBDRM_FILES)
5594 LOCAL_EXPORT_C_INCLUDE_DIRS := \
--- a/amdgpu/Android.mk
+++ b/amdgpu/Android.mk
@@ -5,7 +5,7 @@ include $(CLEAR_VARS)
55 include $(LOCAL_PATH)/Makefile.sources
66
77 LOCAL_MODULE := libdrm_amdgpu
8-
8+LOCAL_VENDOR_MODULE := true
99 LOCAL_SHARED_LIBRARIES := libdrm
1010
1111 LOCAL_SRC_FILES := $(LIBDRM_AMDGPU_FILES)
--- a/etnaviv/Android.mk
+++ b/etnaviv/Android.mk
@@ -5,6 +5,7 @@ include $(CLEAR_VARS)
55 include $(LOCAL_PATH)/Makefile.sources
66
77 LOCAL_MODULE := libdrm_etnaviv
8+LOCAL_VENDOR_MODULE := true
89
910 LOCAL_SHARED_LIBRARIES := libdrm
1011
--- a/freedreno/Android.mk
+++ b/freedreno/Android.mk
@@ -5,7 +5,7 @@ include $(CLEAR_VARS)
55 include $(LOCAL_PATH)/Makefile.sources
66
77 LOCAL_MODULE := libdrm_freedreno
8-
8+LOCAL_VENDOR_MODULE := true
99 LOCAL_SHARED_LIBRARIES := libdrm
1010
1111 LOCAL_SRC_FILES := $(LIBDRM_FREEDRENO_FILES)
--- a/intel/Android.mk
+++ b/intel/Android.mk
@@ -28,6 +28,7 @@ include $(CLEAR_VARS)
2828 include $(LOCAL_PATH)/Makefile.sources
2929
3030 LOCAL_MODULE := libdrm_intel
31+LOCAL_VENDOR_MODULE := true
3132
3233 LOCAL_SRC_FILES := $(LIBDRM_INTEL_FILES)
3334
--- a/libkms/Android.mk
+++ b/libkms/Android.mk
@@ -45,6 +45,7 @@ LOCAL_SRC_FILES += $(LIBKMS_RADEON_FILES)
4545 endif
4646
4747 LOCAL_MODULE := libkms
48+LOCAL_VENDOR_MODULE := true
4849 LOCAL_SHARED_LIBRARIES := libdrm
4950
5051 include $(LIBDRM_COMMON_MK)
--- a/nouveau/Android.mk
+++ b/nouveau/Android.mk
@@ -5,6 +5,7 @@ include $(CLEAR_VARS)
55 include $(LOCAL_PATH)/Makefile.sources
66
77 LOCAL_MODULE := libdrm_nouveau
8+LOCAL_VENDOR_MODULE := true
89
910 LOCAL_SHARED_LIBRARIES := libdrm
1011
--- a/radeon/Android.mk
+++ b/radeon/Android.mk
@@ -5,6 +5,7 @@ include $(CLEAR_VARS)
55 include $(LOCAL_PATH)/Makefile.sources
66
77 LOCAL_MODULE := libdrm_radeon
8+LOCAL_VENDOR_MODULE := true
89
910 LOCAL_SHARED_LIBRARIES := libdrm
1011
--- a/tests/modetest/Android.mk
+++ b/tests/modetest/Android.mk
@@ -7,7 +7,7 @@ LOCAL_SRC_FILES := $(MODETEST_FILES)
77
88 LOCAL_MODULE := modetest
99
10-LOCAL_SHARED_LIBRARIES := libdrm
10+LOCAL_SHARED_LIBRARIES := libdrm_platform
1111 LOCAL_STATIC_LIBRARIES := libdrm_util
1212
1313 include $(LIBDRM_COMMON_MK)
--- a/tests/proptest/Android.mk
+++ b/tests/proptest/Android.mk
@@ -7,7 +7,7 @@ LOCAL_SRC_FILES := $(PROPTEST_FILES)
77
88 LOCAL_MODULE := proptest
99
10-LOCAL_SHARED_LIBRARIES := libdrm
10+LOCAL_SHARED_LIBRARIES := libdrm_platform
1111 LOCAL_STATIC_LIBRARIES := libdrm_util
1212
1313 include $(LIBDRM_COMMON_MK)
--- a/tests/util/Android.mk
+++ b/tests/util/Android.mk
@@ -28,7 +28,7 @@ include $(LOCAL_PATH)/Makefile.sources
2828
2929 LOCAL_MODULE := libdrm_util
3030
31-LOCAL_SHARED_LIBRARIES := libdrm
31+LOCAL_SHARED_LIBRARIES := libdrm_platform
3232
3333 LOCAL_SRC_FILES := $(UTIL_FILES)
3434
旧リポジトリブラウザで表示